CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

How can I apply the bool function?

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 1, 2014, 03:38
Default How can I apply the bool function?
  #1
Member
 
BO WANG
Join Date: Sep 2014
Posts: 37
Rep Power: 11
wang219910611 is on a distinguished road
Hi everyone,

I was trying to do myCavitatingFoam for the last few days. But I met some problem when I was trying to write the 0pEqn.

Following is my 0pEqn:

{
volScalarField pgl=(rhov*rhol*(rhov-rhol))/(magSqr(rhov)*psil-magSqr(rhol)*psiv);
if ( rho>rhol)

p=pSat+(B/N)*(pow((rho/rhol),N)-1.0);

else if (rho<rhov)

p=pSat*pow((rho/rhov),r);

else

p=pSat+pgl*log10(rhov*psil*(rhol+alphav*(rhov-rhol))/(rhol*(rhov*psil-alphav*(rhov*psil-rhol*psiv))));

}

Apparently, this is not in OpenFoam style. And the system told me that I should use a "bool" function instead.

Anybody has any idea of this? Any help will be appreciated.
wang219910611 is offline   Reply With Quote

 

Tags
bool


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 02:36
foamToTecplot360 thomasduerr OpenFOAM Post-Processing 121 June 11, 2021 10:05
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13:06
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


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