mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: DES models - added access function for shielding function, fd
This commit is contained in:
@ -166,6 +166,25 @@ tmp<volScalarField> DESModel<BasicTurbulenceModel>::Ssigma
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField> DESModel<BasicTurbulenceModel>::fd() const
|
||||||
|
{
|
||||||
|
return tmp<volScalarField>::New
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"fd",
|
||||||
|
this->mesh_.time().timeName(),
|
||||||
|
this->mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
this->mesh_,
|
||||||
|
dimensionedScalar(dimless, Zero)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace LESModels
|
} // End namespace LESModels
|
||||||
|
|||||||
@ -120,7 +120,10 @@ public:
|
|||||||
|
|
||||||
//- Return modified strain rate
|
//- Return modified strain rate
|
||||||
// Note: uses Ctrans_ coefficient
|
// Note: uses Ctrans_ coefficient
|
||||||
tmp<volScalarField> Ssigma(const volTensorField& gradU) const;
|
virtual tmp<volScalarField> Ssigma(const volTensorField& gradU) const;
|
||||||
|
|
||||||
|
//- Return the shielding function
|
||||||
|
virtual tmp<volScalarField> fd() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -23,16 +23,6 @@ License
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::DESModelBase
|
|
||||||
|
|
||||||
Description
|
|
||||||
Base class for DES models providing an interfaces to the LESRegion
|
|
||||||
function.
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
DESModelBase.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "DESModelBase.H"
|
#include "DESModelBase.H"
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ 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.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -28,8 +28,7 @@ Class
|
|||||||
Foam::DESModelBase
|
Foam::DESModelBase
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Base class for DES models providing an interfaces to the LESRegion
|
Base class for DES models providing an interfaces to DES fields.
|
||||||
function.
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
DESModelBase.C
|
DESModelBase.C
|
||||||
@ -70,6 +69,9 @@ public:
|
|||||||
|
|
||||||
//- Return the LES field indicator
|
//- Return the LES field indicator
|
||||||
virtual tmp<volScalarField> LESRegion() const = 0;
|
virtual tmp<volScalarField> LESRegion() const = 0;
|
||||||
|
|
||||||
|
//- Return the shielding function
|
||||||
|
virtual tmp<volScalarField> fd() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -189,6 +189,13 @@ bool SpalartAllmarasDDES<BasicTurbulenceModel>::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField> SpalartAllmarasDDES<BasicTurbulenceModel>::fd() const
|
||||||
|
{
|
||||||
|
return fd(mag(fvc::grad(this->U_)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace LESModels
|
} // End namespace LESModels
|
||||||
|
|||||||
@ -147,6 +147,9 @@ public:
|
|||||||
|
|
||||||
//- Read from dictionary
|
//- Read from dictionary
|
||||||
virtual bool read();
|
virtual bool read();
|
||||||
|
|
||||||
|
//- Return the shielding function
|
||||||
|
virtual tmp<volScalarField> fd() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -236,6 +236,17 @@ bool SpalartAllmarasIDDES<BasicTurbulenceModel>::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField> SpalartAllmarasIDDES<BasicTurbulenceModel>::fd() const
|
||||||
|
{
|
||||||
|
const volScalarField alpha(this->alpha());
|
||||||
|
const volScalarField expTerm(exp(sqr(alpha)));
|
||||||
|
|
||||||
|
tmp<volScalarField> fB = min(2*pow(expTerm, -9.0), scalar(1));
|
||||||
|
return max(1 - fdt(mag(fvc::grad(this->U_))), fB);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace LESModels
|
} // End namespace LESModels
|
||||||
|
|||||||
@ -153,6 +153,9 @@ public:
|
|||||||
|
|
||||||
//- Re-read model coefficients if they have changed
|
//- Re-read model coefficients if they have changed
|
||||||
virtual bool read();
|
virtual bool read();
|
||||||
|
|
||||||
|
//- Return the shielding function
|
||||||
|
virtual tmp<volScalarField> fd() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -201,6 +201,13 @@ bool kOmegaSSTDDES<BasicTurbulenceModel>::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField> kOmegaSSTDDES<BasicTurbulenceModel>::fd() const
|
||||||
|
{
|
||||||
|
return fd(mag(fvc::grad(this->U_)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace LESModels
|
} // End namespace LESModels
|
||||||
|
|||||||
@ -157,6 +157,9 @@ public:
|
|||||||
|
|
||||||
//- Re-read model coefficients if they have changed
|
//- Re-read model coefficients if they have changed
|
||||||
virtual bool read();
|
virtual bool read();
|
||||||
|
|
||||||
|
//- Return the shielding function
|
||||||
|
virtual tmp<volScalarField> fd() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -93,7 +93,7 @@ protected:
|
|||||||
|
|
||||||
dimensionedScalar kappa_;
|
dimensionedScalar kappa_;
|
||||||
|
|
||||||
//- DES coefficients
|
//- DES coefficients
|
||||||
dimensionedScalar CDESkom_;
|
dimensionedScalar CDESkom_;
|
||||||
dimensionedScalar CDESkeps_;
|
dimensionedScalar CDESkeps_;
|
||||||
|
|
||||||
|
|||||||
@ -231,6 +231,17 @@ bool kOmegaSSTIDDES<BasicTurbulenceModel>::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasicTurbulenceModel>
|
||||||
|
tmp<volScalarField> kOmegaSSTIDDES<BasicTurbulenceModel>::fd() const
|
||||||
|
{
|
||||||
|
const volScalarField alpha(this->alpha());
|
||||||
|
const volScalarField expTerm(exp(sqr(alpha)));
|
||||||
|
|
||||||
|
tmp<volScalarField> fB = min(2*pow(expTerm, -9.0), scalar(1));
|
||||||
|
return max(1 - fdt(mag(fvc::grad(this->U_))), fB);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace LESModels
|
} // End namespace LESModels
|
||||||
|
|||||||
@ -149,6 +149,9 @@ public:
|
|||||||
|
|
||||||
//- Re-read model coefficients if they have changed
|
//- Re-read model coefficients if they have changed
|
||||||
virtual bool read();
|
virtual bool read();
|
||||||
|
|
||||||
|
//- Return the shielding function
|
||||||
|
virtual tmp<volScalarField> fd() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user