Merge branch 'master' of ssh://noisy/home/noisy2/OpenFOAM/OpenFOAM-dev

This commit is contained in:
andy
2008-06-19 18:05:09 +01:00
5 changed files with 26 additions and 12 deletions

View File

@ -123,13 +123,13 @@ Foam::tmp<Foam::volScalarField> Foam::SchaefferFrictionalStress::muf
)
);
volScalarField& muf_ = tmuf();
volScalarField& muff = tmuf();
forAll (D, celli)
{
if (alpha[celli] > alphaMax.value()-5e-2)
{
muf_[celli] =
muff[celli] =
0.5*pf[celli]*sin(phi.value())
/(
sqrt(1.0/6.0*(sqr(D[celli].xx() - D[celli].yy())
@ -141,7 +141,7 @@ Foam::tmp<Foam::volScalarField> Foam::SchaefferFrictionalStress::muf
}
}
return muf_;
return tmuf;
}

View File

@ -51,9 +51,23 @@ namespace viscosityModels
Foam::tmp<Foam::volScalarField>
Foam::viscosityModels::powerLaw::calcNu() const
{
dimensionedScalar tone("tone", dimTime, 1.0);
return (max(numin_, min(numax_, k_
* pow(tone * strainRate(), n_.value()- scalar(1.0)))));
return max
(
nuMin_,
min
(
nuMax_,
k_*pow
(
max
(
dimensionedScalar("one", dimTime, 1.0)*strainRate(),
dimensionedScalar("VSMALL", dimless, VSMALL)
),
n_.value() - scalar(1.0)
)
)
);
}
@ -71,8 +85,8 @@ Foam::viscosityModels::powerLaw::powerLaw
powerLawCoeffs_(viscosityProperties.subDict(typeName + "Coeffs")),
k_(powerLawCoeffs_.lookup("k")),
n_(powerLawCoeffs_.lookup("n")),
numin_(powerLawCoeffs_.lookup("numin")),
numax_(powerLawCoeffs_.lookup("numax")),
nuMin_(powerLawCoeffs_.lookup("nuMin")),
nuMax_(powerLawCoeffs_.lookup("nuMax")),
nu_
(
IOobject
@ -101,8 +115,8 @@ bool Foam::viscosityModels::powerLaw::read
powerLawCoeffs_.lookup("k") >> k_;
powerLawCoeffs_.lookup("n") >> n_;
powerLawCoeffs_.lookup("numin") >> numin_;
powerLawCoeffs_.lookup("numax") >> numax_;
powerLawCoeffs_.lookup("nuMin") >> nuMin_;
powerLawCoeffs_.lookup("nuMax") >> nuMax_;
return true;
}

View File

@ -61,8 +61,8 @@ class powerLaw
dimensionedScalar k_;
dimensionedScalar n_;
dimensionedScalar numin_;
dimensionedScalar numax_;
dimensionedScalar nuMin_;
dimensionedScalar nuMax_;
volScalarField nu_;