View Issue Details

IDProjectCategoryView StatusLast Update
0003105OpenFOAMBugpublic2018-11-13 09:34
Reporterjherb Assigned Towill  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platform SUSE Linux Enterprise Server 11OSLinuxOS Version3.0.101-108.41-d
Summary0003105: chtMultiRegionFoam checks for closedVolume in transient (PIMPLE) case, where it probably should not
DescriptionSince the unification of the SIMPLE and the PIMPLE variant of the chtMultiRegionFoam solvers, it is always checked, if the solver is running in a "closedVolume" by calling adjustPhi at
https://github.com/OpenFOAM/OpenFOAM-dev/blob/master/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H#L25

But this call we result in a fatal error at https://github.com/OpenFOAM/OpenFOAM-dev/blob/master/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C#L107 if the case has e.g. just one inlet with a given velocity and is initialized at a given pressure.

This should be a valid simulation: Flow goes into the volume, pressure goes up, and vice versa. (If the fluid is compressible).

The pressure equation of buoyantPimpleFoam is nearly the same: https://github.com/OpenFOAM/OpenFOAM-dev/blob/master/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H but there is no such check for a closed volume. In buoyantSimpleFoam, there is: https://github.com/OpenFOAM/OpenFOAM-dev/blob/master/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H#L20

So the following patch would probably fix the problem:

diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H
index d2186a7..05446e6 100644
--- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H
+++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H
@@ -22,7 +22,7 @@
 
 MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
 
-const bool closedVolume = adjustPhi(phiHbyA, U, p_rgh);
+const bool closedVolume = mesh.steady() && adjustPhi(phiHbyA, U, p_rgh);
 const bool adjustMass = closedVolume && !thermo.incompressible();
 
 phiHbyA += phig;

Additional InformationThis is applicable to OpenFOAM-6 and current OpenFOAM-dev
TagsNo tags attached.

Activities

will

2018-11-13 09:34

manager   ~0010178

Thanks for the report. Resolved in dev by commit 7b3cc689, and in version 6 by 9763346f.

Issue History

Date Modified Username Field Change
2018-11-09 15:39 jherb New Issue
2018-11-13 09:34 will Assigned To => will
2018-11-13 09:34 will Status new => resolved
2018-11-13 09:34 will Resolution open => fixed
2018-11-13 09:34 will Fixed in Version => 6
2018-11-13 09:34 will Note Added: 0010178