


{"id":186388,"date":"2021-07-26T09:04:50","date_gmt":"2021-07-26T09:04:50","guid":{"rendered":"\/forum\/forums\/reply\/186388\/"},"modified":"2021-07-26T09:04:50","modified_gmt":"2021-07-26T09:04:50","slug":"186388","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186388\/","title":{"rendered":"Reply To: Need help in 6dof udf with a face loop"},"content":{"rendered":"<p>Hello sdeb<br \/>\nthank you so much for your reply and it helped me a lot. But i have a problem where i am using overset model and now what i did that i define the motion on walls and for overset fluid domain i defined relative motion and UDF with only properties e.e mass, rotation and translation. Is this the right way to do it because when i define the same udf with motion on both then i get errors.<br \/>\n2nd thing is that i have attached the code below when i used my calculation for (#if !RP_HOST) and solving it parallel but in results i have variable output 6 times and every variable has a different value. If you can help me to get the one value which should be equal to the one we can see in dynamic mesh window. What i understood from manual that all variable values which i see in  console are from different nodes and now i want to let them communicate so get the right value which i do not know yet. <br \/>\nAnd for writing a file with variables like time and velocity should i also use #if !RP_HOST or #if RP_NODE, etc.?<br \/>\nyour help will really appreciated. thank you.<\/p>\n<p>\/*******************************************************<br \/>\nSDOF property compiled UDF with external forces\/moments<br \/>\n*******************************************************\/<br \/>\n#include &#8220;udf.h&#8221;<\/p>\n<p>static real acc = 4.631;<br \/>\nstatic real mass = 5;<br \/>\nstatic real velocity, vel, area_tot, area[3];<br \/>\nDEFINE_SDOF_PROPERTIES(acce, prop, dt, time, dtime)<br \/>\n{<\/p>\n<p>\nprop[SDOF_MASS] =5;<br \/>\nprop[SDOF_IXX] = 8.333e-4;<br \/>\nprop[SDOF_IYY] = 4.1667e-3;<br \/>\nprop[SDOF_IZZ] = 5.2e-5;<br \/>\nprop[SDOF_ZERO_TRANS_X] = False;\/* boolean, allow translation in x-direction *\/<br \/>\nprop[SDOF_ZERO_TRANS_Y] = True; \/* boolean, suppress translation in y-direction *\/<br \/>\nprop[SDOF_ZERO_TRANS_Z] = True; \/* boolean, suppress translation in z-direction *\/<br \/>\nprop[SDOF_ZERO_ROT_X] = True; \/* boolean, suppress rotation around x-axis *\/<br \/>\nprop[SDOF_ZERO_ROT_Y] = True; \/* boolean, suppress rotation around y-axis *\/<br \/>\nprop[SDOF_ZERO_ROT_Z] = False; \/* boolean, allow rotation around z-axis *\/<br \/>\n{<br \/>\n#if !RP_HOST<br \/>\nThread *t;<br \/>\nface_t f;<br \/>\nDomain *domain;<br \/>\nint nid;<br \/>\ndomain = THREAD_DOMAIN (DT_THREAD (dt));<br \/>\nnid = THREAD_ID (DT_THREAD (dt));<br \/>\nt = Lookup_Thread (domain, nid);<\/p>\n<p>velocity=0.0;<br \/>\narea_tot=0;<br \/>\n#endif<\/p>\n<p>#if !RP_HOST<br \/>\nbegin_f_loop(f, t)<br \/>\nif (PRINCIPAL_FACE_P(f, t))<br \/>\n{<br \/>\n\tF_AREA(area,f,t);<br \/>\n\t area_tot += NV_MAG(area);<br \/>\n\tvelocity += F_U(f, t)*NV_MAG(area);<br \/>\n}<br \/>\nend_f_loop(f, t)\t\t\t\t<\/p>\n<p>\t \/*area_tot=PRF_GRSUM1(noface);<br \/>\n\t velocity=PRF_GRSUM1(velocity);*\/<br \/>\n#if RP_NODE<br \/>\n\t vel = velocity\/area_tot;<\/p>\n<p>\t Message(&#8220;\\nV1 %f\tArea Total %f \/n&#8221;,vel, area_tot);<br \/>\n#endif<\/p>\n<p>#endif<\/p>\n","protected":false},"template":"","class_list":["post-186388","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Hello sdeb thank you so much for your reply and it helped me a lot. But i have a problem where i am using overset model and now what i did that i define the motion on walls and for overset fluid domain i defined relative motion and UDF with only properties e.e mass, rotation\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186388\/\" \/>\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=\"Reply To: Need help in 6dof udf with a face loop | Ansys Learning Forum\" \/>\n\t\t<meta property=\"og:description\" content=\"Hello sdeb thank you so much for your reply and it helped me a lot. But i have a problem where i am using overset model and now what i did that i define the motion on walls and for overset fluid domain i defined relative motion and UDF with only properties e.e mass, rotation\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186388\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-07-26T09:04:50+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-07-26T09:04:50+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Reply To: Need help in 6dof udf with a face loop | Ansys Learning Forum\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Hello sdeb thank you so much for your reply and it helped me a lot. But i have a problem where i am using overset model and now what i did that i define the motion on walls and for overset fluid domain i defined relative motion and UDF with only properties e.e mass, rotation\" \/>\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\\\/reply\\\/186388\\\/#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\\\/forums\\\/reply\\\/186388\\\/#listItem\",\"name\":\"Reply To: Need help in 6dof udf with a face loop\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/186388\\\/#listItem\",\"position\":2,\"name\":\"Reply To: Need help in 6dof udf with a face loop\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"name\":\"Home\"}}]},{\"@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\\\/reply\\\/186388\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/186388\\\/\",\"name\":\"Reply To: Need help in 6dof udf with a face loop | Ansys Learning Forum\",\"description\":\"Hello sdeb thank you so much for your reply and it helped me a lot. But i have a problem where i am using overset model and now what i did that i define the motion on walls and for overset fluid domain i defined relative motion and UDF with only properties e.e mass, rotation\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/186388\\\/#breadcrumblist\"},\"datePublished\":\"2021-07-26T09:04:50+00:00\",\"dateModified\":\"2021-07-26T09:04:50+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":"Reply To: Need help in 6dof udf with a face loop | Ansys Learning Forum","description":"Hello sdeb thank you so much for your reply and it helped me a lot. But i have a problem where i am using overset model and now what i did that i define the motion on walls and for overset fluid domain i defined relative motion and UDF with only properties e.e mass, rotation","canonical_url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186388\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186388\/#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\/forums\/reply\/186388\/#listItem","name":"Reply To: Need help in 6dof udf with a face loop"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186388\/#listItem","position":2,"name":"Reply To: Need help in 6dof udf with a face loop","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","name":"Home"}}]},{"@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\/reply\/186388\/#webpage","url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186388\/","name":"Reply To: Need help in 6dof udf with a face loop | Ansys Learning Forum","description":"Hello sdeb thank you so much for your reply and it helped me a lot. But i have a problem where i am using overset model and now what i did that i define the motion on walls and for overset fluid domain i defined relative motion and UDF with only properties e.e mass, rotation","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186388\/#breadcrumblist"},"datePublished":"2021-07-26T09:04:50+00:00","dateModified":"2021-07-26T09:04:50+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":"Reply To: Need help in 6dof udf with a face loop | Ansys Learning Forum","og:description":"Hello sdeb thank you so much for your reply and it helped me a lot. But i have a problem where i am using overset model and now what i did that i define the motion on walls and for overset fluid domain i defined relative motion and UDF with only properties e.e mass, rotation","og:url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186388\/","article:published_time":"2021-07-26T09:04:50+00:00","article:modified_time":"2021-07-26T09:04:50+00:00","twitter:card":"summary_large_image","twitter:title":"Reply To: Need help in 6dof udf with a face loop | Ansys Learning Forum","twitter:description":"Hello sdeb thank you so much for your reply and it helped me a lot. But i have a problem where i am using overset model and now what i did that i define the motion on walls and for overset fluid domain i defined relative motion and UDF with only properties e.e mass, rotation"},"aioseo_meta_data":{"post_id":"186388","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-24 04:29:56","updated":"2024-10-28 19:57:27","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\tReply To: Need help in 6dof udf with a face loop\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/forum"},{"label":"Reply To: Need help in 6dof udf with a face loop","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/186388\/"}],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/186388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/reply"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/186388\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=186388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}