View Issue Details

IDProjectCategoryView StatusLast Update
0002585OpenFOAMBugpublic2018-07-10 11:17
ReporterStephanG Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSGNU/Linux Ununtu 16.04OS Version14.04
Product Versiondev 
Fixed in Versiondev 
Summary0002585: U Residuals in chtMultiRegionSimpleFoam
DescriptionWhen running a chtMultiRegionSimpleFoam simulation in openfoam-dev the residuals for Ux Uy and Uz do not show up in the log file. The residual function object also does not pick them up. The solution and chtMultiRegionFoam are not affected. I suppose this is either a problem with my setup or stems from the recent addition of residualControl.
Steps To ReproduceRunning one of the tutorial cases and checking the log file.
TagsNo tags attached.

Activities

wyldckat

2017-06-25 00:21

updater  

proposition_v1.patch (2,474 bytes)   
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H
index 6fe538d..d1893a8 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H
@@ -17,7 +17,6 @@ List<scalar> pRefValueFluid(fluidRegions.size(), 0.0);
 List<bool> frozenFlowFluid(fluidRegions.size(), false);
 List<bool> residualReachedFluid(fluidRegions.size(), true);
 List<bool> residualControlUsedFluid(fluidRegions.size(), false);
-List<bool> momentumPredictorFluid(fluidRegions.size(), false);
 
 PtrList<dimensionedScalar> rhoMax(fluidRegions.size());
 PtrList<dimensionedScalar> rhoMin(fluidRegions.size());
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/readFluidMultiRegionSIMPLEControls.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/readFluidMultiRegionSIMPLEControls.H
index 66fd738..1472397 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/readFluidMultiRegionSIMPLEControls.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/readFluidMultiRegionSIMPLEControls.H
@@ -2,3 +2,6 @@
 
     const int nNonOrthCorr =
         simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
+
+    const bool momentumPredictor =
+        simple.lookupOrDefault("momentumPredictor", true);
\ No newline at end of file
diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H
index 92c8eec..709ce79 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H
@@ -34,7 +34,5 @@
     const volScalarField& gh = ghFluid[i];
     const surfaceScalarField& ghf = ghfFluid[i];
 
-    const bool momentumPredictor = momentumPredictorFluid[i];
-
     bool& resReachedFluid = residualReachedFluid[i];
     bool& residualControlUsed = residualControlUsedFluid[i];
proposition_v1.patch (2,474 bytes)   

wyldckat

2017-06-25 00:21

updater  

proposition_v1.tar.gz (1,960 bytes)

wyldckat

2017-06-25 00:30

updater   ~0008244

@henry: Attached are the following files:

 - proposition_v1.patch - Provides the easy to see list of changes made.

 - proposition_v1.tar.gz - Provides the files that were changed for fixing this issue, indexed to OpenFOAM-dev commit f6faada42674ab. The files that were changed were as follows:

    applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H
    applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/readFluidMultiRegionSIMPLEControls.H
    applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H


The fix is simple:

 1. Remove the unused line from 'createFluidFields.H', which never loaded the setting from SIMPLE in fvSolution. Also removed the associated variable transfer from 'setRegionFluidFields.H'.

 2. Instead, do it in 'readFluidMultiRegionSIMPLEControls.H', the same way it's done in 'readFluidMultiRegionPIMPLEControls.H' for the solver 'chtMultiRegionFoam'.



@Shor-ty: Just giving you the notification that this issue existed in your contribution ;)

Shorty

2017-06-25 07:32

reporter   ~0008245

Hi Bruno,

thank you for the information. Interesting point that I didn't do it in the SIMPLE but thats the reason why the bugtracking system is important :)

Shorty

2017-06-25 07:45

reporter   ~0008246

Hi Bruno and Henry,
I am sure that the fix of Bruno works but it should work even without. Stephan mention that the U even does not show up on the screen so I guess he does not have the momentum predictor on. Normally the momentumPredictor boolean is available and thus. I will check it out again after I recompiled the latest dev version.

Shorty

2017-06-25 08:51

reporter   ~0008247

Hi all,

okay now I got the point. I also added the momentumPredictor switch to the UEqn.H. In previous version it was not there so I missed the point which Bruno mentioned. The lookup for the momentumPredictor was missing which is in the patch of Bruno. The two lines you removed are fine.

@Bruno thanks for the hint and also the email (its a pity that the dash character in my nickname will not give me any notification).

@Henry, can be patched. I checked it and it works fine. Sorry for the stupid bug.

henry

2017-06-25 19:28

manager   ~0008250

Thanks Bruno,

Resolved by commit 53f0c26cf0212cdd0eeaed58bcfa294b063045b1

Issue History

Date Modified Username Field Change
2017-06-16 17:04 StephanG New Issue
2017-06-16 17:04 StephanG Tag Attached: chtMultiregionFoam residualControl
2017-06-25 00:21 wyldckat File Added: proposition_v1.patch
2017-06-25 00:21 wyldckat File Added: proposition_v1.tar.gz
2017-06-25 00:30 wyldckat Note Added: 0008244
2017-06-25 00:30 wyldckat Assigned To => henry
2017-06-25 00:30 wyldckat Status new => assigned
2017-06-25 07:32 Shorty Note Added: 0008245
2017-06-25 07:45 Shorty Note Added: 0008246
2017-06-25 08:51 Shorty Note Added: 0008247
2017-06-25 19:28 henry Status assigned => resolved
2017-06-25 19:28 henry Resolution open => fixed
2017-06-25 19:28 henry Fixed in Version => dev
2017-06-25 19:28 henry Note Added: 0008250
2018-07-10 11:17 administrator Tag Detached: chtMultiregionFoam residualControl