31#include "surfaceInterpolate.H"
47 pistonLayers_(
"pistonLayers",
dimLength, Zero),
51 engineDB_.engineDict()
68 scalar deltaZ = engineDB_.pistonDisplacement().value();
69 Info<<
"deltaZ = " << deltaZ <<
endl;
72 scalar pistonPlusLayers = pistonPosition_.value() + pistonLayers_.value();
74 scalar pistonSpeed = deltaZ/engineDB_.deltaTValue();
76 motionSolver_.pointMotionU().boundaryFieldRef()[pistonIndex_] ==
85 motionSolver_.pointMotionU().boundaryFieldRef()[linerIndex_] ==
86 pistonSpeed*
pos0(deckHeight_.value() - linerPoints)
87 *(deckHeight_.value() - linerPoints)
88 /(deckHeight_.value() - pistonPlusLayers);
91 motionSolver_.solve();
104 bool absolutePhi =
false;
111 movePoints(motionSolver_.curPoints());
120 movePoints(motionSolver_.curPoints());
124 pistonPosition_.value() += deltaZ;
126 Info<<
"clearance: " << deckHeight_.value() - pistonPosition_.value() <<
nl
127 <<
"Piston speed = " << pistonSpeed <<
" m/s" <<
endl;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
const engineTime & engineDB_
const IOdictionary & engineDict() const
Return the engine geometry dictionary.
Foam::fvMotionSolverEngineMesh.
~fvMotionSolverEngineMesh()
Destructor.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Calculate the mesh motion flux and convert fluxes from absolute to relative and back.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
tmp< surfaceScalarField > meshPhi(const volVectorField &U)
dimensionedScalar pos0(const dimensionedScalar &ds)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a)