41 freestreamBCPtr_(nullptr)
54 freestreamBCPtr_(nullptr)
89 const freestreamFvPatchField<Type>& ptf,
91 const DimensionedField<Type, volMesh>& iF,
92 const fvPatchFieldMapper& mapper
95 inletOutletFvPatchField<Type>(ptf,
p, iF, mapper),
96 freestreamBCPtr_(nullptr)
98 if (ptf.freestreamBCPtr_)
101 fvPatchField<Type>::New(ptf.freestreamBCPtr_(), p, iF, mapper);
113 freestreamBCPtr_(nullptr)
115 if (ptf.freestreamBCPtr_)
117 freestreamBCPtr_ = ptf.freestreamBCPtr_->clone();
130 freestreamBCPtr_(nullptr)
132 if (ptf.freestreamBCPtr_)
134 freestreamBCPtr_ = ptf.freestreamBCPtr_->clone();
145 if (freestreamBCPtr_)
147 freestreamBCPtr_->autoMap(m);
155 const fvPatchField<Type>& ptf,
163 if (freestreamBCPtr_ && fsptf.freestreamBCPtr_)
165 freestreamBCPtr_->rmap(fsptf.freestreamBCPtr_(), addr);
178 if (freestreamBCPtr_)
180 freestreamBCPtr_->evaluate();
181 freestreamValue() = freestreamBCPtr_();
192 os.writeEntryIfDifferent<word>(
"phi",
"phi", this->phiName_);
194 if (freestreamBCPtr_)
196 os.beginBlock(
"freestreamBC");
197 freestreamBCPtr_->write(
os);
202 freestreamValue().writeEntry(
"freestreamValue",
os);
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
void assign(const entry &e, const label len)
Assign from a primitive dictionary entry with the following behaviour:
@ MUST_READ
Reading required.
@ LAZY_READ
Reading is optional [identical to READ_IF_PRESENT].
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
This boundary condition provides a free-stream condition. It is a 'mixed' condition derived from the ...
const Field< Type > & freestreamValue() const
Same as refValue().
virtual void write(Ostream &) const
Write.
virtual void autoMap(const fvPatchFieldMapper &mapper)
Map (and resize as needed) from self given a mapping object.
freestreamFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual void rmap(const fvPatchField< Type > &ptf, const labelList &addr)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
bool updated() const noexcept
True if the boundary condition has already been updated.
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
static tmp< fvPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, volMesh > &)
Return a pointer to a new patchField created on freestore given.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void operator=(const UList< Type > &)
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a generic outflow condition, with specified inflow for the case of r...
inletOutletFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
word phiName_
Name of flux field.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
List< label > labelList
A List of labels.