|
[Sponsors] |
Is this a plausible incompressible pressure driven flow case? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 23, 2016, 17:00 |
Is this a plausible incompressible pressure driven flow case?
|
#1 |
New Member
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 10 |
Is this a plausible case?
Say I have a pressure difference driven flow in a cylinder of 200kPa over a distance of 30mm (just simply from the top to the bottom of the cylinder) with a diameter of 2mm, can I use the incompressible solver SIMPLE or is this an compressible case? Because when I try running the case with simpleFoam i always get a floating point exception (and yes there's nothing set to zero) and the velocity is really high. If this is a compressible case what solver could I use and why please. |
|
September 5, 2016, 06:30 |
|
#2 |
New Member
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 10 |
anyone????
|
|
September 5, 2016, 10:45 |
|
#3 |
New Member
Ezequiel Krumrick
Join Date: Mar 2014
Location: Argentina
Posts: 10
Rep Power: 12 |
Hi Yeya,
Is your Mach number lesser than 0.3? What other information do you have on the case? Regards, Ezequiel
__________________
Best regards, Ezequiel |
|
September 5, 2016, 11:17 |
|
#4 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Hi Yeya;
Compressiblity/ incompressibility depends on what you want to test. Based on the pressure gradient over such short distance will result in extremely high velocities for sure. Regarding the floating point, it means your code is dividing a variable by 0. Have you changed your code or are you using standard OpenFOAM code? Check the following thread to know what solver best suits your case study. http://www.cfd-online.com/Forums/ope...s-icofoam.html Saideep |
|
September 5, 2016, 18:40 |
|
#5 | |
New Member
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 10 |
Quote:
I am not totally sure what the Mach number would be but I am guessing it will be high than 0.3 somewhere in the domain due to the pressure difference over a small space but like I said Im not 100% sure about the physics. Other information about the case: I am using a very simple model, just a nozzle shaped as a cylinder where the gas is impinging onto a surface, so the geometry is basically a the mold of a hollow cylinder in a solid box, where the cylinder wall has some thickness. I have set the boundary conditions such that the velocity at the inlet and outlet is determined by the pressure, and the pressure is fixed. I am using the realizableKE turbulence model. do you need more info? |
||
September 5, 2016, 18:48 |
|
#6 | ||
New Member
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 10 |
Quote:
I just need to see the velocity over the whole domain, but as you said this would result in large velocity would you recommend a compressible solver? Quote:
Also, I didn't set anything to zero except 0 velocity at the walls and the placeholder values in the boundary conditions that I have assigned as calculated. |
|||
September 6, 2016, 10:53 |
|
#7 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Hi Yeya;
I never used Compressible flow cases but as you aren't sure about the result it would be better to go ahead with in-compressible flow solver initially. (Just to make things simple and understand what is happening) Regarding high velocity: Probably you could relate your numerical solution with any sort of analytical solutions (if available). I deal with extremely low flow velocities and use Darcy, Hagen-Poisuielle relations to find velocity based on pressure gradient. However, these relations are valid for laminar flow cases. Hope this helps; Saideep |
|
September 7, 2016, 04:54 |
|
#8 | ||
New Member
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 10 |
Hey Saideep!
Quote:
Code:
Time = 49.5 smoothSolver: Solving for Ux, Initial residual = 0.44584, Final residual = 0.0287436, No Iterations 15 smoothSolver: Solving for Uy, Initial residual = 0.421561, Final residual = 0.0224867, No Iterations 16 smoothSolver: Solving for Uz, Initial residual = 0.410142, Final residual = 0.016996, No Iterations 15 #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::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #5 Foam::GAMGSolver::solveCoarsestLevel(Foam::Field<double>&, Foam::Field<double> const&) const at ??:? #6 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:? #7 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #8 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:? #9 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:? #10 Foam::fvMatrix<double>::solve() at ??:? #11 ? at ??:? #12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #13 ? at ??:? Floating point exception (core dumped) Quote:
|
|||
September 8, 2016, 08:25 |
|
#9 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
I just read the thread briefly...
__________________
Keep foaming, Tobias Holzmann |
|
September 9, 2016, 05:22 |
|
#10 | ||
New Member
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 10 |
Hi Tobias thanks for your reply,
Quote:
Pressure: Code:
dimensions [0 2 -2 0 0 0 0]; internalField uniform 61445; boundaryField { in { type fixedValue; value uniform 180722; } out { type fixedValue; value uniform 61039; } wall { type zeroGradient; } sym { type symmetryPlane; } } U file: Code:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { in { type pressureInletUniformVelocity; value uniform (0 0 0); } out { type pressureInletOutletVelocity; value uniform (0 0 0); } wall { type fixedValue; value uniform (0. 0. 0.); } sym { type symmetryPlane; } } I've tried with total pressure at the outlet but the same error. something also to mention the boundig epsilon value and bounding k is getting really big on the order of 10^20 do you think that might be the problem? i have set a fixed value for the inlet on those and zeroGradient on the outlet and the wall function for the wall. Quote:
when viewing the timesteps it looks ok for a couple of timesteps but towards the end it doesn't look good the values increase which seems like to be at a unreasonable rate. |
|||
September 9, 2016, 11:53 |
|
#11 |
Senior Member
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12 |
Hi Yeya;
When things don't go as expected, decompose your problem into smaller steps. That is, use a smaller pressure gradient and see if the flow physics is comparable to Hagen-Poisuielle relations. Though it could be laminar flow, if you get the error even here, its easier to know where the problem comes from. I am not sure about the b.c your using for velocity but as Tobi told, could you switch to lower pressure gradient (maybe: 1Pa, ofcourse this ultimately depends on your domain size) and zeroGradient for velocity at inlet and outlet and also turn off gravity term. This exercise should give more information to know what is happening. Saideep |
|
September 11, 2016, 05:15 |
|
#12 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
You need total pressure at the inlet, otherwise Our dp will always be the same that will accelerate you fluid till you reach infty...
__________________
Keep foaming, Tobias Holzmann |
|
September 12, 2016, 18:27 |
|
#13 | |
New Member
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 10 |
Quote:
thanks so much, having total pressure at the inlet worked i had to change the outlet velocity to inletOutlet! but the problem now is that when I try a compressible case with the same conditions it doesn't work and I get a floating point exception error again. any suggestions? Am I not suppose to fix any other field? |
||
September 13, 2016, 04:35 |
|
#14 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Dear YeYa,
please investigate a bit more time into your questions and provide more information otherwise it is just guessing something. To your question, I am not so familiar with compressible flows but you need to change the total pressure BC. I do not know how you set-up the BC but check out doxygen for the correct use (or go directly to the source-code). In addition as far as I can remember, the BC depend on the problem you are solving. Compressible means that the density is not anymore constant and it is important to specify the correct pressure. Incompressible -> pressure value does not matter, Compressible -> pressure value matters.
__________________
Keep foaming, Tobias Holzmann |
|
September 14, 2016, 18:40 |
|
#15 |
New Member
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 10 |
Hey really sorry about that - I'll include more details from now, thanks for helping.
What I meant to say is I took your suggestion and put total pressure for the inlet but that didn't work so i changed the outlet BC for U to inletOutlet and it worked. (see below) U Code:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { in { type pressureInletVelocity; value uniform (0 0 0); } out { type inletOutlet; inletValue uniform (0 0 0); value $internalField; } wall { type fixedValue; value uniform (0. 0. 0.); } sym { type symmetryPlane; } } Code:
dimensions [0 2 -2 0 0 0 0]; internalField uniform 61445; boundaryField { in { type totalPressure; p0 uniform 180722; } out { type fixedValue: value uniform 61039; } wall { type zeroGradient; } sym { type symmetryPlane; } } Since the speed was so high I am trying to do a compressible case, but I use the same boundary conditions as I did for the incompressible case but I get a floating point error again. In the compressible case we have to take into account more fields, so my question is, are we not suppose to fix any other BC in the other fields? For example, suppose I set the temperature boundary condition as fixedValue, would this not make sense? |
|
September 14, 2016, 18:59 |
|
#16 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
For compressible solvers we only need to solve one equation more (for the energy). This is normally done by using the temperature field and building the enthalpy. Then we solve for the enthalpy, and calculate the density based on the thermodynamic law. Anyway,... if you have a velocity about 700 m/s you should be somehow larger than Ma 1.5, aren´t you? If this is the case, the problem changes and you should not specify the outlet pressure anymore (as far as I can remember).
The totalPressure BC needs to be changed with phi, psi, gamma and rho. Good luck.
__________________
Keep foaming, Tobias Holzmann |
|
September 19, 2016, 04:45 |
|
#17 | |
New Member
larmes
Join Date: Aug 2016
Posts: 26
Rep Power: 10 |
Quote:
Because what if the outlet is exposed to the atmosphere but there is an inital pressure at the inlet. I have attached an image of how the mesh looks like if that helps, the inlet is shaded in orange, and the outlet are the plane faces parallell to the +/-ZY and ZX plane. |
||
Tags |
pressure and velocity, simplefoam convergence |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Buoyancy driven flow of an incompressible fluid in a closed volume | Nicole | OpenFOAM Running, Solving & CFD | 1 | March 12, 2019 22:24 |
Pressure Outlet Targeted Mass Flow Rate | LuckyTran | FLUENT | 1 | November 23, 2016 11:40 |
Is Playstation 3 cluster suitable for CFD work | hsieh | OpenFOAM | 9 | August 16, 2015 15:53 |
Incompressible Flow: Retrieving Pressure from Velocity Field | lordvon | Main CFD Forum | 9 | July 6, 2013 12:24 |
Wrong Pressure countors for channel flow driven by mass flow rate or press gradient | ash-khan | FLUENT | 0 | June 21, 2009 11:02 |