{"id":167524,"date":"2023-04-13T07:32:42","date_gmt":"2023-04-13T07:32:42","guid":{"rendered":"\/knowledge\/forums\/topic\/how-to-create-moving-clip-planes-in-ensight\/"},"modified":"2023-07-31T12:28:21","modified_gmt":"2023-07-31T12:28:21","slug":"how-to-create-moving-clip-planes-in-ensight","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-create-moving-clip-planes-in-ensight\/","title":{"rendered":"How to create moving clip planes in EnSight"},"content":{"rendered":"<p>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 \u2013 MinZ)\/(MaxZ-MinZ)  Step 5: Create an isosurface of Normalized_Z. A value of 0.5 will always remain \u00bd 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 \u2013 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<\/p>\n<p>Attachments:<br \/>\n1. <a href=https:\/\/ansys13.ansys.com\/KnowledgeArticles\/Phase-2A\/2060054\/2060054.zip>2060054.zip<\/a><\/p>\n","protected":false},"template":"","class_list":["post-167524","topic","type-topic","status-publish","hentry","topic-tag-2019-r2","topic-tag-ensight","topic-tag-fluid-dynamics","topic-tag-visualize-data"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_bbp_last_active_time":["04-13-2023  20:20:01"],"_bbp_forum_id":["27796"],"_bbp_author_ip":["209.182.204.162"],"_btv_view_count":["1352"],"siebel_km_number":["2060054"],"product_version":["2019 R2"],"km_published_date":["2019-07-13T00:00:00.000Z"],"family":["Fluid Dynamics"],"application_name":["Ensight"]},"test":"solution"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/167524","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/167524\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=167524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}