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

Pressure BCs simpleFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 5, 2013, 13:32
Arrow Pressure BCs simpleFoam
  #1
Member
 
James
Join Date: May 2013
Posts: 82
Rep Power: 4
Tensian is on a distinguished road
Hi everyone,

Anyone knows how to modelate a pressure driven flow in a channel with simpleFoam solver? When I try to specify fixedValue at inlet and outlet( for p) and zeroGradient in the same boundaries (for U) then the results explodes with no physical meaning. I have tried some combinations (pressureInletVelocity, inletOutlet...). I need to know if its possible to do and if not, which solver can I use?

Please HELP (I am getting crazy with that issue)

Thank you so much
Tensian is offline   Reply With Quote

Old   August 5, 2013, 22:28
Default
  #2
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
I am also stuck on the same problem. The boundary conditions i put seem correct. fixed value condition for p is correct. for U you need to put pressureInletVelocity at the inlet and zeroGradient at the outlet. But using these BCs my solution won't converge and the results look weird. I will post if i solve the problem correctly.
inf.vish is offline   Reply With Quote

Old   August 6, 2013, 11:07
Default
  #3
Member
 
James
Join Date: May 2013
Posts: 82
Rep Power: 4
Tensian is on a distinguished road
Thanks for the reply,

I am trying new bcs that involves totalPressure, but nothing seems to run. I got converged results, but without physical meaning.

I will let you know if I find a solution, but I think simpleFoam does not allow this kind of setup (maybe we have to do some C++ programming for obtain a suitable boundary condition in terms of pressure...)

Its weird, because FLUENT do the calculation without problems....
Tensian is offline   Reply With Quote

Old   August 6, 2013, 11:09
Default simpleFoam BBCC
  #4
New Member
 
Juan Pablo Toro Labbe
Join Date: Jun 2013
Location: Davis CA
Posts: 7
Rep Power: 4
jptorol is on a distinguished road
Hi there, did you review the "turbulent flow over a backward-facing step" (PitzDaily case)?
Because you are interested in the pressure gradient and not in the pressure itself, you can fix the pressure, e.g p=0 Pa at outlet, the program will calculate the pressure field, and thus, you will have the pressure gradient.
Regards,

JP
jptorol is offline   Reply With Quote

Old   August 6, 2013, 11:31
Default
  #5
Member
 
James
Join Date: May 2013
Posts: 82
Rep Power: 4
Tensian is on a distinguished road
Hi Juan Pablo,

Thanks for the suggestion, I will review this tutorial. I need to fix pressure gradient between inlet and outlet, because velocity is not known (and I am interested for example in computing flow rate), so is the pressure difference what induces fluid motion.

Ill try what you suggest, keeping my fingers crossed.

Thank you so much
Tensian is offline   Reply With Quote

Old   August 6, 2013, 11:33
Default
  #6
Member
 
James
Join Date: May 2013
Posts: 82
Rep Power: 4
Tensian is on a distinguished road
Now I am reading slowly what JP has said. I think his suggestion is suitable if you want to calculate pressure gradient, but this is not my case. The pressure at inlet and outlet is known and fixed!

Thanks anyway!
Tensian is offline   Reply With Quote

Old   August 6, 2013, 22:47
Default
  #7
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
Hi James,
Yesterday i solved the problem of Poiseuille flow (laminar) using simpleFoam. The problem is that the solution won't converge even after running for 100000 iterations. The solution conforms with Poiseuille's law even though convergence is not reached. If you want i can post my files. I have done it for an axisymmetric wedge.
inf.vish is offline   Reply With Quote

Old   August 7, 2013, 05:01
Default
  #8
Member
 
James
Join Date: May 2013
Posts: 82
Rep Power: 4
Tensian is on a distinguished road
Hi Vishal,

Yes please, let me see the files so I can compare. I am triying to use fixedGradient, pressureInletVelocity, totalPressure...but nothing give me good results, the simulation gives very high values (for a pressure gradient of 20 Pa I expect velocitites of about 4/5 m/s) for velocity and pressure.
I am a beginner to OF so I am not sure if programming is needed for that kind of setup.

Thanks for your help (if you need I can post my files too)
Tensian is offline   Reply With Quote

Old   August 7, 2013, 23:16
Default
  #9
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
Hi James,
I am also a beginner. Here is my case. The fluid i have considered is water at 20 degree celcius. The only problem I am having is of convergence. If you can shed some light on it then that would be great.

laminarPipe_poiseuille.zip
inf.vish is offline   Reply With Quote

Old   August 8, 2013, 05:25
Default
  #10
Member
 
James
Join Date: May 2013
Posts: 82
Rep Power: 4
Tensian is on a distinguished road
Thanks Vishal,

As I expected, we have the same kind of BCs. The only difference is that I use some nonOrthogonalCorrectors because I have a tetraedral+prism mesh. Ill continue researching and if I know whats happening Ill let you know. I have been reading in the forum and it looks like all the people have some problems with pressure driven flows (many complaints about the big magnitudes of variables when Dirichlet pressure BCs are applied).
We are in contact, if I find something new Ill post it here

Cheers,
James
Tensian is offline   Reply With Quote

Old   August 11, 2013, 23:36
Default
  #11
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
Hi James,
I was able to get convergence on a 3D cylindrical pipe with the same boundary conditions. It takes a lot many iterations (431) as compared to simple velocity driven flow (97).
inf.vish is offline   Reply With Quote

Old   August 12, 2013, 06:54
Default
  #12
Member
 
James
Join Date: May 2013
Posts: 82
Rep Power: 4
Tensian is on a distinguished road
Hi Vishal,

Then it looks like the problems are the complex geometry and maybe the mesh, because I am trying to do this in a complex channel and simulation explodes! I have tried an advise given in the forum: I initialize the internalField for pressure with the same value than I put in the outlet. At first it works fine, but when resiudals are about 1e-02, they start to rise up, and values for pressure and velocity are near of 1e+12.

Ill make some experiments with cylindrical geometries, because if they work fine then Ill be sure that the problem is geometry and mesh, not OF model.

Thanks, we are in contact for anything!
Tensian is offline   Reply With Quote

Old   August 12, 2013, 23:02
Default
  #13
Member
 
Vishal
Join Date: Jul 2013
Posts: 73
Rep Power: 4
inf.vish is on a distinguished road
Oh. You can try refining your boundary meshes.
Yeah try the same problem on a simple cylinder.
You want to simulate Poiseuille flow but what is the geometry you are using?
inf.vish is offline   Reply With Quote

Old   January 2, 2014, 04:18
Default Floating Point core dumped
  #14
Senior Member
 
Join Date: Sep 2013
Location: Bangalore India
Posts: 134
Rep Power: 3
sam.ho is on a distinguished road
Hi,

I rad the discussion made by you all. And implemented similar boundary conditions to my simulations ( Flow through a ball valve) . But I am getting the following error.
#0 Foam::error:rintStack(Foam::Ostream&) in "/home/sml5kor/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/home/sml5kor/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::multiply(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/sml5kor/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 void Foam::multiply<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/sml5kor/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libincompressibleTurbulenceModel.so"
#5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam:perator*<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/sml5kor/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#6 Foam::incompressible::RASModels::kEpsilon::correct () in "/home/sml5kor/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#7
in "/home/sml5kor/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/bin/simpleFoam"
#8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9
in "/home/sml5kor/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/bin/simpleFoam"
Floating point exception (core dumped)

Can anybody help me ?

My case turbulent parameters are as below
k=0.00036 m2/s2
epsilon = 0.00014 m3/s2
nuT = 1.04 X 10^-7 m2/s
Density = 800 kg/m3
and Inlet presure = 5 bar
outlet pressure = 1 bar (atmospheric pressure)
sam.ho is offline   Reply With Quote

Old   February 27, 2014, 10:10
Question Boundary conditions for simpleFOAM
  #15
vut
Member
 
Join Date: Feb 2014
Posts: 56
Rep Power: 3
vut is on a distinguished road
Hi,

I want to apply a total pressure at inlet (4 bar) and a pressure outlet (0 bar) boundary conditions.

May you give me some advides?

In fact, I tried the files p and U given in the folder Poiseill's flow but I was unable to run the simulation!

Thanks.


Quote:
Originally Posted by inf.vish View Post
Oh. You can try refining your boundary meshes.
Yeah try the same problem on a simple cylinder.
You want to simulate Poiseuille flow but what is the geometry you are using?
vut is offline   Reply With Quote

Old   August 29, 2014, 16:33
Default
  #16
Member
 
Christian
Join Date: Apr 2014
Posts: 59
Rep Power: 3
crixman is on a distinguished road
Hi all,
after several tests I was able to get meaningful results for pressure-driven fluxes in a duct using:
p
Inlet: fixed Value uniform 10000 (inlet pressure - remember to divide it by density!)
outlet: fixed value uniform 0

U
inlet: fixed Value uniform (10 0 0)
outlet: fixed value uniform (10 0 0)

with the same fixed value you will force mass conservation and results are ok. this make sense if inlet and outlet have the same area.
if different area (such as pitzdaily,)
try
U
outlet:
type inletOutlet;
inletValue uniform (10 0 0); //or different velocity, try to estimate it from inelt/outlet ratio and mass conservation formulas;
value uniform (10 0 0);

Let me know if it works and if this approach is correct, that's the only way I could get meaningful physical results!
crixman is offline   Reply With Quote

Old   April 23, 2015, 12:19
Default Pressure BCs simpleFoam
  #17
Member
 
alvaro
Join Date: Apr 2015
Posts: 33
Rep Power: 2
alvariten is on a distinguished road
Hi people,

I know has been a long time since last post. I have the same problem with simpleFoam and the pressure driven flow. I'd like to know if you solved the problem (if still remember). I have tried everything, even what Vishal suggested. And whatever I do it diverges always just after the first iteration.

Code:
Starting time loop

Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.000640509, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.000755479, No Iterations 2
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/simpleFoam"
#8  
 in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/simpleFoam"
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10  
 in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/simpleFoam"
Floating point exception (core dumped)
The parameters that I used are exactly the same PitzDaily tutorial but with different boundary values (and the geometry)

p
Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    front
    {
        type            empty;
    }
    back
    {
        type            empty;
    }
    inlet
    {

        type            fixedValue;
        value           uniform 1000;
    }

    outlet
    {
        type            fixedValue;
        value           uniform 0;
    }
    sym
    {
        type            symmetryPlane;
    }
    wall1
    {
        type            zeroGradient;
    }

    wall2
    {
        type            zeroGradient;
    }

}
U
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    front
    {
        type            empty;
    }
    back
    {
        type            empty;
    }
    inlet
    {
        type            fixedValue;
        value           uniform (8.3 -5 0);

//      type        pressureInletVelocity;
//      value        uniform (0 0 0);
    }

    outlet
    {
        type            fixedValue;
        value           uniform (10 0 0);

//        type            zeroGradient;

//        type            inletOutlet;
//        inletValue      uniform (0 0 0);
//        value           uniform (0 0 0);
    }
    sym
    {
        type            symmetryPlane;
    }
    wall1
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    wall2
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

}
Regards
alvariten 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
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
High pressure residual simpleFoam CiccioPasticcio OpenFOAM Running, Solving & CFD 6 March 5, 2013 22:20
Pressure BC for combustion chamber Giuki FLUENT 1 July 19, 2011 11:35
pressure in simpleFoam mediode OpenFOAM Running, Solving & CFD 2 March 6, 2011 15:33
mapping of pressure field (simplefoam to cavitatingFoam) siddharameshwara OpenFOAM Running, Solving & CFD 14 February 15, 2011 09:59


All times are GMT -4. The time now is 15:04.