2 label constraintSize = 0;
8 valves_[valveI].curVelocity()*valves_[valveI].cs().axis();
10 scalar valveDeltaZ = valves_[valveI].curVelocity()*
11 valves_[valveI].cs().axis().z()*engTime().deltaT().value() ;
13 if(valves_[valveI].curLift() > valves_[valveI].deformationLift())
17 if(mag(valves_[valveI].curVelocity()) > 0)
19 Info<< "Valve n. " << valveI << " is moving with velocity = "
20 << valves_[valveI].curVelocity() << endl;
24 Info<< "Valve displacement for valve " << valveI << " = "
25 << valveDeltaZ << endl;
29 valves_[valveI].poppetPatchID().active()
30 && valves_[valveI].isOpen()
33 List<bool> valveTopPoint(newPoints.size(), false);
35 // const scalarField& movingPointsTop =
36 // movingPointsMaskTop(valveI);
38 label layeringVPtsIndex =
39 pointZones().findZoneID
41 "movingPointsTopZoneV"
42 + Foam::name(valveI+1)
45 const labelList& layeringVPoints =
46 pointZones()[layeringVPtsIndex];
48 forAll(layeringVPoints, i)
50 point& p = newPoints[layeringVPoints[i]];
52 (valves_[valveI].cs().axis().z()/
53 mag(valves_[valveI].cs().axis()));
55 valveTopPoint[layeringVPoints[i]] = true;
58 label movingTopPtsVIndex =
59 pointZones().findZoneID
62 + Foam::name(valveI+1)
65 const labelList& movingTopPointsV =
66 pointZones()[movingTopPtsVIndex];
68 forAll(movingTopPointsV, i)
70 if(!valveTopPoint[movingTopPointsV[i]])
73 point& p = newPoints[movingTopPointsV[i]];
75 (valves_[valveI].cs().axis().z()/
76 mag(valves_[valveI].cs().axis()));
80 deleteDemandDrivenData(movingPointsMaskTopPtr_);
84 Info << "Valve " << valveI << " is CLOSED!!!" << endl;
89 label movingPtsIndex =
90 pointZones().findZoneID
93 + Foam::name(valveI + 1)
96 const labelList& movingPointsV = pointZones()[movingPtsIndex];
98 forAll(movingPointsV, mpI)
100 constrainedPoints.append(movingPointsV[mpI]);
101 constrainedVelocity.append(valveVel);
109 if (valves_[valveI].bottomPatchID().active())
111 const scalarField& movingPointsBottom =
112 movingPointsMaskBottom(valveI);
115 List<bool> valveBottomPoint(newPoints.size(), false);
117 label valveBottomPtsIndex =
118 pointZones().findZoneID
120 "movingPointsBottomZoneV"
121 + Foam::name(valveI+1)
124 const labelList& valveBottomPoints =
125 pointZones()[valveBottomPtsIndex];
127 forAll(valveBottomPoints, i)
129 point& p = newPoints[valveBottomPoints[i]];
130 p.z() += valveDeltaZ*
131 (valves_[valveI].cs().axis().z()/
132 mag(valves_[valveI].cs().axis()));
137 deleteDemandDrivenData(movingPointsMaskBottomPtr_);