2 forAll(valves(), valveI)
4 scalar valveDeltaZ = valves_[valveI].curVelocity()*engTime().deltaT().value() ;
7 if(mag(valves_[valveI].curVelocity()) > 0)
9 Info << "Valve n. " << valveI << " is moving" << endl;
13 if(valves_[valveI].poppetPatchID().active() && valves_[valveI].isOpen())
16 if(valves_[valveI].curLift() > valves_[valveI].deformationLift())
18 const scalarField& movingPointsTop = movingPointsMaskTop(valveI);
22 List<bool> valveTopPoint(newPoints.size(), false);
24 labelList valveTopPoints;
27 label valveTopCellsIndex = cellZones().findZoneID("movingCellsTopV"+ Foam::name(valveI+1));
29 if (valveTopCellsIndex < 0)
31 FatalErrorIn("bool verticalValves::update()")
32 << "movingCellsTopV"+ Foam::name(valveI+1)
36 const labelList& movingCellsTopV = cellZones()[valveTopCellsIndex];
38 const labelListList& cp = cellPoints();
40 boolList count(newPoints.size(), false);
42 forAll (movingCellsTopV, cellI)
44 const labelList& curCellPoints = cp[movingCellsTopV[cellI]];
46 forAll (curCellPoints, i)
48 count[curCellPoints[i]] = true;
54 forAll (count, pointI)
56 if (count[pointI] == true)
62 valveTopPoints.setSize(nCounted);
66 forAll (count, pointI)
68 if (count[pointI] == true)
70 valveTopPoints[nCounted] = pointI;
78 // label valveTopPtsIndex = pointZones().findZoneID("valveTopPointsV"+ Foam::name(valveI+1));
79 // const labelList& valveTopPoints = pointZones()[valveTopPtsIndex];
81 forAll(valveTopPoints, i)
83 label pointI = valveTopPoints[i];
84 valveTopPoint[pointI] = true;
88 forAll(valveTopPoints, i)
90 point& p = newPoints[valveTopPoints[i]];
92 (valves_[valveI].cs().axis().z()/mag(valves_[valveI].cs().axis()))*
93 movingPointsTop[valveTopPoints[i]];
98 deleteDemandDrivenData(movingPointsMaskTopPtr_);
102 poppetDeformation = true;
107 Info << "Valve " << valveI << " is CLOSED!!!" << endl;