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. |
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 |
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. |
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 |
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. |
Nevermind, I found a previous
Nevermind, I found a previous post about how to add the new library...
Greg Z. |
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 |
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) |
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,
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 |
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? |
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 |
did this work?
|
Pressure BC Problems with my hot mixing case
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::printStack(Foam::Ostream&) at ??:? along with a call stack to Foam::EulerImplicit<Foam::chemistryModel<Foam::psi ChemistryModel, Foam::sutherlandTransport<Foam::species::thermo<Fo am::janafThermo::Foam::perfectGas<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? |
All times are GMT -4. The time now is 07:57. |