Velocity inlet pressure outlet boundary conditions
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. |
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 |
Quote:
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::printStack(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? |
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. |
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 |
Check if you can take BCs form this tutorial case:
https://openfoamwiki.net/index.php/G..._-_planeWall2D That worked for me. |
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 :D |
1 Attachment(s)
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 |
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::printStack(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? |
Quote:
also, if you can upload your 3D case then I can get an idea where exactly i am missing out. |
1 Attachment(s)
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} Should you have any thoughts, comments or have found mistakes and errors in setup please let me know. |
BuoyantBuossinesqPimpleFoam
1 Attachment(s)
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? |
Quote:
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 Adjustable mass outflow : 6.6375e-164 |
Y + and U infinity
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 |
All times are GMT -4. The time now is 23:30. |