View Issue Details

IDProjectCategoryView StatusLast Update
0003192OpenFOAMBugpublic2019-03-13 19:29
Reporterklinkjak Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionunable to reproduce 
PlatformGNU/LinuxOSOtherOS Version(please specify)
Summary0003192: prghPressure BC uses a hardcoded field name "rho"
DescriptionThe implementation of prghPressure BC [1] uses a hardcoded field name "rho" [2]. This is incompatible with solvers using the "continuousPhaseName" property (see [3]), unless the solver creates something like an "alias field" [4] to make it work. This mechanism is extremely unintuitive. For example, if you take a compressible Lagrangian solver such as reactingParcelFoam and rename all fluid-phase fields to have the "continuousPhaseName" suffix, the BC will fail.

[1] https://github.com/OpenFOAM/OpenFOAM-6/tree/master/src/finiteVolume/fields/fvPatchFields/derived/PrghPressure
[2] https://github.com/OpenFOAM/OpenFOAM-6/blob/master/src/finiteVolume/fields/fvPatchFields/derived/PrghPressure/PrghPressureFvPatchScalarField.C#L110-L113
[3] https://bugs.openfoam.org/view.php?id=1717
[4] https://github.com/OpenFOAM/OpenFOAM-6/blob/master/applications/solvers/multiphase/twoPhaseEulerFoam/pU/pEqn.H#L86
TagsNo tags attached.

Activities

henry

2019-03-11 21:37

manager   ~0010359

It does what it was designed to do as a prototype BC for interFoam. However it would be possible to change the BC so the rho name is optionally read in if the BC will operate usefully for other solvers.

klinkjak

2019-03-11 22:04

reporter   ~0010360

prghPressure BC makes sense for most if not all solvers using the p_rgh field, including about 15 solvers distributed with OpenFOAM 6. Also https://www.openfoam.com/documentation/user-guide/standard-boundaryconditions.php lists prghPressure as a standard BC.

henry

2019-03-11 22:36

manager   ~0010364

The documentation you refer to relates to a fork of OpenFOAM and not the official release by the OpenFOAM Foundation, the owners of the entire OpenFOAM code.
The official source code documentation is here: https://cpp.openfoam.org/v6/
and the user guide here: https://cfd.direct/openfoam/user-guide/

henry

2019-03-11 22:38

manager   ~0010365

Given that "prghPressure BC makes sense for most if not all solvers using the p_rgh field, including about 15 solvers distributed with OpenFOAM 6" it is not clear if the change to the rho name is needed, but it would of course be possible.

henry

2019-03-13 19:29

manager   ~0010373

It is not clear if this change is needed and if so for what solver.
If it is required for some user-specific developments which are not to be contributed then development and maintenance funding would be needed.

Issue History

Date Modified Username Field Change
2019-03-11 21:23 klinkjak New Issue
2019-03-11 21:37 henry Note Added: 0010359
2019-03-11 22:04 klinkjak Note Added: 0010360
2019-03-11 22:36 henry Note Added: 0010364
2019-03-11 22:38 henry Note Added: 0010365
2019-03-13 19:29 henry Assigned To => henry
2019-03-13 19:29 henry Status new => closed
2019-03-13 19:29 henry Resolution open => unable to reproduce
2019-03-13 19:29 henry Note Added: 0010373