CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   runtime cuttingplanes in simpleFoam (

lbordier March 15, 2010 09:26

runtime cuttingplanes in simpleFoam

I'm trying to use sampling with cuttingplanes during run time.

For this, I modified the simpleFoam.C file by including some code taken from sample utility in the main while loop :


IOsampledSurfaces sSurfs

        // Handle geometry/topology changes
        //polyMesh::readUpdateState state = mesh.readUpdate();



        Info<< "write cuttingplanes at Time = " << runTime.timeName() << nl << endl;

All this works well, fields on cutting planes are written for each time step with the information given in sampleDict.

But now, I would like to use the fields on cuttingplane to compute statistics (mean of field, standard deviation on the cutting plane,...).

Can somenone help me to replace the sSurfs.write() statement with some code that could allow me to retrieve the fields value and to operate on them ?


fisch December 14, 2010 09:31


i tried to do similar things.
I want to sample some fields (e.g. velocity) during runtime within a dynamic Mesh solver (in my special case piso).
My problem is that i'm getting a memory error as soon as i want to perform meshMotion.

Do you have an idea how to handle it?


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