CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

how to initalize an expressionField for the walldistance?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 12, 2016, 10:55
Question how to initalize an expressionField for the walldistance?
  #1
New Member
 
David Kinast
Join Date: Nov 2016
Posts: 15
Rep Power: 9
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:

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
david112 is offline   Reply With Quote

Old   March 23, 2017, 03:23
Default
  #2
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17
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

Reply

Tags
expressionfield, walldist patch distance


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 08:49
[swak4Foam] swakFoam - expressionField marluc OpenFOAM Community Contributions 1 April 22, 2015 13:50
Problems creating a volScalarField with expressionField function-object zfaraday OpenFOAM Running, Solving & CFD 2 January 12, 2015 08:49
[swak4Foam] expressionField aylalisa OpenFOAM Community Contributions 1 October 28, 2014 18:42


All times are GMT -4. The time now is 11:19.