General

General

How to create moving clip planes in EnSight

    • SolutionSolution
      Participant

      In the context of an In Cylinder model, it is often useful to have a clip through the cylinder which moves with the piston motion. In the simplest form, you want a clip which is half way between the top of the combustion dome and the piston surface. You can then maintain at a position relative to the top and bottom (eg 25%, or 50% of cylinder height). A similar operation can be done to maintain a fixed distance from some moving reference geometry. (eg 5 mm above piston at all times). The attached video, Single Moving Clip Relative to Cylinder Height.mp4 illustrates a clip which maintains itself at 1/2 cylinder height throughout the cycle. It is in essence at a location half way between the piston and combustion dome. You can easily create additional clips at different locations (instead of 50%, create multiple clips at 20%, 40%, 60%, 80% of cylinder height using the same method) as shown in: Multiple Moving Clip Planes Relative to Cylinder Height.mp4 Using a very similar approach, you can maintain a fixed distance (instead of relative to cylinder height as shown above). In this method, you use a single reference geometry, and specify that the clip is at some fixed distance relative to the reference moving geometry as shown in: Clip Planes offset at fixed distance from moving object.mp4 So, how would you go about creating such clip planes in EnSight? The method here presented uses the fact that a clip plane can be considered an IsoSurface of a Coordinate location. For the creation of Clips relative to Cylinder Height (as a % of Cylinder Height): Step 1: Select the Fluid parent corresponding to the cylinder Step 2: Calculate the component in the cylinder movement direction (this case Z): CoordZ = Coordinates[Z] Step 3: Calculate a Min and Max value of CoordZ: MinZ = Min(plist,CoordZ) MaxZ = Max(plist,CoordZ) Step 4: Calculate a new Normalized Z coordinate: Normalized_Z = (CoordZ – MinZ)/(MaxZ-MinZ) Step 5: Create an isosurface of Normalized_Z. A value of 0.5 will always remain ½ way between top and bottom of fluid domain. Multiple isosurfaces with initial value of 0.2, 4 values, with offset = 0.2 will yield 4 surfaces at 20%, 40%, 60%, 80% of cylinder volume height. For the creation of Clips Offset from the Piston (fixed location relative to reference): Step 1: Select the Fluid parent corresponding to the cylinder Step 2: Calculate the component in the cylinder movement direction (this case Z): CoordZ = Coordinates[Z] Step 3: Selecting just the Piston, calculate a Max value of CoordZ: MaxZ_cylinder = Max(plist,CoordZ) Step 4: Calculate a new Relative Z coordinate : Relative_Z = (CoordZ – MaxZ) Step 5: Create an isosurface of Relative_Z. This can be specified in model units (for example in this model, a value of 5e-3 will be 5 mm above piston

      Attachments:
      1. 2060054.zip