CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Looping over variables within timestep (https://www.cfd-online.com/Forums/openfoam-solving/59087-looping-over-variables-within-timestep.html)

olwi February 28, 2008 15:10

Hi, I'm solving an electro-
 
Hi,

I'm solving an electro-hydrodynamic problem with OpenFOAM. My solver is transient. To get a stable solution, I think I need to loop a couple of times over the variables WITHIN each time step, to get the non-linear coupling right.

1) Is correction loops within time steps as simple as it looks in the standard PISO solvers ? That is, just have another go at the equations, no extras? I'm not risking messing up the implicit time-stepping or something?

2) Does it make any sense to apply the features for underrelaxation (as used in steadystate solvers) also in a transient solver? Is this at all possible to combine?

Thanks for any advice,

Ola

hjasak February 28, 2008 15:27

1) Yes - just put a loop and k
 
1) Yes - just put a loop and keep it simple

2) Yes. Have a look at transientSimpleFoam on:

http://openfoam-extend.svn.sourceforge.net/viewvc/openfoam-extend/trunk/Core/Ope nFOAM-1.4.1-dev/applications/solvers/incompressible/transientSimpleFoam/transien tSimpleFoam.C?revision=53&view=markup

Beware, if you wish to use under-relaxation, you have to grab the reference field within the loop, using eg. p.storePrevIter();

Enjoy Ola, good to hear from you again,

Hrv

olwi February 28, 2008 16:07

Perfect, Hrv, this should do i
 
Perfect, Hrv, this should do it...
Thanks for the info!

/Ola


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