CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Simulating a steady-state/laminar/incompressible/newtonian flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 6, 2019, 11:23
Smile Simulating a steady-state/laminar/incompressible/newtonian flow
  #1
New Member
 
Estelle
Join Date: Mar 2019
Posts: 10
Rep Power: 7
Estelle13 is on a distinguished road
Hello everyone,



I am totally new on OpenFoam. I practiced on tutorials and thanks to some videos/forums. Nevertheless I am facing a problem:

Which solver do I have to use to simulate a steady-state, laminar, incompressible, newtonian flow?



Thanks,
Estelle
Estelle13 is offline   Reply With Quote

Old   March 6, 2019, 11:29
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
simpleFoam works. Probably there's even simpler ones that also work.
LuckyTran is offline   Reply With Quote

Old   March 7, 2019, 11:11
Default
  #3
New Member
 
Estelle
Join Date: Mar 2019
Posts: 10
Rep Power: 7
Estelle13 is on a distinguished road
Yes you're right. I made it work today, I juste changed the turbulenceProperties file to a laminar simulationType ans it has been ok.
I would like to make the transient form work too (icoFoam) ! Until now it does not.
Estelle13 is offline   Reply With Quote

Old   March 7, 2019, 16:01
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
if you don't have any luck with icoFoam, the transient version of simpleFoam is pimpleFoam (merged piso-simple algorithm) or pisoFoam.
LuckyTran is offline   Reply With Quote

Old   March 8, 2019, 04:29
Default
  #5
Member
 
VS
Join Date: Nov 2012
Posts: 86
Rep Power: 14
VSass is on a distinguished road
pimple,piso and icoFoam are good candidates for what you want to do. Try to give some more details on why icoFoam is not working for your case. Solving basic issues in this early stage will give you more than just changing solvers.
VSass is offline   Reply With Quote

Old   March 11, 2019, 06:07
Smile icoFoam simulation - Poiseuille cylinder
  #6
New Member
 
Estelle
Join Date: Mar 2019
Posts: 10
Rep Power: 7
Estelle13 is on a distinguished road
Hello,


I managed to use simpleFoam for my simulations in steady-state! The problem now is for the transient part of my study. As I am a very beginner I tried to use both pimpleFoam, pisoFoam (lam,LES or RAS) but it instantly crashes each time, and I still do not succeed in using icoFoam.


Here's a very simple case I tried to make run with icoFoam: a cylinder with D=1e-04m and L=7e-03m for a Poiseuille flow (nu = 5e-05 mē/s) with the condition deltaP=30bars between the inlet and the outlet. The maximum velocity should be 5.36m/s when it converges. I joined the files P/U/transportProperties/blockMeshDict/controlDict.

Help :')


Thanks for your answers,
Estelle
Attached Files
File Type: pdf p.pdf (29.0 KB, 6 views)
File Type: pdf U.pdf (29.2 KB, 2 views)
File Type: pdf transportProperties.pdf (28.1 KB, 2 views)
File Type: pdf blockMeshDict.pdf (32.5 KB, 1 views)
File Type: pdf controlDict.pdf (28.7 KB, 2 views)
Estelle13 is offline   Reply With Quote

Old   March 11, 2019, 11:38
Default
  #7
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
See if you can dig out the Courant number from the log. It's probably stupidly high.

try a very small deltaT, like 1e-06 s.

What's the ddtScheme setting in fvSchemes dict? Euler hopefully?
What's your fvSolution dict?


Also try the dam break tutorial or pitzdaily tutorial for some hints.
LuckyTran is offline   Reply With Quote

Old   March 11, 2019, 11:56
Unhappy
  #8
New Member
 
Estelle
Join Date: Mar 2019
Posts: 10
Rep Power: 7
Estelle13 is on a distinguished road
Here are the fvSchemes and fvSolution files,.



Is not it what I am doing by setting the "endTime" to 10e+6 and "deltaT" to 1 in controlDict? It is the same than putting respectively 1 and 10e-6, no?

Yes, it is Euler for ddt.


I already did these tutorials. the problem is that I am not working with the same scales at all. My conduct is 10-5 meters large and my fluid is oil =/ so I have results very different from the tutos.
Attached Files
File Type: pdf fvSchemes.pdf (28.7 KB, 3 views)
File Type: pdf fvSolution.pdf (30.1 KB, 2 views)
Estelle13 is offline   Reply With Quote

Old   March 12, 2019, 10:01
Default
  #9
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by Estelle13 View Post
Is not it what I am doing by setting the "endTime" to 10e+6 and "deltaT" to 1 in controlDict? It is the same than putting respectively 1 and 10e-6, no?
For steady they are equivalent. For transient no. deltaT is the time-step size in seconds and endTime is physical duration of the simulation. endTime 1e6 means 1 million seconds of flow time and deltaT 1 means 1 second time-steps. This is very different than endTime 1 and deltaT 1e-06.

Large deltaT is numerically unstable, especially if you are using piso. Your maximum Courant number needs to be around 1ish for PISO to be stable. If it exceeds 1 by too much (i.e. 2 or 3) it will blow up. The Courant number prints at the beginning of the time-step, but since you initialized with 0 velocity everywhere it won't be helpful until you can get some time-steps in.

That's why I suggest to use a stupidly small deltaT to see if you can make it past 1 time-step without it crashing immediately.
LuckyTran is offline   Reply With Quote

Old   March 12, 2019, 10:57
Default
  #10
New Member
 
Estelle
Join Date: Mar 2019
Posts: 10
Rep Power: 7
Estelle13 is on a distinguished road
Thanks ! Yes of course I understand now... I did it and the calculation runs longer but still it crashes...


My last cylinder test:
D = 0.001m
L = 0.07m
nu = 0.00005 mē/s
deltaP = 3 bars
deltaT = 1e-6s
Re = 0.268


I really do not understand why !
Estelle13 is offline   Reply With Quote

Old   March 12, 2019, 12:14
Default
  #11
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Estelle13 View Post
Thanks ! Yes of course I understand now... I did it and the calculation runs longer but still it crashes...


My last cylinder test:
D = 0.001m
L = 0.07m
nu = 0.00005 mē/s
deltaP = 3 bars
deltaT = 1e-6s
Re = 0.268


I really do not understand why !



How do you estimate that Re=O(10^-1)? The deltaP seems to high to produce such a low velocity
FMDenaro is offline   Reply With Quote

Old   March 13, 2019, 04:45
Default
  #12
New Member
 
Estelle
Join Date: Mar 2019
Posts: 10
Rep Power: 7
Estelle13 is on a distinguished road
You're right, I corrected it and got Re = 53.6.


I use Darcy formula to get the average velocit: U = deltap*Dē / (32* nu * rho * L)

In this case, I get U = 2.68 m/s.


Then, Re = U*D / nu.
Estelle13 is offline   Reply With Quote

Old   March 13, 2019, 11:46
Default
  #13
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Okay not crashing immediately. That's progress!


In your U dict try:
Code:
instead of internalField uniform (0 0 0);
change it to
Code:
internalField uniform (2.68 0 0);
What is the purpose of the transient study? If you want to see how the flow develops from rest suddenly subjected to a driving pressure of 30 bar then changing the initial condition is clearly wrong. But I suggest it anyway in hopes that it helps you debug your case.


Another idea is to not use internalField uniform 0 for the initial condition of pressure. You can specify a linear profile but that requires using a tool like funkySetFields from swak4Foam.


Have you tried a very small driving pressure? I.e. 3 Pa instead of 3000000?

Also..... Courant number!?!?!?!?!?!?!?!?
LuckyTran is offline   Reply With Quote

Old   March 13, 2019, 12:09
Question
  #14
New Member
 
Estelle
Join Date: Mar 2019
Posts: 10
Rep Power: 7
Estelle13 is on a distinguished road
Well, I have to check that I get U=2.68m/s at the end of the transient time, for a 30bars deltap! So I will not change my initial conditions.



I just have to check that my simulations suits to the theory. I will have to build a real prototype with deltap = 30bars. I calculated that Umax = 2.68 m/s but I want my simulations to prove it.




Yes, the case is running for very small delta p, also for bigger dimensions, and for more viscous fluids, equivalent Reynolds numbers. This is very frustrating.
If I increase deltap, decrease dimensions or viscosity... Courant number explodes quite fast.




My last try:

- D = 1mm
- L = 70 mm
- deltap = 3 bars
- nu = 5e-5 mē/s


Is running, has to reach U = 5.36 m/s. It took 5h to reach 2.7 m/s... So I am waiting. I managed to get my calculation running longer thanks to a finer mesh on the sides of the duct.
Estelle13 is offline   Reply With Quote

Old   March 13, 2019, 13:35
Default
  #15
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by Estelle13 View Post
Well, I have to check that I get U=2.68m/s at the end of the transient time, for a 30bars deltap! So I will not change my initial conditions.
But my question is do you need to start from 0 velocity and 0 pressure? That is, you want to verify it takes a certain time for the flow to develop? If you want to simply verify that the final velocity attained is a certain number, the initial condition does not matter. To get U=2.68 m/s is a steady result, why do you even need transient? Again, I'm trying to help but I can't if you don't tell me what the constraints are. What is the theory you are trying to prove/verify? Saying I will not change it without explaining why is just being uncooperative.

You have an initial condition of 0 velocity and 0 pressure. And then suddenly impose 30 bar at the inlet. That's practically a blast wave.

Quote:
Originally Posted by Estelle13 View Post

If I increase deltap, decrease dimensions or viscosity... Courant number explodes quite fast.
You must respect the physics and numerics. If Courant number blows up the simulation will blow up. It won't be frustrating if you accept this rather than trying to fight it.

Btw you can get away with slightly larger deltaT using pimpleFoam instead of pisoFoam. But if you don't get how piso works, then I don't recommend to switch to pimple.
LuckyTran is offline   Reply With Quote

Old   March 18, 2019, 09:06
Default
  #16
New Member
 
Estelle
Join Date: Mar 2019
Posts: 10
Rep Power: 7
Estelle13 is on a distinguished road
I managed to get the results by refining a lot on the sides of the duct.


Well yes, it is like a very huge pressure wave. And I wanted to study what happens when putting a so big pressure at once, so in transient. And how much time does that take to get steady


Thanks for your help
Estelle13 is offline   Reply With Quote

Reply

Tags
incompressible, laminar, newtonian, steady-state


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
About Some Concepts:Laminar flow, turbulent flow, steady flow and time-dependent flow Jing Main CFD Forum 8 October 5, 2018 18:02
How does Fluent works in DPM, with steady flow and unsteady particle tracking ? pkp FLUENT 2 March 30, 2016 18:38
Unsteady DPM / Steady Flow Jultou FLUENT 2 December 3, 2015 05:51
Unable to achieve a steady flow lost.identity Main CFD Forum 1 April 29, 2009 11:22
Inviscid Drag at subsonic, subcritical Mach # Axel Rohde Main CFD Forum 1 November 19, 2001 13:19


All times are GMT -4. The time now is 13:24.