CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Pressureonly inlet BC (http://www.cfd-online.com/Forums/openfoam-solving/59873-pressureonly-inlet-bc.html)

gzink June 6, 2006 11:31

Hi, In simpleFoam, is there
 
Hi,

In simpleFoam, is there a way to set an inlet-BC knowing only pressure, rather than needing pressure and velocity? All the ones I've tried need a velocity at the inlet, too.

Greg Z.

hjasak June 6, 2006 11:51

Yes, you need pressureInlet
 
Yes, you need

pressureInletVelocity,

which lives in

src/finiteVolume/fields/fvPatchFields/derivedFvPatchFields/pressureInletVelocity /pressureInletVelocityFvPatchVectorField.H

You will, of course, also fix the pressure at the outlet, right?

Enjoy,

Hrv

gzink June 6, 2006 13:07

Thanks Hrv, Right now I am
 
Thanks Hrv,

Right now I am running OpenFoam 1.2 and the closest I can find to what you mention is src/cfdtools/general/derivedFvPatchFields but there is no pressureInletVelocity directory there. Is it somewhere else in the older versions, or perhaps not there at all?

Greg Z.

hjasak June 6, 2006 13:23

You should really wwitch to 1.
 
You should really wwitch to 1.3 as soon as you possibly can - there's no point of anyone asking questions or supporting the old version because this does not help us move forward.

As for the file, it lives in:

/home/hjasak/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/fields/fvPatchFields/derivedFvPa tchFields/pressureInletVelocity

If you want to see what data it needs, specify the b.c. type as pressureInletVelocity and look at the stuff it asks you to provide.

Hrv

gzink June 7, 2006 09:54

Thanks again. Forgive the n
 
Thanks again.

Forgive the novice question, but where do I need to put that file for the BC? I've looked through the code, but I'm not very experienced in C++, so I'm having some trouble figuring it out on my own.

And I do plan to switch to 1.3, just as soon as the IT department has time to install it!

Greg Z.

gzink June 7, 2006 15:24

Nevermind, I found a previous
 
Nevermind, I found a previous post about how to add the new library...

Greg Z.

dhebert December 28, 2006 15:24

Hello all, In order to use
 
Hello all,

In order to use pressureInletVelocity, a value must be specified. Since velocity is supposed to be computed from flux, I'm not sure what the specified value for. Flow reversal? Could someone please explain?

Thanks,

David

eugene December 29, 2006 07:38

The initial value entry is a p
 
The initial value entry is a placeholder and will be filled with the value calculated from continuity once the simulation starts.

Typically you can simply specify: value uniform (0 0 0);

Examine the updateCoeffs() function in src/finiteVolume/lnInclude/pressureInletVelocityFvPatchVectorField.C for details on how the boundary works. (This is true of most boundary conditions)

eugene December 29, 2006 08:10

The initial value entry is a p
 
The initial value entry is a placeholder and will be filled with the value calculated from continuity once the simulation starts.

Typically you can simply specify: value uniform (0 0 0);

Examine the updateCoeffs() function in src/finiteVolume/lnInclude/pressureInletVelocityFvPatchVectorField.C for details on how the boundary works. (This is true of most boundary conditions)

dhebert December 29, 2006 08:54

Eugene, Thanks for your exp
 
Eugene,

Thanks for your explanation, and thanks for pointing out where the boundary conditions are in the code. That will help for future endeavors.

David

amin144 December 28, 2011 21:36

A conclusion
 
I need some one only tell me is it right my conclusion about pressure boundary condition or not:

if we have a pressure driven flow and we don't know about velocity but we know pressure condition we use velocity (U/0) in this form:

inlet :
type pressureInletVelocity
value uniform(0 0 0 ) ;

outlet:
type zerogradient

and pressure as below:

inlet:
type fixedValue;
value uniform 1; (we assume 1 is value of pressure at inlet)

outlet
type fixedValue;
value uniform 0;

And another queation, is this pressure value real or divided by density?

lewisb2 January 14, 2012 10:25

The meaning of the pressure value is dependent on how the governing equations were written for the solver.

For the basic incompressible solvers (icoFoam, pisoFoam, simpleFoam, ...) the density is never specified, only nu=viscosity/density. Therefore, p is actually pressure/density.

For solvers that can handle density changes (boussinesqSimpleFoam, ...), or fully incompressible solvers, this will not be the case.

You have to look at the code to make sure you understand what things mean.
You can get to all the code for the solvers by
cd $FOAM_SOLVERS

-Bryan


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