2017-06-25 06:06 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002585OpenFOAM[All Projects] Bugpublic2017-06-25 00:30
ReporterStephanG 
Assigned Tohenry 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformGNU/LinuxOSGNU/Linux Ununtu 16.04OS Version14.04
Product Versiondev 
Target VersionFixed in Version 
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.
TagschtMultiregionFoam residualControl
Attached Files
  • patch file icon proposition_v1.patch (2,474 bytes) 2017-06-25 00:21 -
    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];
    
    patch file icon proposition_v1.patch (2,474 bytes) 2017-06-25 00:21 +
  • gz file icon proposition_v1.tar.gz (1,960 bytes) 2017-06-25 00:21

-Relationships
+Relationships

-Notes

~0008244

wyldckat (updater)

@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 ;)
+Notes

-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
+Issue History