57 bool nbrModelFound =
false;
61 if (fvOptions[i].
name() == nbrModelName_)
65 refCast<const interRegionHeatTransferModel>(fvOptions[i])
75 <<
"Neighbour model not found" << nbrModelName_
76 <<
" in region " << nbrMesh.
name() <<
nl 83 nbrModel_->setNbrModel();
91 if (mesh_.time().timeIndex() != timeIndex_)
94 timeIndex_ = mesh_.time().timeIndex();
110 const word& modelType,
122 nbrModelName_(coeffs_.lookup(
"nbrModel")),
142 zeroGradientFvPatchScalarField::typeName
144 semiImplicit_(
false),
145 TName_(coeffs_.lookupOrDefault<
word>(
"T",
"T")),
146 TNbrName_(coeffs_.lookupOrDefault<
word>(
"TNbr",
"T"))
150 coeffs_.lookup(
"fields") >> fieldNames_;
151 applied_.setSize(fieldNames_.size(),
false);
153 coeffs_.lookup(
"semiImplicit") >> semiImplicit_;
196 Info<<
"Volumetric integral of htc: " 200 if (mesh_.time().writeTime())
218 eqn += htc_*(Tmapped -
T) + htcByCpv*he -
fvm::Sp(htcByCpv, he);
225 Info<<
"Energy exchange from region " << nbrMesh.
name()
226 <<
" To " << mesh_.name() <<
" : " << energy.
value()
233 <<
" on mesh " << mesh_.name()
234 <<
" could not find object basicThermo." 235 <<
" The available objects are: " 242 eqn += htc_*Tmapped -
fvm::Sp(htc_, he);
247 eqn += htc_*(Tmapped -
T);
defineTypeNameAndDebug(option, 0)
#define forAll(list, i)
Loop across all elements in list.
Base class for inter region heat exchange. The derived classes must provide the heat transfer coeffic...
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void setNbrModel()
Set the neighbour interRegionHeatTransferModel.
Abstract base-class for fluid and solid thermodynamic properties.
Base class for inter-region exchange.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
interRegionHeatTransferModel(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from dictionary.
bool interpolate(const vector &p1, const vector &p2, const vector &o, vector &n, scalar l)
const GeometricField< Type, fvPatchField, volMesh > & psi() const
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
rhoReactionThermo & thermo
const Time & time() const
Return the top-level database.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
virtual tmp< volScalarField > Cpv() const =0
Heat capacity at constant pressure/volume [J/kg/K].
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
Source term to energy equation.
const word dictName() const
Return the local dictionary name (final part of scoped name)
const dimensionSet dimVolume(pow3(dimLength))
const dimensionSet & dimensions() const
Return dimensions.
void correct()
Correct to calculate the inter-region heat transfer coefficient.
A class for handling words, derived from string.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
const Type & value() const
Return const reference to value.
Volume integrate volField creating a volField.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Internal::FieldType & primitiveFieldRef()
Return a reference to the internal field.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-8/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual tmp< volScalarField > Cp() const =0
Heat capacity at constant pressure [J/kg/K].
virtual ~interRegionHeatTransferModel()
Destructor.
word name(const complex &)
Return a string representation of a complex.
const dimensionSet dimEnergy
Internal & ref()
Return a reference to the dimensioned internal field.
const word & name() const
Return reference to name.
Mesh data needed to do the Finite Volume discretisation.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
List of finite volume options.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
virtual bool write(const bool write=true) const
Write using setting from DB.
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Calculate the matrix for implicit and explicit sources.