mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'feature-turbulence-model-hierarchy' into 'develop'
ENH: Regroup and unify various virtual functions in laminar/RAS/LES models See merge request Development/openfoam!487
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -168,21 +168,6 @@ public:
|
|||||||
return epsilon_;
|
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
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -191,21 +191,6 @@ public:
|
|||||||
return epsilon_;
|
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
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -179,21 +179,6 @@ public:
|
|||||||
return epsilon_;
|
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
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -166,21 +166,6 @@ public:
|
|||||||
return epsilon_;
|
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
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -197,21 +197,6 @@ public:
|
|||||||
return epsilon_;
|
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
|
virtual const volScalarField& q() const
|
||||||
{
|
{
|
||||||
return q_;
|
return q_;
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -248,21 +248,6 @@ public:
|
|||||||
return epsilon_;
|
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
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -346,25 +346,6 @@ public:
|
|||||||
return k_;
|
return k_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the turbulence kinetic energy dissipation rate
|
|
||||||
virtual tmp<volScalarField> epsilon() const
|
|
||||||
{
|
|
||||||
return tmp<volScalarField>
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"epsilon",
|
|
||||||
this->mesh_.time().timeName(),
|
|
||||||
this->mesh_
|
|
||||||
),
|
|
||||||
betaStar_*k_*omega_,
|
|
||||||
omega_.boundaryField().types()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the turbulence kinetic energy dissipation rate
|
//- Return the turbulence kinetic energy dissipation rate
|
||||||
virtual tmp<volScalarField> omega() const
|
virtual tmp<volScalarField> omega() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,6 +28,7 @@ License
|
|||||||
|
|
||||||
#include "DeardorffDiffStress.H"
|
#include "DeardorffDiffStress.H"
|
||||||
#include "fvOptions.H"
|
#include "fvOptions.H"
|
||||||
|
#include "calculatedFvPatchField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -140,48 +141,6 @@ bool DeardorffDiffStress<BasicTurbulenceModel>::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
|
||||||
tmp<volScalarField> DeardorffDiffStress<BasicTurbulenceModel>::epsilon() const
|
|
||||||
{
|
|
||||||
volScalarField k(this->k());
|
|
||||||
|
|
||||||
return tmp<volScalarField>
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
|
||||||
this->runTime_.timeName(),
|
|
||||||
this->mesh_,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
this->Ce_*k*sqrt(k)/this->delta()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
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>
|
template<class BasicTurbulenceModel>
|
||||||
void DeardorffDiffStress<BasicTurbulenceModel>::correct()
|
void DeardorffDiffStress<BasicTurbulenceModel>::correct()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -150,12 +150,6 @@ public:
|
|||||||
//- Read model coefficients if they have changed
|
//- Read model coefficients if they have changed
|
||||||
virtual bool read();
|
virtual bool read();
|
||||||
|
|
||||||
//- 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
|
//- Correct sub-grid stress, eddy-Viscosity and related properties
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -70,6 +70,15 @@ Foam::LESModel<BasicTurbulenceModel>::LESModel
|
|||||||
turbulence_(LESDict_.getOrDefault<Switch>("turbulence", true)),
|
turbulence_(LESDict_.getOrDefault<Switch>("turbulence", true)),
|
||||||
printCoeffs_(LESDict_.getOrDefault<Switch>("printCoeffs", false)),
|
printCoeffs_(LESDict_.getOrDefault<Switch>("printCoeffs", false)),
|
||||||
coeffDict_(LESDict_.optionalSubDict(type + "Coeffs")),
|
coeffDict_(LESDict_.optionalSubDict(type + "Coeffs")),
|
||||||
|
Ce_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::getOrAddToDict
|
||||||
|
(
|
||||||
|
"Ce",
|
||||||
|
LESDict_,
|
||||||
|
1.048
|
||||||
|
)
|
||||||
|
),
|
||||||
kMin_
|
kMin_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensioned<scalar>::getOrAddToDict
|
||||||
@ -188,6 +197,8 @@ bool Foam::LESModel<BasicTurbulenceModel>::read()
|
|||||||
|
|
||||||
delta_().read(LESDict_);
|
delta_().read(LESDict_);
|
||||||
|
|
||||||
|
Ce_.readIfPresent(LESDict_);
|
||||||
|
|
||||||
kMin_.readIfPresent(LESDict_);
|
kMin_.readIfPresent(LESDict_);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -197,6 +208,43 @@ bool Foam::LESModel<BasicTurbulenceModel>::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::LESModel<BasicTurbulenceModel>::epsilon() const
|
||||||
|
{
|
||||||
|
return tmp<volScalarField>::New
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
||||||
|
this->mesh_.time().timeName(),
|
||||||
|
this->mesh_
|
||||||
|
),
|
||||||
|
this->Ce()*pow(this->k(), 1.5)/this->delta()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::LESModel<BasicTurbulenceModel>::omega() const
|
||||||
|
{
|
||||||
|
const scalar betaStar = 0.09;
|
||||||
|
const dimensionedScalar k0(sqr(dimLength/dimTime), SMALL);
|
||||||
|
|
||||||
|
return tmp<volScalarField>::New
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
|
||||||
|
this->mesh_.time().timeName(),
|
||||||
|
this->mesh_
|
||||||
|
),
|
||||||
|
this->epsilon()/(betaStar*(this->k() + k0))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
template<class BasicTurbulenceModel>
|
||||||
void Foam::LESModel<BasicTurbulenceModel>::correct()
|
void Foam::LESModel<BasicTurbulenceModel>::correct()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2017 OpenFOAM Foundation
|
Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -60,10 +61,9 @@ class LESModel
|
|||||||
:
|
:
|
||||||
public BasicTurbulenceModel
|
public BasicTurbulenceModel
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected data
|
// Protected Data
|
||||||
|
|
||||||
//- LES coefficients dictionary
|
//- LES coefficients dictionary
|
||||||
dictionary LESDict_;
|
dictionary LESDict_;
|
||||||
@ -77,6 +77,9 @@ protected:
|
|||||||
//- Model coefficients dictionary
|
//- Model coefficients dictionary
|
||||||
dictionary coeffDict_;
|
dictionary coeffDict_;
|
||||||
|
|
||||||
|
//- Empirical model constant
|
||||||
|
dimensionedScalar Ce_;
|
||||||
|
|
||||||
//- Lower limit of k
|
//- Lower limit of k
|
||||||
dimensionedScalar kMin_;
|
dimensionedScalar kMin_;
|
||||||
|
|
||||||
@ -182,6 +185,12 @@ public:
|
|||||||
return coeffDict_;
|
return coeffDict_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return the empirical model constant
|
||||||
|
const dimensionedScalar& Ce() const noexcept
|
||||||
|
{
|
||||||
|
return Ce_;
|
||||||
|
}
|
||||||
|
|
||||||
//- Return the lower allowable limit for k (default: SMALL)
|
//- Return the lower allowable limit for k (default: SMALL)
|
||||||
const dimensionedScalar& kMin() const
|
const dimensionedScalar& kMin() const
|
||||||
{
|
{
|
||||||
@ -220,6 +229,12 @@ public:
|
|||||||
return this->nut(patchi) + this->nu(patchi);
|
return this->nut(patchi) + this->nu(patchi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Return the turbulence kinetic energy dissipation rate
|
||||||
|
virtual tmp<volScalarField> epsilon() const;
|
||||||
|
|
||||||
|
//- Return the specific dissipation rate
|
||||||
|
virtual tmp<volScalarField> omega() const;
|
||||||
|
|
||||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2017 OpenFOAM Foundation
|
Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -27,7 +27,6 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "LESeddyViscosity.H"
|
#include "LESeddyViscosity.H"
|
||||||
#include "zeroGradientFvPatchField.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -61,16 +60,6 @@ LESeddyViscosity<BasicTurbulenceModel>::LESeddyViscosity
|
|||||||
phi,
|
phi,
|
||||||
transport,
|
transport,
|
||||||
propertiesName
|
propertiesName
|
||||||
),
|
|
||||||
|
|
||||||
Ce_
|
|
||||||
(
|
|
||||||
dimensioned<scalar>::getOrAddToDict
|
|
||||||
(
|
|
||||||
"Ce",
|
|
||||||
this->coeffDict_,
|
|
||||||
1.048
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -82,8 +71,6 @@ bool LESeddyViscosity<BasicTurbulenceModel>::read()
|
|||||||
{
|
{
|
||||||
if (eddyViscosity<LESModel<BasicTurbulenceModel>>::read())
|
if (eddyViscosity<LESModel<BasicTurbulenceModel>>::read())
|
||||||
{
|
{
|
||||||
Ce_.readIfPresent(this->coeffDict());
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,57 +78,6 @@ bool LESeddyViscosity<BasicTurbulenceModel>::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
|
||||||
tmp<volScalarField> LESeddyViscosity<BasicTurbulenceModel>::epsilon() const
|
|
||||||
{
|
|
||||||
tmp<volScalarField> tk(this->k());
|
|
||||||
|
|
||||||
tmp<volScalarField> tepsilon
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
|
||||||
this->runTime_.timeName(),
|
|
||||||
this->mesh_,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
Ce_*tk()*sqrt(tk())/this->delta(),
|
|
||||||
zeroGradientFvPatchField<scalar>::typeName
|
|
||||||
)
|
|
||||||
);
|
|
||||||
volScalarField& epsilon = tepsilon.ref();
|
|
||||||
epsilon.correctBoundaryConditions();
|
|
||||||
|
|
||||||
return tepsilon;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
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
|
} // End namespace LESModels
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -69,13 +69,6 @@ class LESeddyViscosity
|
|||||||
void operator=(const LESeddyViscosity&) = delete;
|
void operator=(const LESeddyViscosity&) = delete;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
// Protected data
|
|
||||||
|
|
||||||
dimensionedScalar Ce_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef typename BasicTurbulenceModel::alphaField alphaField;
|
typedef typename BasicTurbulenceModel::alphaField alphaField;
|
||||||
@ -107,12 +100,6 @@ public:
|
|||||||
|
|
||||||
//- Read model coefficients if they have changed
|
//- Read model coefficients if they have changed
|
||||||
virtual bool read();
|
virtual bool read();
|
||||||
|
|
||||||
//- 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 |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -139,46 +139,6 @@ bool Smagorinsky<BasicTurbulenceModel>::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
|
||||||
tmp<volScalarField> Smagorinsky<BasicTurbulenceModel>::epsilon() const
|
|
||||||
{
|
|
||||||
volScalarField k(this->k(fvc::grad(this->U_)));
|
|
||||||
|
|
||||||
return tmp<volScalarField>
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
|
||||||
this->runTime_.timeName(),
|
|
||||||
this->mesh_
|
|
||||||
),
|
|
||||||
this->Ce_*k*sqrt(k)/this->delta()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
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>
|
template<class BasicTurbulenceModel>
|
||||||
void Smagorinsky<BasicTurbulenceModel>::correct()
|
void Smagorinsky<BasicTurbulenceModel>::correct()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -162,12 +162,6 @@ public:
|
|||||||
return k(fvc::grad(this->U_));
|
return k(fvc::grad(this->U_));
|
||||||
}
|
}
|
||||||
|
|
||||||
//- 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
|
//- Correct Eddy-Viscosity and related properties
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2017 OpenFOAM Foundation
|
Copyright (C) 2015-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -170,49 +170,6 @@ bool WALE<BasicTurbulenceModel>::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
|
||||||
tmp<volScalarField> WALE<BasicTurbulenceModel>::epsilon() const
|
|
||||||
{
|
|
||||||
volScalarField k(this->k(fvc::grad(this->U_)));
|
|
||||||
|
|
||||||
return tmp<volScalarField>
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
|
||||||
this->runTime_.timeName(),
|
|
||||||
this->mesh_,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
this->Ce_*k*sqrt(k)/this->delta()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
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>
|
template<class BasicTurbulenceModel>
|
||||||
void WALE<BasicTurbulenceModel>::correct()
|
void WALE<BasicTurbulenceModel>::correct()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2016 OpenFOAM Foundation
|
Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -154,12 +154,6 @@ public:
|
|||||||
return k(fvc::grad(this->U_));
|
return k(fvc::grad(this->U_));
|
||||||
}
|
}
|
||||||
|
|
||||||
//- 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
|
//- Correct Eddy-Viscosity and related properties
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -219,45 +219,6 @@ bool dynamicKEqn<BasicTurbulenceModel>::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
|
||||||
tmp<volScalarField> dynamicKEqn<BasicTurbulenceModel>::epsilon() const
|
|
||||||
{
|
|
||||||
return tmp<volScalarField>
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
|
||||||
this->runTime_.timeName(),
|
|
||||||
this->mesh_,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
Ce()*k()*sqrt(k())/this->delta()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
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>
|
template<class BasicTurbulenceModel>
|
||||||
void dynamicKEqn<BasicTurbulenceModel>::correct()
|
void dynamicKEqn<BasicTurbulenceModel>::correct()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -178,12 +178,6 @@ public:
|
|||||||
return k_;
|
return k_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- 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
|
//- Return the effective diffusivity for k
|
||||||
tmp<volScalarField> DkEff() const
|
tmp<volScalarField> DkEff() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -139,45 +139,6 @@ bool kEqn<BasicTurbulenceModel>::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
|
||||||
tmp<volScalarField> kEqn<BasicTurbulenceModel>::epsilon() const
|
|
||||||
{
|
|
||||||
return tmp<volScalarField>
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
|
||||||
this->runTime_.timeName(),
|
|
||||||
this->mesh_,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
this->Ce_*k()*sqrt(k())/this->delta()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
|
||||||
tmp<volScalarField> kEqn<BasicTurbulenceModel>::omega() const
|
|
||||||
{
|
|
||||||
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>
|
template<class BasicTurbulenceModel>
|
||||||
void kEqn<BasicTurbulenceModel>::correct()
|
void kEqn<BasicTurbulenceModel>::correct()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -148,12 +148,6 @@ public:
|
|||||||
return k_;
|
return k_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- 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
|
//- Return the effective diffusivity for k
|
||||||
tmp<volScalarField> DkEff() const
|
tmp<volScalarField> DkEff() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -199,21 +199,6 @@ public:
|
|||||||
return epsilon_;
|
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->mesh_.time().timeName(),
|
|
||||||
this->mesh_
|
|
||||||
),
|
|
||||||
epsilon_/(Cmu_*k_)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the effective diffusivity for R
|
//- Return the effective diffusivity for R
|
||||||
tmp<volSymmTensorField> DREff() const;
|
tmp<volSymmTensorField> DREff() const;
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -202,21 +202,6 @@ public:
|
|||||||
return epsilon_;
|
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
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -187,6 +187,44 @@ bool Foam::RASModel<BasicTurbulenceModel>::read()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::RASModel<BasicTurbulenceModel>::epsilon() const
|
||||||
|
{
|
||||||
|
const scalar Cmu = 0.09;
|
||||||
|
|
||||||
|
return tmp<volScalarField>::New
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
||||||
|
this->mesh_.time().timeName(),
|
||||||
|
this->mesh_
|
||||||
|
),
|
||||||
|
Cmu*this->k()*this->omega()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::RASModel<BasicTurbulenceModel>::omega() const
|
||||||
|
{
|
||||||
|
const scalar betaStar = 0.09;
|
||||||
|
const dimensionedScalar k0(sqr(dimLength/dimTime), SMALL);
|
||||||
|
|
||||||
|
return tmp<volScalarField>::New
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
|
||||||
|
this->mesh_.time().timeName(),
|
||||||
|
this->mesh_
|
||||||
|
),
|
||||||
|
this->epsilon()/(betaStar*(this->k() + k0))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
template<class BasicTurbulenceModel>
|
||||||
void Foam::RASModel<BasicTurbulenceModel>::correct()
|
void Foam::RASModel<BasicTurbulenceModel>::correct()
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2017 OpenFOAM Foundation
|
Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -228,6 +229,12 @@ public:
|
|||||||
return this->nut(patchi) + this->nu(patchi);
|
return this->nut(patchi) + this->nu(patchi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- Return the turbulence kinetic energy dissipation rate
|
||||||
|
virtual tmp<volScalarField> epsilon() const;
|
||||||
|
|
||||||
|
//- Return the specific dissipation rate
|
||||||
|
virtual tmp<volScalarField> omega() const;
|
||||||
|
|
||||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -202,21 +202,6 @@ public:
|
|||||||
return epsilon_;
|
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
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015-2016 OpenFOAM Foundation
|
Copyright (C) 2015-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -190,21 +190,6 @@ public:
|
|||||||
return epsilon_;
|
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_)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the effective diffusivity for R
|
//- Return the effective diffusivity for R
|
||||||
tmp<volSymmTensorField> DREff() const;
|
tmp<volSymmTensorField> DREff() const;
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -200,21 +200,6 @@ public:
|
|||||||
return epsilon_;
|
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
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -275,21 +275,6 @@ public:
|
|||||||
return epsilon_;
|
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_)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return the normalised wall-normal fluctuating velocity scale field
|
//- Return the normalised wall-normal fluctuating velocity scale field
|
||||||
virtual tmp<volScalarField> phit() const
|
virtual tmp<volScalarField> phit() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -179,25 +179,6 @@ public:
|
|||||||
return omega_;
|
return omega_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the turbulence kinetic energy dissipation rate
|
|
||||||
virtual tmp<volScalarField> epsilon() const
|
|
||||||
{
|
|
||||||
return tmp<volScalarField>
|
|
||||||
(
|
|
||||||
new volScalarField
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"epsilon",
|
|
||||||
this->mesh_.time().timeName(),
|
|
||||||
this->mesh_
|
|
||||||
),
|
|
||||||
Cmu_*k_*omega_,
|
|
||||||
omega_.boundaryField().types()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Solve the turbulence equations and correct the turbulence viscosity
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -198,21 +198,6 @@ public:
|
|||||||
return epsilon_;
|
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
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2017 OpenFOAM Foundation
|
Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -145,90 +145,6 @@ Stokes<BasicTurbulenceModel>::nuEff
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
|
||||||
tmp<volScalarField>
|
|
||||||
Stokes<BasicTurbulenceModel>::k() const
|
|
||||||
{
|
|
||||||
return tmp<volScalarField>::New
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
IOobject::groupName("k", this->alphaRhoPhi_.group()),
|
|
||||||
this->runTime_.timeName(),
|
|
||||||
this->mesh_,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
),
|
|
||||||
this->mesh_,
|
|
||||||
dimensionedScalar(sqr(this->U_.dimensions()), Zero)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
|
||||||
tmp<volScalarField>
|
|
||||||
Stokes<BasicTurbulenceModel>::epsilon() const
|
|
||||||
{
|
|
||||||
return tmp<volScalarField>::New
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
|
||||||
this->runTime_.timeName(),
|
|
||||||
this->mesh_,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
),
|
|
||||||
this->mesh_,
|
|
||||||
dimensionedScalar(sqr(this->U_.dimensions())/dimTime, Zero)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
|
||||||
tmp<volScalarField>
|
|
||||||
Stokes<BasicTurbulenceModel>::omega() const
|
|
||||||
{
|
|
||||||
return tmp<volScalarField>::New
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
IOobject::groupName("omega", this->alphaRhoPhi_.group()),
|
|
||||||
this->runTime_.timeName(),
|
|
||||||
this->mesh_,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
),
|
|
||||||
this->mesh_,
|
|
||||||
dimensionedScalar(dimless/dimTime, Zero)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
|
||||||
tmp<volSymmTensorField>
|
|
||||||
Stokes<BasicTurbulenceModel>::R() const
|
|
||||||
{
|
|
||||||
return tmp<volSymmTensorField>::New
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
IOobject::groupName("R", this->alphaRhoPhi_.group()),
|
|
||||||
this->runTime_.timeName(),
|
|
||||||
this->mesh_,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE,
|
|
||||||
false
|
|
||||||
),
|
|
||||||
this->mesh_,
|
|
||||||
dimensionedSymmTensor(sqr(this->U_.dimensions()), Zero)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
template<class BasicTurbulenceModel>
|
||||||
void Stokes<BasicTurbulenceModel>::correct()
|
void Stokes<BasicTurbulenceModel>::correct()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2013-2016 OpenFOAM Foundation
|
Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -126,19 +126,6 @@ public:
|
|||||||
//- Return the effective viscosity on patch
|
//- Return the effective viscosity on patch
|
||||||
virtual tmp<scalarField> nuEff(const label patchi) const;
|
virtual tmp<scalarField> nuEff(const label patchi) const;
|
||||||
|
|
||||||
//- Return the turbulence kinetic energy, i.e. 0 for Stokes flow
|
|
||||||
virtual tmp<volScalarField> k() const;
|
|
||||||
|
|
||||||
//- Return the turbulence kinetic energy dissipation rate,
|
|
||||||
//- i.e. 0 for Stokes flow
|
|
||||||
virtual tmp<volScalarField> epsilon() const;
|
|
||||||
|
|
||||||
//- Return the specific dissipation rate, i.e. 0 for Stokes flow
|
|
||||||
virtual tmp<volScalarField> omega() const;
|
|
||||||
|
|
||||||
//- Return the Reynolds stress tensor, i.e. 0 for Stokes flow
|
|
||||||
virtual tmp<volSymmTensorField> R() const;
|
|
||||||
|
|
||||||
//- Correct the Stokes viscosity
|
//- Correct the Stokes viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018-2020 OpenFOAM Foundation
|
Copyright (C) 2018-2020 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -157,45 +157,6 @@ generalizedNewtonian<BasicMomentumTransportModel>::nuEff
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicMomentumTransportModel>
|
|
||||||
tmp<volScalarField>
|
|
||||||
generalizedNewtonian<BasicMomentumTransportModel>::k() const
|
|
||||||
{
|
|
||||||
return volScalarField::New
|
|
||||||
(
|
|
||||||
IOobject::groupName("k", this->alphaRhoPhi_.group()),
|
|
||||||
this->mesh_,
|
|
||||||
dimensionedScalar(sqr(this->U_.dimensions()), Zero)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class BasicMomentumTransportModel>
|
|
||||||
tmp<volScalarField>
|
|
||||||
generalizedNewtonian<BasicMomentumTransportModel>::epsilon() const
|
|
||||||
{
|
|
||||||
return volScalarField::New
|
|
||||||
(
|
|
||||||
IOobject::groupName("epsilon", this->alphaRhoPhi_.group()),
|
|
||||||
this->mesh_,
|
|
||||||
dimensionedScalar(sqr(this->U_.dimensions())/dimTime, Zero)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class BasicMomentumTransportModel>
|
|
||||||
tmp<volSymmTensorField>
|
|
||||||
generalizedNewtonian<BasicMomentumTransportModel>::R() const
|
|
||||||
{
|
|
||||||
return volSymmTensorField::New
|
|
||||||
(
|
|
||||||
IOobject::groupName("R", this->alphaRhoPhi_.group()),
|
|
||||||
this->mesh_,
|
|
||||||
dimensionedSymmTensor(sqr(this->U_.dimensions()), Zero)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class BasicMomentumTransportModel>
|
template<class BasicMomentumTransportModel>
|
||||||
void generalizedNewtonian<BasicMomentumTransportModel>::correct()
|
void generalizedNewtonian<BasicMomentumTransportModel>::correct()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018-2020 OpenFOAM Foundation
|
Copyright (C) 2018-2020 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -135,15 +136,6 @@ public:
|
|||||||
//- Return the effective viscosity on patch
|
//- Return the effective viscosity on patch
|
||||||
virtual tmp<scalarField> nuEff(const label patchi) const;
|
virtual tmp<scalarField> nuEff(const label patchi) const;
|
||||||
|
|
||||||
//- Return the turbulence kinetic energy
|
|
||||||
virtual tmp<volScalarField> k() const;
|
|
||||||
|
|
||||||
//- Return the turbulence kinetic energy dissipation rate,
|
|
||||||
virtual tmp<volScalarField> epsilon() const;
|
|
||||||
|
|
||||||
//- Return the Reynolds stress tensor
|
|
||||||
virtual tmp<volSymmTensorField> R() const;
|
|
||||||
|
|
||||||
//- Correct the generalizedNewtonian viscosity
|
//- Correct the generalizedNewtonian viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018 OpenFOAM Foundation
|
Copyright (C) 2018 OpenFOAM Foundation
|
||||||
Copyright (C) 2020 OpenCFD Ltd.
|
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -226,21 +226,6 @@ public:
|
|||||||
return epsilon_;
|
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
|
//- Solve the turbulence equations and correct the turbulence viscosity
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user