


{"id":360508,"date":"2024-04-04T14:36:39","date_gmt":"2024-04-04T14:36:39","guid":{"rendered":"\/forum\/forums\/topic\/swirl-velocity-gradient-in-2d-axisymmetric-domain\/"},"modified":"2024-04-04T14:36:39","modified_gmt":"2024-04-04T14:36:39","slug":"swirl-velocity-gradient-in-2d-axisymmetric-domain","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/swirl-velocity-gradient-in-2d-axisymmetric-domain\/","title":{"rendered":"Swirl velocity gradient in 2D axisymmetric domain"},"content":{"rendered":"<p>In a 2D, axisymmetric domain, I am modeling a turbulent swirl flow. I want the turbulent viscosity to be dependent on the velocity gradient in the y-direction (x-axis is the symmetry axis) of the swirl velocity. In the UDF, I use &#8220;C_W_G(c,t)[1]&#8221; to find the gradient of the swirl velocity. I can compile and load the UDFs, but when I start the initialization, the error : &#8220;999999 mpt_accept error accept failed no such file or directory &#8221; occurs and fluent closes. The error does not occur when I use &#8220;C_U_G(c,t)[1].&nbsp;<\/p>\n<div>#include &#8220;udf.h&#8221;<\/div>\n<div>&nbsp;<\/div>\n<div>DEFINE_TURBULENT_VISCOSITY(user_mu_t,c,t)<\/div>\n<div>{<\/div>\n<div>&nbsp; real mu_t;<\/div>\n<div>&nbsp; real R;<\/div>\n<div>&nbsp; real rho = C_R(c,t);<\/div>\n<div>&nbsp; real L;<\/div>\n<div>&nbsp; real y;<\/div>\n<div>&nbsp; real dUdy = C_U_G(c,t)[1];<\/div>\n<div>&nbsp; real dSwirldy = C_W_G(c,t)[1];<\/div>\n<div>&nbsp; real x[ND_ND];<\/div>\n<div>&nbsp; C_CENTROID(x,c,t);<\/div>\n<div>&nbsp; y = x[1];<\/div>\n<div>&nbsp; R = 0.05;<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp; L = R*(0.14 &#8211; 0.08*(y\/R)*(y\/R) &#8211; 0.06*(y\/R)*(y\/R)*(y\/R)*(y\/R) );<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp; mu_t = rho*L*L*pow( pow(dSwirldy,2.) ,0.5);<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp; return mu_t;<\/div>\n<div>}<\/div>\n","protected":false},"template":"","class_list":["post-360508","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["342925","199"],"_bbp_author_ip":["96.7.218.223"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["1016"],"_bbp_topic_status":["unanswered"],"_bbp_topic_id":["360508"],"_bbp_forum_id":["27792"],"_bbp_engagement":["199","342925"],"_bbp_voice_count":["2"],"_bbp_reply_count":["13"],"_bbp_last_reply_id":["361570"],"_bbp_last_active_id":["361570"],"_bbp_last_active_time":["2024-04-10 15:20:16"]},"test":"lvandertuintudelft-nl"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/360508","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\/360508\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=360508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}