CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   how to initalize an expressionField for the walldistance? (https://www.cfd-online.com/Forums/openfoam-pre-processing/181319-how-initalize-expressionfield-walldistance.html)

david112 December 12, 2016 09:55

how to initalize an expressionField for the walldistance?
 
Hi Foamers,
I need to compute a field in complex geometries which stores the distance to the nearest wall for the whole field. This is needed for a custom meshing technique for LES. I tried something like:

Code:

alpha2Field {
        type        expressionField;
        writeControl    writeTime;
        writeTime    0;
        fieldName    alpha2;
        expression    "dist()";
        autowrite    true;
    }

unfortunately I am not able to aviod the Error like:

Code:


Creating expression field alpha2 ...Selecting patchDistMethod meshWave
[0]
[0]
[0] --> FOAM FATAL ERROR:
[0] At least one plane coefficient must have a value
[0]
[0]    From function void Foam::plane::calcPntAndVec(const scalarList&)
[0]    in file meshes/primitiveShapes/plane/plane.C at line 51.
[0]

Im usig OF4.1 on ubuntu 16.04 LTS
I hope someone is able and wants to help me. and cant imagine that its endless complicated.
regards,
David

be_inspired March 23, 2017 02:23

Did you solve the issue?
It seems like dist() does not work in OF4 and the approach should be different. dist() worked on OF2.1.1 for me


All times are GMT -4. The time now is 22:00.