Fix tutorials: typo in tutorials/viscoelastic/viscoelasticFluidFoam/S-MDCPP/constant...
[OpenFOAM-1.6-ext.git] / src / engine / engineTopoChangerMesh / layerSmooth / setPistonMotionBoundaryConditionLayerSmooth.H
blob1dd9767eef278b55b3fc393ed8bdf73874412fec
1 // use tetrahedral decomposition of the engine mesh
4     tetPointVectorField& motionU = mSolver.motionU();
6     vector pistonVel =
7             piston().cs().axis()*engineTime_.pistonSpeed().value();
9     // Set piston velocity
10     if (piston().patchID().active())
11     {
13         if (debug)
14         {
15             Info << "Piston velocity: " << pistonVel;
16         }
18         componentMixedTetPolyPatchVectorField& pp =
19             refCast<componentMixedTetPolyPatchVectorField>
20             (
21                 motionU.boundaryField()[piston().patchID().index()]
22             );
24         pp.refValue() = pistonVel;
25         
26     }
27     
28     motionU.correctBoundaryConditions();
29