| 167 | |
| 168 | |
| 169 | bool Foam::functionObjects::yPlus::execute() |
| 170 | { |
| 171 | volScalarField& yPlus = |
| 172 | mesh_.lookupObjectRef<volScalarField>(type()); |
| 173 | |
| 174 | if (mesh_.foundObject<turbulenceModel>(turbulenceModel::propertiesName)) |
| 175 | { |
| 176 | const turbulenceModel& model = mesh_.lookupObject<turbulenceModel> |
| 177 | ( |
| 178 | turbulenceModel::propertiesName |
| 179 | ); |
| 180 | |
| 181 | calcYPlus(model, yPlus); |
| 182 | } |
| 183 | else |
| 184 | { |
| 185 | FatalErrorInFunction |
| 186 | << "Unable to find turbulence model in the " |
| 187 | << "database" << exit(FatalError); |
| 188 | } |
| 189 | |
| 190 | return true; |
| 191 | } |
| 192 | |
| 193 | |
| 194 | bool Foam::functionObjects::yPlus::write() |