mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -1,3 +1,28 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "checkTopology.H"
|
||||
#include "polyMesh.H"
|
||||
#include "Time.H"
|
||||
@ -9,6 +34,8 @@
|
||||
#include "emptyPolyPatch.H"
|
||||
#include "processorPolyPatch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::label Foam::checkTopology
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
@ -287,6 +314,37 @@ Foam::label Foam::checkTopology
|
||||
rs
|
||||
);
|
||||
ctr.write();
|
||||
|
||||
|
||||
// write cellSet for each region
|
||||
PtrList<cellSet> cellRegions(rs.nRegions());
|
||||
for (label i = 0; i < rs.nRegions(); i++)
|
||||
{
|
||||
cellRegions.set
|
||||
(
|
||||
i,
|
||||
new cellSet
|
||||
(
|
||||
mesh,
|
||||
"region" + Foam::name(i),
|
||||
mesh.nCells()/100
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
forAll(rs, i)
|
||||
{
|
||||
cellRegions[rs[i]].insert(i);
|
||||
}
|
||||
|
||||
for (label i = 0; i < rs.nRegions(); i++)
|
||||
{
|
||||
Info<< " <<Writing region " << i << " with "
|
||||
<< returnReduce(cellRegions[i].size(), sumOp<scalar>())
|
||||
<< " cells to cellSet " << cellRegions[i].name() << endl;
|
||||
|
||||
cellRegions[i].write();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -437,3 +495,6 @@ Foam::label Foam::checkTopology
|
||||
|
||||
return noFailedChecks;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -934,8 +934,8 @@ void Foam::GeometricField<Type, PatchField, GeoMesh>::writeMinMax
|
||||
) const
|
||||
{
|
||||
os << "min/max(" << this->name() << ") = "
|
||||
<< min(*this).value() << ", "
|
||||
<< max(*this).value()
|
||||
<< Foam::min(*this).value() << ", "
|
||||
<< Foam::max(*this).value()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
@ -161,6 +161,9 @@ void Foam::layerAdditionRemoval::addCellLayer
|
||||
|
||||
forAll(mf, faceI)
|
||||
{
|
||||
label cellI = mc[faceI];
|
||||
label zoneI = mesh.cellZones().whichZone(cellI);
|
||||
|
||||
addedCells[faceI] =
|
||||
ref.setAction
|
||||
(
|
||||
@ -170,7 +173,7 @@ void Foam::layerAdditionRemoval::addCellLayer
|
||||
-1, // master edge
|
||||
mf[faceI], // master face
|
||||
-1, // master cell
|
||||
-1 // zone for cell
|
||||
zoneI // zone for cell
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -550,7 +550,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
||||
if (cellI > -1)
|
||||
{
|
||||
// Lagrangian timestep
|
||||
scalar dt = time - timeInj;
|
||||
const scalar dt = time - timeInj;
|
||||
|
||||
// Apply corrections to position for 2-D cases
|
||||
meshTools::constrainToMeshCentre(mesh, pos);
|
||||
@ -586,8 +586,11 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
||||
pPtr->rho()
|
||||
);
|
||||
|
||||
const scalar mParcel0 = pPtr->nParticle()*pPtr->mass();
|
||||
|
||||
if (!pPtr->move(td, dt))
|
||||
{
|
||||
massAdded += mParcel0;
|
||||
delete pPtr;
|
||||
}
|
||||
else
|
||||
@ -595,7 +598,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
|
||||
if (pPtr->nParticle() >= 1.0)
|
||||
{
|
||||
td.cloud().addParticle(pPtr);
|
||||
massAdded += pPtr->nParticle()*pPtr->mass();
|
||||
massAdded += mParcel0;
|
||||
parcelsAdded++;
|
||||
}
|
||||
else
|
||||
|
||||
@ -14,7 +14,6 @@ $(KINEMATICMODELS)/force/force/force.C
|
||||
$(KINEMATICMODELS)/force/force/forceNew.C
|
||||
$(KINEMATICMODELS)/force/forceList/forceList.C
|
||||
$(KINEMATICMODELS)/force/contactAngleForce/contactAngleForce.C
|
||||
$(KINEMATICMODELS)/force/surfaceShearForce/surfaceShearForce.C
|
||||
$(KINEMATICMODELS)/force/thermocapillaryForce/thermocapillaryForce.C
|
||||
|
||||
$(KINEMATICMODELS)/injectionModel/injectionModel/injectionModel.C
|
||||
@ -24,6 +23,11 @@ $(KINEMATICMODELS)/injectionModel/drippingInjection/drippingInjection.C
|
||||
$(KINEMATICMODELS)/injectionModel/removeInjection/removeInjection.C
|
||||
$(KINEMATICMODELS)/injectionModel/curvatureSeparation/curvatureSeparation.C
|
||||
|
||||
$(KINEMATICMODELS)/filmThermoModel/filmThermoModel/filmThermoModel.C
|
||||
$(KINEMATICMODELS)/filmThermoModel/filmThermoModel/filmThermoModelNew.C
|
||||
$(KINEMATICMODELS)/filmThermoModel/constantFilmThermo/constantFilmThermo.C
|
||||
$(KINEMATICMODELS)/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C
|
||||
|
||||
$(KINEMATICMODELS)/filmTurbulenceModel/filmTurbulenceModel/filmTurbulenceModel.C
|
||||
$(KINEMATICMODELS)/filmTurbulenceModel/filmTurbulenceModel/filmTurbulenceModelNew.C
|
||||
$(KINEMATICMODELS)/filmTurbulenceModel/laminar/laminar.C
|
||||
@ -33,6 +37,7 @@ $(THERMOMODELS)/phaseChangeModel/phaseChangeModel/phaseChangeModel.C
|
||||
$(THERMOMODELS)/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C
|
||||
$(THERMOMODELS)/phaseChangeModel/noPhaseChange/noPhaseChange.C
|
||||
$(THERMOMODELS)/phaseChangeModel/standardPhaseChange/standardPhaseChange.C
|
||||
$(THERMOMODELS)/phaseChangeModel/solidification/solidification.C
|
||||
|
||||
$(THERMOMODELS)/heatTransferModel/heatTransferModel/heatTransferModel.C
|
||||
$(THERMOMODELS)/heatTransferModel/heatTransferModel/heatTransferModelNew.C
|
||||
@ -46,6 +51,12 @@ $(THERMOMODELS)/filmRadiationModel/constantRadiation/constantRadiation.C
|
||||
$(THERMOMODELS)/filmRadiationModel/primaryRadiation/primaryRadiation.C
|
||||
$(THERMOMODELS)/filmRadiationModel/standardRadiation/standardRadiation.C
|
||||
|
||||
$(THERMOMODELS)/filmViscosityModel/filmViscosityModel/filmViscosityModel.C
|
||||
$(THERMOMODELS)/filmViscosityModel/filmViscosityModel/filmViscosityModelNew.C
|
||||
$(THERMOMODELS)/filmViscosityModel/constantViscosity/constantViscosity.C
|
||||
$(THERMOMODELS)/filmViscosityModel/liquidViscosity/liquidViscosity.C
|
||||
$(THERMOMODELS)/filmViscosityModel/thixotropicViscosity/thixotropicViscosity.C
|
||||
|
||||
|
||||
/* Boundary conditions */
|
||||
PATCHFIELDS=derivedFvPatchFields
|
||||
|
||||
@ -33,6 +33,7 @@ License
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "mappedWallPolyPatch.H"
|
||||
#include "mapDistribute.H"
|
||||
#include "filmThermoModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -72,22 +73,9 @@ bool kinematicSingleLayer::read()
|
||||
|
||||
void kinematicSingleLayer::correctThermoFields()
|
||||
{
|
||||
if (thermoModel_ == tmConstant)
|
||||
{
|
||||
const dictionary& constDict(coeffs_.subDict("constantThermoCoeffs"));
|
||||
rho_ == dimensionedScalar(constDict.lookup("rho0"));
|
||||
mu_ == dimensionedScalar(constDict.lookup("mu0"));
|
||||
sigma_ == dimensionedScalar(constDict.lookup("sigma0"));
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::surfaceFilmModels::kinematicSingleLayer::"
|
||||
"correctThermo()"
|
||||
) << "Kinematic surface film must use "
|
||||
<< thermoModelTypeNames_[tmConstant] << "thermodynamics" << endl;
|
||||
}
|
||||
rho_ == filmThermo_->rho();
|
||||
mu_ == filmThermo_->mu();
|
||||
sigma_ == filmThermo_->sigma();
|
||||
}
|
||||
|
||||
|
||||
@ -195,7 +183,7 @@ tmp<volScalarField> kinematicSingleLayer::pp()
|
||||
|
||||
void kinematicSingleLayer::correctAlpha()
|
||||
{
|
||||
alpha_ == pos(delta_ - dimensionedScalar("SMALL", dimLength, SMALL));
|
||||
alpha_ == pos(delta_ - deltaSmall_);
|
||||
}
|
||||
|
||||
|
||||
@ -450,6 +438,8 @@ kinematicSingleLayer::kinematicSingleLayer
|
||||
|
||||
cumulativeContErr_(0.0),
|
||||
|
||||
deltaSmall_("deltaSmall", dimLength, SMALL),
|
||||
|
||||
rho_
|
||||
(
|
||||
IOobject
|
||||
@ -772,6 +762,8 @@ kinematicSingleLayer::kinematicSingleLayer
|
||||
this->mappedFieldAndInternalPatchTypes<scalar>()
|
||||
),
|
||||
|
||||
filmThermo_(filmThermoModel::New(*this, coeffs_)),
|
||||
|
||||
availableMass_(regionMesh().nCells(), 0.0),
|
||||
|
||||
injection_(*this, coeffs_),
|
||||
@ -786,6 +778,8 @@ kinematicSingleLayer::kinematicSingleLayer
|
||||
{
|
||||
transferPrimaryRegionThermoFields();
|
||||
|
||||
correctAlpha();
|
||||
|
||||
correctThermoFields();
|
||||
|
||||
deltaRho_ == delta_*rho_;
|
||||
@ -944,6 +938,12 @@ const volVectorField& kinematicSingleLayer::Uw() const
|
||||
}
|
||||
|
||||
|
||||
const volScalarField& kinematicSingleLayer::deltaRho() const
|
||||
{
|
||||
return deltaRho_;
|
||||
}
|
||||
|
||||
|
||||
const surfaceScalarField& kinematicSingleLayer::phi() const
|
||||
{
|
||||
return phi_;
|
||||
|
||||
@ -54,6 +54,9 @@ namespace regionModels
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// Forward class declarations
|
||||
class filmThermoModel;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class kinematicSingleLayer Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -94,6 +97,9 @@ protected:
|
||||
//- Cumulative continuity error
|
||||
scalar cumulativeContErr_;
|
||||
|
||||
//- Small delta
|
||||
const dimensionedScalar deltaSmall_;
|
||||
|
||||
|
||||
// Thermo properties
|
||||
|
||||
@ -192,6 +198,9 @@ protected:
|
||||
|
||||
// Sub-models
|
||||
|
||||
//- Film thermo model
|
||||
autoPtr<filmThermoModel> filmThermo_;
|
||||
|
||||
//- Available mass for transfer via sub-models
|
||||
scalarField availableMass_;
|
||||
|
||||
@ -318,6 +327,9 @@ public:
|
||||
//- Return the number of non-orthogonal correctors
|
||||
inline label nNonOrthCorr() const;
|
||||
|
||||
//- Return small delta
|
||||
inline const dimensionedScalar& deltaSmall() const;
|
||||
|
||||
|
||||
// Thermo properties
|
||||
|
||||
@ -345,6 +357,9 @@ public:
|
||||
//- Return the film wall velocity [m/s]
|
||||
virtual const volVectorField& Uw() const;
|
||||
|
||||
//- Return the film thickness*density (helper field) [kg/m3]
|
||||
virtual const volScalarField& deltaRho() const;
|
||||
|
||||
//- Return the film flux [kg.m/s]
|
||||
virtual const surfaceScalarField& phi() const;
|
||||
|
||||
@ -445,6 +460,9 @@ public:
|
||||
|
||||
// Sub-models
|
||||
|
||||
//- Film thermo
|
||||
inline const filmThermoModel& filmThermo() const;
|
||||
|
||||
//- Injection
|
||||
inline injectionModelList& injection();
|
||||
|
||||
@ -460,6 +478,9 @@ public:
|
||||
//- Return the net film mass available over the next integration
|
||||
inline tmp<volScalarField> netMass() const;
|
||||
|
||||
//- Return the change in film mass due to sources/sinks
|
||||
inline tmp<volScalarField> deltaMass() const;
|
||||
|
||||
//- Return the gravity normal-to-patch component contribution
|
||||
inline tmp<volScalarField> gNorm() const;
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "filmThermoModel.H"
|
||||
#include "surfaceInterpolate.H"
|
||||
#include "fvcSurfaceIntegrate.H"
|
||||
|
||||
@ -61,6 +62,12 @@ inline label kinematicSingleLayer::nNonOrthCorr() const
|
||||
}
|
||||
|
||||
|
||||
inline const dimensionedScalar& kinematicSingleLayer::deltaSmall() const
|
||||
{
|
||||
return deltaSmall_;
|
||||
}
|
||||
|
||||
|
||||
inline const volScalarField& kinematicSingleLayer::mu() const
|
||||
{
|
||||
return mu_;
|
||||
@ -163,6 +170,12 @@ inline const volScalarField& kinematicSingleLayer::muPrimary() const
|
||||
}
|
||||
|
||||
|
||||
inline const filmThermoModel& kinematicSingleLayer::filmThermo() const
|
||||
{
|
||||
return filmThermo_();
|
||||
}
|
||||
|
||||
|
||||
inline injectionModelList& kinematicSingleLayer::injection()
|
||||
{
|
||||
return injection_;
|
||||
@ -183,14 +196,19 @@ inline tmp<volScalarField> kinematicSingleLayer::mass() const
|
||||
|
||||
inline tmp<volScalarField> kinematicSingleLayer::netMass() const
|
||||
{
|
||||
dimensionedScalar d0("SMALL", dimLength, ROOTVSMALL);
|
||||
return
|
||||
fvc::surfaceSum(pos(phi_)*phi_/(fvc::interpolate(delta_) + d0))
|
||||
fvc::surfaceSum(pos(phi_)*phi_/(fvc::interpolate(delta_) + deltaSmall_))
|
||||
*time().deltaT()
|
||||
+ rho_*delta_*magSf();
|
||||
}
|
||||
|
||||
|
||||
inline tmp<volScalarField> kinematicSingleLayer::deltaMass() const
|
||||
{
|
||||
return rhoSp_*magSf()*time().deltaT();
|
||||
}
|
||||
|
||||
|
||||
inline tmp<volScalarField> kinematicSingleLayer::gNorm() const
|
||||
{
|
||||
tmp<volScalarField> tgNorm
|
||||
|
||||
@ -0,0 +1,398 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "constantFilmThermo.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(constantFilmThermo, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
filmThermoModel,
|
||||
constantFilmThermo,
|
||||
dictionary
|
||||
);
|
||||
|
||||
|
||||
void constantFilmThermo::init(thermoData& td)
|
||||
{
|
||||
if (coeffs_.readIfPresent(td.name_, td.value_))
|
||||
{
|
||||
td.set_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
constantFilmThermo::constantFilmThermo
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmThermoModel(typeName, owner, dict),
|
||||
name_(coeffs_.lookup("specieName")),
|
||||
rho0_("rho0"),
|
||||
mu0_("mu0"),
|
||||
sigma0_("sigma0"),
|
||||
Cp0_("Cp0"),
|
||||
kappa0_("kappa0"),
|
||||
hl0_("hl0"),
|
||||
pv0_("pv0"),
|
||||
W0_("W0"),
|
||||
Tb0_("Tb0")
|
||||
{
|
||||
init(rho0_);
|
||||
init(mu0_);
|
||||
init(sigma0_);
|
||||
init(Cp0_);
|
||||
init(kappa0_);
|
||||
init(hl0_);
|
||||
init(pv0_);
|
||||
init(W0_);
|
||||
init(Tb0_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
constantFilmThermo::~constantFilmThermo()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
const word& constantFilmThermo::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::rho
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!rho0_.set_)
|
||||
{
|
||||
coeffs_.lookup(rho0_.name_) >> rho0_.value_;
|
||||
rho0_.set_ = true;
|
||||
}
|
||||
|
||||
return rho0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::mu
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!mu0_.set_)
|
||||
{
|
||||
coeffs_.lookup(mu0_.name_) >> mu0_.value_;
|
||||
mu0_.set_ = true;
|
||||
}
|
||||
|
||||
return mu0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::sigma
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!sigma0_.set_)
|
||||
{
|
||||
coeffs_.lookup(sigma0_.name_) >> sigma0_.value_;
|
||||
sigma0_.set_ = true;
|
||||
}
|
||||
|
||||
return sigma0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::Cp
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!Cp0_.set_)
|
||||
{
|
||||
coeffs_.lookup(Cp0_.name_) >> Cp0_.value_;
|
||||
Cp0_.set_ = true;
|
||||
}
|
||||
|
||||
return Cp0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::kappa
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!kappa0_.set_)
|
||||
{
|
||||
coeffs_.lookup(kappa0_.name_) >> kappa0_.value_;
|
||||
kappa0_.set_ = true;
|
||||
}
|
||||
|
||||
return kappa0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::D
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!D0_.set_)
|
||||
{
|
||||
coeffs_.lookup(D0_.name_) >> D0_.value_;
|
||||
D0_.set_ = true;
|
||||
}
|
||||
|
||||
return D0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::hl
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!hl0_.set_)
|
||||
{
|
||||
coeffs_.lookup(hl0_.name_) >> hl0_.value_;
|
||||
hl0_.set_ = true;
|
||||
}
|
||||
|
||||
return hl0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::pv
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
if (!pv0_.set_)
|
||||
{
|
||||
coeffs_.lookup(pv0_.name_) >> pv0_.value_;
|
||||
pv0_.set_ = true;
|
||||
}
|
||||
|
||||
return pv0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::W() const
|
||||
{
|
||||
if (!W0_.set_)
|
||||
{
|
||||
coeffs_.lookup(W0_.name_) >> W0_.value_;
|
||||
W0_.set_ = true;
|
||||
}
|
||||
|
||||
return W0_.value_;
|
||||
}
|
||||
|
||||
|
||||
scalar constantFilmThermo::Tb(const scalar p) const
|
||||
{
|
||||
if (!Tb0_.set_)
|
||||
{
|
||||
coeffs_.lookup(Tb0_.name_) >> Tb0_.value_;
|
||||
Tb0_.set_ = true;
|
||||
}
|
||||
|
||||
return Tb0_.value_;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> constantFilmThermo::rho() const
|
||||
{
|
||||
tmp<volScalarField> trho
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
type() + ':' + rho0_.name_,
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimDensity, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
trho().internalField() = this->rho(0, 0);
|
||||
trho().correctBoundaryConditions();
|
||||
|
||||
return trho;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> constantFilmThermo::mu() const
|
||||
{
|
||||
tmp<volScalarField> tmu
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
type() + ':' + mu0_.name_,
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimPressure*dimTime, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
tmu().internalField() = this->mu(0, 0);
|
||||
tmu().correctBoundaryConditions();
|
||||
|
||||
return tmu;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> constantFilmThermo::sigma() const
|
||||
{
|
||||
tmp<volScalarField> tsigma
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
type() + ':' + sigma0_.name_,
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimMass/sqr(dimTime), 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
tsigma().internalField() = this->sigma(0, 0);
|
||||
tsigma().correctBoundaryConditions();
|
||||
|
||||
return tsigma;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> constantFilmThermo::Cp() const
|
||||
{
|
||||
tmp<volScalarField> tCp
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
type() + ':' + Cp0_.name_,
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
tCp().internalField() = this->Cp(0, 0);
|
||||
tCp().correctBoundaryConditions();
|
||||
|
||||
return tCp;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> constantFilmThermo::kappa() const
|
||||
{
|
||||
tmp<volScalarField> tkappa
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
type() + ':' + kappa0_.name_,
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
tkappa().internalField() = this->kappa(0, 0);
|
||||
tkappa().correctBoundaryConditions();
|
||||
|
||||
return tkappa;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,224 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::constantFilmThermo
|
||||
|
||||
Description
|
||||
Constant thermo model
|
||||
|
||||
SourceFiles
|
||||
constantFilmThermo.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef constantFilmThermo_H
|
||||
#define constantFilmThermo_H
|
||||
|
||||
#include "filmThermoModel.H"
|
||||
#include "dimensionSet.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class constantFilmThermo Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class constantFilmThermo
|
||||
:
|
||||
public filmThermoModel
|
||||
{
|
||||
public:
|
||||
|
||||
struct thermoData
|
||||
{
|
||||
// private:
|
||||
word name_;
|
||||
scalar value_;
|
||||
bool set_;
|
||||
|
||||
// public:
|
||||
thermoData()
|
||||
:
|
||||
name_("unknown"),
|
||||
value_(0.0),
|
||||
set_(false)
|
||||
{}
|
||||
thermoData(const word& n)
|
||||
:
|
||||
name_(n),
|
||||
value_(0.0),
|
||||
set_(false)
|
||||
{}
|
||||
|
||||
// virtual ~thermoData()
|
||||
// {}
|
||||
};
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Specie name
|
||||
word name_;
|
||||
|
||||
//- Density [kg/m3]
|
||||
mutable thermoData rho0_;
|
||||
|
||||
//- Dynamic viscosity [Pa.s]
|
||||
mutable thermoData mu0_;
|
||||
|
||||
//- Surface tension [kg/s2]
|
||||
mutable thermoData sigma0_;
|
||||
|
||||
//- Specific heat capacity [J/kg/K]
|
||||
mutable thermoData Cp0_;
|
||||
|
||||
//- Thermal conductivity [W/m/K]
|
||||
mutable thermoData kappa0_;
|
||||
|
||||
//- Diffusivity [m2/s]
|
||||
mutable thermoData D0_;
|
||||
|
||||
//- Latent heat [J/kg]
|
||||
mutable thermoData hl0_;
|
||||
|
||||
//- Vapour pressure [Pa]
|
||||
mutable thermoData pv0_;
|
||||
|
||||
//- Molecular weight [kg/kmol]
|
||||
mutable thermoData W0_;
|
||||
|
||||
//- Boiling temperature [K]
|
||||
mutable thermoData Tb0_;
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Initialise thermoData object
|
||||
void init(thermoData& td);
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
constantFilmThermo(const constantFilmThermo&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const constantFilmThermo&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("constant");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model and dictionary
|
||||
constantFilmThermo
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~constantFilmThermo();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the specie name
|
||||
virtual const word& name() const;
|
||||
|
||||
|
||||
// Elemental access
|
||||
|
||||
//- Return density [kg/m3]
|
||||
virtual scalar rho(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return dynamic viscosity [Pa.s]
|
||||
virtual scalar mu(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return surface tension [kg/s2]
|
||||
virtual scalar sigma(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return specific heat capacity [J/kg/K]
|
||||
virtual scalar Cp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return thermal conductivity [W/m/K]
|
||||
virtual scalar kappa(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return diffusivity [m2/s]
|
||||
virtual scalar D(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return latent heat [J/kg]
|
||||
virtual scalar hl(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return vapour pressure [Pa]
|
||||
virtual scalar pv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return molecular weight [kg/kmol]
|
||||
virtual scalar W() const;
|
||||
|
||||
//- Return boiling temperature [K]
|
||||
virtual scalar Tb(const scalar p) const;
|
||||
|
||||
|
||||
// Field access
|
||||
|
||||
//- Return density [kg/m3]
|
||||
virtual tmp<volScalarField> rho() const;
|
||||
|
||||
//- Return dynamic viscosity [Pa.s]
|
||||
virtual tmp<volScalarField> mu() const;
|
||||
|
||||
//- Return surface tension [kg/s2]
|
||||
virtual tmp<volScalarField> sigma() const;
|
||||
|
||||
//- Return specific heat capacity [J/kg/K]
|
||||
virtual tmp<volScalarField> Cp() const;
|
||||
|
||||
//- Return thermal conductivity [W/m/K]
|
||||
virtual tmp<volScalarField> kappa() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,76 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "filmThermoModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(filmThermoModel, 0);
|
||||
defineRunTimeSelectionTable(filmThermoModel, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
filmThermoModel::filmThermoModel
|
||||
(
|
||||
const surfaceFilmModel& owner
|
||||
)
|
||||
:
|
||||
subModelBase(owner)
|
||||
{}
|
||||
|
||||
|
||||
filmThermoModel::filmThermoModel
|
||||
(
|
||||
const word& type,
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
subModelBase(type, owner, dict)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
filmThermoModel::~filmThermoModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,186 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::filmThermoModel
|
||||
|
||||
Description
|
||||
Base class for film thermo models
|
||||
|
||||
SourceFiles
|
||||
filmThermoModel.C
|
||||
filmThermoModelNew.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef filmThermoModel_H
|
||||
#define filmThermoModel_H
|
||||
|
||||
#include "subModelBase.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class filmThermoModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class filmThermoModel
|
||||
:
|
||||
public subModelBase
|
||||
{
|
||||
private:
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
filmThermoModel(const filmThermoModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const filmThermoModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("filmThermoModel");
|
||||
|
||||
|
||||
// Declare runtime constructor selection table
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
filmThermoModel,
|
||||
dictionary,
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict
|
||||
),
|
||||
(owner, dict)
|
||||
);
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
filmThermoModel(const surfaceFilmModel& owner);
|
||||
|
||||
//- Construct from type name, dictionary and surface film model
|
||||
filmThermoModel
|
||||
(
|
||||
const word& type,
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Return a reference to the selected phase change model
|
||||
static autoPtr<filmThermoModel> New
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~filmThermoModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the specie name
|
||||
virtual const word& name() const = 0;
|
||||
|
||||
|
||||
// Elemental access
|
||||
|
||||
//- Return density [kg/m3]
|
||||
virtual scalar rho(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return dynamic viscosity [Pa.s]
|
||||
virtual scalar mu(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return surface tension [kg/s2]
|
||||
virtual scalar sigma(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return specific heat capacity [J/kg/K]
|
||||
virtual scalar Cp(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return thermal conductivity [W/m/K]
|
||||
virtual scalar kappa(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return diffusivity [m2/s]
|
||||
virtual scalar D(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return latent heat [J/kg]
|
||||
virtual scalar hl(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return vapour pressure [Pa]
|
||||
virtual scalar pv(const scalar p, const scalar T) const = 0;
|
||||
|
||||
//- Return molecular weight [kg/kmol]
|
||||
virtual scalar W() const = 0;
|
||||
|
||||
//- Return boiling temperature [K]
|
||||
virtual scalar Tb(const scalar p) const = 0;
|
||||
|
||||
|
||||
// Field access
|
||||
|
||||
//- Return density [kg/m3]
|
||||
virtual tmp<volScalarField> rho() const = 0;
|
||||
|
||||
//- Return dynamic viscosity [Pa.s]
|
||||
virtual tmp<volScalarField> mu() const = 0;
|
||||
|
||||
//- Return surface tension [kg/s2]
|
||||
virtual tmp<volScalarField> sigma() const = 0;
|
||||
|
||||
//- Return specific heat capacity [J/kg/K]
|
||||
virtual tmp<volScalarField> Cp() const = 0;
|
||||
|
||||
//- Return thermal conductivity [W/m/K]
|
||||
virtual tmp<volScalarField> kappa() const = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,73 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "filmThermoModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<filmThermoModel> filmThermoModel::New
|
||||
(
|
||||
const surfaceFilmModel& model,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
word modelType(dict.lookup("filmThermoModel"));
|
||||
|
||||
Info<< " Selecting filmThermoModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"filmThermoModel::New(const surfaceFilmModel&, const dictionary&)"
|
||||
) << "Unknown filmThermoModel type " << modelType << nl << nl
|
||||
<< "Valid filmThermoModel types are:" << nl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<filmThermoModel>(cstrIter()(model, dict));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,486 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "liquidFilmThermo.H"
|
||||
#include "demandDrivenData.H"
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "SLGThermo.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(liquidFilmThermo, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
filmThermoModel,
|
||||
liquidFilmThermo,
|
||||
dictionary
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
const thermoSingleLayer& liquidFilmThermo::thermoFilm() const
|
||||
{
|
||||
if (!isA<thermoSingleLayer>(owner_))
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"const thermoSingleLayer& liquidFilmThermo::thermoFilm() const"
|
||||
)
|
||||
<< "Thermo model requires a " << thermoSingleLayer::typeName
|
||||
<< " film to supply the pressure and temperature, but "
|
||||
<< owner_.type() << " film model selected. "
|
||||
<< "Use the 'useReferenceValues' flag to employ reference "
|
||||
<< "pressure and temperature" << exit(FatalError);
|
||||
}
|
||||
|
||||
return refCast<const thermoSingleLayer>(owner_);
|
||||
}
|
||||
|
||||
|
||||
void liquidFilmThermo::initLiquid(const dictionary& dict)
|
||||
{
|
||||
if (liquidPtr_ != NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
dict.lookup("liquid") >> name_;
|
||||
|
||||
if (owner_.primaryMesh().foundObject<SLGThermo>("SLGThermo"))
|
||||
{
|
||||
// retrieve from film thermo
|
||||
ownLiquid_ = false;
|
||||
|
||||
const SLGThermo& thermo =
|
||||
owner_.primaryMesh().lookupObject<SLGThermo>("SLGThermo");
|
||||
label id = thermo.liquidId(name_);
|
||||
liquidPtr_ = &thermo.liquids().properties()[id];
|
||||
}
|
||||
else
|
||||
{
|
||||
// new liquid create
|
||||
ownLiquid_ = true;
|
||||
|
||||
liquidPtr_ = new liquidProperties(dict.subDict(name_ + "Coeffs"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
liquidFilmThermo::liquidFilmThermo
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
filmThermoModel(typeName, owner, dict),
|
||||
name_("unknown_liquid"),
|
||||
liquidPtr_(NULL),
|
||||
ownLiquid_(false),
|
||||
useReferenceValues_(readBool(coeffs_.lookup("useReferenceValues"))),
|
||||
pRef_(0.0),
|
||||
TRef_(0.0)
|
||||
{
|
||||
initLiquid(coeffs_);
|
||||
|
||||
if (useReferenceValues_)
|
||||
{
|
||||
coeffs_.lookup("pRef") >> pRef_;
|
||||
coeffs_.lookup("TRef") >> TRef_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
liquidFilmThermo::~liquidFilmThermo()
|
||||
{
|
||||
if (ownLiquid_)
|
||||
{
|
||||
deleteDemandDrivenData(liquidPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
const word& liquidFilmThermo::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::rho
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->rho(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::mu
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->mu(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::sigma
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->sigma(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::Cp
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->Cp(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::kappa
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->K(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::D
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->D(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::hl
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->hl(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::pv
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return liquidPtr_->pv(p, T);
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::W() const
|
||||
{
|
||||
return liquidPtr_->W();
|
||||
}
|
||||
|
||||
|
||||
scalar liquidFilmThermo::Tb(const scalar p) const
|
||||
{
|
||||
return liquidPtr_->pvInvert(p);
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> liquidFilmThermo::rho() const
|
||||
{
|
||||
tmp<volScalarField> trho
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
type() + ":rho",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimDensity, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& rho = trho().internalField();
|
||||
|
||||
if (useReferenceValues_)
|
||||
{
|
||||
forAll(rho, cellI)
|
||||
{
|
||||
rho[cellI] = this->rho(pRef_, TRef_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const thermoSingleLayer& film = thermoFilm();
|
||||
|
||||
const volScalarField& T = film.T();
|
||||
const volScalarField& p = film.pPrimary();
|
||||
|
||||
forAll(rho, cellI)
|
||||
{
|
||||
rho[cellI] = this->rho(p[cellI], T[cellI]);
|
||||
}
|
||||
}
|
||||
|
||||
trho().correctBoundaryConditions();
|
||||
|
||||
return trho;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> liquidFilmThermo::mu() const
|
||||
{
|
||||
tmp<volScalarField> tmu
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
type() + ":mu",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimPressure*dimTime, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& mu = tmu().internalField();
|
||||
|
||||
if (useReferenceValues_)
|
||||
{
|
||||
forAll(mu, cellI)
|
||||
{
|
||||
mu[cellI] = this->mu(pRef_, TRef_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const thermoSingleLayer& film = thermoFilm();
|
||||
|
||||
const volScalarField& T = film.T();
|
||||
const volScalarField& p = film.pPrimary();
|
||||
|
||||
forAll(mu, cellI)
|
||||
{
|
||||
mu[cellI] = this->mu(p[cellI], T[cellI]);
|
||||
}
|
||||
}
|
||||
|
||||
tmu().correctBoundaryConditions();
|
||||
|
||||
return tmu;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> liquidFilmThermo::sigma() const
|
||||
{
|
||||
tmp<volScalarField> tsigma
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
type() + ":sigma",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimMass/sqr(dimTime), 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& sigma = tsigma().internalField();
|
||||
|
||||
if (useReferenceValues_)
|
||||
{
|
||||
forAll(sigma, cellI)
|
||||
{
|
||||
sigma[cellI] = this->sigma(pRef_, TRef_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const thermoSingleLayer& film = thermoFilm();
|
||||
|
||||
const volScalarField& T = film.T();
|
||||
const volScalarField& p = film.pPrimary();
|
||||
|
||||
forAll(sigma, cellI)
|
||||
{
|
||||
sigma[cellI] = this->sigma(p[cellI], T[cellI]);
|
||||
}
|
||||
}
|
||||
|
||||
tsigma().correctBoundaryConditions();
|
||||
|
||||
return tsigma;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> liquidFilmThermo::Cp() const
|
||||
{
|
||||
tmp<volScalarField> tCp
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
type() + ":Cp",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& Cp = tCp().internalField();
|
||||
|
||||
if (useReferenceValues_)
|
||||
{
|
||||
forAll(Cp, cellI)
|
||||
{
|
||||
Cp[cellI] = this->Cp(pRef_, TRef_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const thermoSingleLayer& film = thermoFilm();
|
||||
|
||||
const volScalarField& T = film.T();
|
||||
const volScalarField& p = film.pPrimary();
|
||||
|
||||
forAll(Cp, cellI)
|
||||
{
|
||||
Cp[cellI] = this->Cp(p[cellI], T[cellI]);
|
||||
}
|
||||
}
|
||||
|
||||
tCp().correctBoundaryConditions();
|
||||
|
||||
return tCp;
|
||||
}
|
||||
|
||||
|
||||
tmp<volScalarField> liquidFilmThermo::kappa() const
|
||||
{
|
||||
tmp<volScalarField> tkappa
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
type() + ":kappa",
|
||||
owner().time().timeName(),
|
||||
owner().regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
owner().regionMesh(),
|
||||
dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
);
|
||||
|
||||
scalarField& kappa = tkappa().internalField();
|
||||
|
||||
if (useReferenceValues_)
|
||||
{
|
||||
forAll(kappa, cellI)
|
||||
{
|
||||
kappa[cellI] = this->kappa(pRef_, TRef_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const thermoSingleLayer& film = thermoFilm();
|
||||
|
||||
const volScalarField& T = film.T();
|
||||
const volScalarField& p = film.pPrimary();
|
||||
|
||||
forAll(kappa, cellI)
|
||||
{
|
||||
kappa[cellI] = this->kappa(p[cellI], T[cellI]);
|
||||
}
|
||||
}
|
||||
|
||||
tkappa().correctBoundaryConditions();
|
||||
|
||||
return tkappa;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,187 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::liquidFilmThermo
|
||||
|
||||
Description
|
||||
Liquid thermo model
|
||||
|
||||
SourceFiles
|
||||
liquidFilmThermo.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef liquidFilmThermo_H
|
||||
#define liquidFilmThermo_H
|
||||
|
||||
#include "filmThermoModel.H"
|
||||
#include "liquidProperties.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// Forward class declarations
|
||||
class thermoSingleLayer;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class liquidFilmThermo Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class liquidFilmThermo
|
||||
:
|
||||
public filmThermoModel
|
||||
{
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Liquid name
|
||||
word name_;
|
||||
|
||||
//- Pointer to the liquid properties
|
||||
const liquidProperties* liquidPtr_;
|
||||
|
||||
//- Flag to indicate that model owns the liquid object
|
||||
bool ownLiquid_;
|
||||
|
||||
//- Flag to indicate that reference values of p and T should be used
|
||||
bool useReferenceValues_;
|
||||
|
||||
//- Reference pressure [pa]
|
||||
scalar pRef_;
|
||||
|
||||
//- Reference temperature [K]
|
||||
scalar TRef_;
|
||||
|
||||
|
||||
// Protected member functions
|
||||
|
||||
//- Return a reference to a thermo film
|
||||
const thermoSingleLayer& thermoFilm() const;
|
||||
|
||||
//- Initialise the liquid pointer
|
||||
void initLiquid(const dictionary& dict);
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
liquidFilmThermo(const liquidFilmThermo&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const liquidFilmThermo&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("liquid");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model and dictionary
|
||||
liquidFilmThermo
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~liquidFilmThermo();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the specie name
|
||||
virtual const word& name() const;
|
||||
|
||||
|
||||
// Elemental access
|
||||
|
||||
//- Return density [kg/m3]
|
||||
virtual scalar rho(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return dynamic viscosity [Pa.s]
|
||||
virtual scalar mu(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return surface tension [kg/s2]
|
||||
virtual scalar sigma(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return specific heat capacity [J/kg/K]
|
||||
virtual scalar Cp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return thermal conductivity [W/m/K]
|
||||
virtual scalar kappa(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return diffusivity [m2/s]
|
||||
virtual scalar D(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return latent heat [J/kg]
|
||||
virtual scalar hl(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return vapour pressure [Pa]
|
||||
virtual scalar pv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return molecular weight [kg/kmol]
|
||||
virtual scalar W() const;
|
||||
|
||||
//- Return boiling temperature [K]
|
||||
virtual scalar Tb(const scalar p) const;
|
||||
|
||||
|
||||
// Field access
|
||||
|
||||
//- Return density [kg/m3]
|
||||
virtual tmp<volScalarField> rho() const;
|
||||
|
||||
//- Return dynamic viscosity [Pa.s]
|
||||
virtual tmp<volScalarField> mu() const;
|
||||
|
||||
//- Return surface tension [kg/s2]
|
||||
virtual tmp<volScalarField> sigma() const;
|
||||
|
||||
//- Return specific heat capacity [J/kg/K]
|
||||
virtual tmp<volScalarField> Cp() const;
|
||||
|
||||
//- Return thermal conductivity [W/m/K]
|
||||
virtual tmp<volScalarField> kappa() const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -44,7 +44,7 @@ autoPtr<filmTurbulenceModel> filmTurbulenceModel::New
|
||||
{
|
||||
const word modelType(dict.lookup("turbulence"));
|
||||
|
||||
Info<< " " << modelType << endl;
|
||||
Info<< " Selecting filmTurbulenceModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
|
||||
@ -122,6 +122,7 @@ void laminar::correct()
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
tmp<fvVectorMatrix> laminar::Su(volVectorField& U) const
|
||||
{
|
||||
// local reference to film model
|
||||
@ -138,9 +139,7 @@ tmp<fvVectorMatrix> laminar::Su(volVectorField& U) const
|
||||
|
||||
// employ simple coeff-based model
|
||||
volScalarField Cs("Cs", Cf_*rhop*mag(Up - Us));
|
||||
|
||||
dimensionedScalar d0("SMALL", delta.dimensions(), SMALL);
|
||||
volScalarField Cw("Cw", mu/(0.3333*(delta + d0)));
|
||||
volScalarField Cw("Cw", mu/(0.3333*(delta + film.deltaSmall())));
|
||||
Cw.min(5000.0);
|
||||
|
||||
return
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -99,11 +99,16 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
virtual const word& type() const = 0;
|
||||
|
||||
//- Return the reference to the owner surface film model
|
||||
inline const surfaceFilmModel& owner() const;
|
||||
|
||||
//- Return the model coefficients dictionary
|
||||
inline const dictionary& coeffs() const;
|
||||
|
||||
template<class FilmType>
|
||||
inline const FilmType& filmType() const;
|
||||
};
|
||||
|
||||
|
||||
@ -119,6 +124,12 @@ public:
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "subModelBaseTemplates.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -0,0 +1,56 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class FilmType>
|
||||
const FilmType& subModelBase::filmType() const
|
||||
{
|
||||
if (!isA<FilmType>(owner_))
|
||||
{
|
||||
FatalErrorIn("FilmType& subModelBase::film() const")
|
||||
<< "Model " << type() << " requested film type "
|
||||
<< FilmType::typeName << " but film is type " << owner_.type()
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return refCast<const FilmType>(owner_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,90 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "constantViscosity.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(constantViscosity, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
filmViscosityModel,
|
||||
constantViscosity,
|
||||
dictionary
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
constantViscosity::constantViscosity
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
)
|
||||
:
|
||||
filmViscosityModel(typeName, owner, dict, mu),
|
||||
mu0_(readScalar(coeffs().lookup("mu0")))
|
||||
{
|
||||
mu_.internalField() = mu0_;
|
||||
mu_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
constantViscosity::~constantViscosity()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void constantViscosity::correct
|
||||
(
|
||||
const volScalarField& p,
|
||||
const volScalarField& T
|
||||
)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,121 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::constantViscosity
|
||||
|
||||
Description
|
||||
Constant viscosity model
|
||||
|
||||
SourceFiles
|
||||
constantViscosity.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef constantViscosity_H
|
||||
#define constantViscosity_H
|
||||
|
||||
#include "filmViscosityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class constantViscosity Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class constantViscosity
|
||||
:
|
||||
public filmViscosityModel
|
||||
{
|
||||
private:
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
constantViscosity(const constantViscosity&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const constantViscosity&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Constant viscosity [Pa.s]
|
||||
scalar mu0_;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("constant");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model
|
||||
constantViscosity
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~constantViscosity();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Correct
|
||||
virtual void correct
|
||||
(
|
||||
const volScalarField& p,
|
||||
const volScalarField& T
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,75 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "filmViscosityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(filmViscosityModel, 0);
|
||||
defineRunTimeSelectionTable(filmViscosityModel, dictionary);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
filmViscosityModel::filmViscosityModel
|
||||
(
|
||||
const word& type,
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
)
|
||||
:
|
||||
subModelBase(type, owner, dict),
|
||||
mu_(mu)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
filmViscosityModel::~filmViscosityModel()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void filmViscosityModel::info(Ostream& os) const
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // end namespace surfaceFilmModels
|
||||
} // end namespace regionModels
|
||||
} // end namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,156 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::filmViscosityModel
|
||||
|
||||
Description
|
||||
Base class for surface film viscosity models
|
||||
|
||||
SourceFiles
|
||||
filmViscosityModel.C
|
||||
filmViscosityModelNew.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef filmViscosityModel_H
|
||||
#define filmViscosityModel_H
|
||||
|
||||
#include "subModelBase.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "scalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class filmViscosityModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class filmViscosityModel
|
||||
:
|
||||
public subModelBase
|
||||
{
|
||||
private:
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
filmViscosityModel(const filmViscosityModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const filmViscosityModel&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Data
|
||||
|
||||
//- Reference to the viscosity field
|
||||
volScalarField& mu_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("filmViscosityModel");
|
||||
|
||||
|
||||
// Declare runtime constructor selection table
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
filmViscosityModel,
|
||||
dictionary,
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
),
|
||||
(owner, dict, mu)
|
||||
);
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from type name, dictionary and surface film model
|
||||
filmViscosityModel
|
||||
(
|
||||
const word& type,
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Return a reference to the selected phase change model
|
||||
static autoPtr<filmViscosityModel> New
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~filmViscosityModel();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Correct
|
||||
virtual void correct
|
||||
(
|
||||
const volScalarField& p,
|
||||
const volScalarField& T
|
||||
) = 0;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
//- Provide some feedback
|
||||
virtual void info(Ostream& os) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,79 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "filmViscosityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<filmViscosityModel> filmViscosityModel::New
|
||||
(
|
||||
const surfaceFilmModel& model,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
)
|
||||
{
|
||||
word modelType(dict.lookup("filmViscosityModel"));
|
||||
|
||||
Info<< " Selecting filmViscosityModel " << modelType << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(modelType);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"filmViscosityModel::New"
|
||||
"("
|
||||
"const surfaceFilmModel&, "
|
||||
"const dictionary&, "
|
||||
"volScalarField&"
|
||||
")"
|
||||
) << "Unknown filmViscosityModel type " << modelType
|
||||
<< nl << nl << "Valid filmViscosityModel types are:" << nl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<filmViscosityModel>(cstrIter()(model, dict, mu));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // end namespace surfaceFilmModels
|
||||
} // end namespace regionModels
|
||||
} // end namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,11 +23,9 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "surfaceShearForce.H"
|
||||
#include "liquidViscosity.H"
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvmSup.H"
|
||||
#include "kinematicSingleLayer.H"
|
||||
#include "turbulenceModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -40,55 +38,45 @@ namespace surfaceFilmModels
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(surfaceShearForce, 0);
|
||||
addToRunTimeSelectionTable(force, surfaceShearForce, dictionary);
|
||||
defineTypeNameAndDebug(liquidViscosity, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
filmViscosityModel,
|
||||
liquidViscosity,
|
||||
dictionary
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
surfaceShearForce::surfaceShearForce
|
||||
liquidViscosity::liquidViscosity
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
)
|
||||
:
|
||||
force(typeName, owner, dict),
|
||||
Cf_(readScalar(coeffs_.lookup("Cf")))
|
||||
filmViscosityModel(typeName, owner, dict, mu)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
surfaceShearForce::~surfaceShearForce()
|
||||
liquidViscosity::~liquidViscosity()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
tmp<fvVectorMatrix> surfaceShearForce::correct(volVectorField& U)
|
||||
void liquidViscosity::correct
|
||||
(
|
||||
const volScalarField& p,
|
||||
const volScalarField& T
|
||||
)
|
||||
{
|
||||
// local reference to film model
|
||||
const kinematicSingleLayer& film =
|
||||
static_cast<const kinematicSingleLayer&>(owner_);
|
||||
const thermoSingleLayer& film = filmType<thermoSingleLayer>();
|
||||
|
||||
// local references to film fields
|
||||
const volScalarField& mu = film.mu();
|
||||
const volVectorField& Uw = film.Uw();
|
||||
const volScalarField& delta = film.delta();
|
||||
const volVectorField& Up = film.UPrimary();
|
||||
|
||||
// laminar case - employ simple coeff-based model
|
||||
const volScalarField& rhop = film.rhoPrimary();
|
||||
volScalarField Cs("Cs", Cf_*rhop*mag(Up - U));
|
||||
|
||||
dimensionedScalar d0("SMALL", delta.dimensions(), SMALL);
|
||||
volScalarField Cw("Cw", mu/(0.3333*(delta + d0)));
|
||||
Cw.min(5000.0);
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::Sp(Cs, U) + Cs*Up // surface contribution
|
||||
- fvm::Sp(Cw, U) + Cw*Uw // wall contribution
|
||||
);
|
||||
mu_ = film.filmThermo().mu();
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -22,20 +22,20 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::surfaceShearForce
|
||||
Foam::liquidViscosity
|
||||
|
||||
Description
|
||||
Film surface shear force
|
||||
liquidViscosity viscosity model
|
||||
|
||||
SourceFiles
|
||||
surfaceShearForce.C
|
||||
liquidViscosity.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef surfaceShearForce_H
|
||||
#define surfaceShearForce_H
|
||||
#ifndef liquidViscosity_H
|
||||
#define liquidViscosity_H
|
||||
|
||||
#include "force.H"
|
||||
#include "filmViscosityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -47,49 +47,49 @@ namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class surfaceShearForce Declaration
|
||||
Class liquidViscosity Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class surfaceShearForce
|
||||
class liquidViscosity
|
||||
:
|
||||
public force
|
||||
public filmViscosityModel
|
||||
{
|
||||
private:
|
||||
|
||||
// Private Data
|
||||
|
||||
//- Surface roughness coefficient
|
||||
scalar Cf_;
|
||||
|
||||
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
surfaceShearForce(const surfaceShearForce&);
|
||||
liquidViscosity(const liquidViscosity&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const surfaceShearForce&);
|
||||
void operator=(const liquidViscosity&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("surfaceShear");
|
||||
TypeName("liquid");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model
|
||||
surfaceShearForce
|
||||
liquidViscosity
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~surfaceShearForce();
|
||||
virtual ~liquidViscosity();
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -97,7 +97,11 @@ public:
|
||||
// Evolution
|
||||
|
||||
//- Correct
|
||||
virtual tmp<fvVectorMatrix> correct(volVectorField& U);
|
||||
virtual void correct
|
||||
(
|
||||
const volScalarField& p,
|
||||
const volScalarField& T
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -0,0 +1,181 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "thixotropicViscosity.H"
|
||||
#include "kinematicSingleLayer.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
#include "fvmDdt.H"
|
||||
#include "fvmDiv.H"
|
||||
#include "fvcDiv.H"
|
||||
#include "fvmSup.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(thixotropicViscosity, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
filmViscosityModel,
|
||||
thixotropicViscosity,
|
||||
dictionary
|
||||
);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
void thixotropicViscosity::updateMu()
|
||||
{
|
||||
const kinematicSingleLayer& film = filmType<kinematicSingleLayer>();
|
||||
|
||||
// blend based on mass fraction of added- to existing film mass
|
||||
const dimensionedScalar m0("zero", dimMass, 0.0);
|
||||
const dimensionedScalar mSMALL("SMALL", dimMass, ROOTVSMALL);
|
||||
const volScalarField deltaMass("deltaMass", max(m0, film.deltaMass()));
|
||||
const volScalarField filmMass("filmMass", film.netMass() + mSMALL);
|
||||
|
||||
// weighting field to blend new and existing mass contributions
|
||||
const volScalarField w("w", max(0.0, min(1.0, deltaMass/filmMass)));
|
||||
|
||||
// evaluate thixotropic viscosity
|
||||
volScalarField muThx("muThx", muInf_/(sqr(1.0 - K_*lambda_) + ROOTVSMALL));
|
||||
|
||||
// set new viscosity based on weight field
|
||||
mu_ = w*muInf_ + (1.0 - w)*muThx;
|
||||
mu_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
thixotropicViscosity::thixotropicViscosity
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
)
|
||||
:
|
||||
filmViscosityModel(typeName, owner, dict, mu),
|
||||
a_(coeffs().lookup("a")),
|
||||
b_(coeffs().lookup("b")),
|
||||
c_(coeffs().lookup("c")),
|
||||
d_(coeffs().lookup("d")),
|
||||
mu0_(coeffs().lookup("mu0")),
|
||||
muInf_(coeffs().lookup("muInf")),
|
||||
K_(1.0 - Foam::sqrt(muInf_/mu0_)),
|
||||
lambda_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ":lambda",
|
||||
owner.regionMesh().time().timeName(),
|
||||
owner.regionMesh(),
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
owner.regionMesh()
|
||||
)
|
||||
{
|
||||
lambda_.min(1.0);
|
||||
lambda_.max(0.0);
|
||||
|
||||
// initialise viscosity to inf value
|
||||
// - cannot call updateMu() since this calls film.netMass() which
|
||||
// cannot be evaluated yet (still in construction)
|
||||
mu_ = muInf_;
|
||||
mu_.correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
thixotropicViscosity::~thixotropicViscosity()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void thixotropicViscosity::correct
|
||||
(
|
||||
const volScalarField& p,
|
||||
const volScalarField& T
|
||||
)
|
||||
{
|
||||
const kinematicSingleLayer& film = filmType<kinematicSingleLayer>();
|
||||
|
||||
// references to film fields
|
||||
const volVectorField& U = film.U();
|
||||
const volVectorField& Uw = film.Uw();
|
||||
const volScalarField& delta = film.delta();
|
||||
const volScalarField& deltaRho = film.deltaRho();
|
||||
const surfaceScalarField& phi = film.phi();
|
||||
|
||||
// gamma-dot (shear rate) raised to the power d
|
||||
volScalarField gDotPowD
|
||||
(
|
||||
"gDotPowD",
|
||||
pow(mag(U - Uw)/(delta + film.deltaSmall()), d_)
|
||||
);
|
||||
|
||||
dimensionedScalar c0("SMALL", dimMass/sqr(dimLength)/dimTime, SMALL);
|
||||
volScalarField coeff(-deltaRho*c_*gDotPowD + c0);
|
||||
|
||||
fvScalarMatrix lambdaEqn
|
||||
(
|
||||
fvm::ddt(deltaRho, lambda_)
|
||||
+ fvm::div(phi, lambda_)
|
||||
- fvm::Sp(fvc::div(phi), lambda_)
|
||||
==
|
||||
deltaRho*a_*pow((1.0 - lambda_), b_)
|
||||
+ fvm::SuSp(coeff, lambda_)
|
||||
);
|
||||
|
||||
lambdaEqn.relax();
|
||||
|
||||
lambdaEqn.solve();
|
||||
|
||||
lambda_.min(1.0);
|
||||
lambda_.max(0.0);
|
||||
|
||||
updateMu();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,205 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::thixotropicViscosity
|
||||
|
||||
Description
|
||||
Thixotropic viscosity model based on the evolution of the structural
|
||||
parameter \f$ \lambda \f$:
|
||||
|
||||
\f[
|
||||
\lambda = a(1 - \lambda)^b - c \lambda \dot{\gamma}^d
|
||||
\f]
|
||||
|
||||
The viscosity is then calculated using the expression
|
||||
|
||||
\f[
|
||||
\mu = \frac{\mu_{inf}}{{1 - K \lambda}^2}
|
||||
\f]
|
||||
|
||||
Where the parameter K is given by:
|
||||
|
||||
\f[
|
||||
K = 1 - \frac{\mu_{\inf}}{\mu_{0}}^0.5
|
||||
\f]
|
||||
|
||||
Here:
|
||||
\vartable
|
||||
\lambda | structural parameter
|
||||
a | model coefficient
|
||||
b | model coefficient
|
||||
c | model coefficient
|
||||
d | model coefficient
|
||||
\dot{\gamma} | stress rate [1/s]
|
||||
\mu_{0} | limiting viscosity when \f$ \lambda = 1 \f$
|
||||
\mu_{\inf} | limiting viscosity when \f$ \lambda = 0 \f$
|
||||
\endvartable
|
||||
|
||||
|
||||
Reference:
|
||||
\verbatim
|
||||
Barnes H A, 1997. Thixotropy - a review. J. Non-Newtonian Fluid
|
||||
Mech 70, pp 1-33
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
thixotropicViscosity.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef thixotropicViscosity_H
|
||||
#define thixotropicViscosity_H
|
||||
|
||||
#include "filmViscosityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class thixotropicViscosity Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class thixotropicViscosity
|
||||
:
|
||||
public filmViscosityModel
|
||||
{
|
||||
private:
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
thixotropicViscosity(const thixotropicViscosity&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const thixotropicViscosity&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
/*
|
||||
//- Model `a' coefficient
|
||||
scalar a_;
|
||||
|
||||
//- Model `b' coefficient
|
||||
scalar b_;
|
||||
|
||||
//- Model `c' coefficient
|
||||
scalar c_;
|
||||
|
||||
//- Model `d' coefficient
|
||||
scalar d_;
|
||||
|
||||
//- Limiting viscosity when lambda = 1
|
||||
scalar mu0_;
|
||||
|
||||
//- Limiting viscosity when lambda = 0
|
||||
scalar muInf_;
|
||||
*/
|
||||
|
||||
//- Model `a' coefficient
|
||||
dimensionedScalar a_;
|
||||
|
||||
//- Model `b' coefficient
|
||||
dimensionedScalar b_;
|
||||
|
||||
//- Model `c' coefficient
|
||||
dimensionedScalar c_;
|
||||
|
||||
//- Model `d' coefficient
|
||||
dimensionedScalar d_;
|
||||
|
||||
//- Limiting viscosity when lambda = 1
|
||||
dimensionedScalar mu0_;
|
||||
|
||||
//- Limiting viscosity when lambda = 0
|
||||
dimensionedScalar muInf_;
|
||||
|
||||
//- Model coeffiicient
|
||||
dimensionedScalar K_;
|
||||
|
||||
//- Structural parameter
|
||||
// 0 = freestream value (most liquid)
|
||||
// 1 = fully built (most solid)
|
||||
volScalarField lambda_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Update the viscosity
|
||||
void updateMu();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("thixotropic");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model
|
||||
thixotropicViscosity
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict,
|
||||
volScalarField& mu
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~thixotropicViscosity();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Correct
|
||||
virtual void correct
|
||||
(
|
||||
const volScalarField& p,
|
||||
const volScalarField& T
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,137 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "solidification.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "thermoSingleLayer.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(solidification, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
phaseChangeModel,
|
||||
solidification,
|
||||
dictionary
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
solidification::solidification
|
||||
(
|
||||
const surfaceFilmModel& owner,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
phaseChangeModel(typeName, owner, dict),
|
||||
T0_(readScalar(coeffs_.lookup("T0"))),
|
||||
L_(readScalar(coeffs_.lookup("L"))),
|
||||
alpha_(readScalar(coeffs_.lookup("alpha"))),
|
||||
mass_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ":mass",
|
||||
owner.regionMesh().time().timeName(),
|
||||
owner.regionMesh(),
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
owner.regionMesh(),
|
||||
dimensionedScalar("zero", dimMass, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
),
|
||||
thickness_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ":thickness",
|
||||
owner.regionMesh().time().timeName(),
|
||||
owner.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
owner.regionMesh(),
|
||||
dimensionedScalar("zero", dimLength, 0.0),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
solidification::~solidification()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void solidification::correctModel
|
||||
(
|
||||
const scalar dt,
|
||||
scalarField& availableMass,
|
||||
scalarField& dMass,
|
||||
scalarField& dEnergy
|
||||
)
|
||||
{
|
||||
const thermoSingleLayer& film = filmType<thermoSingleLayer>();
|
||||
|
||||
const scalarField& T = film.T();
|
||||
const scalarField& alpha = film.alpha();
|
||||
|
||||
forAll(alpha, cellI)
|
||||
{
|
||||
if (alpha[cellI] > 0.5)
|
||||
{
|
||||
if (T[cellI] > T0_)
|
||||
{
|
||||
mass_[cellI] += alpha_*availableMass[cellI];
|
||||
dMass[cellI] += alpha_*availableMass[cellI];
|
||||
dEnergy[cellI] += alpha_*availableMass[cellI]*L_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
thickness_ = mass_/film.magSf()/film.rho();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,130 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::solidification
|
||||
|
||||
Description
|
||||
Solidification phase change model where all film mass is converted when
|
||||
the local temperature > activation temperature.
|
||||
|
||||
SourceFiles
|
||||
solidification.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef solidification_H
|
||||
#define solidification_H
|
||||
|
||||
#include "phaseChangeModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace regionModels
|
||||
{
|
||||
namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class solidification Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class solidification
|
||||
:
|
||||
public phaseChangeModel
|
||||
{
|
||||
private:
|
||||
|
||||
// Private member functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
solidification(const solidification&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const solidification&);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
//- Temperature at which solidification starts
|
||||
scalar T0_;
|
||||
|
||||
//- Latent heat of solidification [J/kg]
|
||||
scalar L_;
|
||||
|
||||
//- Under-relaxation parameter for solidification process (0-1)
|
||||
scalar alpha_;
|
||||
|
||||
//- Accumulated solid mass [kg]
|
||||
volScalarField mass_;
|
||||
|
||||
//- Accumulated solid thickness [m]
|
||||
volScalarField thickness_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("solidification");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from surface film model
|
||||
solidification(const surfaceFilmModel& owner, const dictionary& dict);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~solidification();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Correct
|
||||
virtual void correctModel
|
||||
(
|
||||
const scalar dt,
|
||||
scalarField& availableMass,
|
||||
scalarField& dMass,
|
||||
scalarField& dEnergy
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
} // End namespace regionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -97,13 +97,12 @@ void standardPhaseChange::correctModel
|
||||
scalarField& dEnergy
|
||||
)
|
||||
{
|
||||
const thermoSingleLayer& film = refCast<const thermoSingleLayer>(owner_);
|
||||
const thermoSingleLayer& film = filmType<thermoSingleLayer>();
|
||||
|
||||
// set local thermo properties
|
||||
const SLGThermo& thermo = film.thermo();
|
||||
const label liqId = film.liquidId();
|
||||
const liquidProperties& liq = thermo.liquids().properties()[liqId];
|
||||
const label vapId = thermo.carrierId(thermo.liquids().components()[liqId]);
|
||||
const filmThermoModel& filmThermo = film.filmThermo();
|
||||
const label vapId = thermo.carrierId(filmThermo.name());
|
||||
|
||||
// retrieve fields from film model
|
||||
const scalarField& delta = film.delta();
|
||||
@ -128,22 +127,22 @@ void standardPhaseChange::correctModel
|
||||
const scalar pc = pInf[cellI];
|
||||
|
||||
// calculate the boiling temperature
|
||||
const scalar Tb = liq.pvInvert(pc);
|
||||
const scalar Tb = filmThermo.Tb(pc);
|
||||
|
||||
// local temperature - impose lower limit of 200 K for stability
|
||||
const scalar Tloc = min(TbFactor_*Tb, max(200.0, T[cellI]));
|
||||
|
||||
// saturation pressure [Pa]
|
||||
const scalar pSat = liq.pv(pc, Tloc);
|
||||
const scalar pSat = filmThermo.pv(pc, Tloc);
|
||||
|
||||
// latent heat [J/kg]
|
||||
const scalar hVap = liq.hl(pc, Tloc);
|
||||
const scalar hVap = filmThermo.hl(pc, Tloc);
|
||||
|
||||
// calculate mass transfer
|
||||
if (pSat >= 0.95*pc)
|
||||
{
|
||||
// boiling
|
||||
const scalar Cp = liq.Cp(pc, Tloc);
|
||||
const scalar Cp = filmThermo.Cp(pc, Tloc);
|
||||
const scalar Tcorr = max(0.0, T[cellI] - Tb);
|
||||
const scalar qCorr = limMass[cellI]*Cp*(Tcorr);
|
||||
dMass[cellI] = qCorr/hVap;
|
||||
@ -163,13 +162,13 @@ void standardPhaseChange::correctModel
|
||||
const scalar Wvap = thermo.carrier().W(vapId);
|
||||
|
||||
// molecular weight of liquid [kg/kmol]
|
||||
const scalar Wliq = liq.W();
|
||||
const scalar Wliq = filmThermo.W();
|
||||
|
||||
// vapour mass fraction at interface
|
||||
const scalar Ys = Wliq*pSat/(Wliq*pSat + Wvap*(pc - pSat));
|
||||
|
||||
// vapour diffusivity [m2/s]
|
||||
const scalar Dab = liq.D(pc, Tloc);
|
||||
const scalar Dab = filmThermo.D(pc, Tloc);
|
||||
|
||||
// Schmidt number
|
||||
const scalar Sc = muInfc/(rhoInfc*(Dab + ROOTVSMALL));
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,30 +26,6 @@ License
|
||||
#include "surfaceFilmModel.H"
|
||||
#include "fvMesh.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
template<>
|
||||
const char* NamedEnum
|
||||
<
|
||||
regionModels::surfaceFilmModels::surfaceFilmModel::thermoModelType,
|
||||
2
|
||||
>::names[] =
|
||||
{
|
||||
"constant",
|
||||
"singleComponent"
|
||||
};
|
||||
}
|
||||
|
||||
const Foam::NamedEnum
|
||||
<
|
||||
Foam::regionModels::surfaceFilmModels::surfaceFilmModel::thermoModelType,
|
||||
2
|
||||
>
|
||||
Foam::regionModels::surfaceFilmModels::surfaceFilmModel::thermoModelTypeNames_;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -70,8 +46,6 @@ bool surfaceFilmModel::read()
|
||||
{
|
||||
if (singleLayerRegion::read())
|
||||
{
|
||||
thermoModel_ =
|
||||
thermoModelTypeNames_.read(coeffs_.lookup("thermoModel"));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@ -91,8 +65,7 @@ surfaceFilmModel::surfaceFilmModel
|
||||
)
|
||||
:
|
||||
singleLayerRegion(mesh, "surfaceFilm", modelType),
|
||||
g_(g),
|
||||
thermoModel_(tmConstant)
|
||||
g_(g)
|
||||
{
|
||||
if (active_)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -63,20 +63,6 @@ class surfaceFilmModel
|
||||
:
|
||||
public singleLayerRegion
|
||||
{
|
||||
public:
|
||||
|
||||
// Data types
|
||||
|
||||
//- Enumeration listing the possible thermo types
|
||||
enum thermoModelType
|
||||
{
|
||||
tmConstant,
|
||||
tmSingleComponent
|
||||
};
|
||||
|
||||
//- Named enumeration for the thermoType
|
||||
static const NamedEnum<thermoModelType, 2> thermoModelTypeNames_;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@ -97,9 +83,6 @@ protected:
|
||||
//- Acceleration due to gravity [m/s2]
|
||||
const dimensionedVector& g_;
|
||||
|
||||
//- Thermo type
|
||||
thermoModelType thermoModel_;
|
||||
|
||||
|
||||
// Protected member functions
|
||||
|
||||
@ -160,9 +143,6 @@ public:
|
||||
//- Return the accleration due to gravity
|
||||
inline const dimensionedVector& g() const;
|
||||
|
||||
//- Return the thermo type
|
||||
inline const thermoModelType& thermoModel() const;
|
||||
|
||||
//- External hook to add sources to the film
|
||||
virtual void addSources
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,13 +42,6 @@ inline const Foam::dimensionedVector& surfaceFilmModel::g() const
|
||||
}
|
||||
|
||||
|
||||
inline const surfaceFilmModel::thermoModelType&
|
||||
surfaceFilmModel::thermoModel() const
|
||||
{
|
||||
return thermoModel_;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace surfaceFilmModels
|
||||
|
||||
@ -33,6 +33,8 @@ License
|
||||
#include "mapDistribute.H"
|
||||
|
||||
// Sub-models
|
||||
#include "filmThermoModel.H"
|
||||
#include "filmViscosityModel.H"
|
||||
#include "heatTransferModel.H"
|
||||
#include "phaseChangeModel.H"
|
||||
#include "filmRadiationModel.H"
|
||||
@ -59,7 +61,11 @@ wordList thermoSingleLayer::hsBoundaryTypes()
|
||||
wordList bTypes(T_.boundaryField().types());
|
||||
forAll(bTypes, patchI)
|
||||
{
|
||||
if (bTypes[patchI] == mappedFieldFvPatchField<scalar>::typeName)
|
||||
if
|
||||
(
|
||||
T_.boundaryField()[patchI].fixesValue()
|
||||
|| bTypes[patchI] == mappedFieldFvPatchField<scalar>::typeName
|
||||
)
|
||||
{
|
||||
bTypes[patchI] = fixedValueFvPatchField<scalar>::typeName;
|
||||
}
|
||||
@ -93,53 +99,10 @@ void thermoSingleLayer::resetPrimaryRegionSourceTerms()
|
||||
|
||||
void thermoSingleLayer::correctThermoFields()
|
||||
{
|
||||
switch (thermoModel_)
|
||||
{
|
||||
case tmConstant:
|
||||
{
|
||||
const dictionary&
|
||||
constDict(coeffs_.subDict("constantThermoCoeffs"));
|
||||
rho_ == dimensionedScalar(constDict.lookup("rho0"));
|
||||
mu_ == dimensionedScalar(constDict.lookup("mu0"));
|
||||
sigma_ == dimensionedScalar(constDict.lookup("sigma0"));
|
||||
Cp_ == dimensionedScalar(constDict.lookup("Cp0"));
|
||||
kappa_ == dimensionedScalar(constDict.lookup("kappa0"));
|
||||
|
||||
break;
|
||||
}
|
||||
case tmSingleComponent:
|
||||
{
|
||||
const liquidProperties& liq =
|
||||
thermo_.liquids().properties()[liquidId_];
|
||||
|
||||
forAll(rho_, cellI)
|
||||
{
|
||||
const scalar T = T_[cellI];
|
||||
const scalar p = pPrimary_[cellI];
|
||||
rho_[cellI] = liq.rho(p, T);
|
||||
mu_[cellI] = liq.mu(p, T);
|
||||
sigma_[cellI] = liq.sigma(p, T);
|
||||
Cp_[cellI] = liq.Cp(p, T);
|
||||
kappa_[cellI] = liq.K(p, T);
|
||||
}
|
||||
|
||||
rho_.correctBoundaryConditions();
|
||||
mu_.correctBoundaryConditions();
|
||||
sigma_.correctBoundaryConditions();
|
||||
Cp_.correctBoundaryConditions();
|
||||
kappa_.correctBoundaryConditions();
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void thermoSingleLayer::"
|
||||
"correctThermoFields()"
|
||||
) << "Unknown thermoType enumeration" << abort(FatalError);
|
||||
}
|
||||
}
|
||||
rho_ == filmThermo_->rho();
|
||||
sigma_ == filmThermo_->sigma();
|
||||
Cp_ == filmThermo_->Cp();
|
||||
kappa_ == filmThermo_->kappa();
|
||||
}
|
||||
|
||||
|
||||
@ -286,7 +249,7 @@ void thermoSingleLayer::updateSubmodels()
|
||||
rhoSp_ += primaryMassPCTrans_/magSf()/time().deltaT();
|
||||
|
||||
// Vapour recoil pressure
|
||||
pSp_ -= sqr(primaryMassPCTrans_/magSf()/time_.deltaT())/2.0/rhoPrimary_;
|
||||
pSp_ -= sqr(primaryMassPCTrans_/magSf()/time().deltaT())/2.0/rhoPrimary_;
|
||||
}
|
||||
|
||||
|
||||
@ -294,20 +257,22 @@ tmp<fvScalarMatrix> thermoSingleLayer::q(volScalarField& hs) const
|
||||
{
|
||||
dimensionedScalar Tstd("Tstd", dimTemperature, 298.15);
|
||||
|
||||
volScalarField htcst = htcs_->h()();
|
||||
volScalarField htcwt = htcw_->h()();
|
||||
volScalarField htcst(htcs_->h());
|
||||
volScalarField htcwt(htcw_->h());
|
||||
|
||||
forAll(alpha_, i)
|
||||
{
|
||||
htcst[i] *= max(alpha_[i], ROOTVSMALL);
|
||||
htcwt[i] *= max(alpha_[i], ROOTVSMALL);
|
||||
}
|
||||
|
||||
htcst.correctBoundaryConditions();
|
||||
htcwt.correctBoundaryConditions();
|
||||
|
||||
return
|
||||
(
|
||||
- fvm::Sp(htcst/Cp_, hs) - htcst*(Tstd - TPrimary_)
|
||||
- fvm::Sp(htcwt/Cp_, hs) -htcwt*(Tstd - Tw_)
|
||||
- fvm::Sp(htcwt/Cp_, hs) - htcwt*(Tstd - Tw_)
|
||||
);
|
||||
}
|
||||
|
||||
@ -334,6 +299,9 @@ void thermoSingleLayer::solveEnergy()
|
||||
);
|
||||
|
||||
correctThermoFields();
|
||||
|
||||
// evaluate viscosity from user-model
|
||||
viscosity_->correct(pPrimary_, T_);
|
||||
}
|
||||
|
||||
|
||||
@ -349,7 +317,6 @@ thermoSingleLayer::thermoSingleLayer
|
||||
:
|
||||
kinematicSingleLayer(modelType, mesh, g, false),
|
||||
thermo_(mesh.lookupObject<SLGThermo>("SLGThermo")),
|
||||
liquidId_(thermo_.liquidId(coeffs_.lookup("liquid"))),
|
||||
Cp_
|
||||
(
|
||||
IOobject
|
||||
@ -517,6 +484,7 @@ thermoSingleLayer::thermoSingleLayer
|
||||
|
||||
YPrimary_(),
|
||||
|
||||
viscosity_(filmViscosityModel::New(*this, coeffs(), mu_)),
|
||||
htcs_
|
||||
(
|
||||
heatTransferModel::New(*this, coeffs().subDict("upperSurfaceModels"))
|
||||
@ -576,12 +544,18 @@ thermoSingleLayer::thermoSingleLayer
|
||||
if (readFields)
|
||||
{
|
||||
transferPrimaryRegionThermoFields();
|
||||
|
||||
correctAlpha();
|
||||
|
||||
correctThermoFields();
|
||||
|
||||
// Update derived fields
|
||||
hs_ == hs(T_);
|
||||
deltaRho_ == delta_*rho_;
|
||||
phi_ = fvc::interpolate(deltaRho_*U_) & regionMesh().Sf();
|
||||
|
||||
// evaluate viscosity from user-model
|
||||
viscosity_->correct(pPrimary_, T_);
|
||||
}
|
||||
}
|
||||
|
||||
@ -802,8 +776,7 @@ tmp<DimensionedField<scalar, volMesh> > thermoSingleLayer::Srho
|
||||
const label i
|
||||
) const
|
||||
{
|
||||
const label vapId =
|
||||
thermo_.carrierId(thermo_.liquids().components()[liquidId_]);
|
||||
const label vapId = thermo_.carrierId(filmThermo_->name());
|
||||
|
||||
tmp<DimensionedField<scalar, volMesh> > tSrho
|
||||
(
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -52,6 +52,7 @@ namespace surfaceFilmModels
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class filmViscosityModel;
|
||||
class heatTransferModel;
|
||||
class phaseChangeModel;
|
||||
class filmRadiationModel;
|
||||
@ -87,11 +88,6 @@ protected:
|
||||
//- Reference to the SLGThermo
|
||||
const SLGThermo& thermo_;
|
||||
|
||||
// Single component
|
||||
|
||||
//- Id of component in thermo database
|
||||
label liquidId_;
|
||||
|
||||
|
||||
// Fields
|
||||
|
||||
@ -170,6 +166,9 @@ protected:
|
||||
|
||||
// Sub-models
|
||||
|
||||
//- Viscosity model
|
||||
autoPtr<filmViscosityModel> viscosity_;
|
||||
|
||||
//- Heat transfer coefficient bewteen film surface and primary
|
||||
// region [W/m2/K]
|
||||
autoPtr<heatTransferModel> htcs_;
|
||||
@ -261,11 +260,6 @@ public:
|
||||
//- Return const reference to the SLGThermo object
|
||||
inline const SLGThermo& thermo() const;
|
||||
|
||||
// Single component
|
||||
|
||||
//- Return the Id of component in thermo database
|
||||
inline label liquidId() const;
|
||||
|
||||
|
||||
// Fields
|
||||
|
||||
|
||||
@ -24,8 +24,8 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "heatTransferModel.H"
|
||||
#include "filmRadiationModel.H"
|
||||
#include "heatTransferModel.H"
|
||||
#include "phaseChangeModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -45,12 +45,6 @@ inline const SLGThermo& thermoSingleLayer::thermo() const
|
||||
}
|
||||
|
||||
|
||||
inline label thermoSingleLayer::liquidId() const
|
||||
{
|
||||
return liquidId_;
|
||||
}
|
||||
|
||||
|
||||
inline tmp<scalarField> thermoSingleLayer::hs
|
||||
(
|
||||
const scalarField& T,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -91,7 +91,7 @@ public:
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "hePsiThermo.C"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -92,7 +92,7 @@ public:
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "heRhoThermo.C"
|
||||
|
||||
@ -23,10 +23,18 @@ active true;
|
||||
|
||||
thermoSingleLayerCoeffs
|
||||
{
|
||||
thermoModel singleComponent;
|
||||
liquid H2O;
|
||||
filmThermoModel liquid;
|
||||
|
||||
liquidCoeffs
|
||||
{
|
||||
useReferenceValues no;
|
||||
liquid H2O;
|
||||
}
|
||||
|
||||
filmViscosityModel liquid;
|
||||
|
||||
deltaWet 1e-4;
|
||||
|
||||
hydrophilic no;
|
||||
|
||||
turbulence laminar;
|
||||
|
||||
@ -24,11 +24,18 @@ active true;
|
||||
|
||||
thermoSingleLayerCoeffs
|
||||
{
|
||||
thermoModel singleComponent; // constant
|
||||
filmThermoModel liquid;
|
||||
|
||||
liquid H2O;
|
||||
liquidCoeffs
|
||||
{
|
||||
useReferenceValues no;
|
||||
liquid H2O;
|
||||
}
|
||||
|
||||
filmViscosityModel liquid;
|
||||
|
||||
deltaWet 1e-4;
|
||||
|
||||
hydrophilic no;
|
||||
|
||||
radiationModel none;
|
||||
|
||||
@ -23,12 +23,13 @@ active true;
|
||||
|
||||
kinematicSingleLayerCoeffs
|
||||
{
|
||||
thermoModel constant;
|
||||
constantThermoCoeffs
|
||||
filmThermoModel constant;
|
||||
constantCoeffs
|
||||
{
|
||||
rho0 rho0 [1 -3 0 0 0] 1000;
|
||||
mu0 mu0 [1 -1 -1 0 0] 1e-3;
|
||||
sigma0 sigma0 [1 0 -2 0 0] 0.07;
|
||||
specieName water;
|
||||
rho0 1000;
|
||||
mu0 1e-3;
|
||||
sigma0 0.07;
|
||||
}
|
||||
|
||||
injectionModels ();
|
||||
|
||||
@ -23,9 +23,15 @@ active true;
|
||||
|
||||
thermoSingleLayerCoeffs
|
||||
{
|
||||
thermoModel singleComponent;
|
||||
filmThermoModel liquid;
|
||||
|
||||
liquid H2O;
|
||||
liquidCoeffs
|
||||
{
|
||||
useReferenceValues no;
|
||||
liquid H2O;
|
||||
}
|
||||
|
||||
filmViscosityModel liquid;
|
||||
|
||||
deltaWet 1e-4;
|
||||
hydrophilic no;
|
||||
|
||||
Reference in New Issue
Block a user