View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003105 | OpenFOAM | Bug | public | 2018-11-09 15:39 | 2018-11-13 09:34 |
Reporter | jherb | Assigned To | will | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | SUSE Linux Enterprise Server 11 | OS | Linux | OS Version | 3.0.101-108.41-d |
Summary | 0003105: chtMultiRegionFoam checks for closedVolume in transient (PIMPLE) case, where it probably should not | ||||
Description | Since 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 Information | This is applicable to OpenFOAM-6 and current OpenFOAM-dev | ||||
Tags | No tags attached. | ||||