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/)
-   -   Pressure BCs simpleFoam (http://www.cfd-online.com/Forums/openfoam-solving/121792-pressure-bc-s-simplefoam.html)

Tensian August 5, 2013 13:32

Pressure BCs simpleFoam
 
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

inf.vish August 5, 2013 22:28

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.

Tensian August 6, 2013 11:07

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....

jptorol August 6, 2013 11:09

simpleFoam BBCC
 
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

Tensian August 6, 2013 11:31

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 August 6, 2013 11:33

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!

inf.vish August 6, 2013 22:47

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.

Tensian August 7, 2013 05:01

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)

inf.vish August 7, 2013 23:16

1 Attachment(s)
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.

Attachment 24234

Tensian August 8, 2013 05:25

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

inf.vish August 11, 2013 23:36

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).

Tensian August 12, 2013 06:54

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!

inf.vish August 12, 2013 23:02

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?

sam.ho January 2, 2014 03:18

Floating Point core dumped
 
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::printStack(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::operator*<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)

vut February 27, 2014 09:10

Boundary conditions for simpleFOAM
 
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 (Post 445306)
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?



All times are GMT -4. The time now is 13:48.