60 bool nbrModelFound =
false;
68 refCast<const interRegionHeatTransferModel>(
fvOptions[i])
79 <<
" in region " << nbrMesh.name() <<
nl
94 if (mesh_.time().timeIndex() != timeIndex_)
97 timeIndex_ = mesh_.time().timeIndex();
102 nbrModel().correct();
113 const word& modelType,
125 nbrModelName_(coeffs_.get<
word>(
"nbrModel")),
128 semiImplicit_(false),
142 zeroGradientFvPatchScalarField::typeName
144 TName_(coeffs_.getOrDefault<
word>(
"T",
"T")),
145 TNbrName_(coeffs_.getOrDefault<
word>(
"TNbr",
"T"))
177 mesh_.time().timeName(),
185 auto& Tmapped = tTmapped.
ref();
195 Info<<
"Volumetric integral of htc: "
199 if (mesh_.time().writeTime())
210 const auto* thermoPtr =
219 eqn += htc_*(Tmapped -
T) + htcByCpv*
he -
fvm::Sp(htcByCpv,
he);
226 Info<<
"Energy exchange from region " << nbrMesh.name()
227 <<
" To " << mesh_.name() <<
" : " << energy.
value()
234 <<
" on mesh " << mesh_.name()
235 <<
" could not find object basicThermo."
236 <<
" The available objects are: "
248 eqn += htc_*(Tmapped -
T);
Internal & ref(const bool updateAccessTime=true)
Return a reference to the dimensioned internal field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const
Return Time associated with the objectRegistry.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
virtual bool read()
Re-read model coefficients if they have changed.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Abstract base-class for fluid and solid thermodynamic properties.
static const word dictName
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
const Type & value() const
Return const reference to value.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
const GeometricField< Type, fvPatchField, volMesh > & psi(const label i=0) const
Return psi.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
Intermediate class for handling inter-region heat exchanges.
void correct()
Correct to calculate the inter-region heat transfer coefficient.
void setNbrModel()
Set the neighbour interRegionHeatTransferModel.
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
Source term to energy equation.
word nbrModelName_
Name of the model in the neighbour mesh.
interRegionHeatTransferModel * nbrModel_
Pointer to neighbour interRegionHeatTransferModel.
bool semiImplicit_
Flag to activate semi-implicit coupling.
bool firstIter_
Flag to determine the first iteration.
Intermediate class for handling inter-region exchanges.
word nbrRegionName_
Name of the neighbour region to map.
List of finite volume options.
const word & name() const noexcept
Return const access to the source name.
const fvMesh & mesh_
Reference to the mesh database.
wordList fieldNames_
Field names to apply source to - populated by derived models.
bool active() const noexcept
True if source is active.
dictionary coeffs_
Dictionary containing source coefficients.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const Type & lookupObject(const word &name, const bool recursive=false) const
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Volume integrate volField creating a volField.
Calculate the finiteVolume matrix for implicit and explicit sources.
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
const dimensionSet dimEnergy
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
static constexpr const zero Zero
Global zero (0)
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
const dimensionSet dimVolume(pow3(dimLength))
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.