CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to set the requirements for a boundray condition (https://www.cfd-online.com/Forums/openfoam-solving/171493-how-set-requirements-boundray-condition.html)

qjh888 May 10, 2016 03:10

How to set the requirements for a boundray condition
 
Hi Foamers,

I've faced with a general problem, that is how to know what the requirements for a boundary condition?
For example, in the "surfaceNormalFixedValue" boundary condition in 0/U:

{
type surfaceNormalFixedValue;
refValue 10;
Value (10 10 0);
}

And for the temperatureDirectedInletVelocity:
{
type temperatureDirectedInletVelocity;
inletDirection uniform (-1.0 0.0 0.0);
phi phi; dimensions
T T;
T0 uniform 293.0;
cylindricalCS yes;
omega (0.0 0.0 -10.);
value uniform 0;
}

If I want to use a new boundary condition, such like "pressureInletOutletVelocity" without any tutorial, how can I know how to set the boundary conditions?


Thanks in advance,
Janry

anishtain4 May 10, 2016 09:11

There are two ways that usually are available
1. look at the original code, usually there's a comment section in header file that explains what does this boundary do, or how to use it (unfortunately not the case in your interested BC). Yet you can always go through the file and see what has been done. If you have general knowledge of OF it's not going to be overwhelming, just a little time.
check:
https://github.com/OpenFOAM/OpenFOAM...OutletVelocity

2. Use the banana method, write banana where you don't know what to write, and OF complains that it doesn't recognizes your keyword, then it suggests a list of available keywords and you'll get to see what options are available.

anishtain4 May 10, 2016 12:28

oh, and I forgot, you can search the tutorials to see if there's any similar case,

Quote:

cd $FOAM_TUTORIALS
grep -nr pressureInletOutletVelocity
for your case there's plenty of examples. I know you mentioned without any tutorial, but you gotta know that since OF is opensource, there's not an extensive document for it out there, and tutorials are a precious part of the documentation.

qjh888 May 10, 2016 20:06

Hi Mahdi,
Thanks for your directions!
With your help I've got the information and known how to set up the boundary conditions!

Thanks again.
Janry


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