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 template<
class ... Args>
121 << why <<
" two-resistance heat transfer models found that "
122 <<
"provide a heat transfer coefficient between phases "
130 auto iter = sidedModels_.find(interface);
132 if (iter != sidedModels_.end())
138 iter()->KinThe(phase1,
args ...),
139 iter()->KinThe(phase2,
args ...)
148 if (!isA<fv::twoResistanceHeatTransfer>(
fvModels[i]))
continue;
151 refCast<const fv::twoResistanceHeatTransfer>(
fvModels[i]);
154 heatTransferFvModel.Ks(phase1, phase2,
args ...);
156 if (!Hs.
first().valid() || !Hs.
second().valid())
continue;
187 && !fluid_.
found(modelName<heatTransferModel>())
193 generateBlendedInterfacialModels<blendedHeatTransferModel>
206 generateBlendedInterfacialModels<blendedSidedHeatTransferModel>
219 if (sidedModels_.
found(modelIter.key()))
224 <<
"One-resistance and two-resistance heat transfer models "
225 <<
"both specified between phases "
247 return Hs<>(phase1, phase2);
255 const scalar residualAlpha
258 return Hs<scalar>(phase1, phase2, residualAlpha);
271 forAll(fluid_.phases(), phasei)
273 const phaseModel& phase = fluid_.phases()[phasei];
291 const phaseModel& otherPhase = iter.otherPhase();
299 /
max(iter.otherPhase(), iter.otherPhase().residualAlpha())
303 *eqns[phase.
name()] +=
305 + Hstabilised/Cpv*
he -
fvm::Sp(Hstabilised/Cpv,
he);
315 sidedModelIter()->KinThe(interface.
phase1()),
316 sidedModelIter()->KinThe(interface.
phase2())
327 const phaseModel& otherPhase = iter.otherPhase();
334 *eqns[phase.
name()] +=
#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.
Generic GeometricField class.
void transfer(HashTable< T, Key, Hash > &)
Transfer the contents of the argument table into this table.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
bool found(const Key &) const
Return true if hashedEntry is found in table.
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...
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.
static autoPtr< dictionary > New(Istream &)
Construct top-level dictionary on freestore from Istream.
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.
virtual bool read()
Read object.
A class for managing temporary objects.
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)
const dimensionSet dimEnergy
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimTime
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
HashSet wordHashSet
A HashSet with word keys.
Foam::argList args(argc, argv)