CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Velocity inlet pressure outlet boundary conditions

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

Like Tree5Likes
  • 1 Post By markoseaajan
  • 1 Post By piu58
  • 1 Post By piu58
  • 1 Post By sweet_satan
  • 1 Post By sweet_satan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2018, 20:24
Default Velocity inlet pressure outlet boundary conditions
  #1
New Member
 
markose aajan
Join Date: Jan 2018
Posts: 4
Rep Power: 2
markoseaajan is on a distinguished road
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.
markoseaajan is offline   Reply With Quote

Old   March 8, 2018, 01:53
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 590
Rep Power: 6
piu58 is on a distinguished road
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
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)
piu58 is offline   Reply With Quote

Old   March 9, 2018, 02:15
Default
  #3
New Member
 
markose aajan
Join Date: Jan 2018
Posts: 4
Rep Power: 2
markoseaajan is on a distinguished road
Quote:
Originally Posted by piu58 View Post
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?
markoseaajan is offline   Reply With Quote

Old   March 9, 2018, 05:43
Default
  #4
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 590
Rep Power: 6
piu58 is on a distinguished road
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)
piu58 is offline   Reply With Quote

Old   June 5, 2018, 03:23
Default
  #5
New Member
 
rajat tripathi
Join Date: May 2018
Location: india
Posts: 9
Rep Power: 2
aero.rajat is on a distinguished road
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
aero.rajat is offline   Reply With Quote

Old   June 5, 2018, 08:34
Default
  #6
New Member
 
Join Date: Aug 2012
Posts: 15
Rep Power: 8
sweet_satan is on a distinguished road
Check if you can take BCs form this tutorial case:
https://openfoamwiki.net/index.php/G..._-_planeWall2D


That worked for me.
sweet_satan is offline   Reply With Quote

Old   June 5, 2018, 10:14
Default
  #7
New Member
 
rajat tripathi
Join Date: May 2018
Location: india
Posts: 9
Rep Power: 2
aero.rajat is on a distinguished road
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
aero.rajat is offline   Reply With Quote

Old   June 5, 2018, 19:33
Default
  #8
New Member
 
Join Date: Aug 2012
Posts: 15
Rep Power: 8
sweet_satan is on a distinguished road
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.
sweet_satan is offline   Reply With Quote

Old   June 6, 2018, 06:58
Default
  #9
New Member
 
rajat tripathi
Join Date: May 2018
Location: india
Posts: 9
Rep Power: 2
aero.rajat is on a distinguished road
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<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&) at ??:?
#7 Foam::fvMatrix<double>::solve() at ??:?
#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 ? 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?
aero.rajat is offline   Reply With Quote

Old   June 6, 2018, 07:02
Default
  #10
New Member
 
rajat tripathi
Join Date: May 2018
Location: india
Posts: 9
Rep Power: 2
aero.rajat is on a distinguished road
Quote:
Originally Posted by sweet_satan View Post
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.
aero.rajat is offline   Reply With Quote

Old   June 6, 2018, 08:50
Default
  #11
New Member
 
Join Date: Aug 2012
Posts: 15
Rep Power: 8
sweet_satan is on a distinguished road
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
File Type: gz typ_1_0.tar.gz (186.4 KB, 4 views)
aero.rajat likes this.
sweet_satan is offline   Reply With Quote

Old   June 12, 2018, 07:41
Default BuoyantBuossinesqPimpleFoam
  #12
New Member
 
rajat tripathi
Join Date: May 2018
Location: india
Posts: 9
Rep Power: 2
aero.rajat is on a distinguished road
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
File Type: gz parcel.tar.gz (78.1 KB, 2 views)
aero.rajat is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
interFoam (HELYX-OS) pressure boundary conditions SFr OpenFOAM Running, Solving & CFD 8 June 23, 2016 17:36
Setting both inlet and outlet with pressure boundary conditions ahmadbakri CFX 0 July 1, 2015 05:06
Boundary Conditions: Pressure Inlet, Velocity Outlet BigPapi34 OpenFOAM Running, Solving & CFD 4 August 2, 2014 12:39
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


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