


{"id":292168,"date":"2023-07-09T17:19:53","date_gmt":"2023-07-09T17:19:53","guid":{"rendered":"\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/"},"modified":"2023-07-09T17:19:53","modified_gmt":"2023-07-09T17:19:53","slug":"a-rigid-body-being-moved-by-water-within-a-dynamic-mesh","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/","title":{"rendered":"A rigid body being moved by water within a dynamic mesh."},"content":{"rendered":"<p class=\"MsoNormal\" style=\"margin-left: 0in;text-indent: 0in\">Dear all, I have a cylinder involving a piston being moved by water, as depicted in Figure 1. The water exerts a force on the piston, pushing the water located behind the piston towards the outlet. The mesh employed has an element size of 0.15 mm. I have compiled a User-Defined Function (UDF) in ANSYS Fluent for the properties of water density, water sound speed, and the motion of the piston as a &ldquo;rigid body&rdquo; as in the corresponding TXT File. Most simulation settings are in figures 2 through 9. The time step is 0.001 sec.<br \/>In my attempts to solve this problem, I have explored three different solution methods: SIMPLE, PISO, and Coupled. Unfortunately, all three methods have yielded the same result &ndash; convergence has not been achieved.<br \/>I kindly request assistance from anyone who can identify the errors in my work. Furthermore, I would appreciate guidance on how to correctly implement this simulation.<br \/>Thank you in advance for your support.<\/p>\n<p class=\"MsoNormal\" style=\"margin-left: 0in;text-indent: 0in\">=================================<br \/>TXT File<br \/>=================================<br \/><span style=\"font-size: 10.0pt;line-height: 107%;font-family: 'Courier New'\"><a href=\"https:\/\/community.ansys.com\/?hashtag\/include\/\" target=\"_blank\" rel=\"noopener\">#include<\/a>&nbsp;&#8220;udf.h&#8221;<\/p>\n<p><a href=\"https:\/\/community.ansys.com\/?hashtag\/define\/\" target=\"_blank\" rel=\"noopener\">#define<\/a>&nbsp;Bulk_Modulus 2.2e09<br \/><a href=\"https:\/\/community.ansys.com\/?hashtag\/define\/\" target=\"_blank\" rel=\"noopener\">#define<\/a>&nbsp;rho_ref 997.0<\/p>\n<p>DEFINE_PROPERTY(water_density, c, t)<br \/>{<br \/>real rho;<br \/>real p, dp, p_operating;<\/p>\n<p>p_operating = RP_Get_Real(&#8220;operating-pressure&#8221;);<br \/>p = C_P(c, t);<br \/>dp = p &#8211; p_operating;<br \/>rho = rho_ref \/ (1.0 &#8211; dp \/ Bulk_Modulus);<\/p>\n<p>return rho;<br \/>}<\/p>\n<p>DEFINE_PROPERTY(water_speed_of_sound, c, t)<br \/>{<br \/>real a_soundspeed;<br \/>real p, dp, p_operating;<br \/>p_operating = RP_Get_Real(&#8220;operating-pressure&#8221;);<br \/>p = C_P(c, t);<br \/>dp = p &#8211; p_operating;<br \/>a_soundspeed = (1.0 &#8211; dp \/ Bulk_Modulus)*sqrt(Bulk_Modulus \/ rho_ref);<\/p>\n<p>return a_soundspeed;<br \/>}<\/p>\n<p>DEFINE_SDOF_PROPERTIES(piston_rec, prop, dt, time, dtime)<br \/>{<br \/>prop[SDOF_MASS] = 0.094488;<br \/>prop[SDOF_IXX] = 0.0000291338;<br \/>prop[SDOF_IYY] = 0.000003937;<br \/>prop[SDOF_IZZ] = 0.000031496;<br \/>prop[SDOF_ZERO_TRANS_X] = FALSE;<br \/>prop[SDOF_ZERO_TRANS_Y] = TRUE;<br \/>prop[SDOF_ZERO_TRANS_Z] = TRUE;<br \/>prop[SDOF_ZERO_ROT_X] = TRUE;<br \/>prop[SDOF_ZERO_ROT_Y] = TRUE;<br \/>prop[SDOF_ZERO_ROT_Z] = TRUE;<br \/>}<\/span><img decoding=\"async\" title=\"Figure (1)\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/07\/09-07-2023-1688922779-Figure (1).png\" alt=\"\"><\/p>\n<p class=\"MsoNormal\" style=\"margin-left: 0in;text-indent: 0in\"><img decoding=\"async\" title=\"Figure (5)\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/07\/09-07-2023-1688922879-Figure (5).png\" alt=\"\"> <img decoding=\"async\" title=\"Figure (6)\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/07\/09-07-2023-1688922907-Figure (6).png\" alt=\"\"> <img decoding=\"async\" title=\"Figure (7)\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/07\/09-07-2023-1688922937-Figure (7).png\" alt=\"\">&nbsp;<\/p>\n","protected":false},"template":"","class_list":["post-292168","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Dear all, I have a cylinder involving a piston being moved by water, as depicted in Figure 1. The water exerts a force on the piston, pushing the water located behind the piston towards the outlet. The mesh employed has an element size of 0.15 mm. I have compiled a User-Defined Function (UDF) in ANSYS\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ansys Learning Forum | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"A rigid body being moved by water within a dynamic mesh. | Ansys Learning Forum\" \/>\n\t\t<meta property=\"og:description\" content=\"Dear all, I have a cylinder involving a piston being moved by water, as depicted in Figure 1. The water exerts a force on the piston, pushing the water located behind the piston towards the outlet. The mesh employed has an element size of 0.15 mm. I have compiled a User-Defined Function (UDF) in ANSYS\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2023\/07\/09-07-2023-1688922779-Figure%20(1).png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2023\/07\/09-07-2023-1688922779-Figure%20(1).png\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-07-09T17:19:53+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-07-09T17:19:53+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"A rigid body being moved by water within a dynamic mesh. | Ansys Learning Forum\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Dear all, I have a cylinder involving a piston being moved by water, as depicted in Figure 1. The water exerts a force on the piston, pushing the water located behind the piston towards the outlet. The mesh employed has an element size of 0.15 mm. I have compiled a User-Defined Function (UDF) in ANSYS\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2023\/07\/09-07-2023-1688922779-Figure (1).png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/#listItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\\\/#listItem\",\"name\":\"A rigid body being moved by water within a dynamic mesh.\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\\\/#listItem\",\"position\":3,\"name\":\"A rigid body being moved by water within a dynamic mesh.\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/#listItem\",\"name\":\"Topics\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\\\/\",\"name\":\"A rigid body being moved by water within a dynamic mesh. | Ansys Learning Forum\",\"description\":\"Dear all, I have a cylinder involving a piston being moved by water, as depicted in Figure 1. The water exerts a force on the piston, pushing the water located behind the piston towards the outlet. The mesh employed has an element size of 0.15 mm. I have compiled a User-Defined Function (UDF) in ANSYS\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\\\/#breadcrumblist\"},\"datePublished\":\"2023-07-09T17:19:53+00:00\",\"dateModified\":\"2023-07-09T17:19:53+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"A rigid body being moved by water within a dynamic mesh. | Ansys Learning Forum","description":"Dear all, I have a cylinder involving a piston being moved by water, as depicted in Figure 1. The water exerts a force on the piston, pushing the water located behind the piston towards the outlet. The mesh employed has an element size of 0.15 mm. I have compiled a User-Defined Function (UDF) in ANSYS","canonical_url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/forum","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/topics\/#listItem","position":2,"name":"Topics","item":"https:\/\/innovationspace.ansys.com\/forum\/topics\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/#listItem","name":"A rigid body being moved by water within a dynamic mesh."},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/#listItem","position":3,"name":"A rigid body being moved by water within a dynamic mesh.","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/topics\/#listItem","name":"Topics"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization","name":"Ansys Learning Forum","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/forum\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/#webpage","url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/","name":"A rigid body being moved by water within a dynamic mesh. | Ansys Learning Forum","description":"Dear all, I have a cylinder involving a piston being moved by water, as depicted in Figure 1. The water exerts a force on the piston, pushing the water located behind the piston towards the outlet. The mesh employed has an element size of 0.15 mm. I have compiled a User-Defined Function (UDF) in ANSYS","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/#breadcrumblist"},"datePublished":"2023-07-09T17:19:53+00:00","dateModified":"2023-07-09T17:19:53+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/forum\/#website","url":"https:\/\/innovationspace.ansys.com\/forum\/","name":"Ansys Learning Forum","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Learning Forum | Ansys Innovation Space","og:type":"article","og:title":"A rigid body being moved by water within a dynamic mesh. | Ansys Learning Forum","og:description":"Dear all, I have a cylinder involving a piston being moved by water, as depicted in Figure 1. The water exerts a force on the piston, pushing the water located behind the piston towards the outlet. The mesh employed has an element size of 0.15 mm. I have compiled a User-Defined Function (UDF) in ANSYS","og:url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/","og:image":"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2023\/07\/09-07-2023-1688922779-Figure%20(1).png","og:image:secure_url":"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2023\/07\/09-07-2023-1688922779-Figure%20(1).png","article:published_time":"2023-07-09T17:19:53+00:00","article:modified_time":"2023-07-09T17:19:53+00:00","twitter:card":"summary_large_image","twitter:title":"A rigid body being moved by water within a dynamic mesh. | Ansys Learning Forum","twitter:description":"Dear all, I have a cylinder involving a piston being moved by water, as depicted in Figure 1. The water exerts a force on the piston, pushing the water located behind the piston towards the outlet. The mesh employed has an element size of 0.15 mm. I have compiled a User-Defined Function (UDF) in ANSYS","twitter:image":"https:\/\/innovationspace.ansys.com\/forum\/forum\/wp-content\/uploads\/sites\/2\/2023\/07\/09-07-2023-1688922779-Figure (1).png"},"aioseo_meta_data":{"post_id":"292168","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"content","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":true,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2024-10-28 18:00:07","updated":"2024-10-28 18:00:07","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\/topics\/\" title=\"Topics\">Topics<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tA rigid body being moved by water within a dynamic mesh.\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/forum"},{"label":"Topics","link":"https:\/\/innovationspace.ansys.com\/forum\/topics\/"},{"label":"A rigid body being moved by water within a dynamic mesh.","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/a-rigid-body-being-moved-by-water-within-a-dynamic-mesh\/"}],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["180530","13659"],"_bbp_author_ip":["168.143.243.14"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["568"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["292168"],"_bbp_forum_id":["27792"],"_bbp_engagement":["13659","180530"],"_bbp_voice_count":["2"],"_bbp_reply_count":["10"],"_bbp_last_reply_id":["293112"],"_bbp_last_active_id":["293112"],"_bbp_last_active_time":["2023-07-14 13:14:01"]},"test":"younis_alassedi"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/292168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/292168\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=292168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}