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

GroovyBC. Distance from patch face center to wall terrain.

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 22, 2014, 13:35
Default GroovyBC. Distance from patch face center to wall terrain.
  #1
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 112
Rep Power: 8
be_inspired is on a distinguished road
Hi all,

The point is that atmBoundaryLayerInletVelocity uses a zGround variable to impose the logaritmic profile. If the surface is not planar, we could have a problem because Zground is clearly variable.

To solve this point I want to use groovyBC. The same mathematical formulation is implemented but I want to use dist() function to calculate the distance the final distance between face center and the terrain.

I have used:
Code:
boundaryField
{
    inlet           
    {
      type            groovyBC;
      variables "wd=dist();";
      valueExpression  "vector(wd,0,0)";
      gradientExpression "vector(0,0,0)";
      fractionExpression "(phi > 0) ? 0 : 1";
      value           uniform (10 0 0);
But I obtain wd=0 for the inlet patch. Maybe dist() does not see the terrain?

The appoach that I would like to follow is to impose the wallDistance of the neighbour cell to the face center.
Code:
zDistance=dist();wd=internalField(zDistance)
This also fails.

How can I obtain an internalField, zDistance, that I can operate with to obtain wd at the patch?

Thank you very much
be_inspired is offline   Reply With Quote

Old   October 22, 2014, 15:17
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by be_inspired View Post
Hi all,

The point is that atmBoundaryLayerInletVelocity uses a zGround variable to impose the logaritmic profile. If the surface is not planar, we could have a problem because Zground is clearly variable.

To solve this point I want to use groovyBC. The same mathematical formulation is implemented but I want to use dist() function to calculate the distance the final distance between face center and the terrain.

I have used:
Code:
boundaryField
{
    inlet           
    {
      type            groovyBC;
      variables "wd=dist();";
      valueExpression  "vector(wd,0,0)";
      gradientExpression "vector(0,0,0)";
      fractionExpression "(phi > 0) ? 0 : 1";
      value           uniform (10 0 0);
But I obtain wd=0 for the inlet patch. Maybe dist() does not see the terrain?

The appoach that I would like to follow is to impose the wallDistance of the neighbour cell to the face center.
Code:
zDistance=dist();wd=internalField(zDistance)
This also fails.

How can I obtain an internalField, zDistance, that I can operate with to obtain wd at the patch?

Thank you very much
Not sure but distToPatch (http://sourceforge.net/p/openfoam-ex...amReference.md) might do what you need. For performance reasons I would not use this directly in the BC (unless your terrain changes) but create it in a functionObject at the beginning of the run
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
y+ and u+ values with low-Re RANS turbulence models: utility + testcase florian_krause OpenFOAM 108 June 9, 2015 08:13
dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 5 March 2, 2015 18:19
non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Native Meshers: blockMesh 7 April 17, 2013 05:42
Import netgen mesh to OpenFOAM hsieh Open Source Meshers: Gmsh, Netgen, CGNS, ... 32 September 13, 2011 05:50
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00


All times are GMT -4. The time now is 13:55.