46 pistonLayers_(
"pistonLayers",
dimLength, meshCoeffs_)
60 const scalar deltaZ = pistonDisplacement().value();
61 Info<<
"deltaZ = " << deltaZ <<
endl;
64 const scalar pistonPlusLayers =
65 pistonPosition_.value() + pistonLayers_.value();
71 point&
p = newPoints[pointi];
73 if (
p.z() < pistonPlusLayers)
77 else if (
p.z() < deckHeight_.value())
81 *(deckHeight_.value() -
p.z())
82 /(deckHeight_.value() - pistonPlusLayers);
86 mesh().movePoints(newPoints);
88 pistonPosition_.value() += deltaZ;
89 const scalar pistonSpeed = deltaZ/mesh().time().deltaTValue();
91 Info<<
"clearance: " << deckHeight_.value() - pistonPosition_.value() <<
nl
92 <<
"Piston speed = " << pistonSpeed <<
" m/s" <<
endl;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Abstract base class for fvMesh movers.
Basic mesh motion specifically for engines.
layeredEngine(fvMesh &mesh)
Construct from fvMesh.
~layeredEngine()
Destructor.
virtual void topoChange(const polyTopoChangeMap &)
Update corresponding to the given map.
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual bool update()
Update the mesh for both mesh motion and topology change.
Mesh data needed to do the Finite Volume discretisation.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
defineTypeNameAndDebug(none, 0)
addToRunTimeSelectionTable(fvMeshMover, none, fvMesh)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimLength