Commit d7622d1e authored by Kutalmis Bercin's avatar Kutalmis Bercin Committed by Andrew Heather
Browse files

ENH: add virtual omega to turbulenceModels

  STYLE: update dimensionSets in SpalartAllmaras
parent aa9be5b5
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -233,6 +233,14 @@ Foam::RASModels::kineticTheoryModel::epsilon() const
}
Foam::tmp<Foam::volScalarField>
Foam::RASModels::kineticTheoryModel::omega() const
{
NotImplemented;
return nullptr;
}
Foam::tmp<Foam::volSymmTensorField>
Foam::RASModels::kineticTheoryModel::R() const
{
......
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -205,6 +206,9 @@ public:
//- Return the turbulence kinetic energy dissipation rate
virtual tmp<volScalarField> epsilon() const;
//- Return the specific dissipation rate
virtual tmp<volScalarField> omega() const;
//- Return the Reynolds stress tensor
virtual tmp<volSymmTensorField> R() const;
......
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -119,6 +120,14 @@ Foam::RASModels::phasePressureModel::epsilon() const
}
Foam::tmp<Foam::volScalarField>
Foam::RASModels::phasePressureModel::omega() const
{
NotImplemented;
return nullptr;
}
Foam::tmp<Foam::volSymmTensorField>
Foam::RASModels::phasePressureModel::R() const
{
......
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -164,6 +165,9 @@ public:
//- Return the turbulence kinetic energy dissipation rate
virtual tmp<volScalarField> epsilon() const;
//- Return the specific dissipation rate
virtual tmp<volScalarField> omega() const;
//- Return the Reynolds stress tensor
virtual tmp<volSymmTensorField> R() const;
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -168,6 +168,21 @@ public:
return epsilon_;
}
//- Return the (estimated) specific dissipation rate
virtual tmp<volScalarField> omega() const
{
return tmp<volScalarField>::New
(
IOobject
(
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
epsilon_/(Cmu_*k_)
);
}
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();
};
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -191,6 +191,21 @@ public:
return epsilon_;
}
//- Return the (estimated) specific dissipation rate
virtual tmp<volScalarField> omega() const
{
return tmp<volScalarField>::New
(
IOobject
(
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
epsilon_/(Cmu_*k_)
);
}
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();
};
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -179,6 +179,21 @@ public:
return epsilon_;
}
//- Return the (estimated) specific dissipation rate
virtual tmp<volScalarField> omega() const
{
return tmp<volScalarField>::New
(
IOobject
(
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
epsilon_/(Cmu_*k_)
);
}
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();
};
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -166,6 +166,21 @@ public:
return epsilon_;
}
//- Return the (estimated) specific dissipation rate
virtual tmp<volScalarField> omega() const
{
return tmp<volScalarField>::New
(
IOobject
(
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
epsilon_/(0.09*k_)
);
}
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();
};
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -197,6 +197,21 @@ public:
return epsilon_;
}
//- Return the (estimated) specific dissipation rate
virtual tmp<volScalarField> omega() const
{
return tmp<volScalarField>::New
(
IOobject
(
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
epsilon_/(Cmu_*k_)
);
}
virtual const volScalarField& q() const
{
return q_;
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -248,6 +248,21 @@ public:
return epsilon_;
}
//- Return the (estimated) specific dissipation rate
virtual tmp<volScalarField> omega() const
{
return tmp<volScalarField>::New
(
IOobject
(
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
epsilon_/(Cmu_*k_)
);
}
//- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct();
};
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -163,6 +163,25 @@ tmp<volScalarField> DeardorffDiffStress<BasicTurbulenceModel>::epsilon() const
}
template<class BasicTurbulenceModel>
tmp<volScalarField> DeardorffDiffStress<BasicTurbulenceModel>::omega() const
{
volScalarField k(this->k());
volScalarField epsilon(this->Ce_*k*sqrt(k)/this->delta());
return tmp<volScalarField>::New
(
IOobject
(
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
epsilon/(0.09*k)
);
}
template<class BasicTurbulenceModel>
void DeardorffDiffStress<BasicTurbulenceModel>::correct()
{
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -153,6 +153,9 @@ public:
//- Return the turbulence kinetic energy dissipation rate
virtual tmp<volScalarField> epsilon() const;
//- Return the specific dissipation rate
virtual tmp<volScalarField> omega() const;
//- Correct sub-grid stress, eddy-Viscosity and related properties
virtual void correct();
};
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2017 OpenFOAM Foundation
Copyright (C) 2016-2019 OpenCFD Ltd.
Copyright (C) 2016-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -119,6 +119,29 @@ tmp<volScalarField> LESeddyViscosity<BasicTurbulenceModel>::epsilon() const
}
template<class BasicTurbulenceModel>
tmp<volScalarField> LESeddyViscosity<BasicTurbulenceModel>::omega() const
{
tmp<volScalarField> tk(this->k());
tmp<volScalarField> tepsilon(this->epsilon());
auto tomega = tmp<volScalarField>::New
(
IOobject
(
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
tepsilon()/(0.09*tk())
);
auto& omega = tomega.ref();
omega.correctBoundaryConditions();
return tomega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace LESModels
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -110,6 +110,9 @@ public:
//- Return sub-grid dissipation rate
virtual tmp<volScalarField> epsilon() const;
//- Return sub-grid specific dissipation rate
virtual tmp<volScalarField> omega() const;
};
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -160,6 +160,25 @@ tmp<volScalarField> Smagorinsky<BasicTurbulenceModel>::epsilon() const
}
template<class BasicTurbulenceModel>
tmp<volScalarField> Smagorinsky<BasicTurbulenceModel>::omega() const
{
volScalarField k(this->k(fvc::grad(this->U_)));
volScalarField epsilon(this->Ce_*k*sqrt(k)/this->delta());
return tmp<volScalarField>::New
(
IOobject
(
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
epsilon/(0.09*k)
);
}
template<class BasicTurbulenceModel>
void Smagorinsky<BasicTurbulenceModel>::correct()
{
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -165,6 +165,9 @@ public:
//- Return sub-grid dissipation rate
virtual tmp<volScalarField> epsilon() const;
//- Return sub-grid specific dissipation rate
virtual tmp<volScalarField> omega() const;
//- Correct Eddy-Viscosity and related properties
virtual void correct();
};
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2015-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -193,6 +193,26 @@ tmp<volScalarField> WALE<BasicTurbulenceModel>::epsilon() const
}
template<class BasicTurbulenceModel>
tmp<volScalarField> WALE<BasicTurbulenceModel>::omega() const
{
volScalarField k(this->k(fvc::grad(this->U_)));
volScalarField epsilon(this->Ce_*k*sqrt(k)/this->delta());
return tmp<volScalarField>::New
(
IOobject
(
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
epsilon/(0.09*k)
);
}
template<class BasicTurbulenceModel>
void WALE<BasicTurbulenceModel>::correct()
{
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2015-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -157,6 +157,9 @@ public:
//- Return sub-grid dissipation rate
virtual tmp<volScalarField> epsilon() const;
//- Return sub-grid specific dissipation rate
virtual tmp<volScalarField> omega() const;
//- Correct Eddy-Viscosity and related properties
virtual void correct();
};
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -240,6 +240,24 @@ tmp<volScalarField> dynamicKEqn<BasicTurbulenceModel>::epsilon() const
}
template<class BasicTurbulenceModel>
tmp<volScalarField> dynamicKEqn<BasicTurbulenceModel>::omega() const
{
volScalarField epsilon(Ce()*k()*sqrt(k())/this->delta());
return tmp<volScalarField>::New
(
IOobject
(
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
this->runTime_.timeName(),
this->mesh_
),
epsilon/(0.09*k())
);
}
template<class BasicTurbulenceModel>
void dynamicKEqn<BasicTurbulenceModel>::correct()
{
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -181,6 +181,9 @@ public:
//- Return sub-grid dissipation rate
virtual tmp<volScalarField> epsilon() const;
//- Return sub-grid specific dissipation rate
virtual tmp<volScalarField> omega() const;
//- Return the effective diffusivity for k
tmp<volScalarField> DkEff() const
{
......
Markdown is supported
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