CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Mapping deltaTChem_ on refined mesh (

tgvosk August 29, 2012 11:32

Mapping deltaTChem_ on refined mesh
I am trying to use dynamic mesh refinement in conjunction with a chemistry solver, and am getting errors from the ODE solver. The problem is that deltaTChem_ (a member of basicChemistryModel) is a scalarField that is not being updated when the mesh is updated (its size remains is the old mesh size, which causes a fatal error when the mesh size increases).

I have gotten it working by changing the deltaTChem() method in basicChemistryModel to public, putting it in a volScalarField at the top level which gets mapped, then copying its internalField back into deltaTChem after mapping, but that seems unnecessarily complicated and I'd prefer having a solver that didn't require modifying the main OF source code.

How can I set this field to be mapped automatically by mesh.update()?

I am using OF 2.1.1.

EDIT: This has been resolved in the latest commit to OF 2.1.x per bug report 0000637 by changing deltaTChem_ to a field that gets remapped.

All times are GMT -4. The time now is 10:37.