Pressure BC´s simpleFoam

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

 August 5, 2013, 13:32 Pressure BC´s simpleFoam #1 Senior Member   James Join Date: May 2013 Posts: 104 Rep Power: 5 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 it´s possible to do and if not, which solver can I use? Please HELP (I am getting crazy with that issue) Thank you so much

 August 5, 2013, 22:28 #2 Member   Vishal Join Date: Jul 2013 Posts: 73 Rep Power: 5 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.

 August 6, 2013, 11:07 #3 Senior Member   James Join Date: May 2013 Posts: 104 Rep Power: 5 Thanks for the reply, I am trying new bc´s 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...) It´s weird, because FLUENT do the calculation without problems....

 August 6, 2013, 11:09 simpleFoam BBCC #4 New Member   Juan Pablo Toro Labbe Join Date: Jun 2013 Location: Davis CA Posts: 7 Rep Power: 5 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

 August 6, 2013, 11:31 #5 Senior Member   James Join Date: May 2013 Posts: 104 Rep Power: 5 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. I´ll try what you suggest, keeping my fingers crossed. Thank you so much

 August 6, 2013, 11:33 #6 Senior Member   James Join Date: May 2013 Posts: 104 Rep Power: 5 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!

 August 6, 2013, 22:47 #7 Member   Vishal Join Date: Jul 2013 Posts: 73 Rep Power: 5 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.

 August 7, 2013, 05:01 #8 Senior Member   James Join Date: May 2013 Posts: 104 Rep Power: 5 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)

 August 7, 2013, 23:16 #9 Member   Vishal Join Date: Jul 2013 Posts: 73 Rep Power: 5 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

 August 8, 2013, 05:25 #10 Senior Member   James Join Date: May 2013 Posts: 104 Rep Power: 5 Thanks Vishal, As I expected, we have the same kind of BC´s. The only difference is that I use some nonOrthogonalCorrectors because I have a tetraedral+prism mesh. I´ll continue researching and if I know what´s happening I´ll 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 BC´s are applied). We are in contact, if I find something new I´ll post it here Cheers, James

 August 11, 2013, 23:36 #11 Member   Vishal Join Date: Jul 2013 Posts: 73 Rep Power: 5 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).

 August 12, 2013, 06:54 #12 Senior Member   James Join Date: May 2013 Posts: 104 Rep Power: 5 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. I´ll make some experiments with cylindrical geometries, because if they work fine then I´ll be sure that the problem is geometry and mesh, not OF model. Thanks, we are in contact for anything!

 August 12, 2013, 23:02 #13 Member   Vishal Join Date: Jul 2013 Posts: 73 Rep Power: 5 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?

 January 2, 2014, 04:18 Floating Point core dumped #14 Senior Member   Join Date: Sep 2013 Location: Bangalore India Posts: 134 Rep Power: 5 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&, Foam::UList const&, Foam::UList const&) in "/home/sml5kor/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #4 void Foam::multiply(Foam::GeometricField&, Foam::GeometricField const&, Foam::GeometricField const&) in "/home/sml5kor/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64GccDPOpt/lib/libincompressibleTurbulenceModel.so" #5 Foam::tmp > Foam:perator*(Foam::tmp > const&, Foam::GeometricField 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)

February 27, 2014, 10:10
Boundary conditions for simpleFOAM
#15
Member

Join Date: Feb 2014
Posts: 57
Rep Power: 4
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 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?

 August 29, 2014, 16:33 #16 Member   Christian Join Date: Apr 2014 Posts: 72 Rep Power: 4 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!

 April 23, 2015, 12:19 Pressure BC´s simpleFoam #17 Member   alvaro Join Date: Apr 2015 Posts: 33 Rep Power: 3 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&, Foam::Field&, Foam::lduMatrix const&, Foam::FieldField const&, Foam::UPtrList const&, Foam::Field const&, unsigned char) const in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #4 Foam::GAMGSolver::Vcycle(Foam::PtrList const&, Foam::Field&, Foam::Field const&, Foam::Field&, Foam::Field&, Foam::Field&, Foam::Field&, Foam::Field&, Foam::PtrList >&, Foam::PtrList >&, unsigned char) const in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #5 Foam::GAMGSolver::solve(Foam::Field&, Foam::Field const&, unsigned char) const in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #6 Foam::fvMatrix::solveSegregated(Foam::dictionary const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libfiniteVolume.so" #7 Foam::fvMatrix::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

 February 5, 2016, 06:27 #18 New Member   Lisa Join Date: Dec 2015 Posts: 8 Rep Power: 2 Hey Alvaro, Did you solve that Problem? I have the same Problem and can't find an answer.. Thanks!!

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post Mihail CFX 7 September 7, 2014 06:27 CiccioPasticcio OpenFOAM Running, Solving & CFD 6 March 5, 2013 22:20 Giuki FLUENT 1 July 19, 2011 11:35 mediode OpenFOAM Running, Solving & CFD 2 March 6, 2011 15:33 siddharameshwara OpenFOAM Running, Solving & CFD 14 February 15, 2011 09:59

All times are GMT -4. The time now is 00:58.