Skip to content
Snippets Groups Projects
Commit 9b3009e2 authored by Andrew Heather's avatar Andrew Heather
Browse files

Merge branch 'master' of develop.openfoam.com:Development/OpenFOAM-plus

parents b846422e 40e13d2a
No related merge requests found
......@@ -69,9 +69,9 @@ dimensionedScalar rhoMin
);
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::RASModel> turbulence
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::New<compressible::RASModel>
compressible::turbulenceModel::New
(
rho,
U,
......
......@@ -38,7 +38,23 @@ volVectorField U
);
Info<< "Calculating wall distance field" << endl;
const volScalarField& y(wallDist::New(mesh).y());
volScalarField y
(
IOobject
(
"y",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", dimLength, 0.0),
zeroGradientFvPatchScalarField::typeName
);
y.internalField() = wallDist::New(mesh).y().internalField();
y.correctBoundaryConditions();
// Set the mean boundary-layer thickness
dimensionedScalar ybl("ybl", dimLength, 0);
......
......@@ -62,9 +62,9 @@ Description
type compressible::turbulentTemperatureCoupledBaffleMixed;
Tnbr T;
kappa lookup;
KappaName kappa;
kappaName kappa;
thicknessLayers (0.1 0.2 0.3 0.4);
kappaLayers (1 2 3 4)
kappaLayers (1 2 3 4);
value uniform 300;
}
\endverbatim
......
......@@ -55,7 +55,7 @@ Description
type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T;
kappa lookup;
KappaName kappa;
kappaName kappa;
QrNbr Qr; // or none. Name of Qr field on neighbour region
Qr Qr; // or none. Name of Qr field on local region
thicknessLayers (0.1 0.2 0.3 0.4);
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -457,7 +457,29 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::k() const
{
const volScalarField chi(this->chi());
const volScalarField fv1(this->fv1(chi));
return sqr(this->nut()/ck_/dTilda(chi, fv1, fvc::grad(this->U_)));
tmp<volScalarField> tdTilda
(
new volScalarField
(
IOobject
(
"dTilda",
this->mesh_.time().timeName(),
this->mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
this->mesh_,
dimensionedScalar("0", dimLength, 0.0),
zeroGradientFvPatchField<vector>::typeName
)
);
volScalarField& dTildaF = tdTilda();
dTildaF = dTilda(chi, fv1, fvc::grad(this->U_));
dTildaF.correctBoundaryConditions();
return sqr(this->nut()/ck_/dTildaF);
}
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -94,7 +94,7 @@ tmp<volScalarField> LESeddyViscosity<BasicTurbulenceModel>::epsilon() const
{
tmp<volScalarField> tk(this->k());
return tmp<volScalarField>
tmp<volScalarField> tepsilon
(
new volScalarField
(
......@@ -106,9 +106,14 @@ tmp<volScalarField> LESeddyViscosity<BasicTurbulenceModel>::epsilon() const
IOobject::NO_READ,
IOobject::NO_WRITE
),
Ce_*tk()*sqrt(tk())/this->delta()
Ce_*tk()*sqrt(tk())/this->delta(),
zeroGradientFvPatchScalarField::typeName
)
);
volScalarField& epsilon = tepsilon();
epsilon.correctBoundaryConditions();
return tepsilon;
}
......
......@@ -300,6 +300,11 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::DnuTildaEff() const
template<class BasicTurbulenceModel>
tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::k() const
{
WarningInFunction
<< "Turbulence kinetic energy not defined for "
<< "Spalart-Allmaras model. Returning zero field"
<< endl;
return tmp<volScalarField>
(
new volScalarField
......@@ -311,7 +316,8 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::k() const
this->mesh_
),
this->mesh_,
dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0)
dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0),
zeroGradientFvPatchField<vector>::typeName
)
);
}
......@@ -336,7 +342,8 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::epsilon() const
this->mesh_
),
this->mesh_,
dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0)
dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0),
zeroGradientFvPatchField<vector>::typeName
)
);
}
......
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