1 Info << "virtualPistonPosition = " << virtualPistonPosition()
2 << ", deckHeight = " << deckHeight() << endl;
4 // Mesh in three parts:
5 // - pistonPoints - move with deltaZ
7 const pointZoneMesh& pZones = pointZones();
8 label pistonPtsIndex = pZones.findZoneID("pistonPoints");
9 const labelList& pistonPoints = pZones[pistonPtsIndex];
12 // Whether point displacement is by scaling
13 boolList scaleDisp(nPoints(), true);
14 label nScaled = nPoints();
15 List<bool> pistonPoint(newPoints.size(), false);
17 forAll(pistonPoints, i)
19 label pointI = pistonPoints[i];
20 pistonPoint[pointI] = true;
21 point& p = newPoints[pointI];
23 if (p.z() < pistonPosition() - 1.0e-6)
25 scaleDisp[pointI] = false;
35 scalar pistonTopZ = -GREAT;
36 forAll(pistonPoints, i)
38 point& p = newPoints[pistonPoints[i]];
40 pistonTopZ = max(pistonTopZ, p.z());
44 // NN! fix. only needed for compression
47 // check if piston-points have moved beyond the layer above
52 if (virtualPistonPosition() > newPoints[i].z())
54 newPoints[i].z() = pistonTopZ + 0.9*minLayerThickness;
61 // movePoints(newPoints);
64 pistonPosition() += deltaZ;
65 scalar pistonSpeed = deltaZ/engTime().deltaT().value();
67 Info<< "clearance: " << deckHeight() - pistonPosition() << nl
68 << "Piston speed = " << pistonSpeed << " m/s" << endl;