// Construct from components Foam::engineValveSliding::engineValveSliding ( const IOobject& io ) : engineTopoChangerMesh(io), piston_(*this, engTime().engineDict().subDict("piston")), valves_(*this, engTime().engineDict().lookup("engineValveSliding")), deformSwitch_(readScalar(engTime().engineDict().lookup("deformAngle"))), valveTopTol_(readScalar(engTime().engineDict().lookup("valveTopTol"))), pistonPosition_(-GREAT), deckHeight_(GREAT), minValveZ_(nValves()), poppetValveTol_ ( readScalar(engTime().engineDict().lookup("poppetValveTol")) ), bottomValveTol_ ( readScalar(engTime().engineDict().lookup("bottomValveTol")) ), msPtr_(motionSolver::New(*this)), isReallyClosed_(valves().size(), false), correctPointsMotion_(engTime().engineDict().lookup("correctPointsMotion")) { // Add zones and modifiers if not already there. addZonesAndModifiers(); }
// Construct from components Foam::movingBodyTopoFvMesh::movingBodyTopoFvMesh(const IOobject& io) : topoChangerFvMesh(io), dict_ ( IOdictionary ( IOobject ( "dynamicMeshDict", time().constant(), *this, IOobject::MUST_READ, IOobject::NO_WRITE ) ).subDict(typeName + "Coeffs") ), movingCellsName_(dict_.lookup("movingCells")), frontFacesName_(dict_.lookup("frontFaces")), backFacesName_(dict_.lookup("backFaces")), SBMFPtr_(solidBodyMotionFunction::New(dict_, time())), motionMask_() { addZonesAndModifiers(); motionMask_ = calcMotionMask(); }
// Construct from components Foam::movingConeTopoFvMesh::movingConeTopoFvMesh(const IOobject& io) : topoChangerFvMesh(io), motionDict_ ( IOdictionary ( IOobject ( "dynamicMeshDict", time().constant(), *this, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) ).subDict(typeName + "Coeffs") ), motionVelAmplitude_(motionDict_.lookup("motionVelAmplitude")), motionVelPeriod_(readScalar(motionDict_.lookup("motionVelPeriod"))), curMotionVel_ ( motionVelAmplitude_* Foam::sin(time().value()*M_PI/motionVelPeriod_) ), leftEdge_(readScalar(motionDict_.lookup("leftEdge"))), curLeft_(readScalar(motionDict_.lookup("leftObstacleEdge"))), curRight_(readScalar(motionDict_.lookup("rightObstacleEdge"))) { Pout<< "Initial time:" << time().value() << " Initial curMotionVel_:" << curMotionVel_ << endl; addZonesAndModifiers(); curLeft_ = average ( faceZones() [ faceZones().findZoneID("leftExtrusionFaces") ]().localPoints() ).x() - SMALL; curRight_ = average ( faceZones() [ faceZones().findZoneID("rightExtrusionFaces") ]().localPoints() ).x() + SMALL; motionMask_ = vertexMarkup ( points(), curLeft_, curRight_ ); }
// Construct from components Foam::accordionEngineMesh::accordionEngineMesh ( const IOobject& io ) : engineTopoChangerMesh(io), piston_(*this, engTime().engineDict().subDict("piston")), valves_(*this, engTime().engineDict().lookup("accordionEngineMesh")), deformSwitch_(readScalar(engTime().engineDict().lookup("deformAngle"))), delta_(readScalar(engTime().engineDict().lookup("delta"))), offSet_(readScalar(engTime().engineDict().lookup("offSet"))), pistonPosition_(-GREAT), virtualPistonPosition_(-GREAT), deckHeight_(GREAT), msPtr_(motionSolver::New(*this)), cylinderHeadName_(engTime().engineDict().lookup("cylinderHeadName")), linerName_(engTime().engineDict().lookup("linerName")), pistonAuxPoints_(engTime().engineDict().lookup("pistonAuxPoints")), moveDetach_(engTime().engineDict().lookup("moveDetach")) { // Add zones and modifiers if not already there. addZonesAndModifiers(); }
// Construct from components Foam::twoStrokeEngine::twoStrokeEngine ( const IOobject& io ) : engineTopoChangerMesh(io), piston_(*this, engTime().engineDict().subDict("piston")), scavInPortPatches_(engTime().engineDict().lookup("scavInPortPatches")), scavInCylPatches_(engTime().engineDict().lookup("scavInCylPatches")), headPointsSetName_(engTime().engineDict().lookup("headPointsSetName")), headCellsSetName_(engTime().engineDict().lookup("headCellsSetName")), movingCellSetName_(engTime().engineDict().lookup("movingCellSetName")), movingPointsMaskPtr_(NULL), deformSwitch_(readScalar(engTime().engineDict().lookup("deformAngle"))), pistonPosition_(-GREAT), virtualPistonPosition_(-GREAT), deckHeight_(GREAT), csPtr_ ( coordinateSystem::New ( "coordinateSystem", engTime().engineDict().subDict("coordinateSystem") ) ) { if(scavInPortPatches_.size() != scavInCylPatches_.size()) { FatalErrorIn ( "Foam::twoStrokeEngine::twoStrokeEngine(const IOobject& io)" ) << "The size of the scavenging-cylinder patches is not" << "the same of the scavenging-port patches" << abort(FatalError); } forAll (scavInPortPatches_, patchi) { if(boundaryMesh().findPatchID(scavInPortPatches_[patchi]) == -1) { FatalErrorIn ( "Foam::twoStrokeEngine::twoStrokeEngine(const IOobject& io)" ) << "patch called" << scavInPortPatches_[patchi] << "does not exist" << abort(FatalError); } } forAll (scavInCylPatches_, patchi) { if(boundaryMesh().findPatchID(scavInCylPatches_[patchi]) == -1) { FatalErrorIn ( "Foam::twoStrokeEngine::twoStrokeEngine(const IOobject& io)" ) << "patch called" << scavInCylPatches_[patchi] << "does not exist" << abort(FatalError); } } // Add zones and modifiers if not already there. addZonesAndModifiers(); }