// Set valve velociaty forAll (valves(), valveI) { vector valveVel = valves()[valveI].curVelocity()*valves()[valveI].cs().axis(); // If valve is present in geometry, set the motion if (valves()[valveI].stemPatchID().active()) { // Bottom of the valve moves with given velocity U.boundaryField()[valves()[valveI].stemPatchID().index()] == valveVel; } // If valve is present in geometry, set the motion if (valves()[valveI].detachInPortPatchID().active()) { // Bottom of the valve moves with given velocity U.boundaryField()[valves()[valveI].detachInPortPatchID().index()] == vector::zero; U.oldTime().boundaryField()[valves()[valveI].detachInPortPatchID().index()] == vector::zero; } // If valve is present in geometry, set the motion if (valves()[valveI].detachInCylinderPatchID().active()) { // Bottom of the valve moves with given velocity U.boundaryField()[valves()[valveI].detachInCylinderPatchID().index()] == vector::zero; U.oldTime().boundaryField()[valves()[valveI].detachInCylinderPatchID().index()] == vector::zero; } }
// 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(); }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- std::vector<const RimWellPathComponentInterface*> RimWellPathCompletions::allCompletions() const { std::vector<const RimWellPathComponentInterface*> completions; for (const RimWellPathFracture* fracture : fractureCollection()->allFractures()) { completions.push_back(fracture); } for (const RimFishbonesMultipleSubs* fishbones : fishbonesCollection()->allFishbonesSubs()) { completions.push_back(fishbones); } for (const RimPerforationInterval* perforation : perforationCollection()->perforations()) { completions.push_back(perforation); } std::vector<RimWellPathValve*> allValves = valves(); for (const RimWellPathValve* valve : allValves) { completions.push_back(valve); } return completions; }
bool Foam::pistonSliding::realDeformation() const { bool deformationValve = false; forAll(valves(), valveI) { scalar maxLayer = piston().minLayer(); if(valves()[valveI].bottomPatchID().active()) { maxLayer = max(maxLayer, valves()[valveI].minBottomLayer()); } scalar valveDisplacement = valves_[valveI].curVelocity()*valves_[valveI].cs().axis().z()*engTime().deltaT().value() ; if(valvePistonPosition()[valveI] + engTime().pistonDisplacement().value() > valveBottomPosition_[valveI] + valveDisplacement - 5.0*maxLayer - 0.001 ) { deformationValve = true; } }