34 namespace solidBodyMotionFunctions
83 if (!isA<fvMeshMovers::multiValveEngine>(fluidMover))
86 <<
"The " <<
typeName <<
" motion function requires the motion"
87 <<
" solver for the associated fluid region (i.e., "
88 << fluidRegionName_ <<
") to be of type "
94 refCast<const fvMeshMovers::multiValveEngine>(fluidMover);
96 if (valveIndex_ == -1)
100 if (fluidEngineMover.
valves[valvei].name == valveName_)
102 valveIndex_ = valvei;
108 if (valveIndex_ == -1)
113 valveNames[valvei] = fluidEngineMover.
valves[valvei].name;
117 <<
"A valve named '" << valveName_ <<
"' was not found in the "
119 << fluidRegionName_ <<
nl <<
nl
120 <<
"Valid valve names are:" <<
nl << valveNames
127 fluidEngineMover.
valves[valveIndex_].isOpen()
128 ? fluidEngineMover.
valves[valveIndex_].lift()
129 *fluidEngineMover.
valves[valveIndex_].axis
142 fluidRegionName_ = SBMFCoeffs.
lookup<
word>(
"fluidRegion");
144 valveName_ = SBMFCoeffs.
lookup<
word>(
"valve");
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
label size() const
Return the number of elements in the UPtrList.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Abstract base class for fvMesh movers.
A mesh mover using explicit node translation based on scaled distance functions per moving object....
const valveList & valves
Container for all valves.
Mesh data needed to do the Finite Volume discretisation.
const fvMeshMover & mover() const
Return the mover function class.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
Septernion class used to perform translations and rotations in 3D space.
Base class for defining solid-body motions.
virtual bool read(const dictionary &dict)=0
Update properties from given dictionary.
Motion function for solid regions representing a valve. Looks up the multiValveEngine mover from the ...
multiValveEngineValveMotion(const word &name, const dictionary &SBMFCoeffs, const Time &runTime)
Construct from components.
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
virtual ~multiValveEngineValveMotion()
Destructor.
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
addToRunTimeSelectionTable(solidBodyMotionFunction, multiValveEnginePistonMotion, dictionary)
defineTypeNameAndDebug(multiValveEnginePistonMotion, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.