2 // currently unused - commented out below
3 // label constraintSize = 0;
7 // currently unused - commented out below
9 // valves_[valveI].curVelocity()*valves_[valveI].cs().axis();
11 scalar valveDeltaZ = valves_[valveI].curVelocity()*
12 valves_[valveI].cs().axis().z()*engTime().deltaT().value() ;
14 if(valves_[valveI].curLift() > valves_[valveI].deformationLift())
16 if(mag(valves_[valveI].curVelocity()) > 0)
18 Info<< "Valve n. " << valveI << " is moving with velocity = "
19 << valves_[valveI].curVelocity() << endl;
22 Info<< "Valve displacement for valve " << valveI << " = "
23 << valveDeltaZ << endl;
27 valves_[valveI].poppetPatchID().active()
28 && valves_[valveI].isOpen()
31 List<bool> valveTopPoint(newPoints.size(), false);
33 // const scalarField& movingPointsTop =
34 // movingPointsMaskTop(valveI);
36 label layeringVPtsIndex =
37 pointZones().findZoneID
39 "movingPointsTopZoneV"
40 + Foam::name(valveI+1)
43 const labelList& layeringVPoints =
44 pointZones()[layeringVPtsIndex];
46 forAll(layeringVPoints, i)
48 point& p = newPoints[layeringVPoints[i]];
50 (valves_[valveI].cs().axis().z()/
51 mag(valves_[valveI].cs().axis()));
53 valveTopPoint[layeringVPoints[i]] = true;
56 label movingTopPtsVIndex =
57 pointZones().findZoneID
60 + Foam::name(valveI+1)
63 const labelList& movingTopPointsV =
64 pointZones()[movingTopPtsVIndex];
66 forAll(movingTopPointsV, i)
68 if(!valveTopPoint[movingTopPointsV[i]])
71 point& p = newPoints[movingTopPointsV[i]];
73 (valves_[valveI].cs().axis().z()/
74 mag(valves_[valveI].cs().axis()));
78 deleteDemandDrivenData(movingPointsMaskTopPtr_);
82 Info << "Valve " << valveI << " is CLOSED!!!" << endl;
87 label movingPtsIndex =
88 pointZones().findZoneID
91 + Foam::name(valveI + 1)
94 const labelList& movingPointsV = pointZones()[movingPtsIndex];
96 forAll(movingPointsV, mpI)
98 constrainedPoints.append(movingPointsV[mpI]);
99 constrainedVelocity.append(valveVel);
107 if (valves_[valveI].bottomPatchID().active())
110 List<bool> valveBottomPoint(newPoints.size(), false);
112 label valveBottomPtsIndex =
113 pointZones().findZoneID
115 "movingPointsBottomZoneV"
116 + Foam::name(valveI+1)
119 const labelList& valveBottomPoints =
120 pointZones()[valveBottomPtsIndex];
122 forAll(valveBottomPoints, i)
124 point& p = newPoints[valveBottomPoints[i]];
125 p.z() += valveDeltaZ*
126 (valves_[valveI].cs().axis().z()/
127 mag(valves_[valveI].cs().axis()));
132 deleteDemandDrivenData(movingPointsMaskBottomPtr_);