Skip to content

energyTransport does not work in combination with dynamicRefineFvMesh

energyTrnasport function object crashes when used with phi rhoPhi; and dynamicRefineFvMesh.

The cause appears to be that the field rhoCp is not registered (https://develop.openfoam.com/Development/openfoam/-/blob/master/src/functionObjects/solvers/energyTransport/energyTransport.C?ref_type=heads#L208-221) and therefore not automatically updated when the mesh is refined.

Making this field registered (changing https://develop.openfoam.com/Development/openfoam/-/blob/master/src/functionObjects/solvers/energyTransport/energyTransport.C?ref_type=heads#L217 to IOobject::REGISTER) appears to fix the problem. However, I am not sure if this is the right fix and if there are any other consequences to this change. (There must be a reason with it was NO_REGISTER in the first place?)