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")),
143 zeroGradientFvPatchScalarField::typeName
145 semiImplicit_(
false),
146 TName_(coeffs_.lookupOrDefault<
word>(
"T",
"T")),
147 TNbrName_(coeffs_.lookupOrDefault<
word>(
"TNbr",
"T"))
151 coeffs_.lookup(
"fields") >> fieldNames_;
152 applied_.setSize(fieldNames_.size(),
false);
154 coeffs_.lookup(
"semiImplicit") >> semiImplicit_;
188 mesh_.time().timeName(),
208 Info<<
"Volumetric integral of htc: " 212 if (mesh_.time().writeTime())
230 eqn += htc_*(Tmapped -
T) + htcByCpv*he -
fvm::Sp(htcByCpv, he);
237 Info<<
"Energy exchange from region " << nbrMesh.
name()
238 <<
" To " << mesh_.name() <<
" : " << energy.
value()
245 <<
" on mesh " << mesh_.name()
246 <<
" could not find object basicThermo." 247 <<
" The available objects are: " 254 eqn += htc_*Tmapped -
fvm::Sp(htc_, he);
259 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 coeffis...
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
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.
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(psi *p+alphal *rhol0+((alphav *psiv+alphal *psil) - psi) *pSat, rhoMin);# 1 "/home/ubuntu/OpenFOAM-6/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.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
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.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual Ostream & write(const token &)=0
Write next token to stream.
List of finite volume options.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
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.