CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

how to initalize an expressionField for the walldistance?

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   December 12, 2016, 09:55
Question how to initalize an expressionField for the walldistance?
New Member
David Kinast
Join Date: Nov 2016
Posts: 14
Rep Power: 6
david112 is on a distinguished road
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:

alpha2Field {
        type         expressionField;
        writeControl    writeTime;
        writeTime    0;
        fieldName     alpha2;
        expression     "dist()";
        autowrite    true;
unfortunately I am not able to aviod the Error like:

Creating expression field alpha2 ...Selecting patchDistMethod meshWave
[0] At least one plane coefficient must have a value
[0]     From function void Foam::plane::calcPntAndVec(const scalarList&)
[0]     in file meshes/primitiveShapes/plane/plane.C at line 51.
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.
david112 is offline   Reply With Quote

Old   March 23, 2017, 02:23
Senior Member
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 134
Rep Power: 14
be_inspired is on a distinguished road
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
be_inspired is offline   Reply With Quote


expressionfield, walldist patch distance

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] Using fieldAverage together with swak4foam expressionField tiam OpenFOAM Community Contributions 33 December 18, 2016 07:49
[swak4Foam] swakFoam - expressionField marluc OpenFOAM Community Contributions 1 April 22, 2015 12:50
Problems creating a volScalarField with expressionField function-object zfaraday OpenFOAM Running, Solving & CFD 2 January 12, 2015 07:49
[swak4Foam] expressionField aylalisa OpenFOAM Community Contributions 1 October 28, 2014 17:42

All times are GMT -4. The time now is 06:38.