mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -480,7 +480,7 @@ void Foam::fvMatrix<Type>::setReference
|
|||||||
const bool forceReference
|
const bool forceReference
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (celli >= 0 && (psi_.needReference() || forceReference))
|
if ((forceReference || psi_.needReference()) && celli >= 0)
|
||||||
{
|
{
|
||||||
source()[celli] += diag()[celli]*value;
|
source()[celli] += diag()[celli]*value;
|
||||||
diag()[celli] += diag()[celli];
|
diag()[celli] += diag()[celli];
|
||||||
|
|||||||
@ -45,25 +45,23 @@ namespace RASModels
|
|||||||
scalar mutRoughWallFunctionFvPatchScalarField::fnRough
|
scalar mutRoughWallFunctionFvPatchScalarField::fnRough
|
||||||
(
|
(
|
||||||
const scalar KsPlus,
|
const scalar KsPlus,
|
||||||
const scalar Cs,
|
const scalar Cs
|
||||||
const scalar kappa
|
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Set deltaB based on non-dimensional roughness height
|
// Return fn based on non-dimensional roughness height
|
||||||
scalar deltaB = 0.0;
|
|
||||||
if (KsPlus < 90.0)
|
if (KsPlus < 90.0)
|
||||||
{
|
{
|
||||||
deltaB =
|
return pow
|
||||||
1.0/kappa
|
(
|
||||||
*log((KsPlus - 2.25)/87.75 + Cs*KsPlus)
|
(KsPlus - 2.25)/87.75 + Cs*KsPlus,
|
||||||
*sin(0.4258*(log(KsPlus) - 0.811));
|
sin(0.4258*(log(KsPlus) - 0.811))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
deltaB = 1.0/kappa*log(1.0 + Cs*KsPlus);
|
return (1.0 + Cs*KsPlus);
|
||||||
}
|
}
|
||||||
|
|
||||||
return exp(min(deltaB*kappa, 50.0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -216,8 +214,8 @@ void mutRoughWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
scalar yPlusLamNew = yPlusLam;
|
scalar yPlusLamNew = yPlusLam;
|
||||||
if (KsPlus > 2.25)
|
if (KsPlus > 2.25)
|
||||||
{
|
{
|
||||||
Edash = E/fnRough(KsPlus, Cs_[faceI], kappa);
|
Edash = E/fnRough(KsPlus, Cs_[faceI]);
|
||||||
yPlusLam = rasModel.yPlusLam(kappa, Edash);
|
yPlusLamNew = rasModel.yPlusLam(kappa, Edash);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
@ -231,7 +229,9 @@ void mutRoughWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
if (yPlus > yPlusLamNew)
|
if (yPlus > yPlusLamNew)
|
||||||
{
|
{
|
||||||
mutw[faceI] = muw[faceI]*(yPlus*kappa/log(Edash*yPlus) - 1);
|
mutw[faceI] =
|
||||||
|
muw[faceI]
|
||||||
|
*(yPlus*kappa/log(max(Edash*yPlus, 1+1e-4)) - 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -83,12 +83,7 @@ class mutRoughWallFunctionFvPatchScalarField
|
|||||||
// Private member functions
|
// Private member functions
|
||||||
|
|
||||||
//- Compute the roughness function
|
//- Compute the roughness function
|
||||||
scalar fnRough
|
scalar fnRough(const scalar KsPlus, const scalar Cs) const;
|
||||||
(
|
|
||||||
const scalar KsPlus,
|
|
||||||
const scalar Cs,
|
|
||||||
const scalar kappa
|
|
||||||
) const;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -45,8 +45,7 @@ namespace RASModels
|
|||||||
scalar nutRoughWallFunctionFvPatchScalarField::fnRough
|
scalar nutRoughWallFunctionFvPatchScalarField::fnRough
|
||||||
(
|
(
|
||||||
const scalar KsPlus,
|
const scalar KsPlus,
|
||||||
const scalar Cs,
|
const scalar Cs
|
||||||
const scalar kappa
|
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Return fn based on non-dimensional roughness height
|
// Return fn based on non-dimensional roughness height
|
||||||
@ -205,7 +204,7 @@ void nutRoughWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
|
|
||||||
if (KsPlus > 2.25)
|
if (KsPlus > 2.25)
|
||||||
{
|
{
|
||||||
Edash = E/fnRough(KsPlus, Cs_[faceI], kappa);
|
Edash = E/fnRough(KsPlus, Cs_[faceI]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (yPlus > yPlusLam)
|
if (yPlus > yPlusLam)
|
||||||
|
|||||||
@ -80,12 +80,7 @@ class nutRoughWallFunctionFvPatchScalarField
|
|||||||
// Private member functions
|
// Private member functions
|
||||||
|
|
||||||
//- Compute the roughness function
|
//- Compute the roughness function
|
||||||
scalar fnRough
|
scalar fnRough(const scalar KsPlus, const scalar Cs) const;
|
||||||
(
|
|
||||||
const scalar KsPlus,
|
|
||||||
const scalar Cs,
|
|
||||||
const scalar kappa
|
|
||||||
) const;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user