mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: Updated template code
This commit is contained in:
@ -25,7 +25,7 @@
|
|||||||
// Update the pressure BCs to ensure flux consistency
|
// Update the pressure BCs to ensure flux consistency
|
||||||
constrainPressure(p_rgh, U, phiHbyA, rAUf);
|
constrainPressure(p_rgh, U, phiHbyA, rAUf);
|
||||||
|
|
||||||
Pair<tmp<volScalarField> > vDot = mixture->vDot();
|
Pair<tmp<volScalarField>> vDot = mixture->vDot();
|
||||||
const volScalarField& vDotc = vDot[0]();
|
const volScalarField& vDotc = vDot[0]();
|
||||||
const volScalarField& vDotv = vDot[1]();
|
const volScalarField& vDotv = vDot[1]();
|
||||||
|
|
||||||
|
|||||||
@ -61,7 +61,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::constant
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Pair<Foam::tmp<Foam::volScalarField> >
|
Foam::Pair<Foam::tmp<Foam::volScalarField>>
|
||||||
Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotAlphal() const
|
Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotAlphal() const
|
||||||
{
|
{
|
||||||
const volScalarField& T = mesh_.lookupObject<volScalarField>("T");
|
const volScalarField& T = mesh_.lookupObject<volScalarField>("T");
|
||||||
@ -76,7 +76,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotAlphal() const
|
|||||||
|
|
||||||
dimensionedScalar T0("0", dimTemperature, 0.0);
|
dimensionedScalar T0("0", dimTemperature, 0.0);
|
||||||
|
|
||||||
return Pair<tmp<volScalarField> >
|
return Pair<tmp<volScalarField>>
|
||||||
(
|
(
|
||||||
coeffC_*mixture_.rho2()*max(TSat - T, T0),
|
coeffC_*mixture_.rho2()*max(TSat - T, T0),
|
||||||
-coeffE_*mixture_.rho1()*max(T - TSat, T0)
|
-coeffE_*mixture_.rho1()*max(T - TSat, T0)
|
||||||
@ -84,7 +84,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotAlphal() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::Pair<Foam::tmp<Foam::volScalarField> >
|
Foam::Pair<Foam::tmp<Foam::volScalarField>>
|
||||||
Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDot() const
|
Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDot() const
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDot() const
|
|||||||
|
|
||||||
dimensionedScalar T0("0", dimTemperature, 0.0);
|
dimensionedScalar T0("0", dimTemperature, 0.0);
|
||||||
|
|
||||||
return Pair<tmp<volScalarField> >
|
return Pair<tmp<volScalarField>>
|
||||||
(
|
(
|
||||||
coeffC_*mixture_.rho2()*limitedAlpha2*max(TSat - T, T0),
|
coeffC_*mixture_.rho2()*limitedAlpha2*max(TSat - T, T0),
|
||||||
coeffE_*mixture_.rho1()*limitedAlpha1*max(T - TSat, T0)
|
coeffE_*mixture_.rho1()*limitedAlpha1*max(T - TSat, T0)
|
||||||
@ -118,7 +118,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDot() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::Pair<Foam::tmp<Foam::volScalarField> >
|
Foam::Pair<Foam::tmp<Foam::volScalarField>>
|
||||||
Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotDeltaT() const
|
Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotDeltaT() const
|
||||||
{
|
{
|
||||||
volScalarField limitedAlpha1
|
volScalarField limitedAlpha1
|
||||||
@ -142,7 +142,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotDeltaT() const
|
|||||||
const dimensionedScalar& TSat = thermo.TSat();
|
const dimensionedScalar& TSat = thermo.TSat();
|
||||||
|
|
||||||
|
|
||||||
return Pair<tmp<volScalarField> >
|
return Pair<tmp<volScalarField>>
|
||||||
(
|
(
|
||||||
coeffC_*mixture_.rho2()*limitedAlpha2*pos(TSat - T),
|
coeffC_*mixture_.rho2()*limitedAlpha2*pos(TSat - T),
|
||||||
coeffE_*mixture_.rho1()*limitedAlpha1*pos(T - TSat)
|
coeffE_*mixture_.rho1()*limitedAlpha1*pos(T - TSat)
|
||||||
|
|||||||
@ -46,7 +46,7 @@ namespace temperaturePhaseChangeTwoPhaseMixtures
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*--------------------------------------------------------------------*\
|
/*--------------------------------------------------------------------*\
|
||||||
Class constant
|
Class constant
|
||||||
\*--------------------------------------------------------------------*/
|
\*--------------------------------------------------------------------*/
|
||||||
|
|
||||||
class constant
|
class constant
|
||||||
@ -88,15 +88,15 @@ public:
|
|||||||
//- Return the mass condensation and vaporisation rates as a
|
//- Return the mass condensation and vaporisation rates as a
|
||||||
// coefficient to multiply (1 - alphal) for the condensation rate
|
// coefficient to multiply (1 - alphal) for the condensation rate
|
||||||
// and a coefficient to multiply alphal for the vaporisation rate
|
// and a coefficient to multiply alphal for the vaporisation rate
|
||||||
virtual Pair<tmp<volScalarField> > mDotAlphal() const;
|
virtual Pair<tmp<volScalarField>> mDotAlphal() const;
|
||||||
|
|
||||||
//- Return the mass condensation and vaporisation rates as coefficients
|
//- Return the mass condensation and vaporisation rates as coefficients
|
||||||
virtual Pair<tmp<volScalarField> > mDot() const;
|
virtual Pair<tmp<volScalarField>> mDot() const;
|
||||||
|
|
||||||
//- Return the mass condensation and vaporisation rates as a
|
//- Return the mass condensation and vaporisation rates as a
|
||||||
// coefficient to multiply (Tsat - T) for the condensation rate
|
// coefficient to multiply (Tsat - T) for the condensation rate
|
||||||
// and a coefficient to multiply (T - Tsat) for the vaporisation rate
|
// and a coefficient to multiply (T - Tsat) for the vaporisation rate
|
||||||
virtual Pair<tmp<volScalarField> > mDotDeltaT() const;
|
virtual Pair<tmp<volScalarField>> mDotDeltaT() const;
|
||||||
|
|
||||||
//- Correct the constant phaseChange model
|
//- Correct the constant phaseChange model
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
|
|||||||
@ -64,7 +64,7 @@ temperaturePhaseChangeTwoPhaseMixture
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Pair<Foam::tmp<Foam::volScalarField> >
|
Foam::Pair<Foam::tmp<Foam::volScalarField>>
|
||||||
Foam::temperaturePhaseChangeTwoPhaseMixture::vDotAlphal() const
|
Foam::temperaturePhaseChangeTwoPhaseMixture::vDotAlphal() const
|
||||||
{
|
{
|
||||||
volScalarField alphalCoeff
|
volScalarField alphalCoeff
|
||||||
@ -73,9 +73,9 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::vDotAlphal() const
|
|||||||
*(1.0/mixture_.rho1() - 1.0/mixture_.rho2())
|
*(1.0/mixture_.rho1() - 1.0/mixture_.rho2())
|
||||||
);
|
);
|
||||||
|
|
||||||
Pair<tmp<volScalarField> > mDotAlphal = this->mDotAlphal();
|
Pair<tmp<volScalarField>> mDotAlphal = this->mDotAlphal();
|
||||||
|
|
||||||
return Pair<tmp<volScalarField> >
|
return Pair<tmp<volScalarField>>
|
||||||
(
|
(
|
||||||
alphalCoeff*mDotAlphal[0],
|
alphalCoeff*mDotAlphal[0],
|
||||||
alphalCoeff*mDotAlphal[1]
|
alphalCoeff*mDotAlphal[1]
|
||||||
@ -83,13 +83,13 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::vDotAlphal() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::Pair<Foam::tmp<Foam::volScalarField> >
|
Foam::Pair<Foam::tmp<Foam::volScalarField>>
|
||||||
Foam::temperaturePhaseChangeTwoPhaseMixture::vDot() const
|
Foam::temperaturePhaseChangeTwoPhaseMixture::vDot() const
|
||||||
{
|
{
|
||||||
dimensionedScalar pCoeff(1.0/mixture_.rho1() - 1.0/mixture_.rho2());
|
dimensionedScalar pCoeff(1.0/mixture_.rho1() - 1.0/mixture_.rho2());
|
||||||
Pair<tmp<volScalarField> > mDot = this->mDot();
|
Pair<tmp<volScalarField>> mDot = this->mDot();
|
||||||
|
|
||||||
return Pair<tmp<volScalarField> >(pCoeff*mDot[0], pCoeff*mDot[1]);
|
return Pair<tmp<volScalarField>>(pCoeff*mDot[0], pCoeff*mDot[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -130,24 +130,24 @@ public:
|
|||||||
//- Return the mass condensation and vaporisation rates as a
|
//- Return the mass condensation and vaporisation rates as a
|
||||||
// coefficient to multiply (1 - alphal) for the condensation rate
|
// coefficient to multiply (1 - alphal) for the condensation rate
|
||||||
// and a coefficient to multiply alphal for the vaporisation rate
|
// and a coefficient to multiply alphal for the vaporisation rate
|
||||||
virtual Pair<tmp<volScalarField> > mDotAlphal() const = 0;
|
virtual Pair<tmp<volScalarField>> mDotAlphal() const = 0;
|
||||||
|
|
||||||
//- Return the mass condensation and vaporisation rates as coefficients
|
//- Return the mass condensation and vaporisation rates as coefficients
|
||||||
virtual Pair<tmp<volScalarField> > mDot() const = 0;
|
virtual Pair<tmp<volScalarField>> mDot() const = 0;
|
||||||
|
|
||||||
//- Return the mass condensation and vaporisation rates as a
|
//- Return the mass condensation and vaporisation rates as a
|
||||||
// coefficient to multiply (Tsat - T) for the condensation rate
|
// coefficient to multiply (Tsat - T) for the condensation rate
|
||||||
// and a coefficient to multiply (T - Tsat) for the vaporisation rate
|
// and a coefficient to multiply (T - Tsat) for the vaporisation rate
|
||||||
virtual Pair<tmp<volScalarField> > mDotDeltaT() const = 0;
|
virtual Pair<tmp<volScalarField>> mDotDeltaT() const = 0;
|
||||||
|
|
||||||
//- Return the volumetric condensation and vaporisation rates as a
|
//- Return the volumetric condensation and vaporisation rates as a
|
||||||
// coefficient to multiply (1 - alphal) for the condensation rate
|
// coefficient to multiply (1 - alphal) for the condensation rate
|
||||||
// and a coefficient to multiply alphal for the vaporisation rate
|
// and a coefficient to multiply alphal for the vaporisation rate
|
||||||
Pair<tmp<volScalarField> > vDotAlphal() const;
|
Pair<tmp<volScalarField>> vDotAlphal() const;
|
||||||
|
|
||||||
//- Return the volumetric condensation and vaporisation rates as
|
//- Return the volumetric condensation and vaporisation rates as
|
||||||
// coefficients
|
// coefficients
|
||||||
Pair<tmp<volScalarField> > vDot() const;
|
Pair<tmp<volScalarField>> vDot() const;
|
||||||
|
|
||||||
//- Correct the phaseChange model
|
//- Correct the phaseChange model
|
||||||
virtual void correct() = 0;
|
virtual void correct() = 0;
|
||||||
|
|||||||
@ -97,7 +97,7 @@ List<Vb::Point> pointFile::initialPoints() const
|
|||||||
|
|
||||||
if (points.empty())
|
if (points.empty())
|
||||||
{
|
{
|
||||||
FatalErrorIn("List<Vb::Point> pointFile::initialPoints() const")
|
FatalErrorInFunction
|
||||||
<< "Point file contain no points"
|
<< "Point file contain no points"
|
||||||
<< exit(FatalError) << endl;
|
<< exit(FatalError) << endl;
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ List<Vb::Point> pointFile::initialPoints() const
|
|||||||
|
|
||||||
if (points.empty())
|
if (points.empty())
|
||||||
{
|
{
|
||||||
FatalErrorIn("List<Vb::Point> pointFile::initialPoints() const")
|
FatalErrorInFunction
|
||||||
<< "Point file contain no points"
|
<< "Point file contain no points"
|
||||||
<< exit(FatalError) << endl;
|
<< exit(FatalError) << endl;
|
||||||
}
|
}
|
||||||
@ -170,7 +170,7 @@ List<Vb::Point> pointFile::initialPoints() const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorIn("List<Vb::Point> pointFile::initialPoints() const")
|
FatalErrorInFunction
|
||||||
<< "Cannot find points file " << pointsIO.objectPath()
|
<< "Cannot find points file " << pointsIO.objectPath()
|
||||||
<< exit(FatalError) << endl;
|
<< exit(FatalError) << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,7 +119,7 @@ void Foam::unwatchedIOdictionary::addWatch()
|
|||||||
|
|
||||||
if (findIndex(files_, f) != -1)
|
if (findIndex(files_, f) != -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn("regIOobject::addWatch()")
|
FatalErrorInFunction
|
||||||
<< "Object " << objectPath() << " of type " << type()
|
<< "Object " << objectPath() << " of type " << type()
|
||||||
<< " already watched" << abort(FatalError);
|
<< " already watched" << abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -269,7 +269,7 @@ void Foam::regIOobject::addWatch()
|
|||||||
label index = time().findWatch(watchIndices_, f);
|
label index = time().findWatch(watchIndices_, f);
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn("regIOobject::addWatch()")
|
FatalErrorInFunction
|
||||||
<< "Object " << objectPath() << " of type " << type()
|
<< "Object " << objectPath() << " of type " << type()
|
||||||
<< " already watched with index " << watchIndices_[index]
|
<< " already watched with index " << watchIndices_[index]
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
|
|||||||
@ -1058,7 +1058,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
|
|||||||
|
|
||||||
if (newPoints.size() != points_.size())
|
if (newPoints.size() != points_.size())
|
||||||
{
|
{
|
||||||
FatalErrorIn("polyMesh::movePoints(const pointField&)")
|
FatalErrorInFunction
|
||||||
<< "Size of newPoints " << newPoints.size()
|
<< "Size of newPoints " << newPoints.size()
|
||||||
<< " does not correspond to current mesh points size "
|
<< " does not correspond to current mesh points size "
|
||||||
<< points_.size()
|
<< points_.size()
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class InterfaceForce
|
|||||||
const scalar C_;
|
const scalar C_;
|
||||||
|
|
||||||
//- gradInterForce interpolator
|
//- gradInterForce interpolator
|
||||||
autoPtr<interpolation<vector> > gradInterForceInterpPtr_;
|
autoPtr<interpolation<vector>> gradInterForceInterpPtr_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -87,9 +87,9 @@ public:
|
|||||||
InterfaceForce(const InterfaceForce& gf);
|
InterfaceForce(const InterfaceForce& gf);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual autoPtr<ParticleForce<CloudType> > clone() const
|
virtual autoPtr<ParticleForce<CloudType>> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<ParticleForce<CloudType> >
|
return autoPtr<ParticleForce<CloudType>>
|
||||||
(
|
(
|
||||||
new InterfaceForce<CloudType>(*this)
|
new InterfaceForce<CloudType>(*this)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -76,7 +76,7 @@ void Foam::reactionsSensitivityAnalysis<chemistryType>::calculateSpeciesRR
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
tmp<DimensionedField<scalar, volMesh> > RRt
|
tmp<DimensionedField<scalar, volMesh>> RRt
|
||||||
(
|
(
|
||||||
new DimensionedField<scalar, volMesh>
|
new DimensionedField<scalar, volMesh>
|
||||||
(
|
(
|
||||||
|
|||||||
@ -25,6 +25,7 @@ License
|
|||||||
|
|
||||||
\defgroup grpRegionBoundaryConditions Region boundary conditions
|
\defgroup grpRegionBoundaryConditions Region boundary conditions
|
||||||
@{
|
@{
|
||||||
|
\ingroup grpBoundaryConditions
|
||||||
This group contains region model boundary conditions
|
This group contains region model boundary conditions
|
||||||
@}
|
@}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user