|
[Sponsors] |
November 6, 2014, 12:18 |
A quite simple if() condition statement.
|
#1 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 |
Hi guys,
In my phase dictionary, this is a sub dictionary for a specific phase. for example: the subdic for air: In file:Phaseproperties Code:
phases (air water); air { //diameterModel sauter; diameterModel constant; .................... Code:
if(diameter model is sauter, we run this function...) { } Or can I ask ubuntu to learn human language? lol Last edited by sharonyue; November 7, 2014 at 01:45. |
|
November 20, 2014, 08:29 |
|
#2 |
Member
Artem Shaklein
Join Date: Feb 2010
Location: Russia, Izhevsk
Posts: 43
Rep Power: 16 |
Hi, sharonyue.
Can't find what kind of standard mathematical model uses diameterModel class. So, I give you analog example. If one wants to check turbulence model typeName, he can write next code: createFields.H Code:
... const word modelType ( IOdictionary ( IOobject ( "RASProperties", U.time().constant(), U.db(), IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) ).lookup("RASModel") ); const word turbType ( IOdictionary ( IOobject ( "turbulenceProperties", U.time().constant(), U.db(), IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) ).lookup("simulationType") ); Info << "Turbulence model type is " << turbType << "\n" << "Turbulence model name is " << modelType << "\n"; ... Code:
if (modelType == "kEpsilon" && turbType == "RASModel") { // Do operations based on assumption that kEpsilon model is used } |
|
November 20, 2014, 09:52 |
|
#3 | |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Boundary Condition for granular temperature Theta | cheng1988sjtu | OpenFOAM Programming & Development | 4 | July 4, 2016 16:08 |
about the implemention of periodic boundary condition | harbinyg | Main CFD Forum | 5 | July 12, 2012 04:30 |
asking for Boundary condition in FLUENT | Destry | FLUENT | 0 | July 27, 2010 00:55 |
External Radiation Boundary Condition for Grid Interface | CFD XUE | FLUENT | 0 | July 9, 2010 02:53 |
vorticity boundary condition | bearcharge | Main CFD Forum | 0 | May 14, 2010 11:32 |