|
[Sponsors] |
December 1, 2014, 04:38 |
How can I apply the bool function?
|
#1 |
Member
BO WANG
Join Date: Sep 2014
Posts: 37
Rep Power: 12 |
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. |
|
December 1, 2014, 04:56 |
|
#2 |
Senior Member
|
Hi,
surely people can try to guess but... 0. what is rho? 1. what is rhol? 2. what is rhov? In fact the question is are they scalars or fields? |
|
December 1, 2014, 05:12 |
|
#3 | |
Member
BO WANG
Join Date: Sep 2014
Posts: 37
Rep Power: 12 |
Quote:
rho is the density, volScalarField rhov is the gas density, dimensionedScalar(which should be volScalarField) rhol is the liquid density, dimensionedScalar(which should be volScalarField) Now the compile goes well. I'm going to test the solver with case now. |
||
Tags |
bool |
|
|
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 03:36 |
foamToTecplot360 | thomasduerr | OpenFOAM Post-Processing | 121 | June 11, 2021 11:05 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 14:06 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |