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/)
-   -   totalPressure Boundary condition (http://www.cfd-online.com/Forums/openfoam-solving/72394-totalpressure-boundary-condition.html)

bastil February 4, 2010 05:39

totalPressure Boundary condition
 
Dear Foamers,

we are currently struggling with the total pressure inlet BC (totalPressure). We do not fully understand the meaning of some of the require parameters in the "p"-File:
Code:

/* PRESSURE INLET */
    patchname_pressureinlet
    {
        type            totalPressure;
        p0              uniform 1.e5; /* Total pressure p0 = p + 1/2*rho*U^2 */
        U              U;
        phi            phi;
        rho            rho;/none;
        psi            psi;/none;
        gamma          1;
    }

We are not aware of the meaning of phi, rho, psi and gamma. Looking into the sources I found the following error:
Code:

        FatalErrorIn
        (
            "totalPressureFvPatchScalarField::updateCoeffs()"
        )  << " rho or psi set inconsitently, rho = " << rhoName_
            << ", psi = " << psiName_ << '.' << nl
            << "    Set either rho or psi or neither depending on the "
              "definition of total pressure." << nl
            << "    Set the unused variables to 'none'."
            << "\n    on patch " << this->patch().name()
            << " of field " << this->dimensionedInternalField().name()
            << " in file " << this->dimensionedInternalField().objectPath()
            << exit(FatalError);

We are unsure how to set phi, rho, psi and gamma "consitantly". We want to use it with the rhoSimpleFoam-solver.
  • Does it depend on the solver type? (pressure-based/density-based?).
  • However, we see differences when using the different formulations.
  • It can also be seen from the sources that calculation of the boundary values are depending on the formulation. So we need to know how to set these values.
It would be very helpful if somebody can comment on this. Thanks.

sankarv February 25, 2010 14:35

totalPressure Boundary condition
 
Dear Bastil

Did you find answers to your question ? I also have the same question and have not received any reply yet. Please let me know if you have figured out ?

Thanks
Vaidya

saba_saeb April 16, 2012 23:18

Exactly same problem, any idea so far?!

klio April 17, 2012 03:06

Quote:

Originally Posted by bastil (Post 244915)

/* PRESSURE INLET */
patchname_pressureinlet
{
type totalPressure;
p0 uniform 1.e5; /* Total pressure p0 = p + 1/2*rho*U^2 */
U U;
phi phi;
rho rho;/none;
psi psi;/none;
gamma 1;
}


"totalPressureFvPatchScalarField::updateCoeffs ()"
<< " rho or psi set inconsitently, rho = " << rhoName_
<< ", psi = " << psiName_ << '.' << nl
<< " Set either rho or psi or neither depending on the "
"definition of total pressure." << nl
<< " Set the unused variables to 'none'."
<< "\n on patch " << this->patch().name()
<< " of field " << this->dimensionedInternalField().name()
<< " in file " << this->dimensionedInternalField().objectPath()
<< exit(FatalError);
[.

I'm really new using OpenFoam but I guess you only have to add U, phi, rho or psi if you have set or calculated initial BC for those! (Maybe with potentialFoam)
And it is also depending on incompressible or compressible simulation. Either you have a field for compressible simulations or just the value in the transport properties.
If you don't add them they will be calculated automatically.
And I also guess that psi is about particle movement depending on the velocity (streamfunction) and directly depending on rho so if you fix one of them the other will be calculated!

But may I'm wrong

kmou July 4, 2013 09:09

Hello,

I know this is an old thread but I was looking around for the same answer and I found in which header file OpenFoam describes these variables:
http://foam.sourceforge.net/docs/cpp/a04465_source.html


All times are GMT -4. The time now is 21:43.