mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -44,7 +44,6 @@ uniformTotalPressureFvPatchScalarField
|
|||||||
rhoName_("none"),
|
rhoName_("none"),
|
||||||
psiName_("none"),
|
psiName_("none"),
|
||||||
gamma_(0.0),
|
gamma_(0.0),
|
||||||
p0_(0.0),
|
|
||||||
pressure_()
|
pressure_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -63,7 +62,6 @@ uniformTotalPressureFvPatchScalarField
|
|||||||
rhoName_(dict.lookupOrDefault<word>("rho", "none")),
|
rhoName_(dict.lookupOrDefault<word>("rho", "none")),
|
||||||
psiName_(dict.lookupOrDefault<word>("psi", "none")),
|
psiName_(dict.lookupOrDefault<word>("psi", "none")),
|
||||||
gamma_(readScalar(dict.lookup("gamma"))),
|
gamma_(readScalar(dict.lookup("gamma"))),
|
||||||
p0_(readScalar(dict.lookup("p0"))),
|
|
||||||
pressure_(DataEntry<scalar>::New("pressure", dict))
|
pressure_(DataEntry<scalar>::New("pressure", dict))
|
||||||
{
|
{
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
@ -75,7 +73,8 @@ uniformTotalPressureFvPatchScalarField
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fvPatchField<scalar>::operator=(p0_);
|
scalar p0 = pressure_->value(this->db().time().timeOutputValue());
|
||||||
|
fvPatchField<scalar>::operator=(p0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +94,6 @@ uniformTotalPressureFvPatchScalarField
|
|||||||
rhoName_(ptf.rhoName_),
|
rhoName_(ptf.rhoName_),
|
||||||
psiName_(ptf.psiName_),
|
psiName_(ptf.psiName_),
|
||||||
gamma_(ptf.gamma_),
|
gamma_(ptf.gamma_),
|
||||||
p0_(ptf.p0_),
|
|
||||||
pressure_(ptf.pressure_().clone().ptr())
|
pressure_(ptf.pressure_().clone().ptr())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -112,7 +110,6 @@ uniformTotalPressureFvPatchScalarField
|
|||||||
rhoName_(tppsf.rhoName_),
|
rhoName_(tppsf.rhoName_),
|
||||||
psiName_(tppsf.psiName_),
|
psiName_(tppsf.psiName_),
|
||||||
gamma_(tppsf.gamma_),
|
gamma_(tppsf.gamma_),
|
||||||
p0_(tppsf.p0_),
|
|
||||||
pressure_(tppsf.pressure_().clone().ptr())
|
pressure_(tppsf.pressure_().clone().ptr())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -130,7 +127,6 @@ uniformTotalPressureFvPatchScalarField
|
|||||||
rhoName_(tppsf.rhoName_),
|
rhoName_(tppsf.rhoName_),
|
||||||
psiName_(tppsf.psiName_),
|
psiName_(tppsf.psiName_),
|
||||||
gamma_(tppsf.gamma_),
|
gamma_(tppsf.gamma_),
|
||||||
p0_(tppsf.p0_),
|
|
||||||
pressure_(tppsf.pressure_().clone().ptr())
|
pressure_(tppsf.pressure_().clone().ptr())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -147,14 +143,14 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
p0_ = pressure_->value(this->db().time().timeOutputValue());
|
scalar p0 = pressure_->value(this->db().time().timeOutputValue());
|
||||||
|
|
||||||
const fvsPatchField<scalar>& phip =
|
const fvsPatchField<scalar>& phip =
|
||||||
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
||||||
|
|
||||||
if (psiName_ == "none" && rhoName_ == "none")
|
if (psiName_ == "none" && rhoName_ == "none")
|
||||||
{
|
{
|
||||||
operator==(p0_ - 0.5*(1.0 - pos(phip))*magSqr(Up));
|
operator==(p0 - 0.5*(1.0 - pos(phip))*magSqr(Up));
|
||||||
}
|
}
|
||||||
else if (rhoName_ == "none")
|
else if (rhoName_ == "none")
|
||||||
{
|
{
|
||||||
@ -167,7 +163,7 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs
|
|||||||
|
|
||||||
operator==
|
operator==
|
||||||
(
|
(
|
||||||
p0_
|
p0
|
||||||
/pow
|
/pow
|
||||||
(
|
(
|
||||||
(1.0 + 0.5*psip*gM1ByG*(1.0 - pos(phip))*magSqr(Up)),
|
(1.0 + 0.5*psip*gM1ByG*(1.0 - pos(phip))*magSqr(Up)),
|
||||||
@ -177,7 +173,7 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
operator==(p0_/(1.0 + 0.5*psip*(1.0 - pos(phip))*magSqr(Up)));
|
operator==(p0/(1.0 + 0.5*psip*(1.0 - pos(phip))*magSqr(Up)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (psiName_ == "none")
|
else if (psiName_ == "none")
|
||||||
@ -185,7 +181,7 @@ void Foam::uniformTotalPressureFvPatchScalarField::updateCoeffs
|
|||||||
const fvPatchField<scalar>& rho =
|
const fvPatchField<scalar>& rho =
|
||||||
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||||
|
|
||||||
operator==(p0_ - 0.5*rho*(1.0 - pos(phip))*magSqr(Up));
|
operator==(p0 - 0.5*rho*(1.0 - pos(phip))*magSqr(Up));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -219,7 +215,6 @@ void Foam::uniformTotalPressureFvPatchScalarField::write(Ostream& os) const
|
|||||||
os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("psi") << psiName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("psi") << psiName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
|
os.writeKeyword("gamma") << gamma_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("p0") << p0_ << token::END_STATEMENT << nl;
|
|
||||||
pressure_->writeData(os);
|
pressure_->writeData(os);
|
||||||
writeEntry("value", os);
|
writeEntry("value", os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -75,9 +75,6 @@ class uniformTotalPressureFvPatchScalarField
|
|||||||
//- Heat capacity ratio
|
//- Heat capacity ratio
|
||||||
scalar gamma_;
|
scalar gamma_;
|
||||||
|
|
||||||
//- Total pressure
|
|
||||||
scalar p0_;
|
|
||||||
|
|
||||||
//- Table of time vs total pressure, including the bounding treatment
|
//- Table of time vs total pressure, including the bounding treatment
|
||||||
autoPtr<DataEntry<scalar> > pressure_;
|
autoPtr<DataEntry<scalar> > pressure_;
|
||||||
|
|
||||||
@ -178,18 +175,6 @@ public:
|
|||||||
return gamma_;
|
return gamma_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the total pressure
|
|
||||||
scalar p0() const
|
|
||||||
{
|
|
||||||
return p0_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Return reference to the total pressure to allow adjustment
|
|
||||||
scalar p0()
|
|
||||||
{
|
|
||||||
return p0_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
|
|||||||
@ -636,7 +636,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions
|
|||||||
*(sum(dMassSRGas) + sum(dMassSRLiquid) + sum(dMassSRSolid))
|
*(sum(dMassSRGas) + sum(dMassSRLiquid) + sum(dMassSRSolid))
|
||||||
);
|
);
|
||||||
|
|
||||||
const scalar xsi = min(T/5000.0, 1.0);
|
const scalar xsi = min(T/td.cloud().constProps().TMax(), 1.0);
|
||||||
const scalar coeff =
|
const scalar coeff =
|
||||||
(1.0 - xsi*xsi)*td.cloud().constProps().hRetentionCoeff();
|
(1.0 - xsi*xsi)*td.cloud().constProps().hRetentionCoeff();
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ namespace LESModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class GenEddyVisc Declaration
|
Class GenEddyVisc Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class GenEddyVisc
|
class GenEddyVisc
|
||||||
@ -108,7 +108,21 @@ public:
|
|||||||
//- Return sub-grid disipation rate
|
//- Return sub-grid disipation rate
|
||||||
virtual tmp<volScalarField> epsilon() const
|
virtual tmp<volScalarField> epsilon() const
|
||||||
{
|
{
|
||||||
return ce_*k()*sqrt(k())/delta();
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"epsilon",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
ce_*k()*sqrt(k())/delta()
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return viscosity
|
//- Return viscosity
|
||||||
|
|||||||
@ -52,7 +52,7 @@ namespace LESModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class GenSGSStress Declaration
|
Class GenSGSStress Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class GenSGSStress
|
class GenSGSStress
|
||||||
@ -109,14 +109,43 @@ public:
|
|||||||
//- Return the SGS turbulent kinetic energy
|
//- Return the SGS turbulent kinetic energy
|
||||||
virtual tmp<volScalarField> k() const
|
virtual tmp<volScalarField> k() const
|
||||||
{
|
{
|
||||||
return 0.5*tr(B_);
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"k",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
0.5*tr(B_)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the SGS turbulent dissipation
|
//- Return the SGS turbulent dissipation
|
||||||
virtual tmp<volScalarField> epsilon() const
|
virtual tmp<volScalarField> epsilon() const
|
||||||
{
|
{
|
||||||
const volScalarField K(k());
|
const volScalarField K(k());
|
||||||
return ce_*K*sqrt(K)/delta();
|
|
||||||
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"epsilon",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
ce_*K*sqrt(K)/delta()
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the SGS viscosity
|
//- Return the SGS viscosity
|
||||||
|
|||||||
@ -51,7 +51,7 @@ namespace LESModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class GenEddyVisc Declaration
|
Class GenEddyVisc Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class GenEddyVisc
|
class GenEddyVisc
|
||||||
@ -104,7 +104,21 @@ public:
|
|||||||
//- Return sub-grid disipation rate
|
//- Return sub-grid disipation rate
|
||||||
virtual tmp<volScalarField> epsilon() const
|
virtual tmp<volScalarField> epsilon() const
|
||||||
{
|
{
|
||||||
return ce_*k()*sqrt(k())/delta();
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"epsilon",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
ce_*k()*sqrt(k())/delta()
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the SGS viscosity.
|
//- Return the SGS viscosity.
|
||||||
|
|||||||
@ -52,7 +52,7 @@ namespace LESModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class GenSGSStress Declaration
|
Class GenSGSStress Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class GenSGSStress
|
class GenSGSStress
|
||||||
@ -104,14 +104,43 @@ public:
|
|||||||
//- Return the SGS turbulent kinetic energy.
|
//- Return the SGS turbulent kinetic energy.
|
||||||
virtual tmp<volScalarField> k() const
|
virtual tmp<volScalarField> k() const
|
||||||
{
|
{
|
||||||
return 0.5*tr(B_);
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"k",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
0.5*tr(B_)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the SGS turbulent dissipation.
|
//- Return the SGS turbulent dissipation.
|
||||||
virtual tmp<volScalarField> epsilon() const
|
virtual tmp<volScalarField> epsilon() const
|
||||||
{
|
{
|
||||||
const volScalarField K(k());
|
const volScalarField K(k());
|
||||||
return ce_*K*sqrt(K)/delta();
|
|
||||||
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"epsilon",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
ce_*K*sqrt(K)/delta()
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the SGS viscosity.
|
//- Return the SGS viscosity.
|
||||||
|
|||||||
Reference in New Issue
Block a user