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

[swak4Foam] GroovyBC. Distance from patch face center to wall terrain.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 22, 2014, 14:35
Default GroovyBC. Distance from patch face center to wall terrain.
  #1
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17
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, 16:17
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
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


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
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 16:33
Natural convection in a closed domain STILL NEEDING help! Yr0gErG FLUENT 4 December 2, 2019 01:04
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 10:28
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


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