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