CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Pressureonly inlet BC

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 4 Post By lewisb2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 6, 2006, 11:31
Default Hi, In simpleFoam, is there
  #1
New Member
 
Greg Zink
Join Date: Mar 2009
Location: Ames, Iowa, USA
Posts: 16
Rep Power: 17
gzink is on a distinguished road
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.
gzink is offline   Reply With Quote

Old   June 6, 2006, 11:51
Default Yes, you need pressureInlet
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
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
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   June 6, 2006, 13:07
Default Thanks Hrv, Right now I am
  #3
New Member
 
Greg Zink
Join Date: Mar 2009
Location: Ames, Iowa, USA
Posts: 16
Rep Power: 17
gzink is on a distinguished road
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.
gzink is offline   Reply With Quote

Old   June 6, 2006, 13:23
Default You should really wwitch to 1.
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
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
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   June 7, 2006, 09:54
Default Thanks again. Forgive the n
  #5
New Member
 
Greg Zink
Join Date: Mar 2009
Location: Ames, Iowa, USA
Posts: 16
Rep Power: 17
gzink is on a distinguished road
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 is offline   Reply With Quote

Old   June 7, 2006, 15:24
Default Nevermind, I found a previous
  #6
New Member
 
Greg Zink
Join Date: Mar 2009
Location: Ames, Iowa, USA
Posts: 16
Rep Power: 17
gzink is on a distinguished road
Nevermind, I found a previous post about how to add the new library...

Greg Z.
gzink is offline   Reply With Quote

Old   December 28, 2006, 14:24
Default Hello all, In order to use
  #7
Member
 
David Hebert
Join Date: Mar 2009
Posts: 31
Rep Power: 17
dhebert is on a distinguished road
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
dhebert is offline   Reply With Quote

Old   December 29, 2006, 06:38
Default The initial value entry is a p
  #8
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
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 is offline   Reply With Quote

Old   December 29, 2006, 07:10
Default The initial value entry is a p
  #9
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
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 is offline   Reply With Quote

Old   December 29, 2006, 07:54
Default Eugene, Thanks for your exp
  #10
Member
 
David Hebert
Join Date: Mar 2009
Posts: 31
Rep Power: 17
dhebert is on a distinguished road
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
dhebert is offline   Reply With Quote

Old   December 28, 2011, 20:36
Smile A conclusion
  #11
Member
 
Amin Shariat KHah
Join Date: Apr 2011
Location: Shiraz
Posts: 86
Rep Power: 15
amin144 is on a distinguished road
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?
amin144 is offline   Reply With Quote

Old   January 14, 2012, 09:25
Default
  #12
New Member
 
Bryan Lewis
Join Date: Jul 2010
Posts: 5
Rep Power: 15
lewisb2 is on a distinguished road
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
lewisb2 is offline   Reply With Quote

Old   July 28, 2016, 06:10
Default
  #13
Member
 
annn
Join Date: Jun 2016
Posts: 40
Rep Power: 9
cleoo is on a distinguished road
did this work?
cleoo is offline   Reply With Quote

Old   October 6, 2016, 10:42
Default Pressure BC Problems with my hot mixing case
  #14
New Member
 
Martin Denison
Join Date: Oct 2016
Posts: 1
Rep Power: 0
Keith is on a distinguished road
I am trying to run a case involving the mixing of two streams, one hot with two inlet BCs. One is cold with a pressure specified. I am using reactingFoam with the reactions file

species
(
O2
H2O
CH4
CO2
N2
);

reactions
{
}

notice that there are no reactions.

For my inlet BC's I am using for the cold BC with the pressure specified

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

p:
type fixedValue;
value uniform 94016.6;

on the PIMPLE: iteration 1 I eventually get
Foam::error:rintStack(Foam::Ostream&) at ??:?
along with a call stack to
Foam::EulerImplicit<Foam::chemistryModel<Foam:si ChemistryModel, Foam::sutherlandTransport<Foam::species::thermo<Fo am::janafThermo::Foam:erfectGas<Foam::specie> >, Foam::sensibleEnthalpy> > > >::solve(Foam::UniformField<double> ...

When I run with a specified massflow at this BC, it runs ok. Do I have to manually iterate of the BC flowrate to get my desired pressure?

How can I make the pressure BC more stable?
Keith 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
velocity inlet vs pressure inlet cheong FLUENT 6 April 9, 2011 03:07
subsonic inlet or supersonic inlet? mali CFX 0 November 28, 2008 20:57
reversed flow at velocity inlet / mass flow inlet ib FLUENT 1 March 26, 2007 13:11
How to set smoke inlet speed on inlet Adam FLUENT 0 October 4, 2005 08:18
Inlet Christian Cordeiro CFX 3 May 26, 2003 07:47


All times are GMT -4. The time now is 08:17.