102 if (phiHeader.headerOk())
121 if (rhoHeader.headerOk())
140 if (pHeader.headerOk())
154 void createVolScalarField
157 const word& fieldName,
170 if (!fieldHeader.headerOk())
172 Info<<
"Creating field " << fieldName <<
nl <<
endl;
193 void replaceBoundaryType
196 const word& fieldName,
197 const word& boundaryType,
198 const string& boundaryValue
210 if (!header.headerOk())
215 Info<<
"Updating boundary types for field " << header.name() <<
endl;
217 const word oldTypeName = IOdictionary::typeName;
222 const_cast<word&
>(IOdictionary::typeName) = oldTypeName;
223 const_cast<word&
>(dict.type()) = dict.headerClassName();
226 word backupName(dict.name() +
".old");
227 Info<<
" copying " << dict.name() <<
" to "
228 << backupName <<
endl;
230 dictOld.
rename(backupName);
231 dictOld.regIOobject::write();
238 if (isA<wallPolyPatch>(bMesh[patchI]))
240 word patchName = bMesh[patchI].
name();
244 newPatch.add(
"type", boundaryType);
245 newPatch.add(
"value", (
"uniform " + boundaryValue).c_str());
251 Info<<
" writing updated " << dict.name() <<
nl <<
endl;
252 dict.regIOobject::write();
256 void updateCompressibleCase(
const fvMesh& mesh)
258 Info<<
"Case treated as compressible" <<
nl <<
endl;
269 compressible::RASModels::mutWallFunctionFvPatchScalarField::typeName,
276 compressible::RASModels::epsilonWallFunctionFvPatchScalarField::
284 compressible::RASModels::omegaWallFunctionFvPatchScalarField::typeName,
291 compressible::RASModels::kqRWallFunctionFvPatchField<scalar>::typeName,
298 compressible::RASModels::kqRWallFunctionFvPatchField<scalar>::typeName,
305 compressible::RASModels::kqRWallFunctionFvPatchField<symmTensor>::
312 void updateIncompressibleCase(
const fvMesh& mesh)
314 Info<<
"Case treated as incompressible" <<
nl <<
endl;
321 incompressible::RASModels::nutWallFunctionFvPatchScalarField::typeName,
367 int main(
int argc,
char *argv[])
378 Info<<
"Updating turbulence fields to operate using new run time "
379 <<
"selectable" <<
nl <<
"wall functions"
382 if (compressible || caseIsCompressible(mesh))
384 updateCompressibleCase(mesh);
388 updateIncompressibleCase(mesh);