|
[Sponsors] |
January 2, 2020, 03:18 |
Time steps for very small conduits
|
#1 |
New Member
Fady Megally
Join Date: Nov 2019
Posts: 6
Rep Power: 7 |
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 03:32. Reason: Missing info |
|
January 2, 2020, 04:29 |
|
#2 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
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? |
|
January 2, 2020, 05:53 |
|
#3 | |
New Member
Fady Megally
Join Date: Nov 2019
Posts: 6
Rep Power: 7 |
Quote:
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 ? |
||
January 2, 2020, 08:44 |
|
#4 |
Senior Member
Yogesh Bapat
Join Date: Oct 2010
Posts: 102
Rep Power: 16 |
Please do checkMesh before starting the simulation.
|
|
January 2, 2020, 13:39 |
|
#5 |
New Member
Fady Megally
Join Date: Nov 2019
Posts: 6
Rep Power: 7 |
||
January 2, 2020, 19:43 |
|
#6 | |
New Member
Fady Megally
Join Date: Nov 2019
Posts: 6
Rep Power: 7 |
Quote:
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" |
||
January 2, 2020, 21:47 |
|
#7 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
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. |
|
Tags |
courant number, openfoam, time step |
|
|
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 01:58 |
Time convergence study problems, very small time steps | GregCFD | Main CFD Forum | 10 | January 23, 2017 02:35 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
mixerVesselAMI2D's mass is not balancing | sharonyue | OpenFOAM Running, Solving & CFD | 6 | June 10, 2013 10:34 |