35 namespace laminarModels
40 template<
class BasicMomentumTransportModel>
48 const viscosity& viscosity
63 b_(
"b",
dimless, this->coeffDict_),
64 d_(
"d",
dimless, this->coeffDict_),
65 c_(
"c",
pow(
dimTime, d_.value() - scalar(1)), this->coeffDict_),
68 K_(1 -
sqrt(nuInf_/nu0_)),
79 this->runTime_.timeName(),
96 this->runTime_.timeName(),
108 template<
class BasicMomentumTransportModel>
112 return nuInf_/(
sqr(1 - K_*lambda_) + rootVSmall);
116 template<
class BasicMomentumTransportModel>
126 template<
class BasicMomentumTransportModel>
131 a_.read(this->coeffDict());
132 b_.read(this->coeffDict());
133 d_.read(this->coeffDict());
142 nu0_.read(this->coeffDict());
143 nuInf_.read(this->coeffDict());
145 K_ = (1 -
sqrt(nuInf_/nu0_));
156 template<
class BasicMomentumTransportModel>
168 template<
class BasicMomentumTransportModel>
175 return nu_.boundaryField()[
patchi];
179 template<
class BasicMomentumTransportModel>
195 a_*
pow(1 - lambda_(), b_)
197 + fvModels.source(lambda_)
200 lambdaEqn.
ref().relax();
201 fvConstraints.
constrain(lambdaEqn.ref());
205 lambda_.maxMin(scalar(0), scalar(1));
const dimensionSet dimViscosity
virtual void correct()
Correct the lambdaThixotropic viscosity.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Templated abstract base class for laminar transport models.
BasicMomentumTransportModel::alphaField alphaField
T & ref() const
Return non-const reference or generate a fatal error.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Linear viscous stress turbulence model base class.
const dimensionSet dimless
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
const dimensionSet dimTime
Foam::fvConstraints & fvConstraints
static word groupName(Name name, const word &group)
Info<< "Reading field p\"<< endl;volScalarField p(IOobject("p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field U\"<< endl;volVectorField U(IOobject("U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);pressureReference pressureReference(p, simple.dict());mesh.schemes().setFluxRequired(p.name());Info<< "Reading field pa\"<< endl;volScalarField pa(IOobject("pa", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);Info<< "Reading field Ua\"<< endl;volVectorField Ua(IOobject("Ua", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);# 65 "/home/ubuntu/OpenFOAM-10/applications/solvers/incompressible/adjointShapeOptimisationFoam/createFields.H" 2label paRefCell=0;scalar paRefValue=0.0;setRefCell(pa, simple.dict(), paRefCell, paRefValue);mesh.schemes().setFluxRequired(pa.name());autoPtr< viscosityModel > viscosity(viscosityModel::New(mesh))
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
bool constrain(fvMatrix< Type > &eqn) const
Apply constraints to an equation.
Foam::fvModels & fvModels
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Finite volume constraints.
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
virtual void correct()
Correct the laminar viscosity.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual bool read()
Read momentumTransport dictionary.
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
dimensioned< scalar > mag(const dimensioned< Type > &)
Thixotropic viscosity momentum transport model based on the evolution of the structural parameter : ...
static word modelName(Name name, const word &model)
Return the name of the object within the given model.
A class for managing temporary objects.
virtual tmp< volScalarField > nuEff() const
Return the effective viscosity.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
BasicMomentumTransportModel::rhoField rhoField
lambdaThixotropic(const alphaField &alpha, const rhoField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const viscosity &viscosity)
Construct from components.