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/)
-   -   if statement for volScalarField (http://www.cfd-online.com/Forums/openfoam-programming-development/101181-if-statement-volscalarfield.html)

sasookey April 28, 2012 16:37

if statement for volScalarField
 
hi
i'm a new user of openFoam, i try to do something when a volScalarFied like p is in the specific number like smaller than 1 i tried this in solver.

if ( p < 1)
{
.....
}

when p is volScalarField and i got som error for operator <
thanks to help me.

Bernhard April 29, 2012 04:27

It depends a bit of what you want to do precisely. It is always a good idea to carefully read the errormessages. If you don't understand them, it is still worth to post them in a thread.

See also: http://www.cfd-online.com/Forums/ope...uction-if.html

sasookey April 29, 2012 05:56

Thanks dear Bernhard, you got me and my problem has been solved. :D


All times are GMT -4. The time now is 17:58.