58 const auto&
fvOptions = nbrMesh.lookupObject<optionList>(
"fvOptions");
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),
144 TName_(coeffs_.getOrDefault<
word>(
"T",
"T")),
145 TNbrName_(coeffs_.getOrDefault<
word>(
"TNbr",
"T"))
177 auto& Tmapped = tTmapped.
ref();
187 Info<<
"Volumetric integral of htc: " 191 if (mesh_.time().writeTime())
202 const auto* thermoPtr =
207 const basicThermo&
thermo = *thermoPtr;
211 eqn += htc_*(Tmapped -
T) + htcByCpv*
he -
fvm::Sp(htcByCpv,
he);
218 Info<<
"Energy exchange from region " << nbrMesh.name()
219 <<
" To " << mesh_.name() <<
" : " << energy.value()
226 <<
" on mesh " << mesh_.name()
227 <<
" could not find object basicThermo." 228 <<
" The available objects are: " 240 eqn += htc_*(Tmapped -
T);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
word dictName() const
The local dictionary name (final part of scoped name)
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
Intermediate class for handling inter-region heat exchanges.
void setNbrModel()
Set the neighbour interRegionHeatTransferModel.
const word zeroGradientType
A zeroGradient patch field type.
errorManipArg< error, int > exit(error &err, const int errNo=1)
wordList fieldNames_
Field names to apply source to - populated by derived models.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
defineTypeNameAndDebug(atmAmbientTurbSource, 0)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const fvMesh & mesh_
Reference to the mesh database.
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)
word nbrModelName_
Name of the model in the neighbour mesh.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Template invariant parts for fvPatchField.
dimensioned< Type > domainIntegrate(const GeometricField< Type, fvPatchField, volMesh > &vf)
const Time & time() const
Return the top-level database.
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
Source term to energy equation.
#define forAll(list, i)
Loop across all elements in list.
bool firstIter_
Flag to determine the first iteration.
virtual bool read(const dictionary &dict)
Read dictionary.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
psiReactionThermo & thermo
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect...
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const dimensionSet dimVolume(pow3(dimLength))
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
const GeometricField< Type, fvPatchField, volMesh > & psi(const label i=0) const
Return psi.
bool active() const noexcept
True if source is active.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void correct()
Correct to calculate the inter-region heat transfer coefficient.
A class for handling words, derived from Foam::string.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Volume integrate volField creating a volField.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
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.
const word & name() const noexcept
Return const access to the source name.
word nbrRegionName_
Name of the neighbour region to map.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
const Time & time() const noexcept
Return Time associated with the objectRegistry.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
bool semiImplicit_
Flag to activate semi-implicit coupling.
int debug
Static debugging option.
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/chef2/andy/OpenFOAM/release/v2406/OpenFOAM-v2406/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=clamp((rho - rholSat)/(rhovSat - rholSat), zero_one{});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)
const dimensionSet dimEnergy
interRegionHeatTransferModel * nbrModel_
Pointer to neighbour interRegionHeatTransferModel.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef()
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
virtual bool read(const dictionary &dict)
Read source dictionary.
Defines the attributes of an object for which implicit objectRegistry management is supported...
dictionary coeffs_
Dictionary containing source coefficients.
Calculate the finiteVolume matrix for implicit and explicit sources.
static constexpr const zero Zero
Global zero (0)