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

internal flow BCs: pressure driven versus velocity driven

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   September 7, 2012, 14:18
Default
  #21
MBA
New Member
 
anonymous
Join Date: Oct 2010
Posts: 4
Rep Power: 7
MBA is on a distinguished road
Since you are using simpleFoam just add the following:

type totalPressure;
gamma 1.0;
p0 uniform 0;
value uniform 0;

You should be O.K now.
MBA is offline   Reply With Quote

Old   March 6, 2014, 11:00
Question BC Total Pressure
  #22
vut
Member
 
Join Date: Feb 2014
Posts: 57
Rep Power: 4
vut is on a distinguished road
Dear OpenFoamers,

I would like to set up my study case: a water flow through a channel by simpleFoam.

I want to set boundary conditions as total pressure: (1 bar at inlet and 0 bar at outlet).

Now I have:

================================================== ====
p
================================================== ====
inlet
type fixedValue
uniform 100

? for simpleFoam pressure = pressure/mass density, right?

outlet
type fixedValue
uniform 0

================================================== ====
U
================================================== ====

inlet
type pressureInletVelocity
uniform (0 0 0)

outlet
type zeroGradient



It does not work when I ran simpleFoam! It stops after several iterations.

I really don't understand what happened.

Do you known why, rather why not?

I am looking to hear from you all...

Regards,

T


















Quote:
Originally Posted by Tobi View Post
Hi all,

for the totalPressure BC there are different ways for calculation. It depends on the initialization of the BC. But first to your question @lobstar.

gamma = Heat capacity ratio

That is the important code for totalPressure:
Code:
    if (psiName_ == "none" && rhoName_ == "none")
    {
        operator==(p0p - 0.5*(1.0 - pos(phip))*magSqr(Up));
    }
    else if (rhoName_ == "none")
    {
        const fvPatchField<scalar>& psip =
            patch().lookupPatchField<volScalarField, scalar>(psiName_);

        if (gamma_ > 1.0)
        {
            scalar gM1ByG = (gamma_ - 1.0)/gamma_;

            operator==
            (
                p0p
               /pow
                (
                    (1.0 + 0.5*psip*gM1ByG*(1.0 - pos(phip))*magSqr(Up)),
                    1.0/gM1ByG
                )
            );
        }
        else
        {
            operator==(p0p/(1.0 + 0.5*psip*(1.0 - pos(phip))*magSqr(Up)));
        }
    }
    else if (psiName_ == "none")
    {
        const fvPatchField<scalar>& rho =
            patch().lookupPatchField<volScalarField, scalar>(rhoName_);

        operator==(p0p - 0.5*rho*(1.0 - pos(phip))*magSqr(Up));
    }
depend on your BC initialization you calculate in different ways.
In the constructors you find the way how to set this bc correct and if you do not set an value which value would be set instead - an example that works:
Code:
outlet
{
        type               totalPressure;
        p0                  uniform 100000;
        psi                  none;
        gamma            0;
        rho                 rho;
        value              uniform 100000;
}


and that lead you to that calculation:

operator==(p0p - 0.5*rho*(1.0 - pos(phip))*magSqr(Up));
If you set rho=none and psi=none (like in incompressible flows) you get the same calculation without rho:
Code:
operator==(p0p - 0.5*(1.0 - pos(phip))*magSqr(Up));

its here:

    if (psiName_ == "none" && rhoName_ == "none")
    {
        operator==(p0p - 0.5*(1.0 - pos(phip))*magSqr(Up));
    }
Hope it will help you.
Tobi
vut is offline   Reply With Quote

Old   March 6, 2014, 11:06
Default
  #23
vut
Member
 
Join Date: Feb 2014
Posts: 57
Rep Power: 4
vut is on a distinguished road
Thank MBA for your answer.

That's for p, right? And for both inlet and outlet?

Preciously, I change in constant/transportProperties nu = 1e-6 to simulate water. It's OK?

May you give me more details... That's would be useful.
vut is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maintaining Static Pressure at Fluid Flow Inlet cdevalve FLUENT 3 January 14, 2012 01:11
Channel flow: Inlet pressure AND uniform velocity? frmap1 Main CFD Forum 0 April 15, 2010 10:32
Pressure driven laminar flow simpleFoam pressure higher at the outlet than inlet gabriel OpenFOAM Running, Solving & CFD 16 September 30, 2009 18:20
Urgent: How to model a stationary sphere in a pressure driven flow using Ansys CFX? farhan OpenFOAM Running, Solving & CFD 1 April 14, 2009 14:34
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) HB &DS CFX 0 January 9, 2000 14:19


All times are GMT -4. The time now is 09:11.