
[Sponsors] 
December 3, 1999, 00:18 
unsteady time step

#1 
Guest
Posts: n/a

I want to simulate an unsteady flow which total physical time is 1 second. Explicit scheme was employed in my code,but I found the time step is 1.0E7 second which means to simulate this problem will take 10000000 iteration steps(horrible). Who have simulated unsteady flow £¿Please give me some advice. Thank you !


December 3, 1999, 01:47 
Re: unsteady time step

#2 
Guest
Posts: n/a

(1). If the flow is really unsteady, and the explicit time step is always 1.0E7 second, then the physics will dictate the time step. There is not much one can do. That's why you need a supercomputer. (2). But sometimes, the time step does not have to be that small all the time, or everywhere. In this case, the time step can be larger, especially for steady state solutions. (3). So, if the physics does happen that fast and require small time steps, then you will have to use small time step to capture the real solutions. (4). But, if the time step requirement is derived from the stability criteria, then it can be somewhat relaxed by using the implicit method.


December 3, 1999, 02:06 
Re: unsteady time step

#3 
Guest
Posts: n/a

The maximum allowable time step depends on the numerical scheme and the size of the grid. If the CFL condition applies, then the timestep is determined by the maximum wavespeed and the smallest grid size. Usually, the problem arises because of the grid being very fine, known as grid induced stiffness. Also, upwind schemes tend to place a more restrictive condition on the timestep compared to central difference schemes. The first solution to this problem is to use time accurate implicit scheme. More sophisticated techniques are to use time accurate multigrid. There are quite a lot of publications on this. Look at some papers by Jameson.


December 3, 1999, 04:22 
Re: unsteady time step

#4 
Guest
Posts: n/a

You can use the socalled "subiteration technique". It consists to add a fictitious unsteady term to your equations: du/dTau + du/dt + convective term = pressure gradient + viscous term, Tau being the fictitious time. At each time step, you solve the equations by iterating on the fictitious timestep (like as for your explicit scheme). In the course of the iterations, you renew the other terms of the equation. It is a way to have an implicit scheme with an explicit code. After a few iterations (in principle), the solution stabilizes and the fictitious time derivative vanishes... You can go on to the next actual time step. Notice that the fictitious time step does not need to be the same everywhere (no physicial meaning) so can be adjusted to increase the CFL number.
Regards franck PS: more details in the literature:  PhD thesis by Rogers (NASA Ames, nov 1990)  'Efficiency and Accuracy of time accurate turbulent NavierStokes computations', Rumsey and all, AIAA 951835, 13th AIAA Applied Aerodynamics Conference, San Diego, CA. 

December 3, 1999, 08:29 
Re: unsteady time step

#5 
Guest
Posts: n/a

You have not said what is causing the limit. Is it necessary to resolve the physical process that is causing the limit? For example, it may be diffusion number limit due to a fine grid in a boundary layer modelled with an eddy viscosity turbulence model in which case changing to an implicit scheme and raising the time step is unlikely to lose any important physical processes. Alternatively, it may be a convection limit in a DNS simulation in which case significant physics would be lost if you raised the time step.


December 3, 1999, 10:21 
Re: unsteady time step

#6 
Guest
Posts: n/a

The main questions are
what is your flow problem? What are the equations? (NavierStokes or just Euler?) Do you have viscosity and what is the Reynodls number? Do you have radiation? (or equivalently do you have diffusive terms? i.e. second order derivaties in space). Do you have a boundary layer or a strong shear in the flow? You need to know what is the dynamical time scale (L/v, where L is the size of the domain and v is the sound speed), the viscous time scale (if any), the radiative time scale (if any) and on what time scale do you need to run the problem (evolution time scale)? Are you looking for the solution to reach a final steady state, and is the transient phase important? There are many things that need to be clarified in order to be able to give a precise answer (is it a 3D flow problem? is it rotating? what is the resolution  how many grid points in each dimension ? How much CPU takes on time step? and so on...). It seems that you need to run the model for 10^7 time steps. I myself sometimes run models for up to 10^6 time steps, so maybe 10^7 is possible but it will take you a month or more, would that still be OK? As I said you need to give some more details on the flow problem, the physics and the numerics. Cheers, Patrick 

December 6, 1999, 09:51 
Re: unsteady time step

#7 
Guest
Posts: n/a

my proble is :
 \\\ \\\\ \\\  inflow  outflow > > Pt  Pb \\\  \\\ \\\\  the geometery of a tube like above.Pt=f(t)(sometimes Pt>2*atm),Pb=1atm which is located far away from the tube.five subdomains were used in my code.the size of the finest grid is 0.4mm*0.6mm and the tube dimension is 15mm*20mm.Re=roe*a*L/uim, roe=const is density, a=const is sound speed and L=1mm.my code is 3D NS solver.i want to get the transient flow field not the steady . my qustion is : if the order of time step (10^7 s ) I calculated with explicit schem is right? Cheers, S.T.Wang 

December 6, 1999, 10:45 
Re: unsteady time step

#8 
Guest
Posts: n/a

The time step in this case is either
1. deltax/(Cs+v) , where deltax is 0.4mm (0.04cm) , Cs is the sound speed and v is the velocity of the flow (its absolute value). ONe has to take the minimal value of this expression in the flow. or 2. deltax**2/nu where nu is the kinematic viscosity. The time step is supposed to be the smallest value between 1 and 2. Now put the numbers in and check if this leads (in cgs units) to 10^7 sec or even 10^6 (since one does only take a fraction of the above value). Now obviously deltax=0.04 and deltax**2=0.0016, I am not sure but I think that the kinematic viscosity of water (if water flows in the pipe) is of the order of unity (1 in cgs)  I never worked with water so I am not sure about this. Otherwise, using (2), in order to have delatt=10^7, The viscosity would have to be 10^4. So it seems that the time step comes from the first term (1) rather than the second one: detatt = deltax/Cs where deltax=0.04cm and Cs=1200m/s=120000cm/sec. Then deltat=3.3e07. Since one only takes a fraction of that then the time step could well be 1.e07 sec. Now I am not sure what is the speed of propagation of the flow v, but I guess it is well subsonic, and in this case the flow can be assumed to be incompressible. Then basically you solve only for the velocities, and the pressure is obtained using the Bernouli relation (the density does not enter the equations). Then there is actually no sound waves in the flow and the restriction on the time step becomes deltax/v, instead of deltax/(Cs+v), and since v is much smaller than Cs, the time step becomes much larger. If this is not the case and your flow is supersonic (or transonic) then in any case at a speed of almost 1200 m/s (or 120000cm/s), the flow will travel from one end of the pipe to the other within about 10^4 sec only! THis is called the dynamic time of the system. And if you wish to solve for that kind of flow for 1 sec, then you actually solve for a long evolution time scale of the order of 10^4 dynamic times, which is really very long for a real 3D problems (need for implicit methods and supercomputer). I guess that you actually need to solve for the incompressible case. Unless you flow is not water and it is transonic (Mach Number larger than 0.3 or so). I hope this helps. Cheers, Patrick 

December 6, 1999, 11:17 
Re: unsteady time step

#9 
Guest
Posts: n/a

(1). The estimated time step should be of order 1.0E07, that is 0.0000001 ~ 0.0000002 based on the grid size and the pressure ratio (total to static).


December 6, 1999, 12:00 
Re: unsteady time step

#10 
Guest
Posts: n/a

(1). It then depends on the Pt=f(t), to determine the total time steps needed. (2). If Pt=f(t)=constant, then you probably need 1000 ~ 10000 time steps for transient flow. (3). So, if the f(t) change is slower than 0.0001 ~ 0.001, then the flow can be considered qusisteady state (slow varying inlet condition). That is you can hold the total pressure constant and run a transient calculation for 1000 ~ 10000 time steps to get your transient flow solution. (4). On the other hand, if the rate of change of f(t) is much faster than 0.0001 ~ 0.001, then you may have to run the whole problem as real transient all the time.


September 5, 2011, 02:58 

#11 
New Member
parisa
Join Date: Sep 2011
Posts: 10
Rep Power: 6 
dear all
do you have C++ code for unsteady flow????? 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Superlinear speedup in OpenFOAM 13  msrinath80  OpenFOAM Running, Solving & CFD  18  March 3, 2015 06:36 
Adding heat source to chtMultiRegionFoam  maddalena  OpenFOAM Programming & Development  58  July 16, 2014 02:57 
Full pipe 3D using icoFoam  cyberbrain  OpenFOAM  4  March 16, 2011 10:20 
Problems with simulating TurbFOAM  barath.ezhilan  OpenFOAM  13  July 16, 2009 05:55 
Convergence moving mesh  lr103476  OpenFOAM Running, Solving & CFD  30  November 19, 2007 15:09 