1 // use tetrahedral decomposition of the engine mesh
5 Info << "setting valve motion b.c." << endl;
7 tetPointVectorField& motionU = mSolver.motionU();
10 forAll (valves_, valveI)
13 Info << "Valve n. " << valveI + 1 << " velocity = " << valves_[valveI].curVelocity() << endl;
16 valves_[valveI].curVelocity()*valves_[valveI].cs().axis();
18 // If valve is present in geometry, set the motion
19 if (valves_[valveI].bottomPatchID().active())
21 // Bottom of the valve moves with given velocity
22 motionU.boundaryField()[valves_[valveI].bottomPatchID().index()] ==
27 Info<< "Valve " << valveI << " lift: "
28 << valves_[valveI].curLift()
29 << " velocity: " << valves_[valveI].curVelocity()
34 if (valves_[valveI].poppetPatchID().active())
37 // Top of the valve does not move
38 motionU.boundaryField()[valves_[valveI].poppetPatchID().index()] ==
42 if (valves_[valveI].sidePatchID().active())
44 // Top of the valve does not move
45 motionU.boundaryField()[valves_[valveI].sidePatchID().index()] ==
49 if (valves_[valveI].detachInPortPatchID().active())
51 motionU.boundaryField()[valves_[valveI].detachInPortPatchID().index()] == vector::zero;
54 if (valves_[valveI].detachInCylinderPatchID().active())
56 motionU.boundaryField()[valves_[valveI].detachInCylinderPatchID().index()] == vector::zero;
62 // Setting the boundary position
65 label cylinderHeadIndex = boundaryMesh().findPatchID(cylinderHeadName_);
67 // Top of the valve does not move
68 motionU.boundaryField()[cylinderHeadIndex] ==
72 Info << "valve motion boundary conditions set" << endl;