Go to the documentation of this file.
48 void Foam::linearValveFvMesh::addZonesAndModifiers()
61 <<
"Zones and modifiers already present. Skipping."
68 <<
"Adding zones and modifiers to the mesh" <<
endl;
71 List<pointZone*> pz(1);
74 pz[0] =
new pointZone(
"cutPointZone", 0,
pointZones());
79 List<faceZone*> fz(3);
82 const word innerSliderName
84 motionDict_.
subDict(
"slider").
get<word>(
"inside")
86 const polyPatch& innerSlider =
boundaryMesh()[innerSliderName];
98 const word outerSliderName
100 motionDict_.
subDict(
"slider").
get<word>(
"outside")
102 const polyPatch& outerSlider =
boundaryMesh()[outerSliderName];
114 fz[2] =
new faceZone(
"cutFaceZone", 2,
faceZones());
116 List<cellZone*> cz(0);
118 Info<<
"Adding point, face and cell zones" <<
endl;
122 Info<<
"Adding topology modifiers" <<
endl;
132 outerSliderName +
"Zone",
133 innerSliderName +
"Zone",
149 void Foam::linearValveFvMesh::makeSlidersDead()
151 const polyTopoChanger& topoChanges = topoChanger_;
156 if (isA<slidingInterface>(topoChanges[modI]))
158 topoChanges[modI].disable();
163 <<
"Don't know what to do with mesh modifier "
164 << modI <<
" of type " << topoChanges[modI].type()
171 void Foam::linearValveFvMesh::makeSlidersLive()
173 const polyTopoChanger& topoChanges = topoChanger_;
178 if (isA<slidingInterface>(topoChanges[modI]))
180 topoChanges[modI].enable();
185 <<
"Don't know what to do with mesh modifier "
186 << modI <<
" of type " << topoChanges[modI].type()
193 bool Foam::linearValveFvMesh::attached()
const
195 const polyTopoChanger& topoChanges = topoChanger_;
201 if (isA<slidingInterface>(topoChanges[modI]))
205 || refCast<const slidingInterface>(topoChanges[modI]).attached();
212 if (isA<slidingInterface>(topoChanges[modI]))
217 != refCast<const slidingInterface>(topoChanges[modI]).attached()
222 <<
" named " << topoChanges[modI].name()
223 <<
" out of sync: Should be" << result
231 Info<<
"linearValveFvMesh: attached!" <<
endl;
235 Info<<
"linearValveFvMesh: detached!" <<
endl;
245 Foam::linearValveFvMesh::linearValveFvMesh(
const IOobject& io)
261 ).optionalSubDict(typeName +
"Coeffs")
265 addZonesAndModifiers();
282 Info<<
"Decoupling sliding interfaces" <<
endl;
290 msPtr_->updateMesh();
294 Info<<
"Sliding interfaces decoupled" <<
endl;
302 setMorphTimeIndex(3*time().
timeIndex() + 1);
305 msPtr_->updateMesh();
309 if (topoChangeMap().hasMotionPoints())
311 Info<<
"Topology change; executing pre-motion" <<
endl;
312 movePoints(topoChangeMap().preMotionPoints());
319 movePoints(msPtr_->curPoints());
322 Info<<
"Coupling sliding interfaces" <<
endl;
325 setMorphTimeIndex(3*time().
timeIndex() + 2);
328 Info<<
"Moving points post slider attach" <<
endl;
330 msPtr_->updateMesh();
332 Info<<
"Sliding interfaces coupled: " << attached() <<
endl;
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
label size() const noexcept
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual bool write(const bool valid=true) const
static word timeName(const scalar t, const int precision=precision_)
const polyBoundaryMesh & boundaryMesh() const
Ostream & endl(Ostream &os)
const T * set(const label i) const
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
writeOption writeOpt() const noexcept
const cellZoneMesh & cellZones() const noexcept
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
void setSize(const label newLen)
const faceZoneMesh & faceZones() const noexcept
Macros for easy insertion into run-time selection tables.
virtual ~linearValveFvMesh()
errorManip< error > abort(error &err)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
#define FatalErrorInFunction
Virtual base class for mesh motion solver.
Abstract base class for a topology changing fvMesh.
labelList identity(const label len, label start=0)
const pointZoneMesh & pointZones() const noexcept
const Time & time() const
constant condensation/saturation model.
defineTypeNameAndDebug(combustionModel, 0)
void addZones(const List< pointZone * > &pz, const List< faceZone * > &fz, const List< cellZone * > &cz)
polyTopoChanger topoChanger_