Skip to content

No Fields converted with "ensightWrite" FO with region different than region0

In my process:

1- I am mapping a VolScalarField (the pressure "p") from region0 on a targetMesh (coarser than region0) on the fly using the "mapFields" FO as:

meshInterp1
{
    type            mapFields;
    libs            ("libfieldFunctionObjects.so");
    writeControl   timeStep;
    writeInterval  1;

    mapRegion       targetMesh;
    mapMethod       cellVolumeWeight;
    consistent      no;

    fields          (p);

    patchMap        ();
    cuttingPatches  (CONTOUR GAMMA_S GAMMA_E);
}
  • Then:*

2- I want to use the "ensightWrite" FO on the fly during the execution to convert the pressure field from the OpenFOAM format to the Ensight one as:

ensightWrite_P { type ensightWrite; libs ("libutilityFunctionObjects.so"); writeControl timeStep; writeInterval 1; format binary; directory "postProcessing/EnSight/"; nodeValues yes; fields ( p ); region targetMesh; overwrite true; }

It seems the fields is not converted, only the mesh is present in the Ensigth directory but no fields data:

PIMPLE: iteration 1 smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 5.60474e-06, No Iterations 6 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 5.1773e-06, No Iterations 5 GAMG: Solving for p, Initial residual = 1, Final residual = 0.00404502, No Iterations 4 time step continuity errors : sum local = 0.00019636, global = -5.23346e-05, cumulative = -5.23346e-05 GAMG: Solving for p, Initial residual = 0.00782886, Final residual = 7.54917e-08, No Iterations 10 time step continuity errors : sum local = 2.98405e-07, global = 3.4694e-08, cumulative = -5.22999e-05 smoothSolver: Solving for epsilon, Initial residual = 0.0426054, Final residual = 7.6249e-06, No Iterations 6 smoothSolver: Solving for k, Initial residual = 1, Final residual = 7.86417e-06, No Iterations 10 ExecutionTime = 0.41 s ClockTime = 1 s

mapFields mapFields write: p: interpolated and written

ensightWrite ensightWrite write: ( )

but it seems working when I want to field on the "region0" as

ensightWrite_P { type ensightWrite; libs ("libutilityFunctionObjects.so"); writeControl timeStep; writeInterval 1; format binary; directory "postProcessing/EnSight/"; nodeValues yes; fields ( p ); // region targetMesh; overwrite true; }

it gives:

PIMPLE: iteration 1 smoothSolver: Solving for Ux, Initial residualpitzDailyFO_ensightWrite_Issue.tar.gz = 0.979549, Final residual = 6.32759e-06, No Iterations 11 smoothSolver: Solving for Uy, Initial residual = 0.663667, Final residual = 3.98739e-06, No Iterations 11 GAMG: Solving for p, Initial residual = 0.0514127, Final residual = 0.000190129, No Iterations 4 time step continuity errors : sum local = 0.0001831, global = 4.22034e-05, cumulative = -1.00965e-05 GAMG: Solving for p, Initial residual = 0.013377, Final residual = 5.64195e-08, No Iterations 11 time step continuity errors : sum local = 1.58111e-07, global = -1.82685e-08, cumulative = -1.01148e-05 smoothSolver: Solving for epsilon, Initial residual = 0.0120984, Final residual = 5.31586e-06, No Iterations 5 smoothSolver: Solving for k, Initial residual = 0.359881, Final residual = 3.64655e-06, No Iterations 9 ExecutionTime = 0.45 s ClockTime = 1 s

mapFields mapFields write: p: interpolated and written

ensightWrite ensightWrite write: ( p ) End

It seems there is a problem with "region" argument in the "ensightWrite" FO

pitzDailyFO_ensightWrite_Issue.tar.gz

Edited by Nicolas Zerbib