# Pressure gradient flows boundary condition

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

 July 18, 2022, 02:39 Pressure gradient flows boundary condition #1 Member   Jigs Join Date: Aug 2017 Location: Ahmedabad Posts: 37 Rep Power: 7 Hi Team, I am trying to simulate a problem with pressure condition at inlet and outlet. The same problem works great with fixed value at inlet velocity but doesn't converge for pressure inputs at inlet and outlet. Let's say I am trying to simulate with pressure inlet at 1 psi and atmospheric pressure at outlet. Used fixedValue for inlet and outlet for pressure condition. (I did divide the density with the pressure to apply pressure gradient here as input value) - Hope this part is correct. Do correct me if I am wrong. Now what i am confused is with the velocity (U) at inlet and outlet. Should I keep zeroGradient or any other type i should be using. Regards,

 July 20, 2022, 14:28 #2 New Member   Pavithran R Join Date: Mar 2021 Posts: 2 Rep Power: 0 You can keep velocity BC as zeroGradient

 July 21, 2022, 01:11 #3 Member   Jigs Join Date: Aug 2017 Location: Ahmedabad Posts: 37 Rep Power: 7 I did try that and it isn't converging. The simulation stops after few steps throwing below error. Code: ```smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0835649, No Iterations 9 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0832669, No Iterations 9 smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.0962039, No Iterations 6 #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 double Foam::sumProd(Foam::UList const&, Foam::UList const&) at ??:? #4 Foam::PCG::solve(Foam::Field&, Foam::Field const&, unsigned char) const at ??:? #5 Foam::GAMGSolver::solveCoarsestLevel(Foam::Field&, Foam::Field const&) const at ??:? #6 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 at ??:? #7 Foam::GAMGSolver::solve(Foam::Field&, Foam::Field const&, unsigned char) const at ??:? #8 Foam::fvMatrix::solveSegregated(Foam::dictionary const&) at ??:? #9 Foam::fvMatrix::solve(Foam::dictionary const&) in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/simpleFoam" #10 Foam::fvMatrix::solve() in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/simpleFoam" #11 ? in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/simpleFoam" #12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #13 ? in "/opt/openfoam9/platforms/linux64GccDPInt32Opt/bin/simpleFoam" Floating point exception```

 July 21, 2022, 01:54 #4 Member   Jigs Join Date: Aug 2017 Location: Ahmedabad Posts: 37 Rep Power: 7 even pressureInletOutletVelocity in U at inlet didn't work. same floating point exception error.

 July 21, 2022, 13:30 #5 New Member   Pavithran R Join Date: Mar 2021 Posts: 2 Rep Power: 0 Check Schems in your case and try using relaxation factors. If you using tet mesh means use nNonOrthogonalCorrectors in fvSolution