Commit 912b38fd authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: applyBoundaryLayer - added -write-nut option to write nut|nuTilda (default=no)

parent 445017c7
......@@ -261,13 +261,8 @@ tmp<volScalarField> calcNut
incompressible::turbulenceModel::New(U, phi, laminarTransport)
// Hack to correct nut
// Note: in previous versions of the code, nut was initialised on
// construction of the turbulence model. This is no longer the
// case for the Templated Turbulence models. The call to correct
// below will evolve the turbulence model equations and update
// nut, whereas only nut update is required. Need to revisit.
// Correct nut
return tmp<volScalarField>(new volScalarField(turbulence->nut()));
......@@ -296,6 +291,11 @@ int main(int argc, char *argv[])
"boundary-layer thickness as Cbl * mean distance to wall"
"Write the turbulence viscosity field"
#include "setRootCase.H"
......@@ -316,6 +316,8 @@ int main(int argc, char *argv[])
<< exit(FatalError);
bool writeNut = args.optionFound("write-nut");
#include "createTime.H"
#include "createNamedMesh.H"
#include "createFields.H"
......@@ -348,7 +350,11 @@ int main(int argc, char *argv[])
// Do not correct BC - wall functions will 'undo' manipulation above
// by using nut from turbulence model
if (writeNut)
Info<< "Writing nut\n" << endl;
// Boundary layer turbulence kinetic energy
scalar ck0 = pow025(Cmu)*kappa;
......@@ -362,7 +368,7 @@ int main(int argc, char *argv[])
blendField("k", mesh, mask, kBL);
blendField("epsilon", mesh, mask, epsilonBL);
calcOmegaField(mesh, mask, kBL, epsilonBL);
setField(mesh, "nuTilda", nut);
if (writeNut) setField(mesh, "nuTilda", nut);
// Write the updated U field
Info<< "Writing U\n" << endl;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment