CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Conditional reading of field (http://www.cfd-online.com/Forums/openfoam-programming-development/107166-conditional-reading-field.html)

dl6tud September 19, 2012 07:08

Conditional reading of field
 
I would like to add a body force to a solver, but not allways. Is there a way to say OpenFOAM to read the field BF only when the file is there? And to set BF=0 otherwise?

I know only:
Quote:

IOobject::MUST_READ
IOobject::NO_READ
IOobject::MUST_READ_IF_MODIFIED

GerhardHolzinger September 20, 2012 06:46

Hello,

have a look on this one, maybe it helps

http://www.cfd-online.com/Forums/ope...revisited.html


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