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

Time steps for very small conduits

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By cryabroad

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 2, 2020, 02:18
Default Time steps for very small conduits
  #1
New Member
 
Fady Megally
Join Date: Nov 2019
Posts: 6
Rep Power: 6
fmegally is on a distinguished road
I'm new to OpenFOAM and I am trying to model air flow in a very small conduit with a circular cross section. The diameter is 0.2 mm and is spanned by roughly 10 elements. Using tetrahedral mesh since the geometry is complex. (couldn't use structured mesh)
Reynolds number is around 60 so i decided to try and solve with icoFoam.
I have had a hard time getting it to converge with any time step more than 10^-6 s
Is this normal ? I've never seen any examples with such a small step.
I read about the Courant criterion and going by that it seems like that for the same flow rate and number of elements, a smaller conduit would require a finer time step. Is this a correct statement ?

Last edited by fmegally; January 2, 2020 at 02:32. Reason: Missing info
fmegally is offline   Reply With Quote

Old   January 2, 2020, 03:29
Default
  #2
Senior Member
 
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 9
cryabroad is on a distinguished road
Please provide more details, your case seems to be a steady-state one, are you sure you want to use trasient simulations? What are you trying to observe?

Time steps of the order of 10^-6 is not rare, if that is to ensure the Courant number to be < 1, and sometimes even that is not enough. The Courant number is indeed very important for flow simulations. An intuitive way of thinking about it is that it essentially tells you how many cells a fluid element travels within a time step. If you use a too large time step, the fluid element travels several cells without knowing that it covers that many cells. This results in missing information and more importantly, the fluid element may go through drastic changes, which are neglected due to the large time step. Obviously this is not good.

In your case, you know the velocity of the flow and the cell size in the main flow direction, based on that you can estimate a time step which satisfies Co = 1. How small is it?
cryabroad is offline   Reply With Quote

Old   January 2, 2020, 04:53
Default
  #3
New Member
 
Fady Megally
Join Date: Nov 2019
Posts: 6
Rep Power: 6
fmegally is on a distinguished road
Quote:
Originally Posted by cryabroad View Post
Please provide more details, your case seems to be a steady-state one, are you sure you want to use trasient simulations? What are you trying to observe?

Time steps of the order of 10^-6 is not rare, if that is to ensure the Courant number to be < 1, and sometimes even that is not enough. The Courant number is indeed very important for flow simulations. An intuitive way of thinking about it is that it essentially tells you how many cells a fluid element travels within a time step. If you use a too large time step, the fluid element travels several cells without knowing that it covers that many cells. This results in missing information and more importantly, the fluid element may go through drastic changes, which are neglected due to the large time step. Obviously this is not good.

In your case, you know the velocity of the flow and the cell size in the main flow direction, based on that you can estimate a time step which satisfies Co = 1. How small is it?
Yes it is steady-state. I am trying to estimate the pressure drop through a group of manifolds and tubing for a known flow rate. That along with the an air pump characteristic curve, i would be able to predict the device performance. Sorry can't share too many details

The narrowest portions of the domain are 0.2 mm diameter.

Now, what i have noticed is that the Courant number remains fairly low (single digit) and jumps quite drastically to ~100 something in one time step. Does that suggest a meshing issue ?
fmegally is offline   Reply With Quote

Old   January 2, 2020, 07:44
Default
  #4
Senior Member
 
Yogesh Bapat
Join Date: Oct 2010
Posts: 102
Rep Power: 15
ybapat is on a distinguished road
Please do checkMesh before starting the simulation.
ybapat is offline   Reply With Quote

Old   January 2, 2020, 12:39
Default
  #5
New Member
 
Fady Megally
Join Date: Nov 2019
Posts: 6
Rep Power: 6
fmegally is on a distinguished road
Quote:
Originally Posted by ybapat View Post
Please do checkMesh before starting the simulation.
I did. It said that everything is OK. Initially it said something about non-orthogonal element but then i made some changes to the mesh and it went away.
fmegally is offline   Reply With Quote

Old   January 2, 2020, 18:43
Default
  #6
New Member
 
Fady Megally
Join Date: Nov 2019
Posts: 6
Rep Power: 6
fmegally is on a distinguished road
Quote:
Originally Posted by cryabroad View Post
Please provide more details, your case seems to be a steady-state one, are you sure you want to use trasient simulations? What are you trying to observe?

Time steps of the order of 10^-6 is not rare, if that is to ensure the Courant number to be < 1, and sometimes even that is not enough. The Courant number is indeed very important for flow simulations. An intuitive way of thinking about it is that it essentially tells you how many cells a fluid element travels within a time step. If you use a too large time step, the fluid element travels several cells without knowing that it covers that many cells. This results in missing information and more importantly, the fluid element may go through drastic changes, which are neglected due to the large time step. Obviously this is not good.

In your case, you know the velocity of the flow and the cell size in the main flow direction, based on that you can estimate a time step which satisfies Co = 1. How small is it?

Here is the output from the run. Maybe you can see something that I don't
Code:
Courant Number mean: 0.00336256 max: 31.1564
smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 8.23783e-05, N
smoothSolver:  Solving for Uy, Initial residual = 0, Final residual = 0, No Iteratio
smoothSolver:  Solving for Uz, Initial residual = 0, Final residual = 0, No Iteratio
smoothSolver:  Solving for p, Initial residual = 1, Final residual = 0.433606, No It
smoothSolver:  Solving for p, Initial residual = 0.691471, Final residual = 0.064173
smoothSolver:  Solving for p, Initial residual = 0.240623, Final residual = 0.036269
time step continuity errors : sum local = 0.00672513, global = 0.00672513, cumulativ
smoothSolver:  Solving for p, Initial residual = 0.273437, Final residual = 0.028113
smoothSolver:  Solving for p, Initial residual = 0.313463, Final residual = 0.025935
smoothSolver:  Solving for p, Initial residual = 0.13408, Final residual = 0.0261848
time step continuity errors : sum local = 0.00672513, global = 0.00672513, cumulativ
ExecutionTime = 36.47 s  ClockTime = 37 s

Time = 0.0002

Courant Number mean: 0.662443 max: 106.692
smoothSolver:  Solving for Ux, Initial residual = 0.496674, Final residual = 8.02456
smoothSolver:  Solving for Uy, Initial residual = 0.42566, Final residual = 9.67407e
smoothSolver:  Solving for Uz, Initial residual = 0.428083, Final residual = 9.40994
smoothSolver:  Solving for p, Initial residual = 0.519246, Final residual = 0.090530
smoothSolver:  Solving for p, Initial residual = 0.445529, Final residual = 0.052872
smoothSolver:  Solving for p, Initial residual = 0.2442, Final residual = 0.035936, 
time step continuity errors : sum local = 0.0237425, global = 0.00672513, cumulative
smoothSolver:  Solving for p, Initial residual = 0.35642, Final residual = 0.0198187
smoothSolver:  Solving for p, Initial residual = 0.208734, Final residual = 0.013619
smoothSolver:  Solving for p, Initial residual = 0.100324, Final residual = 0.012281
time step continuity errors : sum local = 0.0115243, global = 0.00672513, cumulative
ExecutionTime = 75.42 s  ClockTime = 76 s

Time = 0.0003

Courant Number mean: 2.4147 max: 173.556
smoothSolver:  Solving for Ux, Initial residual = 0.548884, Final residual = 7.39196
smoothSolver:  Solving for Uy, Initial residual = 0.508242, Final residual = 3.80225
smoothSolver:  Solving for Uz, Initial residual = 0.508612, Final residual = 7.87574
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/usr/lib/libc.so.6"
#3  Foam::GaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam:const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) at
#4  Foam::GaussSeidelSmoother::smooth(Foam::Field<double>&, Foam::Field<double> cons
#5  Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsi
#6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
#7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/OpenFOAM/OpenFOA
#8  Foam::fvMatrix<double>::solve() in "/opt/OpenFOAM/OpenFOAM-7/platforms/linux64Gc
#9  ? in "/opt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/icoFoam"
#10  __libc_start_main in "/usr/lib/libc.so.6"
#11  ? in "/opt/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/icoFoam"
fmegally is offline   Reply With Quote

Old   January 2, 2020, 20:47
Default
  #7
Senior Member
 
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 9
cryabroad is on a distinguished road
The log file is not complete. I hope to see something like "smoothSolver: Solving for xxx, No Iterations ". Also things after "cumulative = ".

Anyway, I think your mesh needs to be imporoved. Check where the Courant number gets its maximum value. You can do this by saving the results and run "Co", which will calculate and save the Courant number inside your domain. Check the spots where it is large (>2 for example).

Can you try a steady-state case? It should be easy to run, and you get so much information out of it. It can also tell you if the boundary conditions are properly set.
fmegally likes this.
cryabroad is offline   Reply With Quote

Reply

Tags
courant number, openfoam, time step


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
Setting up Lid driven Cavity Benchmark with 1M cells for multiple cores puneet336 OpenFOAM Running, Solving & CFD 11 April 7, 2019 00:58
Time convergence study problems, very small time steps GregCFD Main CFD Forum 10 January 23, 2017 01:35
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 09:34


All times are GMT -4. The time now is 17:22.