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

Error using totalPressure in p_rgh

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

Like Tree1Likes
  • 1 Post By jaydeep

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2017, 15:50
Default Error using totalPressure in p_rgh
  #1
Member
 
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 52
Rep Power: 9
Sugajen is on a distinguished road
Hi all,

I am trying to run a pressure driven flow simulation using reactingTwoPhaseEulerFoam. I get an error when I specify totalPressure in inlet p_rgh.
Code:
--> FOAM FATAL ERROR: 

    request for volVectorField U from objectRegistry region0 failed
    available objects of type volVectorField are

6
(
U.particles_0
DUDt.particles
U.air
U.air_0
U.particles
DUDt.air
)


    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-4.1/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 193.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const at ??:?
#3  Foam::totalPressureFvPatchScalarField::updateCoeffs() at ??:?
#4  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) in "/opt/openfoam4/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam"
#5  Foam::fv::EulerDdtScheme<double>::fvmDdt(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#6  Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::ddt<double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/openfoam4/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam"
#7  ? in "/opt/openfoam4/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam"
#8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9  ? in "/opt/openfoam4/platforms/linux64GccDPInt32Opt/bin/reactingTwoPhaseEulerFoam"
Aborted (core dumped)
For fixedValue inlet p_prgh, the velocties keep increasing with each time step and does not make sense.
When I used the totalPressuere in inlet P instead of p_rgh, I get reasonable values, but that is not the right way to do, right ?
I searched the forum for relevant threads, but none touched this explicitly, and hence the post.
I am attaching my p, p_rgh and U files below.
P:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 1.04e5;

boundaryField
{

    inlet
    {
	type		calculated;
	value		$internalField;
    }

    outlet
    {
	type		calculated;
	value		$internalField;
    }

    top
    {
	type		calculated;
	value		$internalField;
    }

    bottom
    {
	type		calculated;
	value		$internalField;
    }

    walls
    {
	type		calculated;
	value		$internalField;
    }

    frontAndBack
    {
        type		empty;
    }
p_rgh:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 1.04e5;

boundaryField
{

    inlet
    {
	type            totalPressure;
	p0              $internalField;
	value           $internalField;
    }

    outlet
    {
	type 		prghPressure;
	p 		uniform 0;
    }

    top
    {
        type		fixedFluxPressure;
        value    	$internalField;
    }

    bottom
    {
        type		fixedFluxPressure;
        value    	$internalField;
    }

    walls
    {
        type 		fixedFluxPressure;
        value 		$internalField;
    }

    frontAndBack
    {
        type            empty;
    }
}
U:
Code:
FoamFile
{
    version     2.0;
    format      binary;
    class       volVectorField;
    location    "0";
    object      U.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0.0 0.0 0.0);

boundaryField
{

    inlet
    {
        type            fixedValue;
	value		$internalField;
    }

    outlet
    {
        type            fixedValue;
	value		$internalField;
    }

    top
    {
        type            noSlip;
    }

    bottom
    {
        type            noSlip;
    }

    walls
    {
        type            noSlip;
    }

    frontAndBack
    {
        type            empty;
    }

}
Any comments, suggestions or guidance will be greatly appreciated.
Thanks in advance

Sugajen
Sugajen is offline   Reply With Quote

Old   November 18, 2017, 17:09
Default Refer to the source code for boundary specification
  #2
Member
 
Jaydeep
Join Date: Jun 2015
Posts: 34
Rep Power: 6
jaydeep is on a distinguished road
Your error is pretty self explanatory. You can look for the boundary definition here:
https://github.com/OpenFOAM/OpenFOAM...hScalarField.H

You will find that the boundary does calculation along the lines of:
Code:
            p_p = p_0 - 0.5 |U|^2

So it needs "U" field. In your case, you will need to explicitly feed U field for species. The definition is given in the same source file:

Code:
Usage
        Property     | Description                | Required | Default value
        U            | Velocity field name        | no       | U
        phi          | Flux field name            | no       | phi
        rho          | Density field name         | no       | rho
        psi          | Compressibility field name | no       | none
        gamma        | (Cp/Cv)                    | no       | 1
        p0           | Total pressure             | yes      |
Sugajen likes this.
jaydeep is offline   Reply With Quote

Old   November 21, 2019, 20:02
Default Pressure driven flow in nozzle
  #3
Member
 
Stanley John
Join Date: Sep 2018
Posts: 43
Rep Power: 3
sjohn2 is on a distinguished road
Hi,

I have the same problem. I want to specify total pressure in the inlet and static pressure in the outlet using the same solver reactingtwophaseeulerFoam. Does any one have an example?
sjohn2 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
totalPressure (why flux direction dependend) Tobi OpenFOAM Running, Solving & CFD 3 October 17, 2019 23:27
Need info about totalPressure boundary condition sahmed OpenFOAM Running, Solving & CFD 4 December 4, 2018 22:23
About the totalPressure BC fmerk OpenFOAM Running, Solving & CFD 1 September 25, 2017 18:53
totalPressure boundary :Performance Curve (constant RPM) nash OpenFOAM Running, Solving & CFD 0 September 6, 2013 12:34
Totalpressure Ansys Leuchte CFX 2 April 9, 2013 19:56


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