CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Explicit algorithm (http://www.cfd-online.com/Forums/openfoam-solving/58442-explicit-algorithm.html)

rinao October 22, 2008 04:53

Hi there, I want to know if
 
Hi there,

I want to know if there is an explicit algorithm in OpenFoam, where multiple time steps are used in the simulations depending on the parameters or space step (delta x).

Thanks

Rina

grtabor October 22, 2008 06:16

I'm not entirely clear what yo
 
I'm not entirely clear what you mean here; but if you construct an equation object where the only fvm:: operator used is the time derivative, then you have an explicit algorithm. Eg. for the heat equation;

solve(fvm::ddt(T) == kappa*fvc::laplacian(T));

is an explicit algorithm. fvc:: is always an explicit evaluation of the field.

Gavin

rinao October 22, 2008 07:43

Hi Gavin, Thanks for your e
 
Hi Gavin,

Thanks for your email.

What I ment by explicit algrithm is by the ability to change the time step throughout the simulation depending on the courant number, for example in the case of a pressure wave.
Is it possible?

Rina

niklas October 22, 2008 08:01

If you want to use a Courant-b
 
If you want to use a Courant-based timestep you might have to modify the code.
Dont worry, it is very easy.

Lets take turbFoam as an example.
open up turbFoam.C with your favourite editor and
after this line
# include "initContinuityErrs.H"
add this
# include "readTimeControls.H"

and after this line
# include "CourantNo.H"
add this
# include "setDeltaT.H"

now run wmake

to use it you need to edit the system/controlDict
by adding these lines

adjustTimeStep on;
maxCo 0.1;

and thats it.

N


All times are GMT -4. The time now is 14:26.