# Velocity inlet pressure outlet boundary conditions

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

 March 7, 2018, 20:24 Velocity inlet pressure outlet boundary conditions #1 New Member   markose aajan Join Date: Jan 2018 Posts: 4 Rep Power: 4 Hi, I'm trying to simulate flow over a heater thats placed in a square duct and I want to fix the inlet velocity and the outlet pressure (outlet at atmospheric pressure). I'm not sure what combination of boundary conditions to use in 0/U and 0/p for the inlet and outlet patches. Any help would be appreciated. aero.rajat likes this.

 March 8, 2018, 01:53 #2 Senior Member     Uwe Pilz Join Date: Feb 2017 Location: Leipzig, Germany Posts: 590 Rep Power: 8 Normally, in such cases is used: - fixed velocity at the inlet - zero gradient pressure at the inlet - zero gradient velocity at the outlet - fixed pressure at the oultlet tonnykz and aero.rajat like this. __________________ Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)

March 9, 2018, 02:15
#3
New Member

markose aajan
Join Date: Jan 2018
Posts: 4
Rep Power: 4
Quote:
 Originally Posted by piu58 Normally, in such cases is used: - fixed velocity at the inlet - zero gradient pressure at the inlet - zero gradient velocity at the outlet - fixed pressure at the oultlet
Time = 126

DILUPBiCGStab: Solving for Ux, Initial residual = 0.127555, Final residual = 0.000726358, No Iterations 1
DILUPBiCGStab: Solving for Uy, Initial residual = 0.0816763, Final residual = 0.000339077, No Iterations 1
DILUPBiCGStab: Solving for T, Initial residual = 0.000453331, Final residual = 1.69327e-05, No Iterations 1
DICPCG: Solving for p_rgh, Initial residual = 0.970206, Final residual = 0.00821321, No Iterations 3
time step continuity errors : sum local = 8.9019e+39, global = -9.73798e+24, cumulative = -9.73798e+24
DILUPBiCGStab: Solving for epsilon, Initial residual = 1, Final residual = 4.24128e-05, No Iterations 1
bounding epsilon, min: -5.43709e+48 max: 3.98894e+75 average: 6.98025e+71
DILUPBiCGStab: Solving for k, Initial residual = 0.423591, Final residual = 0.000569428, No Iterations 1
ExecutionTime = 3.6 s ClockTime = 3 s

Time = 127

DILUPBiCGStab: Solving for Ux, Initial residual = 0.0181682, Final residual = 0.000211638, No Iterations 1
DILUPBiCGStab: Solving for Uy, Initial residual = 0.00725383, Final residual = 8.25262e-05, No Iterations 1
DILUPBiCGStab: Solving for T, Initial residual = 7.9043e-14, Final residual = 7.9043e-14, No Iterations 0
DICPCG: Solving for p_rgh, Initial residual = 0.99686, Final residual = 2.46733e+07, No Iterations 1001
time step continuity errors : sum local = 6.13966e+48, global = 5.73131e+39, cumulative = 5.73131e+39
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4 Foam::PBiCGStab::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#5 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) at ??:?
#6 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqSimpleFoam"
#7 Foam::fvMatrix<double>::solve() in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqSimpleFoam"
#8 Foam::SolverPerformance<double> Foam::solve<double>(Foam::tmp<Foam::fvMatrix<doubl e> > const&) at ??:?
#9 Foam::RASModels::kEpsilon<Foam::IncompressibleTurb ulenceModel<Foam::transportModel> >::correct() at ??:?
#10 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqSimpleFoam"
#11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#12 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/buoyantBoussinesqSimpleFoam"
Floating point exception (core dumped)

I tried those conditions and this is the error i'm getting. Any idea what could be causing this error?

 March 9, 2018, 05:43 #4 Senior Member     Uwe Pilz Join Date: Feb 2017 Location: Leipzig, Germany Posts: 590 Rep Power: 8 In the case of compressible media and with buoyancy, p_rgh takes the role of the pressure in simpler cases. Please check the b.c. for p_rgh. It is not a good idea in this case, to set a whole patch to a fixed pressure, because it is nonphysical. You have to set only one reference point. You may, however, set p_rgh to be uniform at a patch. aero.rajat likes this. __________________ Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)

 June 5, 2018, 03:23 #5 New Member   rajat tripathi Join Date: May 2018 Location: india Posts: 9 Rep Power: 3 hello. I am working on a similar problem. If you can help me a little regarding your case setup then it would make my life a little easier. Thanks

 June 5, 2018, 08:34 #6 New Member   Join Date: Aug 2012 Posts: 15 Rep Power: 9 Check if you can take BCs form this tutorial case: https://openfoamwiki.net/index.php/G..._-_planeWall2D That worked for me.

 June 5, 2018, 10:14 #7 New Member   rajat tripathi Join Date: May 2018 Location: india Posts: 9 Rep Power: 3 thanks buddy for the prompt response but the case mentioned by you is nowhere close to my problem. I want to analyse the heat transfer for a small box kept exactly at the centre of a big cuboid room. Also, wind is blowing at 10 m/s. I am using the solver bouyantSimpleFoam. Is there anything better you would like to suggest? i have built my blockMeshDict file but still working on the boundary conditions part. I can post them here if required. Again, thanks for replying. I didnt really expect such a quick reply

 June 5, 2018, 19:33 #8 New Member   Join Date: Aug 2012 Posts: 15 Rep Power: 9 I haven't used that solver so I'm no expert. However I would suggest to build your case around one of the tutorials. From my experience that saves a lot of time and nerves. There is like 5 tutorial cases for this solver in openfoam, I am sure you can find one that suits your needs. In the attached screen you can see post process from a case I have build from planeWall2D tutorial I have mentioned before. From this 2D tutorial I have build a 3d case with three fluid and one solid regions. It was one day of work, when on the other hand if I tried to build this case from scratch it would took me a week at least. Screenshot from 2018-06-06 00-30-50.jpg aero.rajat likes this.

 June 6, 2018, 06:58 #9 New Member   rajat tripathi Join Date: May 2018 Location: india Posts: 9 Rep Power: 3 PIMPLE: iteration 1 DILUPBiCGStab: Solving for T, Initial residual = 1, Final residual = 6.48233e-07, No Iterations 7 DICPCG: Solving for p_rgh, Initial residual = 3.38465e-41, Final residual = 3.38465e-41, No Iterations 0 time step continuity errors : sum local = 5.06569e+47, global = -1.29063e+32, cumulative = -1.2414e+32 DICPCG: Solving for p_rgh, Initial residual = 4.27552e-41, Final residual = 4.27552e-41, No Iterations 0 time step continuity errors : sum local = 6.39901e+47, global = 7.55855e+31, cumulative = -4.85546e+31 #0 Foam::error:rintStack(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::PBiCGStab::solve(Foam::Field&, Foam::Field const&, unsigned char) const at ??:? #5 Foam::fvMatrix::solveSegregated(Foam::dict ionary const&) at ??:? #6 Foam::fvMatrix::solve(Foam::dictionary const&) at ??:? #7 Foam::fvMatrix::solve() at ??:? #8 Foam::SolverPerformance Foam::solve(Foam::tmp > const&) at ??:? #9 Foam::RASModels::kEpsilon >::correct() at ??:? #10 ? at ??:? #11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #12 ? at ??:? Floating point exception (core dumped) getting the above message. The iteration stops after time step = 12. I cant figure out any reason. Any suggestions?

June 6, 2018, 07:02
#10
New Member

rajat tripathi
Join Date: May 2018
Location: india
Posts: 9
Rep Power: 3
Quote:
 Originally Posted by sweet_satan I haven't used that solver so I'm no expert. However I would suggest to build your case around one of the tutorials. From my experience that saves a lot of time and nerves. There is like 5 tutorial cases for this solver in openfoam, I am sure you can find one that suits your needs. In the attached screen you can see post process from a case I have build from planeWall2D tutorial I have mentioned before. From this 2D tutorial I have build a 3d case with three fluid and one solid regions. It was one day of work, when on the other hand if I tried to build this case from scratch it would took me a week at least. Attachment 63803

also, if you can upload your 3D case then I can get an idea where exactly i am missing out.

June 6, 2018, 08:50
#11
New Member

Join Date: Aug 2012
Posts: 15
Rep Power: 9
As for the error message. I am pretty sure its a setup problem - check BCs and thermophysicalProperties.

As for my case I have uploaded it but bear in mind it's ans early stage and needs some work, however calcualtions work and you can postprocess results so its a good starting point.

The solver used is chtMultiRegionSimpleFoam and BCs setup is a little different here. Long story short it takes BCs from 0 folder and copies that to each region folder after splitting mesh into regions. After that system/*/changeDictionaryDict is used to change BCs of the desired patch.

So you have to look into changeDictionaryDict first, and if there is no BC for a patch, it is taken form 0 folder.

Alternatively you can run this case with ./Allrun script and check region folders in 0 after changeDictionary is done.

I have set snappy to coarser mesh in case you want to run this case. Allrun script almost work you still have to :
Code:
`rm -f 0/wall/{mut,alphat,epsilon,k,U,p_rgh}`
before postprocess. There is also paraview state in the folder you can load.

Should you have any thoughts, comments or have found mistakes and errors in setup please let me know.
Attached Files
 typ_1_0.tar.gz (186.4 KB, 6 views)

June 12, 2018, 07:41
BuoyantBuossinesqPimpleFoam
#12
New Member

rajat tripathi
Join Date: May 2018
Location: india
Posts: 9
Rep Power: 3
i tried to run this case(attached). The principal problem was about the forced convection over a heated battery kept in air @ 10 m/s.
But, to verify whether the test case is built up correctly, i simplified it into flow over a flat plate and compared my results of thermal boundary layer with the standard results.

Problem is, my temperature is shooting up to thousands of kelvin, 2*10^4K. Probably the solution is diverging. I dont know what is the issue, tired of seeing it again and again.

Even an inch of support will be a helpful right now. Batman, where are you?
Attached Files
 parcel.tar.gz (78.1 KB, 6 views)

January 30, 2020, 18:53
#13
Member

Join Date: Jul 2019
Posts: 51
Rep Power: 2
Quote:
 Originally Posted by piu58 In the case of compressible media and with buoyancy, p_rgh takes the role of the pressure in simpler cases. Please check the b.c. for p_rgh. It is not a good idea in this case, to set a whole patch to a fixed pressure, because it is nonphysical. You have to set only one reference point. You may, however, set p_rgh to be uniform at a patch.

Hi,

I am using twoLiquidMixingFoam multiphase solver. In this case, there is a variation in the density and, thus, there is buoyancy.

When I do not set the pressure value at the outlet for the whole patch, I get an error that the continuity is not satisfied (this is obtained I set a reference cell for a reference pressure value).

I would appreciate you assistance. Thanks.

Here is the error I get:

Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 1.49068e-05
Specified mass inflow : 0.00344015
Specified mass outflow : 0

 February 3, 2020, 03:58 Y + and U infinity #14 New Member   Deutschland Join Date: Jun 2019 Posts: 19 Rep Power: 2 Hi everyone, I want to use the boundary layer on my mesh and compute the y+. But unfortunately, my velocity at inlet and outlet is zero, therefore I have to calculate the U infinity, does anyone know how can I have U infinity? kind regards, Arghavan