mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
INT: Integration of Upstream CFD's grey-area sigma into kOmegaSST models
- Initial code supplied by Marian Fuchs, Upstream CFD GmbH - Code cleaned/refactored/integrated by OpenCFD
This commit is contained in:
@ -6,7 +6,8 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||||
|
Copyright (C) 2022 Upstream CFD GmbH
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -164,6 +165,22 @@ tmp<volScalarField::Internal> kOmegaSSTBase<BasicEddyViscosityModel>::epsilonByk
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicEddyViscosityModel>
|
||||||
|
tmp<volScalarField::Internal> kOmegaSSTBase<BasicEddyViscosityModel>::GbyNu0
|
||||||
|
(
|
||||||
|
const volTensorField& gradU,
|
||||||
|
const volScalarField& F1,
|
||||||
|
const volScalarField& S2
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return tmp<volScalarField::Internal>::New
|
||||||
|
(
|
||||||
|
IOobject::scopedName(this->type(), "GbyNu"),
|
||||||
|
gradU() && dev(twoSymm(gradU()))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicEddyViscosityModel>
|
template<class BasicEddyViscosityModel>
|
||||||
tmp<volScalarField::Internal> kOmegaSSTBase<BasicEddyViscosityModel>::GbyNu
|
tmp<volScalarField::Internal> kOmegaSSTBase<BasicEddyViscosityModel>::GbyNu
|
||||||
(
|
(
|
||||||
@ -510,13 +527,8 @@ void kOmegaSSTBase<BasicEddyViscosityModel>::correct()
|
|||||||
|
|
||||||
tmp<volTensorField> tgradU = fvc::grad(U);
|
tmp<volTensorField> tgradU = fvc::grad(U);
|
||||||
volScalarField S2(this->S2(F1, tgradU()));
|
volScalarField S2(this->S2(F1, tgradU()));
|
||||||
volScalarField::Internal GbyNu0
|
volScalarField::Internal GbyNu0(this->GbyNu0(tgradU(), F1, S2));
|
||||||
(
|
|
||||||
this->type() + ":GbyNu",
|
|
||||||
(tgradU() && dev(twoSymm(tgradU())))
|
|
||||||
);
|
|
||||||
volScalarField::Internal G(this->GName(), nut*GbyNu0);
|
volScalarField::Internal G(this->GName(), nut*GbyNu0);
|
||||||
tgradU.clear();
|
|
||||||
|
|
||||||
// Update omega and G at the wall
|
// Update omega and G at the wall
|
||||||
omega_.boundaryFieldRef().updateCoeffs();
|
omega_.boundaryFieldRef().updateCoeffs();
|
||||||
|
|||||||
@ -6,7 +6,8 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2021 OpenCFD Ltd.
|
Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||||
|
Copyright (C) 2022 Upstream CFD GmbH
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -273,6 +274,14 @@ protected:
|
|||||||
const volTensorField& gradU
|
const volTensorField& gradU
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Return (G/nu)_0
|
||||||
|
virtual tmp<volScalarField::Internal> GbyNu0
|
||||||
|
(
|
||||||
|
const volTensorField& gradU,
|
||||||
|
const volScalarField& F1,
|
||||||
|
const volScalarField& S2
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Return G/nu
|
//- Return G/nu
|
||||||
virtual tmp<volScalarField::Internal> GbyNu
|
virtual tmp<volScalarField::Internal> GbyNu
|
||||||
(
|
(
|
||||||
|
|||||||
@ -6,7 +6,8 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015 OpenFOAM Foundation
|
Copyright (C) 2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||||
|
Copyright (C) 2022 Upstream CFD GmbH
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -49,6 +50,35 @@ tmp<volScalarField> kOmegaSSTDDES<BasicTurbulenceModel>::fd
|
|||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField> kOmegaSSTDDES<BasicTurbulenceModel>::S2
|
||||||
|
(
|
||||||
|
const volScalarField& F1,
|
||||||
|
const volTensorField& gradU
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<volScalarField> tS2 =
|
||||||
|
this->kOmegaSSTDES<BasicTurbulenceModel>::S2(F1, gradU);
|
||||||
|
|
||||||
|
if (useSigma_)
|
||||||
|
{
|
||||||
|
volScalarField& S2 = tS2.ref();
|
||||||
|
const volScalarField CDES(this->CDES(F1));
|
||||||
|
const volScalarField& k = this->k_;
|
||||||
|
const volScalarField& omega = this->omega_;
|
||||||
|
const volScalarField Ssigma(this->Ssigma(gradU));
|
||||||
|
S2 -=
|
||||||
|
(
|
||||||
|
fd(mag(gradU))
|
||||||
|
*pos(sqrt(k)/(this->betaStar_*omega) - CDES*this->delta())
|
||||||
|
*(S2 - sqr(Ssigma))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tS2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasicTurbulenceModel>
|
template<class BasicTurbulenceModel>
|
||||||
tmp<volScalarField> kOmegaSSTDDES<BasicTurbulenceModel>::dTilda
|
tmp<volScalarField> kOmegaSSTDDES<BasicTurbulenceModel>::dTilda
|
||||||
(
|
(
|
||||||
@ -75,6 +105,45 @@ tmp<volScalarField> kOmegaSSTDDES<BasicTurbulenceModel>::dTilda
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField::Internal> kOmegaSSTDDES<BasicTurbulenceModel>::GbyNu0
|
||||||
|
(
|
||||||
|
const volTensorField& gradU,
|
||||||
|
const volScalarField& F1,
|
||||||
|
const volScalarField& S2
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<volScalarField::Internal> tGbyNu0 =
|
||||||
|
this->kOmegaSSTDES<BasicTurbulenceModel>::GbyNu0(gradU, F1, S2);
|
||||||
|
|
||||||
|
if (useSigma_)
|
||||||
|
{
|
||||||
|
volScalarField::Internal& GbyNu0 = tGbyNu0.ref();
|
||||||
|
const volScalarField::Internal CDES(this->CDES(F1)()());
|
||||||
|
const volScalarField::Internal& k = this->k_();
|
||||||
|
const volScalarField::Internal& omega = this->omega_();
|
||||||
|
|
||||||
|
GbyNu0 -=
|
||||||
|
fd(mag(gradU))()()
|
||||||
|
*pos(sqrt(k)/(this->betaStar_*omega) - CDES*this->delta()())
|
||||||
|
*(GbyNu0 - S2);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tGbyNu0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField::Internal> kOmegaSSTDDES<BasicTurbulenceModel>::GbyNu
|
||||||
|
(
|
||||||
|
const volScalarField::Internal& GbyNu0,
|
||||||
|
const volScalarField::Internal& F2,
|
||||||
|
const volScalarField::Internal& S2
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return GbyNu0; // Unlimited
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -103,9 +172,25 @@ kOmegaSSTDDES<BasicTurbulenceModel>::kOmegaSSTDDES
|
|||||||
type
|
type
|
||||||
),
|
),
|
||||||
|
|
||||||
|
useSigma_
|
||||||
|
(
|
||||||
|
Switch::getOrAddToDict
|
||||||
|
(
|
||||||
|
"useSigma",
|
||||||
|
this->coeffDict_,
|
||||||
|
false
|
||||||
|
)
|
||||||
|
),
|
||||||
Cd1_
|
Cd1_
|
||||||
(
|
(
|
||||||
|
useSigma_ ?
|
||||||
dimensioned<scalar>::getOrAddToDict
|
dimensioned<scalar>::getOrAddToDict
|
||||||
|
(
|
||||||
|
"Cd1Sigma",
|
||||||
|
this->coeffDict_,
|
||||||
|
22
|
||||||
|
)
|
||||||
|
: dimensioned<scalar>::getOrAddToDict
|
||||||
(
|
(
|
||||||
"Cd1",
|
"Cd1",
|
||||||
this->coeffDict_,
|
this->coeffDict_,
|
||||||
|
|||||||
@ -6,7 +6,8 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015 OpenFOAM Foundation
|
Copyright (C) 2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2019 OpenCFD Ltd.
|
Copyright (C) 2019, 2022 OpenCFD Ltd.
|
||||||
|
Copyright (C) 2022 Upstream CFD GmbH
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -46,8 +47,8 @@ SourceFiles
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef kOmegaSSTDDES_H
|
#ifndef Foam_kOmegaSSTDDES_H
|
||||||
#define kOmegaSSTDDES_H
|
#define Foam_kOmegaSSTDDES_H
|
||||||
|
|
||||||
#include "kOmegaSSTDES.H"
|
#include "kOmegaSSTDES.H"
|
||||||
|
|
||||||
@ -82,6 +83,9 @@ protected:
|
|||||||
|
|
||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
|
//- Switch to activate grey-area enhanced sigma-DDES
|
||||||
|
Switch useSigma_;
|
||||||
|
|
||||||
// Model coefficients
|
// Model coefficients
|
||||||
|
|
||||||
dimensionedScalar Cd1_;
|
dimensionedScalar Cd1_;
|
||||||
@ -90,6 +94,13 @@ protected:
|
|||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
|
//- Return square of strain rate
|
||||||
|
virtual tmp<volScalarField> S2
|
||||||
|
(
|
||||||
|
const volScalarField& F1,
|
||||||
|
const volTensorField& gradU
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Length scale
|
//- Length scale
|
||||||
virtual tmp<volScalarField> dTilda
|
virtual tmp<volScalarField> dTilda
|
||||||
(
|
(
|
||||||
@ -97,6 +108,21 @@ protected:
|
|||||||
const volScalarField& CDES
|
const volScalarField& CDES
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
//- Return (G/nu)_0
|
||||||
|
virtual tmp<volScalarField::Internal> GbyNu0
|
||||||
|
(
|
||||||
|
const volTensorField& gradU,
|
||||||
|
const volScalarField& F1,
|
||||||
|
const volScalarField& S2
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Return G/nu
|
||||||
|
virtual tmp<volScalarField::Internal> GbyNu
|
||||||
|
(
|
||||||
|
const volScalarField::Internal& GbyNu0,
|
||||||
|
const volScalarField::Internal& F2,
|
||||||
|
const volScalarField::Internal& S2
|
||||||
|
) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,8 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2015 OpenFOAM Foundation
|
Copyright (C) 2015 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2020 OpenCFD Ltd.
|
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||||
|
Copyright (C) 2022 Upstream CFD GmbH
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -167,6 +168,10 @@ kOmegaSSTDES<BasicTurbulenceModel>::kOmegaSSTDES
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
// Note: Ctrans coeff is model specific; for k-w = 60
|
||||||
|
this->Ctrans_ =
|
||||||
|
dimensioned<scalar>::getOrAddToDict("Ctrans", this->coeffDict_, 60.0);
|
||||||
|
|
||||||
if (type == typeName)
|
if (type == typeName)
|
||||||
{
|
{
|
||||||
this->printCoeffs(type);
|
this->printCoeffs(type);
|
||||||
|
|||||||
Reference in New Issue
Block a user