51 Foam::IOobject Foam::heatTransferSystem::io(
const phaseSystem& fluid)
const
53 typeIOobject<IOdictionary> result
56 fluid.mesh().time().constant(),
64 if (!result.headerOk())
70 fluid.found(modelName<heatTransferModel>())
71 || !fluid.thermalPhases().empty()
75 <<
"Specifying a heat transfer model entry - "
76 << modelName<heatTransferModel>() <<
" - in "
77 << fluid.relativeObjectPath() <<
" is deprecated. The contents "
78 <<
"of this entry should now be specified in "
79 << result.relativeObjectPath() <<
"." <<
endl;
84 if (fluid.found(modelName<heatTransferModel>()))
87 <<
"Heat transfer model entry - "
88 << modelName<heatTransferModel>() <<
" - in "
89 << fluid.relativeObjectPath() <<
" is no longer used. The "
90 <<
"contents of this entry are now read from "
91 << result.relativeObjectPath() <<
"." <<
endl;
101 const word key = modelName<heatTransferModel>();
105 ? fluid_.subDict(key)
110 void Foam::heatTransferSystem::readModels()
113 generateBlendedInterfacialModels<blendedHeatTransferModel>
122 generateBlendedInterfacialModels<blendedSidedHeatTransferModel>
132 if (sidedModels_.found(modelIter.key()))
134 const phaseInterface interface(fluid_, modelIter.key());
137 <<
"One-resistance and two-resistance heat transfer models "
138 <<
"both specified between phases "
139 << interface.phase1().name() <<
" and "
146 template<
class ... Args>
157 << why <<
" two-resistance heat transfer models found that "
158 <<
"provide a heat transfer coefficient between phases "
166 auto iter = sidedModels_.find(interface);
168 if (iter != sidedModels_.end())
174 iter()->KinThe(phase1,
args ...),
175 iter()->KinThe(phase2,
args ...)
184 if (!isA<fv::twoResistanceHeatTransfer>(
fvModels[i]))
continue;
187 refCast<const fv::twoResistanceHeatTransfer>(
fvModels[i]);
190 heatTransferFvModel.Ks(phase1, phase2,
args ...);
192 if (!Hs.
first().valid() || !Hs.
second().valid())
continue;
223 && !fluid_.
found(modelName<heatTransferModel>())
250 return Hs<>(phase1, phase2);
258 const scalar residualAlpha
261 return Hs<scalar>(phase1, phase2, residualAlpha);
274 forAll(fluid_.phases(), phasei)
276 const phaseModel& phase = fluid_.phases()[phasei];
294 const phaseModel& otherPhase = iter.otherPhase();
302 /
max(iter.otherPhase()(), iter.otherPhase().residualAlpha())
306 eqns[phase.
name()] +=
308 + Hstabilised/Cpv*he -
fvm::Sp(Hstabilised/Cpv, he);
318 sidedModelIter()->KinThe(interface.
phase1()),
319 sidedModelIter()->KinThe(interface.
phase2())
330 const phaseModel& otherPhase = iter.otherPhase();
337 eqns[phase.
name()] +=
339 + H/Cpv*he -
fvm::Sp(H/Cpv, he);
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
static fvModels & New(const word &name, const fvMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
A HashTable specialisation for hashing pointers.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
fileName relativeObjectPath() const
Return complete relativePath + object name.
readOption readOpt() const
An ordered pair of two objects of type <Type> with first() and second() elements.
const Type & second() const
Return second.
const Type & first() const
Return first.
bool empty() const
Return true if the UPtrList is empty (ie, size() is zero)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
void set(T *)
Set pointer to that given.
virtual const volScalarField & T() const =0
Temperature [K].
virtual const volScalarField & Cpv() const =0
Heat capacity at constant pressure/volume [J/kg/K].
virtual const volScalarField & he() const =0
Enthalpy/Internal energy [J/kg].
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Class to handle errors and exceptions in a simple, consistent stream-based manner.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Model for heat transfer between two phases. Two heat transfer coefficients are used to calculate the ...
Class which provides interfacial momentum transfer between a number of phases. Drag,...
static const word propertiesName
Default name of the phase properties dictionary.
heatTransferSystem(const phaseSystem &)
Construct from a phase system.
virtual ~heatTransferSystem()
Destructor.
autoPtr< HashPtrTable< fvScalarMatrix > > heatTransfer() const
Return the heat transfer matrices.
virtual bool read()
Read base phaseProperties dictionary.
Class to represent an interface between phases. Derivations can further specify the configuration of ...
const phaseModel & phase1() const
Return phase 1.
const phaseModel & phase2() const
Return phase 2.
virtual const rhoThermo & thermo() const =0
Return the thermophysical model.
const word & name() const
Return the name of this phase.
Class to represent a system of phases.
const phaseModelPartialList & thermalPhases() const
Return the models for phases that have variable temperature.
Enables the printing of a dictionary and subsequently looked-up defaulted entries.
virtual bool read()
Read object.
A class for managing temporary objects.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Calculate the matrix for implicit and explicit sources.
#define WarningInFunction
Report a warning using Foam::Warning.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const VolField< Type > &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet & dimTime
HashSet wordHashSet
A HashSet with word keys.
Ostream & indentOrNl(Ostream &os)
Indent stream or add newline if indent level == 0.
const dimensionSet & dimEnergy
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
Foam::argList args(argc, argv)