INT: integration updates

This commit is contained in:
Andrew Heather
2018-06-20 16:28:48 +01:00
parent 3603cf289f
commit c103331a6a
68 changed files with 292 additions and 554 deletions

View File

@ -74,4 +74,5 @@ Info<< "Maximum ddtAlpha : " << ddtAlphaNum << endl;
Info<< "Maximum DiffNum : " << DiNum << endl; Info<< "Maximum DiffNum : " << DiNum << endl;
// ************************************************************************* // // ************************************************************************* //

View File

@ -0,0 +1,2 @@
// Volumatric flux
surfaceScalarField& phi = fluid.phi();

View File

@ -114,9 +114,6 @@
p_rgh = p - rho*gh; p_rgh = p - rho*gh;
} }
// Total volumetric flux
surfaceScalarField& phi = fluid.phi();
// Mass flux // Mass flux
surfaceScalarField& rhoPhi = fluid.rhoPhi(); surfaceScalarField& rhoPhi = fluid.rhoPhi();

View File

@ -29,7 +29,8 @@ Group
Description Description
Solver for n incompressible, non-isothermal immiscible fluids with Solver for n incompressible, non-isothermal immiscible fluids with
phase-change. Uses a VOF (volume of fluid) phase-fraction based interface capturing approach. phase-change. Uses a VOF (volume of fluid) phase-fraction based interface
capturing approach.
The momentum, energy and other fluid properties are of the "mixture" and a The momentum, energy and other fluid properties are of the "mixture" and a
single momentum equation is solved. single momentum equation is solved.
@ -54,6 +55,8 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#include "postProcess.H"
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
#include "createMesh.H" #include "createMesh.H"
@ -61,12 +64,15 @@ int main(int argc, char *argv[])
pimpleControl pimple(mesh); pimpleControl pimple(mesh);
#include "createFields.H" #include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H" #include "createFvOptions.H"
#include "createTimeControls.H" #include "createTimeControls.H"
#include "CourantNo.H" #include "CourantNo.H"
#include "alphaCourantNo.H" //#include "alphaCourantNo.H"
#include "setInitialDeltaT.H" #include "setInitialDeltaT.H"
turbulence->validate();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
@ -92,6 +98,7 @@ int main(int argc, char *argv[])
#include "UEqn.H" #include "UEqn.H"
#include "YEqns.H" #include "YEqns.H"
#include "TEqn.H" #include "TEqn.H"
// --- Pressure corrector loop // --- Pressure corrector loop
while (pimple.correct()) while (pimple.correct())
{ {
@ -108,9 +115,7 @@ int main(int argc, char *argv[])
runTime.write(); runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" runTime.printExecutionTime(Info);
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
} }
Info<< "End\n" << endl; Info<< "End\n" << endl;

View File

@ -62,9 +62,6 @@ class DTRMParticle
: :
public particle public particle
{ {
private:
// Private data // Private data
//- Size in bytes of the fields //- Size in bytes of the fields
@ -98,8 +95,6 @@ public:
: :
public particle::trackingData public particle::trackingData
{ {
// Interpolators for continuous phase fields // Interpolators for continuous phase fields
const interpolationCell<scalar>& aInterp_; const interpolationCell<scalar>& aInterp_;
@ -135,10 +130,6 @@ public:
volScalarField& Q volScalarField& Q
); );
// Public data
// Member functions // Member functions
@ -151,7 +142,6 @@ public:
inline const UPtrList<reflectionModel>& reflection() const; inline const UPtrList<reflectionModel>& reflection() const;
inline scalar& Q(label celli); inline scalar& Q(label celli);
}; };
// Static data members // Static data members
@ -268,7 +258,6 @@ public:
// Edit // Edit
//- Return access to the target position //- Return access to the target position
inline point& p1(); inline point& p1();
@ -293,7 +282,6 @@ public:
// Member Operators // Member Operators
//- Overridable function to handle the particle hitting a processorPatch //- Overridable function to handle the particle hitting a processorPatch
void hitProcessorPatch void hitProcessorPatch
( (

View File

@ -60,7 +60,6 @@ Foam::DTRMParticle::DTRMParticle
if (is.format() == IOstream::ASCII) if (is.format() == IOstream::ASCII)
{ {
is >> p0_ >> p1_ >> I0_ >> I_ >> dA_ >> transmissiveId_; is >> p0_ >> p1_ >> I0_ >> I_ >> dA_ >> transmissiveId_;
DebugVar(transmissiveId_);
} }
else else
{ {
@ -95,7 +94,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const DTRMParticle& p)
} }
// Check state of Ostream // Check state of Ostream
os.check("Ostream& operator<<(Ostream&, const DTRMParticle&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -54,20 +54,17 @@ namespace Foam
0 0
); );
namespace radiation template<>
const char* Foam::NamedEnum
<
Foam::radiation::laserDTRM::powerDistributionMode,
3
>::names[] =
{ {
template<> "Gaussian",
const char* Foam::NamedEnum "manual",
< "uniform"
Foam::radiation::laserDTRM::powerDistributionMode, };
3
>::names[] =
{
"Gaussian",
"manual",
"uniform"
};
}
} }
const Foam::NamedEnum const Foam::NamedEnum
@ -82,35 +79,32 @@ const Foam::NamedEnum
Foam::scalar Foam::radiation::laserDTRM::calculateIp(scalar r, scalar theta) Foam::scalar Foam::radiation::laserDTRM::calculateIp(scalar r, scalar theta)
{ {
const scalar t = mesh_.time().value(); const scalar t = mesh_.time().value();
const scalar power = laserPower_->value(t);
switch(mode_) switch(mode_)
{ {
case pdGaussian: case pdGaussian:
{ {
scalar I0 = scalar I0 = power/(mathematical::twoPi*sqr(sigma_));
laserPower_->value(t)/(mathematical::twoPi*sqr(sigma_));
return(I0*exp(-sqr(r)/2.0/sqr(sigma_)));
return I0*exp(-sqr(r)/2.0/sqr(sigma_));
break; break;
} }
case pdManual: case pdManual:
{ {
return(laserPower_->value(t)*powerDistribution_()(theta, r)); return power*powerDistribution_()(theta, r);
break; break;
} }
case pdUniform: case pdUniform:
{ {
return return power/(mathematical::pi*sqr(focalLaserRadius_));
( break;
laserPower_->value(t)/(mathematical::pi*sqr(focalLaserRadius_))
);
} }
default: default:
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Unhandled type " << powerDistypeNames_ << "Unhandled type " << powerDistypeNames_
<< abort(FatalError); << abort(FatalError);
return(0); return (0);
} }
} }
} }
@ -125,7 +119,7 @@ Foam::tmp<Foam::volVectorField> Foam::radiation::laserDTRM::nHatfv
const dimensionedScalar deltaN const dimensionedScalar deltaN
( (
"deltaN", "deltaN",
1e-7/pow(average(mesh_.V()), 1.0/3.0) 1e-7/cbrt(average(mesh_.V()))
); );
const volVectorField gradAlphaf const volVectorField gradAlphaf
@ -134,8 +128,8 @@ Foam::tmp<Foam::volVectorField> Foam::radiation::laserDTRM::nHatfv
- alpha1*fvc::grad(alpha2) - alpha1*fvc::grad(alpha2)
); );
// Face unit interface normal // Face unit interface normal
return gradAlphaf/(mag(gradAlphaf)+ deltaN); return gradAlphaf/(mag(gradAlphaf)+ deltaN);
} }
@ -203,7 +197,7 @@ void Foam::radiation::laserDTRM::initialise()
nParticles_ = ndr_*ndTheta_; nParticles_ = ndr_*ndTheta_;
switch(mode_) switch (mode_)
{ {
case pdGaussian: case pdGaussian:
{ {
@ -285,8 +279,8 @@ void Foam::radiation::laserDTRM::initialise()
if (cellI != -1) if (cellI != -1)
{ {
// Create a new particle // Create a new particle
DTRMParticle* pPtr = new DTRMParticle DTRMParticle* pPtr =
(mesh_, p0, p1, Ip, cellI, dAi, -1); new DTRMParticle(mesh_, p0, p1, Ip, cellI, dAi, -1);
// Add to cloud // Add to cloud
DTRMCloud_.addParticle(pPtr); DTRMCloud_.addParticle(pPtr);
@ -294,7 +288,7 @@ void Foam::radiation::laserDTRM::initialise()
if (returnReduce(cellI, maxOp<label>()) == -1) if (returnReduce(cellI, maxOp<label>()) == -1)
{ {
WarningIn("void Foam::radiation::laserDTRM::initialise()") WarningInFunction
<< "Cannot find owner cell for particle at position " << p0 << "Cannot find owner cell for particle at position " << p0
<< endl; << endl;
} }
@ -303,18 +297,16 @@ void Foam::radiation::laserDTRM::initialise()
} }
else else
{ {
FatalErrorIn("void Foam::radiation::laserDTRM::initialise()") FatalErrorInFunction
<< "Current functionality limited to 3-D cases" << "Current functionality limited to 3-D cases"
<< exit(FatalError); << exit(FatalError);
} }
if (debug) DebugInfo
{ << "Total Power in the laser : " << power << endl
Info << "Total Power in the laser : " << power << endl; << "Total Area in the laser : " << area << endl
Info << "Total Area in the laser : " << area << endl; << "Number of particles in the laser : "
Info << "Number of particles in the laser : " << returnReduce(DTRMCloud_.size(), sumOp<label>()) << endl;
<< returnReduce(DTRMCloud_.size(), sumOp<label>()) << endl;
}
} }
@ -534,12 +526,6 @@ Foam::radiation::laserDTRM::laserDTRM
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::radiation::laserDTRM::~laserDTRM()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::radiation::laserDTRM::read() bool Foam::radiation::laserDTRM::read()
@ -661,8 +647,6 @@ void Foam::radiation::laserDTRM::calculate()
{ {
nHat[cellI] += nHatPhase[cellI]; nHat[cellI] += nHatPhase[cellI];
} }
} }
} }
reflectionModelId++; reflectionModelId++;
@ -687,8 +671,8 @@ void Foam::radiation::laserDTRM::calculate()
Q_ Q_
); );
Info << "Move particles..." Info<< "Move particles..."
<< returnReduce(DTRMCloud_.size(), sumOp<label>()) << endl; << returnReduce(DTRMCloud_.size(), sumOp<label>()) << endl;
DTRMCloud_.move(DTRMCloud_, td, mesh_.time().deltaTValue()); DTRMCloud_.move(DTRMCloud_, td, mesh_.time().deltaTValue());
@ -697,13 +681,10 @@ void Foam::radiation::laserDTRM::calculate()
if (debug) if (debug)
{ {
Info<< "Final number of particles..." Info<< "Final number of particles..."
<< returnReduce(DTRMCloud_.size(), sumOp<label>()) << endl; << returnReduce(DTRMCloud_.size(), sumOp<label>()) << endl;
OFstream osRef OFstream osRef(type() + ":particlePath.obj");
(
type() + ":particlePath.obj"
);
label vertI = 0; label vertI = 0;
List<pointField> positions(Pstream::nProcs()); List<pointField> positions(Pstream::nProcs());
@ -727,7 +708,7 @@ void Foam::radiation::laserDTRM::calculate()
Pstream::gatherList(p0); Pstream::gatherList(p0);
Pstream::scatterList(p0); Pstream::scatterList(p0);
for (label proci = 0; proci < Pstream::nProcs(); proci++) for (label proci = 0; proci < Pstream::nProcs(); ++proci)
{ {
const pointField& pos = positions[proci]; const pointField& pos = positions[proci];
const pointField& pfinal = p0[proci]; const pointField& pfinal = p0[proci];
@ -748,8 +729,8 @@ void Foam::radiation::laserDTRM::calculate()
if (mesh_.time().outputTime()) if (mesh_.time().outputTime())
{ {
reflectingCellsVol.write(); reflectingCellsVol.write();
nHat.write(); nHat.write();
} }
} }
@ -762,32 +743,29 @@ void Foam::radiation::laserDTRM::calculate()
Foam::tmp<Foam::volScalarField> Foam::radiation::laserDTRM::Rp() const Foam::tmp<Foam::volScalarField> Foam::radiation::laserDTRM::Rp() const
{ {
return tmp<volScalarField> return tmp<volScalarField>::New
( (
new volScalarField IOobject
( (
IOobject "zero",
( mesh_.time().timeName(),
"zero",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
mesh_, mesh_,
dimensionedScalar IOobject::NO_READ,
( IOobject::NO_WRITE,
"zero", false
dimPower/dimVolume/pow4(dimTemperature), ),
0.0 mesh_,
) dimensionedScalar
(
"zero",
dimPower/dimVolume/pow4(dimTemperature),
0.0
) )
); );
} }
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> > Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
Foam::radiation::laserDTRM::Ru() const Foam::radiation::laserDTRM::Ru() const
{ {
return Q_.internalField(); return Q_.internalField();

View File

@ -237,7 +237,7 @@ public:
//- Destructor //- Destructor
virtual ~laserDTRM(); virtual ~laserDTRM() = default;
// Member functions // Member functions

View File

@ -52,11 +52,7 @@ Foam::radiation::localDensityAbsorptionEmission::alpha(word alphaName) const
{ {
if (!mesh_.foundObject<volScalarField>(alphaName)) if (!mesh_.foundObject<volScalarField>(alphaName))
{ {
FatalErrorIn FatalErrorInFunction
(
"const Foam::volScalarField& "
"Foam::radiation::localDensityAbsorptionEmission::alpha() const"
)
<< "Unable to retrieve density field " << alphaName << " from " << "Unable to retrieve density field " << alphaName << " from "
<< "database. Available objects:" << mesh_.sortedNames() << "database. Available objects:" << mesh_.sortedNames()
<< exit(FatalError); << exit(FatalError);
@ -83,13 +79,6 @@ Foam::radiation::localDensityAbsorptionEmission::localDensityAbsorptionEmission
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::radiation::localDensityAbsorptionEmission::
~localDensityAbsorptionEmission()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>

View File

@ -33,8 +33,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef radiationLocalDensityAbsorptionEmission_H #ifndef radiation_localDensityAbsorptionEmission_H
#define radiationLocalDensityAbsorptionEmission_H #define radiation_localDensityAbsorptionEmission_H
#include "absorptionEmissionModel.H" #include "absorptionEmissionModel.H"
@ -94,7 +94,7 @@ public:
//- Destructor //- Destructor
virtual ~localDensityAbsorptionEmission(); virtual ~localDensityAbsorptionEmission() = default;
// Member Functions // Member Functions

View File

@ -119,7 +119,7 @@ Foam::scalar Foam::radiation::Fresnel::rho
(sqr(sqrt(sqrP) + sqrt(n1)*sinTheta1*tanTheta1) + sqrQ) (sqr(sqrt(sqrP) + sqrt(n1)*sinTheta1*tanTheta1) + sqrQ)
)*rhoP; )*rhoP;
return (rhoP + rhoN)/2; return 0.5*(rhoP + rhoN);
} }
@ -133,5 +133,4 @@ Foam::vector Foam::radiation::Fresnel::R
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -35,8 +35,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef Fresnel_H #ifndef radiation_Fresnel_H
#define Fresnel_H #define radiation_Fresnel_H
#include "reflectionModel.H" #include "reflectionModel.H"
@ -48,14 +48,13 @@ namespace radiation
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class Fresnel Declaration Class Fresnel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class Fresnel class Fresnel
: :
public reflectionModel public reflectionModel
{ {
// Private data // Private data
//- Coefficients dictionary //- Coefficients dictionary
@ -73,12 +72,8 @@ public:
//- Runtime type information //- Runtime type information
TypeName("Fresnel"); TypeName("Fresnel");
//- Construct from components
// Constructors Fresnel(const dictionary& dict, const fvMesh& mesh);
//- Construct from components
Fresnel(const dictionary& dict, const fvMesh& mesh);
//- Destructor //- Destructor
virtual ~Fresnel(); virtual ~Fresnel();
@ -90,11 +85,8 @@ public:
virtual vector R(const vector& incident, const vector& n) const; virtual vector R(const vector& incident, const vector& n) const;
//- Return reflectivity from medium1 to medium2 and a incident angle. //- Return reflectivity from medium1 to medium2 and a incident angle.
// nk1 = (n1 - i k1) from medium 1. // nk1 = (n1 - i k1) from medium 1.
virtual scalar rho virtual scalar rho(const scalar incidentAngle) const;
(
const scalar incidentAngle
) const;
}; };

View File

@ -57,12 +57,6 @@ Foam::radiation::FresnelLaser::FresnelLaser
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::radiation::FresnelLaser::~FresnelLaser()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::scalar Foam::radiation::FresnelLaser::rho Foam::scalar Foam::radiation::FresnelLaser::rho
@ -75,7 +69,7 @@ Foam::scalar Foam::radiation::FresnelLaser::rho
scalar rho = scalar rho =
0.5 0.5
* ( * (
(1 + sqr(1 - epsilon_*cosTheta))/(1 + sqr(1 + epsilon_*cosTheta)) (1 + sqr(1 - epsilon_*cosTheta))/(1 + sqr(1 + epsilon_*cosTheta))
+ +
(sqr(epsilon_) - 2*epsilon_*cosTheta + 2*sqr(cosTheta)) (sqr(epsilon_) - 2*epsilon_*cosTheta + 2*sqr(cosTheta))
/ /

View File

@ -39,8 +39,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef FresnelLaser_H #ifndef radiation_FresnelLaser_H
#define FresnelLaser_H #define radiation_FresnelLaser_H
#include "reflectionModel.H" #include "reflectionModel.H"
@ -71,15 +71,11 @@ public:
//- Runtime type information //- Runtime type information
TypeName("FresnelLaser"); TypeName("FresnelLaser");
//- Construct from components
// Constructors FresnelLaser(const dictionary& dict, const fvMesh& mesh);
//- Construct from components
FresnelLaser(const dictionary& dict, const fvMesh& mesh);
//- Destructor //- Destructor
virtual ~FresnelLaser(); virtual ~FresnelLaser() = default;
// Member Functions // Member Functions
@ -88,11 +84,8 @@ public:
virtual vector R(const vector& incident, const vector& n) const; virtual vector R(const vector& incident, const vector& n) const;
//- Return reflectivity from medium1 to medium2 and a incident angle. //- Return reflectivity from medium1 to medium2 and a incident angle.
// nk1 = (n1 - i k1) from medium 1. // nk1 = (n1 - i k1) from medium 1.
virtual scalar rho virtual scalar rho(const scalar incidentAngle) const;
(
const scalar incidentAngle
) const;
}; };

View File

@ -50,12 +50,6 @@ Foam::radiation::noReflection::noReflection
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::radiation::noReflection::~noReflection()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::scalar Foam::radiation::noReflection::rho Foam::scalar Foam::radiation::noReflection::rho

View File

@ -32,8 +32,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef radiationConstantScatter_H #ifndef radiation_noReflection_H
#define radiationConstantScatter_H #define radiation_noReflection_H
#include "reflectionModel.H" #include "reflectionModel.H"
@ -45,7 +45,7 @@ namespace radiation
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class noReflection Declaration Class noReflection Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class noReflection class noReflection
@ -58,15 +58,11 @@ public:
//- Runtime type information //- Runtime type information
TypeName("none"); TypeName("none");
//- Construct from components
// Constructors noReflection(const dictionary& dict, const fvMesh& mesh);
//- Construct from components
noReflection(const dictionary& dict, const fvMesh& mesh);
//- Destructor //- Destructor
virtual ~noReflection(); virtual ~noReflection() = default;
// Member Functions // Member Functions

View File

@ -50,10 +50,4 @@ Foam::radiation::reflectionModel::reflectionModel
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
Foam::radiation::reflectionModel::~reflectionModel()
{}
// ************************************************************************* // // ************************************************************************* //

View File

@ -29,8 +29,8 @@ Description
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef reflectionModel_H #ifndef radiation_reflectionModel_H
#define reflectionModel_H #define radiation_reflectionModel_H
#include "IOdictionary.H" #include "IOdictionary.H"
#include "autoPtr.H" #include "autoPtr.H"
@ -46,7 +46,7 @@ namespace radiation
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class reflectionModel Declaration Class reflectionModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class reflectionModel class reflectionModel
@ -59,6 +59,7 @@ protected:
//- Reference to the fvMesh //- Reference to the fvMesh
const fvMesh& mesh_; const fvMesh& mesh_;
public: public:
//- Runtime type information //- Runtime type information
@ -95,7 +96,7 @@ public:
//- Destructor //- Destructor
virtual ~reflectionModel(); virtual ~reflectionModel() = default;
// Member Functions // Member Functions
@ -104,10 +105,7 @@ public:
virtual vector R(const vector& incident, const vector& n) const = 0; virtual vector R(const vector& incident, const vector& n) const = 0;
//- Return reflectivity from medium1 to medium2 and a incident angle. //- Return reflectivity from medium1 to medium2 and a incident angle.
virtual scalar rho virtual scalar rho(const scalar incidentAngle) const = 0;
(
const scalar incidentAngle
) const = 0;
}; };

View File

@ -28,9 +28,8 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::radiation::reflectionModel> Foam::radiation:: Foam::autoPtr<Foam::radiation::reflectionModel>
reflectionModel:: Foam::radiation::reflectionModel::New
New
( (
const dictionary& dict, const dictionary& dict,
const fvMesh& mesh const fvMesh& mesh
@ -40,19 +39,16 @@ New
Info<< "Selecting reflectionModel " << modelType << endl; Info<< "Selecting reflectionModel " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = const auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
dictionaryConstructorTablePtr_->find(modelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (!cstrIter.found())
{ {
FatalErrorIn FatalIOErrorInFunction(dict)
( << "Unknown reflectionModel type "
"reflectionModel::New(const dictionary&, const fvMesh&)"
) << "Unknown reflectionModel type "
<< modelType << nl << nl << modelType << nl << nl
<< "Valid reflectionModel types are :" << nl << "Valid reflectionModel types are :" << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalIOError);
} }
return autoPtr<reflectionModel>(cstrIter()(dict, mesh)); return autoPtr<reflectionModel>(cstrIter()(dict, mesh));

View File

@ -220,14 +220,6 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::InterfaceCompositionModel
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo>
Foam::InterfaceCompositionModel<Thermo, OtherThermo>::
~InterfaceCompositionModel()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template<class Thermo, class OtherThermo> template<class Thermo, class OtherThermo>
@ -288,17 +280,9 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::L
) const ) const
{ {
const typename Thermo::thermoType& fromThermo = const typename Thermo::thermoType& fromThermo =
getLocalThermo getLocalThermo(speciesName, fromThermo_);
(
speciesName,
fromThermo_
);
const typename OtherThermo::thermoType& toThermo = const typename OtherThermo::thermoType& toThermo =
getLocalThermo getLocalThermo(speciesName, toThermo_);
(
speciesName,
toThermo_
);
const volScalarField& p(fromThermo_.p()); const volScalarField& p(fromThermo_.p());

View File

@ -49,7 +49,7 @@ template <class ThermoType> class pureMixture;
template <class ThermoType> class multiComponentMixture; template <class ThermoType> class multiComponentMixture;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class InterfaceCompositionModel Declaration Class InterfaceCompositionModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Thermo, class OtherThermo> template<class Thermo, class OtherThermo>
@ -125,14 +125,11 @@ protected:
public: public:
// Constructors //- Construct from components
InterfaceCompositionModel(const dictionary& dict, const phasePair& pair);
//- Construct from components
InterfaceCompositionModel(const dictionary& dict, const phasePair& pair);
//- Destructor //- Destructor
~InterfaceCompositionModel(); ~InterfaceCompositionModel() = default;
// Member Functions // Member Functions

View File

@ -107,7 +107,8 @@ namespace Foam
constIncompressibleGasHThermoPhysics constIncompressibleGasHThermoPhysics
); );
// From pure liquid (BoussinesqFluid) to a multi-component gas incomp phase // From pure liquid (BoussinesqFluid) to a multi-component gas incomp
// phase
makeInterfaceContSpecieMixtureType makeInterfaceContSpecieMixtureType
( (
kineticGasEvaporation, kineticGasEvaporation,
@ -284,4 +285,5 @@ namespace Foam
); );
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -47,8 +47,11 @@ Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Lee
template<class Thermo, class OtherThermo> template<class Thermo, class OtherThermo>
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo> Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Kexp
::Kexp(label variable, const volScalarField& refValue) (
label variable,
const volScalarField& refValue
)
{ {
if (this->modelVariable_ == variable) if (this->modelVariable_ == variable)
{ {
@ -92,8 +95,7 @@ Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>
template<class Thermo, class OtherThermo> template<class Thermo, class OtherThermo>
const Foam::dimensionedScalar& const Foam::dimensionedScalar&
Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo> Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Tactivate() const
::Tactivate() const
{ {
return Tactivate_; return Tactivate_;
} }

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::phaseChangeTwoPhaseMixtures::Lee Foam::meltingEvaporationModels::Lee
Description Description
Mass tranfer Lee model. Simple model driven by field value difference as: Mass tranfer Lee model. Simple model driven by field value difference as:
@ -85,8 +85,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef Lee_H #ifndef meltingEvaporationModels_Lee_H
#define Lee_H #define meltingEvaporationModels_Lee_H
#include "InterfaceCompositionModel.H" #include "InterfaceCompositionModel.H"
@ -99,7 +99,7 @@ namespace meltingEvaporationModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class Lee Class Lee
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Thermo, class OtherThermo> template<class Thermo, class OtherThermo>
@ -136,8 +136,7 @@ public:
//- Destructor //- Destructor
virtual ~Lee() virtual ~Lee() = default;
{}
// Member Functions // Member Functions
@ -151,7 +150,6 @@ public:
//- Return T transition between phases //- Return T transition between phases
virtual const dimensionedScalar& Tactivate() const; virtual const dimensionedScalar& Tactivate() const;
}; };

View File

@ -1,5 +1,5 @@
interfaceCompositionModel/interfaceCompositionModel.C interfaceCompositionModel/interfaceCompositionModel.C
interfaceCompositionModel/newInterfaceCompositionModel.C interfaceCompositionModel/interfaceCompositionModelNew.C
InterfaceCompositionModel/InterfaceCompositionModels.C InterfaceCompositionModel/InterfaceCompositionModels.C
LIB = $(FOAM_LIBBIN)/libmassTransferModels LIB = $(FOAM_LIBBIN)/libmassTransferModels

View File

@ -49,9 +49,7 @@ namespace Foam
"pressure", "pressure",
"massFraction" "massFraction"
}; };
}
} // End namespace Foam
const Foam::NamedEnum const Foam::NamedEnum
< <
@ -83,12 +81,6 @@ Foam::interfaceCompositionModel::interfaceCompositionModel
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::interfaceCompositionModel::~interfaceCompositionModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::word Foam::interfaceCompositionModel::transferSpecie() const const Foam::word Foam::interfaceCompositionModel::transferSpecie() const
@ -108,4 +100,5 @@ const Foam::word Foam::interfaceCompositionModel::variable() const
return modelVariableNames[modelVariable_]; return modelVariableNames[modelVariable_];
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -52,7 +52,7 @@ class phaseModel;
class phasePair; class phasePair;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class interfaceCompositionModel Declaration Class interfaceCompositionModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class interfaceCompositionModel class interfaceCompositionModel
@ -121,7 +121,7 @@ public:
//- Destructor //- Destructor
virtual ~interfaceCompositionModel(); virtual ~interfaceCompositionModel() = default;
// Selectors // Selectors
@ -181,9 +181,9 @@ public:
//- Returns the variable on which the model is based //- Returns the variable on which the model is based
const word variable() const; const word variable() const;
}; };
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View File

@ -49,15 +49,15 @@ Foam::interfaceCompositionModel::New
Info<< "Selecting interfaceCompositionModel for " Info<< "Selecting interfaceCompositionModel for "
<< pair << ": " << interfaceCompositionModelType << endl; << pair << ": " << interfaceCompositionModelType << endl;
dictionaryConstructorTable::iterator cstrIter = const auto cstrIter =
dictionaryConstructorTablePtr_->find(interfaceCompositionModelType); dictionaryConstructorTablePtr_->cfind(interfaceCompositionModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (!cstrIter.found())
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Unknown interfaceCompositionModelType type " << "Unknown interfaceCompositionModelType type "
<< interfaceCompositionModelType << endl << endl << interfaceCompositionModelType << nl << nl
<< "Valid interfaceCompositionModel types are : " << endl << "Valid interfaceCompositionModel types are : " << nl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -130,20 +130,17 @@ Foam::meltingEvaporationModels::kineticGasEvaporation<Thermo, OtherThermo>
const volVectorField gradFrom(fvc::grad(from)); const volVectorField gradFrom(fvc::grad(from));
const volVectorField gradTo(fvc::grad(to)); const volVectorField gradTo(fvc::grad(to));
const volScalarField areaDensity const volScalarField areaDensity("areaDensity", mag(gradFrom));
(
"areaDensity", mag(gradFrom)
);
const volScalarField gradAlphaf(gradFrom & gradTo); const volScalarField gradAlphaf(gradFrom & gradTo);
volScalarField Tmask("Tmask", from*0.0); volScalarField Tmask("Tmask", from*0.0);
forAll (Tmask, celli) forAll(Tmask, celli)
{ {
if (gradAlphaf[celli] < 0) if (gradAlphaf[celli] < 0)
{ {
if (from[celli] > alphaMin_ && from[celli] < alphaMax_) if (from[celli] > alphaMin_ && from[celli] < alphaMax_)
{ {
{ {
scalar alphaRes = 1.0 - from[celli] - to[celli]; scalar alphaRes = 1.0 - from[celli] - to[celli];

View File

@ -22,12 +22,13 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::phaseChangeTwoPhaseMixtures::kineticGasEvaporation Foam::meltingEvaporationModels::kineticGasEvaporation
Description Description
Considering the Hertz Knudsen formula, which gives the evaporation-condensation Considering the Hertz Knudsen formula, which gives the
flux based on the kinetic theory for flat interface: evaporation-condensation flux based on the kinetic theory for flat
interface:
\f[ \f[
Flux = C sqrt(M/(2 \pi \R T_{activate}))(\p - pSat) Flux = C sqrt(M/(2 \pi \R T_{activate}))(\p - pSat)
@ -74,8 +75,8 @@ Description
Hertz-Knudsen-Schrage. Hertz-Knudsen-Schrage.
Based on the reference: Based on the reference:
-# Van P. Carey, “Liquid-Vapor Phase Change Phenomena”, ISBN 0-89116836, 1992, - Van P. Carey, “Liquid-Vapor Phase Change Phenomena”, ISBN 0-89116836,
pp. 112-121. 1992, pp. 112-121.
Usage Usage
@ -107,15 +108,13 @@ Usage
species | Specie name on the other phase | yes species | Specie name on the other phase | yes
\endtable \endtable
SourceFiles SourceFiles
kineticGasEvaporation.C kineticGasEvaporation.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef kineticGasEvaporation_H #ifndef meltingEvaporationModels_kineticGasEvaporation_H
#define kineticGasEvaporation_H #define meltingEvaporationModels_kineticGasEvaporation_H
#include "InterfaceCompositionModel.H" #include "InterfaceCompositionModel.H"
@ -131,7 +130,7 @@ namespace meltingEvaporationModels
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class kineticGasEvaporation Class kineticGasEvaporation
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class Thermo, class OtherThermo> template<class Thermo, class OtherThermo>
@ -177,8 +176,7 @@ public:
//- Destructor //- Destructor
virtual ~kineticGasEvaporation() virtual ~kineticGasEvaporation() = default;
{}
// Member Functions // Member Functions
@ -190,9 +188,8 @@ public:
const volScalarField& field const volScalarField& field
); );
//- Return Tref //- Return Tactivate
virtual const dimensionedScalar& Tactivate() const; virtual const dimensionedScalar& Tactivate() const;
}; };

View File

@ -1,5 +1,5 @@
interfaceModels/porousModels/porousModel/porousModel.C interfaceModels/porousModels/porousModel/porousModel.C
interfaceModels/porousModels/porousModel/newPorousModel.C interfaceModels/porousModels/porousModel/porousModelNew.C
interfaceModels/porousModels/VollerPrakash/VollerPrakash.C interfaceModels/porousModels/VollerPrakash/VollerPrakash.C
phasePair/phasePairKey/phasePairKey.C phasePair/phasePairKey/phasePairKey.C
@ -7,13 +7,13 @@ phasePair/phasePair/phasePair.C
phasePair/orderedPhasePair/orderedPhasePair.C phasePair/orderedPhasePair/orderedPhasePair.C
phaseModel/phaseModel/phaseModel.C phaseModel/phaseModel/phaseModel.C
phaseModel/phaseModel/newphaseModel.C phaseModel/phaseModel/phaseModelNew.C
phaseModel/phaseModel/phaseModels.C phaseModel/phaseModel/phaseModels.C
phaseSystem/phaseSystem.C phaseSystem/phaseSystem.C
phaseSystem/multiphaseSystem/multiphaseSystem.C phaseSystem/multiphaseSystem/multiphaseSystem.C
phaseSystem/multiphaseSystem/newMultiphaseSystem.C phaseSystem/multiphaseSystem/multiphaseSystemNew.C
phaseSystem/multiphaseSystem/multiphaseSystems.C phaseSystem/multiphaseSystem/multiphaseSystems.C
LIB = $(FOAM_LIBBIN)/libIncompressibleMultiphaseSystems LIB = $(FOAM_LIBBIN)/libIncompressibleMultiphaseSystems

View File

@ -35,8 +35,10 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class BasePhaseSystem> template<class BasePhaseSystem>
Foam::MassTransferPhaseSystem<BasePhaseSystem>:: Foam::MassTransferPhaseSystem<BasePhaseSystem>::MassTransferPhaseSystem
MassTransferPhaseSystem(const fvMesh& mesh) (
const fvMesh& mesh
)
: :
BasePhaseSystem(mesh) BasePhaseSystem(mesh)
{ {
@ -68,13 +70,6 @@ MassTransferPhaseSystem(const fvMesh& mesh)
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class BasePhaseSystem>
Foam::MassTransferPhaseSystem<BasePhaseSystem>::
~MassTransferPhaseSystem()
{}
// * * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * // // * * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * //
template<class BasePhaseSystem> template<class BasePhaseSystem>
@ -137,6 +132,7 @@ Foam::MassTransferPhaseSystem<BasePhaseSystem>::calculateL
return tL; return tL;
} }
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template<class BasePhaseSystem> template<class BasePhaseSystem>
@ -243,11 +239,7 @@ Foam::MassTransferPhaseSystem<BasePhaseSystem>::heatTransfer
// Explicit temperature mass transfer rate // Explicit temperature mass transfer rate
tmp<volScalarField> Kexp = tmp<volScalarField> Kexp =
interfacePtr->Kexp interfacePtr->Kexp(interfaceCompositionModel::T, T);
(
interfaceCompositionModel::T,
T
);
if (Kexp.valid()) if (Kexp.valid())
{ {
@ -264,11 +256,7 @@ Foam::MassTransferPhaseSystem<BasePhaseSystem>::heatTransfer
// Explicit temperature mass transfer rate // Explicit temperature mass transfer rate
const tmp<volScalarField> Kexp = const tmp<volScalarField> Kexp =
interfacePtr->Kexp interfacePtr->Kexp(interfaceCompositionModel::T, T);
(
interfaceCompositionModel::T,
T
);
if (Kexp.valid()) if (Kexp.valid())
{ {
@ -315,9 +303,9 @@ void Foam::MassTransferPhaseSystem<BasePhaseSystem>::massSpeciesTransfer
Su += Su +=
this->Su()[phase.name()] this->Su()[phase.name()]
+ this->Sp()[phase.name()]*phase.oldTime(); + this->Sp()[phase.name()]*phase.oldTime();
} }
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -110,7 +110,7 @@ public:
//- Destructor //- Destructor
virtual ~MassTransferPhaseSystem(); virtual ~MassTransferPhaseSystem() = default;
// Member Functions // Member Functions

View File

@ -58,13 +58,6 @@ Foam::porousModels::VollerPrakash::VollerPrakash
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::porousModels::VollerPrakash::
~ VollerPrakash()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::VollerPrakash Foam::porousModels::VollerPrakash
Description Description
Porous model to apply a porous media on a solid phase. Porous model to apply a porous media on a solid phase.
@ -61,8 +61,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef VollerPrakash_H #ifndef porousModels_VollerPrakash_H
#define VollerPrakash_H #define porousModels_VollerPrakash_H
#include "porousModel.H" #include "porousModel.H"
@ -107,7 +107,7 @@ public:
//- Destructor //- Destructor
virtual ~VollerPrakash(); virtual ~VollerPrakash() = default;
// Member Functions // Member Functions

View File

@ -58,12 +58,6 @@ Foam::porousModel::porousModel
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::porousModel::~porousModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::porousModel::writeData(Ostream& os) const bool Foam::porousModel::writeData(Ostream& os) const

View File

@ -46,7 +46,7 @@ namespace Foam
class fvMesh; class fvMesh;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class porousModel Declaration Class porousModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class porousModel class porousModel
@ -92,7 +92,7 @@ public:
//- Destructor //- Destructor
virtual ~porousModel(); virtual ~porousModel() = default;
// Selectors // Selectors

View File

@ -28,26 +28,24 @@ License
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::porousModel > Foam::autoPtr<Foam::porousModel> Foam::porousModel::New
Foam::porousModel::New
( (
const dictionary& dict, const dictionary& dict,
const fvMesh& mesh const fvMesh& mesh
) )
{ {
word porousModelType(dict.lookup("type")); word modelType(dict.lookup("type"));
Info<< "Selecting porousModel for " Info<< "Selecting porousModel for "
<< ": " << porousModelType << endl; << ": " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = const auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
dictionaryConstructorTablePtr_->find(porousModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (!cstrIter.found())
{ {
FatalErrorIn("porousModel::New") FatalErrorInFunction
<< "Unknown porousModelType type " << "Unknown modelType type "
<< porousModelType << endl << endl << modelType << endl << endl
<< "Valid porousModel types are : " << endl << "Valid porousModel types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);

View File

@ -59,13 +59,6 @@ constantSurfaceTensionCoefficient
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::surfaceTensionModels::constantSurfaceTensionCoefficient::
~constantSurfaceTensionCoefficient()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
@ -74,19 +67,16 @@ Foam::surfaceTensionModels::constantSurfaceTensionCoefficient::sigma() const
const fvMesh& mesh(this->pair_.phase1().mesh()); const fvMesh& mesh(this->pair_.phase1().mesh());
return return
tmp<volScalarField> tmp<volScalarField>::New
( (
new volScalarField IOobject
( (
IOobject "zero",
( mesh.time().timeName(),
"zero", mesh
mesh.time().timeName(), ),
mesh mesh,
), sigma_
mesh,
sigma_
)
); );
} }

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::constantSurfaceTensionCoefficient Foam::surfaceTensionModels::constantSurfaceTensionCoefficient
Description Description
Constant value surface tension model. Constant value surface tension model.
@ -32,8 +32,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef constantSurfaceTensionCoefficient_H #ifndef surfaceTensionModels_constantSurfaceTensionCoefficient_H
#define constantSurfaceTensionCoefficient_H #define surfaceTensionModels_constantSurfaceTensionCoefficient_H
#include "surfaceTensionModel.H" #include "surfaceTensionModel.H"
@ -76,7 +76,7 @@ public:
//- Destructor //- Destructor
virtual ~constantSurfaceTensionCoefficient(); virtual ~constantSurfaceTensionCoefficient() = default;
// Member Functions // Member Functions

View File

@ -60,12 +60,6 @@ Foam::surfaceTensionModel::surfaceTensionModel
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::surfaceTensionModel::~surfaceTensionModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::surfaceTensionModel::writeData(Ostream& os) const bool Foam::surfaceTensionModel::writeData(Ostream& os) const

View File

@ -28,7 +28,7 @@ Description
SourceFiles SourceFiles
surfaceTensionModel.C surfaceTensionModel.C
newAspectRatioModel.C surfaceTensionModelNew.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -47,7 +47,7 @@ namespace Foam
class phasePair; class phasePair;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class surfaceTensionModel Declaration Class surfaceTensionModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class surfaceTensionModel class surfaceTensionModel
@ -95,7 +95,7 @@ public:
//- Destructor //- Destructor
virtual ~surfaceTensionModel(); virtual ~surfaceTensionModel() = default;
// Selectors // Selectors

View File

@ -28,29 +28,27 @@ License
// * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Selector * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::surfaceTensionModel > Foam::autoPtr<Foam::surfaceTensionModel> Foam::surfaceTensionModel::New
Foam::surfaceTensionModel::New
( (
const dictionary& dict, const dictionary& dict,
const phasePair& pair const phasePair& pair
) )
{ {
word surfaceTensionModelType(dict.lookup("type")); word modelType(dict.lookup("type"));
Info<< "Selecting surfaceTensionModel for " Info<< "Selecting surfaceTensionModel for "
<< pair << ": " << surfaceTensionModelType << endl; << pair << ": " << modelType << endl;
dictionaryConstructorTable::iterator cstrIter = const auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
dictionaryConstructorTablePtr_->find(surfaceTensionModelType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (!cstrIter.found())
{ {
FatalErrorIn("surfaceTensionModel::New") FatalIOErrorInFunction(dict)
<< "Unknown surfaceTensionModelType type " << "Unknown surfaceTensionModel type "
<< surfaceTensionModelType << endl << endl << surfaceTensionModelType << endl << endl
<< "Valid surfaceTensionModel types are : " << endl << "Valid modelType types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalIOError);
} }
return cstrIter()(dict, pair, true); return cstrIter()(dict, pair, true);

View File

@ -65,13 +65,6 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class BasePhaseModel>
Foam::MovingPhaseModel<BasePhaseModel>::~MovingPhaseModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class BasePhaseModel> template<class BasePhaseModel>
@ -125,20 +118,18 @@ template<class BasePhaseModel>
Foam::tmp<Foam::surfaceScalarField> Foam::MovingPhaseModel<BasePhaseModel>:: Foam::tmp<Foam::surfaceScalarField> Foam::MovingPhaseModel<BasePhaseModel>::
diffNo() const diffNo() const
{ {
return tmp<surfaceScalarField> return tmp<surfaceScalarField>::New
( (
new surfaceScalarField IOobject
( (
IOobject IOobject::groupName("diffNo", phaseModel::name()),
( U_.mesh().time().timeName(),
IOobject::groupName("diffNo", phaseModel::name()), U_.mesh()
U_.mesh().time().timeName(), ),
U_.mesh() U_.mesh(),
), dimensionedScalar("0", dimless, 0.0)
U_.mesh(),
dimensionedScalar("0", dimless, 0.0)
)
); );
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -79,7 +79,7 @@ public:
//- Destructor //- Destructor
virtual ~MovingPhaseModel(); virtual ~MovingPhaseModel() = default;
// Member Functions // Member Functions
@ -90,7 +90,6 @@ public:
// Momentum // Momentum
//- Constant access the volumetric flux //- Constant access the volumetric flux
virtual tmp<surfaceScalarField> phi() const; virtual tmp<surfaceScalarField> phi() const;
@ -108,7 +107,6 @@ public:
//- Diffusion number //- Diffusion number
virtual tmp<surfaceScalarField> diffNo() const; virtual tmp<surfaceScalarField> diffNo() const;
}; };

View File

@ -99,18 +99,9 @@ MultiComponentPhaseModel
// Init vol fractions from mass fractions // Init vol fractions from mass fractions
calculateVolumeFractions(); calculateVolumeFractions();
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class BasePhaseModel, class phaseThermo>
Foam::MultiComponentPhaseModel<BasePhaseModel, phaseThermo>::
~MultiComponentPhaseModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -139,13 +130,12 @@ void Foam::MultiComponentPhaseModel<BasePhaseModel, phaseThermo>
} }
X_[inertIndex_] = 1.0 - Xtotal; X_[inertIndex_] = 1.0 - Xtotal;
X_[inertIndex_].correctBoundaryConditions(); X_[inertIndex_].correctBoundaryConditions();
} }
template<class BasePhaseModel, class phaseThermo> template<class BasePhaseModel, class phaseThermo>
void Foam::MultiComponentPhaseModel<BasePhaseModel, phaseThermo> void Foam::MultiComponentPhaseModel<BasePhaseModel, phaseThermo>::
::calculateMassFractions() calculateMassFractions()
{ {
volScalarField W(X_[0]*thermo().composition().W(0)); volScalarField W(X_[0]*thermo().composition().W(0));
for(label i=1; i< species_.size(); i++) for(label i=1; i< species_.size(); i++)
@ -421,4 +411,5 @@ Foam::MultiComponentPhaseModel<BasePhaseModel, phaseThermo>::inertIndex() const
return inertIndex_; return inertIndex_;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -57,7 +57,6 @@ class MultiComponentPhaseModel
{ {
protected: protected:
// Protected data // Protected data
//- Species table //- Species table
@ -82,7 +81,6 @@ protected:
void calculateVolumeFractions(); void calculateVolumeFractions();
public: public:
// Constructors // Constructors
@ -95,7 +93,7 @@ public:
//- Destructor //- Destructor
virtual ~MultiComponentPhaseModel(); virtual ~MultiComponentPhaseModel() = default;
// Member Functions // Member Functions
@ -135,7 +133,6 @@ public:
//- Return inert species index //- Return inert species index
label inertIndex() const; label inertIndex() const;
}; };

View File

@ -50,13 +50,6 @@ Foam::PurePhaseModel<BasePhaseModel, phaseThermo>::PurePhaseModel
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class BasePhaseModel, class phaseThermo>
Foam::PurePhaseModel<BasePhaseModel, phaseThermo>::~PurePhaseModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class BasePhaseModel, class phaseThermo> template<class BasePhaseModel, class phaseThermo>
@ -66,16 +59,10 @@ void Foam::PurePhaseModel<BasePhaseModel, phaseThermo>::solveYi
PtrList<Foam::volScalarField::Internal>& PtrList<Foam::volScalarField::Internal>&
) )
{ {
notImplemented NotImplemented;
(
"template<class BasePhaseModel> "
"Foam::tmp<Foam::fvScalarMatrix> "
"Foam::PurePhaseModel<BasePhaseModel>::solveYi()"
);
} }
template<class BasePhaseModel, class phaseThermo> template<class BasePhaseModel, class phaseThermo>
const Foam::PtrList<Foam::volScalarField>& const Foam::PtrList<Foam::volScalarField>&
Foam::PurePhaseModel<BasePhaseModel, phaseThermo>::Y() const Foam::PurePhaseModel<BasePhaseModel, phaseThermo>::Y() const
@ -99,11 +86,12 @@ thermo() const
return thermoPtr_(); return thermoPtr_();
} }
template<class BasePhaseModel, class phaseThermo> template<class BasePhaseModel, class phaseThermo>
phaseThermo& Foam::PurePhaseModel<BasePhaseModel, phaseThermo>:: phaseThermo& Foam::PurePhaseModel<BasePhaseModel, phaseThermo>::thermo()
thermo()
{ {
return thermoPtr_(); return thermoPtr_();
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -79,7 +79,7 @@ public:
//- Destructor //- Destructor
virtual ~PurePhaseModel(); virtual ~PurePhaseModel() = default;
// Member Functions // Member Functions

View File

@ -68,13 +68,6 @@ Foam::StaticPhaseModel<BasePhaseModel>::StaticPhaseModel
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class BasePhaseModel>
Foam::StaticPhaseModel<BasePhaseModel>::~StaticPhaseModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class BasePhaseModel> template<class BasePhaseModel>
@ -88,19 +81,16 @@ template<class BasePhaseModel>
Foam::tmp<Foam::surfaceScalarField> Foam::tmp<Foam::surfaceScalarField>
Foam::StaticPhaseModel<BasePhaseModel>::phi() const Foam::StaticPhaseModel<BasePhaseModel>::phi() const
{ {
return tmp<surfaceScalarField> return tmp<surfaceScalarField>::New
( (
new surfaceScalarField IOobject
( (
IOobject IOobject::groupName("phi", phaseModel::name()),
( U_.mesh().time().timeName(),
IOobject::groupName("phi", phaseModel::name()), U_.mesh()
U_.mesh().time().timeName(), ),
U_.mesh() U_.mesh(),
), dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0)
U_.mesh(),
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0)
)
); );
} }
@ -179,4 +169,5 @@ Foam::tmp<Foam::surfaceScalarField> Foam::StaticPhaseModel<BasePhaseModel>
return tkapparhoCpbyDelta; return tkapparhoCpbyDelta;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -75,7 +75,7 @@ public:
//- Destructor //- Destructor
virtual ~StaticPhaseModel(); virtual ~StaticPhaseModel() = default;
// Member Functions // Member Functions
@ -86,7 +86,6 @@ public:
// Momentum // Momentum
//- Constant access the volumetric flux. Return zero field //- Constant access the volumetric flux. Return zero field
virtual tmp<surfaceScalarField> phi() const; virtual tmp<surfaceScalarField> phi() const;
@ -104,7 +103,6 @@ public:
//- Maximum diffusion number //- Maximum diffusion number
virtual tmp<surfaceScalarField> diffNo() const; virtual tmp<surfaceScalarField> diffNo() const;
}; };

View File

@ -35,10 +35,15 @@ License
\ \
namespace Foam \ namespace Foam \
{ \ { \
typedef Foam::MomemtumType<Foam::CompType<Foam::Phase, Foam::Thermo> > \ typedef Foam::MomemtumType \
Name; \ < \
\ Foam::CompType \
\ < \
Foam::Phase, \
Foam::Thermo \
> \
> \
Name; \
\ \
addNamedToRunTimeSelectionTable \ addNamedToRunTimeSelectionTable \
( \ ( \

View File

@ -60,12 +60,6 @@ Foam::phaseModel::phaseModel
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::phaseModel::~phaseModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::word& Foam::phaseModel::name() const const Foam::word& Foam::phaseModel::name() const

View File

@ -52,7 +52,7 @@ namespace Foam
class phaseSystem; class phaseSystem;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class phaseModel Declaration Class phaseModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class phaseModel class phaseModel
@ -94,7 +94,7 @@ public:
//- Destructor //- Destructor
virtual ~phaseModel(); virtual ~phaseModel() = default;
// Selectors // Selectors
@ -212,10 +212,8 @@ public:
} }
// Transport // Transport
//- Thermal diffusivity for enthalpy of mixture [kg/m/s] //- Thermal diffusivity for enthalpy of mixture [kg/m/s]
const volScalarField& alpha() const; const volScalarField& alpha() const;
@ -265,7 +263,6 @@ public:
virtual tmp<surfaceScalarField> diffNo() const = 0; virtual tmp<surfaceScalarField> diffNo() const = 0;
// Species // Species
//- Constant access the species mass fractions //- Constant access the species mass fractions
@ -275,27 +272,25 @@ public:
virtual PtrList<volScalarField>& Y() = 0; virtual PtrList<volScalarField>& Y() = 0;
// Momentum // Momentum
//- Constant access the volumetric flux
virtual tmp<surfaceScalarField> phi() const = 0;
//- Constant access the volumetric flux //- Access the volumetric flux
virtual tmp<surfaceScalarField> phi() const = 0; virtual const surfaceScalarField& phi() = 0;
//- Access the volumetric flux //- Constant access the volumetric flux of the phase
virtual const surfaceScalarField& phi() = 0; virtual tmp<surfaceScalarField> alphaPhi() const = 0;
//- Constant access the volumetric flux of the phase //- Access the volumetric flux of the phase
virtual tmp<surfaceScalarField> alphaPhi() const = 0; virtual surfaceScalarField& alphaPhi() = 0;
//- Access the volumetric flux of the phase //- Access const reference to U
virtual surfaceScalarField& alphaPhi() = 0; virtual tmp<volVectorField> U() const = 0;
//- Access const reference to U
virtual tmp<volVectorField> U() const = 0;
// Turbulence (WIP: possible to add turbulent on each phase) // Turbulence (WIP: possible to add turbulence on each phase)
/* /*
//- Return the turbulent dynamic viscosity //- Return the turbulent dynamic viscosity

View File

@ -34,19 +34,18 @@ Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New
const word& phaseName const word& phaseName
) )
{ {
word phaseModelType(fluid.subDict(phaseName).lookup("type")); word modelType(fluid.subDict(phaseName).lookup("type"));
Info<< "Selecting phaseModel for " Info<< "Selecting phaseModel for "
<< phaseName << ": " << phaseModelType << endl; << phaseName << ": " << modelType << endl;
phaseSystemConstructorTable::iterator cstrIter = const auto cstrIter = phaseSystemConstructorTablePtr_->cfind(modelType);
phaseSystemConstructorTablePtr_->find(phaseModelType);
if (cstrIter == phaseSystemConstructorTablePtr_->end()) if (!cstrIter.found())
{ {
FatalErrorIn("phaseModel::New") FatalErrorInFunction
<< "Unknown phaseModelType type " << "Unknown phaseModel type "
<< phaseModelType << endl << endl << modelType << endl << endl
<< "Valid phaseModel types are : " << endl << "Valid phaseModel types are : " << endl
<< phaseSystemConstructorTablePtr_->sortedToc() << phaseSystemConstructorTablePtr_->sortedToc()
<< exit(FatalError); << exit(FatalError);
@ -55,4 +54,5 @@ Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New
return cstrIter()(fluid, phaseName); return cstrIter()(fluid, phaseName);
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -33,18 +33,7 @@ Foam::orderedPhasePair::orderedPhasePair
const phaseModel& to const phaseModel& to
) )
: :
phasePair phasePair(from, to, true)
(
from,
to,
true
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::orderedPhasePair::~orderedPhasePair()
{} {}
@ -69,4 +58,5 @@ Foam::word Foam::orderedPhasePair::name() const
return first() + "To" + namec; return first() + "To" + namec;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -42,7 +42,7 @@ namespace Foam
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class orderedPhasePair Declaration Class orderedPhasePair Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class orderedPhasePair class orderedPhasePair
@ -62,7 +62,7 @@ public:
//- Destructor //- Destructor
virtual ~orderedPhasePair(); virtual ~orderedPhasePair() = default;
// Member Functions // Member Functions
@ -75,7 +75,6 @@ public:
//- Pair name //- Pair name
virtual word name() const; virtual word name() const;
}; };

View File

@ -42,17 +42,11 @@ Foam::phasePair::phasePair
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::phasePair::~phasePair()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
const Foam::phaseModel& Foam::phasePair::from() const const Foam::phaseModel& Foam::phasePair::from() const
{ {
FatalErrorIn("Foam::phasePair::from() const") FatalErrorInFunction
<< "Requested from phase from an unordered pair." << "Requested from phase from an unordered pair."
<< exit(FatalError); << exit(FatalError);
@ -62,7 +56,7 @@ const Foam::phaseModel& Foam::phasePair::from() const
const Foam::phaseModel& Foam::phasePair::to() const const Foam::phaseModel& Foam::phasePair::to() const
{ {
FatalErrorIn("Foam::phasePair::to() const") FatalErrorInFunction
<< "Requested to phase from an unordered pair." << "Requested to phase from an unordered pair."
<< exit(FatalError); << exit(FatalError);

View File

@ -53,11 +53,6 @@ class phasePair
: :
public phasePairKey public phasePairKey
{ {
public:
private:
// Private data // Private data
//- Phase 1 //- Phase 1
@ -81,7 +76,7 @@ public:
//- Destructor //- Destructor
virtual ~phasePair(); virtual ~phasePair() = default;
// Member Functions // Member Functions
@ -96,7 +91,6 @@ public:
virtual word name() const; virtual word name() const;
// Access // Access
// Phase 1 // Phase 1
@ -104,7 +98,6 @@ public:
// Phase 2 // Phase 2
inline const phaseModel& phase2() const; inline const phaseModel& phase2() const;
}; };

View File

@ -47,12 +47,6 @@ Foam::phasePairKey::phasePairKey
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::phasePairKey::~phasePairKey()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
bool Foam::phasePairKey::ordered() const bool Foam::phasePairKey::ordered() const
@ -133,14 +127,8 @@ Foam::Istream& Foam::operator>>(Istream& is, phasePairKey& key)
} }
else else
{ {
FatalErrorIn FatalErrorInFunction
( << "Phase pair type is not recognised. "
"friend Istream& operator>>"
"("
"Istream& is, "
"phasePairKey& key"
")"
) << "Phase pair type is not recognised. "
<< temp << temp
<< "Use (phaseDispersed to phaseContinuous) for an ordered" << "Use (phaseDispersed to phaseContinuous) for an ordered"
<< "pair, or (phase1 and pase2) for an unordered pair." << "pair, or (phase1 and pase2) for an unordered pair."

View File

@ -94,7 +94,7 @@ public:
// Destructor // Destructor
virtual ~phasePairKey(); virtual ~phasePairKey() = default;
// Access // Access

View File

@ -113,13 +113,6 @@ Foam::multiphaseSystem::multiphaseSystem
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::multiphaseSystem::~multiphaseSystem()
{
}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::multiphaseSystem::calculateSuSp() void Foam::multiphaseSystem::calculateSuSp()
@ -623,6 +616,7 @@ Foam::dimensionedScalar Foam::multiphaseSystem::ddtAlphaMax() const
return ddtAlphaMax_; return ddtAlphaMax_;
} }
Foam::scalar Foam::multiphaseSystem::maxDiffNo() const Foam::scalar Foam::multiphaseSystem::maxDiffNo() const
{ {
phaseModelTable::const_iterator phaseModelIter = phaseModels_.begin(); phaseModelTable::const_iterator phaseModelIter = phaseModels_.begin();
@ -645,24 +639,30 @@ Foam::scalar Foam::multiphaseSystem::maxDiffNo() const
return DiNum; return DiNum;
} }
const Foam::multiphaseSystem::compressionFluxTable& const Foam::multiphaseSystem::compressionFluxTable&
Foam::multiphaseSystem::limitedPhiAlphas() const Foam::multiphaseSystem::limitedPhiAlphas() const
{ {
return limitedPhiAlphas_; return limitedPhiAlphas_;
} }
Foam::multiphaseSystem::SuSpTable& Foam::multiphaseSystem::Su() Foam::multiphaseSystem::SuSpTable& Foam::multiphaseSystem::Su()
{ {
return Su_; return Su_;
} }
Foam::multiphaseSystem::SuSpTable& Foam::multiphaseSystem::Sp() Foam::multiphaseSystem::SuSpTable& Foam::multiphaseSystem::Sp()
{ {
return Sp_; return Sp_;
} }
bool Foam::multiphaseSystem::read() bool Foam::multiphaseSystem::read()
{ {
return true; return true;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -95,6 +95,7 @@ protected:
//- Calculate Sp and Su //- Calculate Sp and Su
void calculateSuSp(); void calculateSuSp();
public: public:
//- Runtime type information //- Runtime type information
@ -121,7 +122,7 @@ public:
//- Destructor //- Destructor
virtual ~multiphaseSystem(); virtual ~multiphaseSystem() = default;
// Selectors // Selectors
@ -137,7 +138,6 @@ public:
// Access // Access
//- Return phases //- Return phases
const UPtrList<phaseModel>& phases() const; const UPtrList<phaseModel>& phases() const;
@ -167,9 +167,6 @@ public:
//- Read thermophysical properties dictionary //- Read thermophysical properties dictionary
virtual bool read(); virtual bool read();
}; };
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -50,15 +50,13 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
Info<< "Selecting multiphaseSystem " << multiphaseSystemType << endl; Info<< "Selecting multiphaseSystem " << multiphaseSystemType << endl;
dictionaryConstructorTable::iterator cstrIter = const auto cstrIter =
dictionaryConstructorTablePtr_->find(multiphaseSystemType); dictionaryConstructorTablePtr_->cfind(multiphaseSystemType);
if (cstrIter == dictionaryConstructorTablePtr_->end()) if (!cstrIter.found())
{ {
FatalErrorIn FatalErrorInFunction
( << "Unknown multiphaseSystemType type "
"multiphaseSystem::New"
) << "Unknown multiphaseSystemType type "
<< multiphaseSystemType << endl << multiphaseSystemType << endl
<< "Valid multiphaseSystem types are : " << endl << "Valid multiphaseSystem types are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc() << dictionaryConstructorTablePtr_->sortedToc()
@ -68,4 +66,5 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
return autoPtr<multiphaseSystem> (cstrIter()(mesh)); return autoPtr<multiphaseSystem> (cstrIter()(mesh));
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -438,7 +438,7 @@ Foam::tmp<Foam::scalarField> Foam::phaseSystem::Cp
); );
++phaseModelIter; ++phaseModelIter;
for (; phaseModelIter != phaseModels_.end(); ++ phaseModelIter) for (; phaseModelIter != phaseModels_.end(); ++phaseModelIter)
{ {
tmpCp.ref() += phaseModelIter()()*phaseModelIter()->Cp(p, T, patchI); tmpCp.ref() += phaseModelIter()()*phaseModelIter()->Cp(p, T, patchI);
} }
@ -1196,5 +1196,5 @@ bool Foam::phaseSystem::read()
} }
} }
// ************************************************************************* //
// ************************************************************************* //

View File

@ -235,8 +235,6 @@ protected:
); );
public: public:
//- Runtime type information //- Runtime type information
@ -351,7 +349,6 @@ public:
//- Return Cv of the mixture //- Return Cv of the mixture
virtual tmp<volScalarField> Cv() const; virtual tmp<volScalarField> Cv() const;
//- Heat capacity at constant volume for patch [J/kg/K] //- Heat capacity at constant volume for patch [J/kg/K]
virtual tmp<scalarField> Cv virtual tmp<scalarField> Cv
( (
@ -360,7 +357,6 @@ public:
const label patchI const label patchI
) const; ) const;
//- Gamma = Cp/Cv [] //- Gamma = Cp/Cv []
virtual tmp<volScalarField> gamma() const; virtual tmp<volScalarField> gamma() const;
@ -400,7 +396,6 @@ public:
// Transport // Transport
//- Thermal diffusivity for temperature of mixture [J/m/s/K] //- Thermal diffusivity for temperature of mixture [J/m/s/K]
virtual tmp<volScalarField> kappa() const; virtual tmp<volScalarField> kappa() const;
@ -503,7 +498,6 @@ public:
//- Return interfacial source mass rate per phase pair //- Return interfacial source mass rate per phase pair
virtual tmp<volScalarField> dmdt(const phasePairKey& key) const = 0; virtual tmp<volScalarField> dmdt(const phasePairKey& key) const = 0;
//- Return the heat transfer matrices //- Return the heat transfer matrices
virtual tmp<fvScalarMatrix> heatTransfer virtual tmp<fvScalarMatrix> heatTransfer
( (
@ -546,7 +540,6 @@ public:
virtual bool read(); virtual bool read();
// Access to phases models // Access to phases models
//- Constant access the total phase pairs //- Constant access the total phase pairs
@ -626,7 +619,6 @@ public:
//- Near Interface of alpha'n //- Near Interface of alpha'n
tmp<volScalarField> nearInterface() const; tmp<volScalarField> nearInterface() const;
}; };

View File

@ -84,6 +84,7 @@ void Foam::phaseSystem::createSubModels
} }
} }
template<class modelType> template<class modelType>
void Foam::phaseSystem::generatePairsAndSubModels void Foam::phaseSystem::generatePairsAndSubModels
( (
@ -96,13 +97,11 @@ void Foam::phaseSystem::generatePairsAndSubModels
>& models >& models
) )
{ {
dictTable modelDicts(lookup(modelName)); dictTable modelDicts(lookup(modelName));
generatePairs(modelDicts); generatePairs(modelDicts);
createSubModels(modelDicts, models); createSubModels(modelDicts, models);
} }
@ -119,13 +118,11 @@ void Foam::phaseSystem::generatePairsAndSubModels
>& models >& models
) )
{ {
dictTable modelDicts(lookup(modelName)); dictTable modelDicts(lookup(modelName));
generatePairs(modelDicts); generatePairs(modelDicts);
createSubModels(modelDicts, mesh, models); createSubModels(modelDicts, mesh, models);
} }

View File

@ -61,4 +61,5 @@ if (adjustTimeStep)
Info<< "deltaT = " << runTime.deltaTValue() << endl; Info<< "deltaT = " << runTime.deltaTValue() << endl;
} }
// ************************************************************************* // // ************************************************************************* //