


{"id":345375,"date":"2024-01-18T13:25:23","date_gmt":"2024-01-18T13:25:23","guid":{"rendered":"\/forum\/forums\/topic\/erosion-contours-not-continous-when-udf-is-applied\/"},"modified":"2024-01-18T13:25:23","modified_gmt":"2024-01-18T13:25:23","slug":"erosion-contours-not-continous-when-udf-is-applied","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/erosion-contours-not-continous-when-udf-is-applied\/","title":{"rendered":"Erosion contours not continous when UDF is applied"},"content":{"rendered":"<p class=\"MsoNormal\"><span style=\"font-size: 10pt\">Greetings all,<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-size: 10pt\">I am using Fluent 2021R1 and am required to simulate slurry based erosion in pipes using UDFs in transient state. In attempts to do so, I have been facing the problem that the &ldquo;erosion contours&rdquo; presented by Fluent appear as a distribution of discrete spots rather than contours of continuous regions (examples below) for any of the UDFs that I use. Apparently, the problem responsible for causing such discrete erosion region is also responsible for causing the plots of the extracted erosion values to be of curves with abrupt variations. This is a problem because the expected plot and contours should represent a rather steady and gradual increase in erosion when the top centreline of the elbow is considered according to the experimental results. It seems that the data requires averaging of some sort, but I am unable to figure out based on which parameter exactly and how. So, I would appreciate it if any insight can be given on how to achieve continuous erosion contours and hence a linear\/concave curve when applying UDF. I understand that it may be difficult to provide a generic solution that will be applicable for any UDF, so I have provided below the UDF that I had prepared based on the Oka model as presented in <a href=\"https:\/\/doi.org\/10.1016\/j.wear.2005.01.040\">Reference 1<\/a>. It would be helpful if anyone can provide suggestions based on the provided UDF, which will also help me understand modifications that&nbsp;<span lang=\"EN-GB\">need<\/span> to be made for any other UDFs that I need to apply. I also understand that one may require to know additional information regarding the parameters to help me solve this problem, so please let me know what information would be sufficient to provide.&nbsp;<br \/><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-size: 10pt\">Also, i<\/span><span style=\"font-size: 10pt\">f it helps to know, I have made some observations regarding this problem&hellip;<\/span><span style=\"font-size: 10pt\">The discrete appearance of the &#8220;erosion contours&#8221; \/ the abruptly changing plot which I find when I apply my UDFs in transient state is also visible if the same case is run in steady state regardless of the type of erosion model used and whether it uses a UDF or is in-built. However, if the case is run in transient state but without the UDF, i.e. the erosion is computed based on Fluent&#8217;s in-built erosion models in transient state, the &#8220;erosion contours&#8221; are continuous regions of erosion and the data plot is a slightly concave curve as desired. I have attached below example images of the contours achieved in the different cases. This implies to me that the continuous nature of the contours maybe due to a time factor that is involved by default in the transient state and the in-built erosion models but is missing within my UDF. I actually did attempt to incorporate the time unit in my UDF code by utilizing the particle mass flow rate (kg\/s) but it did not seem to help. So, any advice on this case would be appreciated.&nbsp;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-size: 10pt\">My UDF code based on Oka model&#8230;<\/span><\/p>\n<pre><span style=\"font-size: 10pt\">#include \"udf.h\"&nbsp;<\/span><br><span style=\"font-size: 10pt\">#include \"math.h\"&nbsp;<\/span><br><br><span style=\"font-size: 10pt\">DEFINE_DPM_EROSION(Oka, tp, t, f, normal, alpha, Vmag, mdot)<\/span><br><span style=\"font-size: 10pt\">{&nbsp;<\/span><br><span style=\"font-size: 10pt\">real E_alpha, g_alpha, E_90, Hv, n1, n2, k1, k2, k3, K, a, b, V_ref, D_ref, D;<\/span><br><span style=\"font-size: 10pt\">Hv = 2.01; \/*GPa*\/<\/span><br><span style=\"font-size: 10pt\">n1 = 0.79;<\/span><br><span style=\"font-size: 10pt\">n2 = 1.34;<\/span><br><span style=\"font-size: 10pt\">k1 = -0.12;<\/span><br><span style=\"font-size: 10pt\">k2 = 2.35;<\/span><br><span style=\"font-size: 10pt\">k3 = 0.19;<\/span><br><span style=\"font-size: 10pt\">K = 50;&nbsp;<\/span><br><span style=\"font-size: 10pt\">a = 0.0071;<\/span><br><span style=\"font-size: 10pt\">b = 0.4;<\/span><br><span style=\"font-size: 10pt\">V_ref = 104; <span>\/*(m\/s)*\/<\/span><\/span><br><span style=\"font-size: 10pt\">D_ref = 0.000326; <span>\/*m*\/<\/span><\/span><br><span style=\"font-size: 10pt\">D = 0.00045; <span>\/*m*\/<\/span><\/span><br><span style=\"font-size: 10pt\">g_alpha = (pow((sin(alpha)),n1)) * (pow((1+(Hv*(1-(sin(alpha))))),n2)); <span>\/*impact angle function, angle in radians*\/<\/span><\/span><br><span style=\"font-size: 10pt\">E_90 = (K*(pow((a*Hv),(k1*b))))*(pow((Vmag\/V_ref),k2))*(pow((D\/D_ref),k3)); <span>\/*erosion at an impact angle of 90 degrees*\/<\/span><\/span><br><span style=\"font-size: 10pt\">E_alpha = (g_alpha)*(E_90); <span>\/*erosion at an arbitrary angle*\/<\/span><\/span><br><span style=\"font-size: 10pt\">F_STORAGE_R_XV(f, t, SV_DPMS_EROSION, EROSION_UDF) = E_alpha;}&nbsp;<br><\/span><\/pre>\n<p class=\"MsoNormal\"><span style=\"font-size: 10pt\">The desired erosion contours only achievable with Fluent&#8217;s in-built erosion models run in transient state&#8230;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-size: 10pt\"><img loading=\"lazy\" decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/18-01-2024-1705583206-erosion contour 1.jpg\" alt=\"desired erosion contours only achieved by Fluent's in-built erosion models run in transient case\" width=\"122\" height=\"265\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-size: 10pt\">The achieved but undesired erosion contours when any UDF is applied and when any erosion simulation is run in steady state&#8230;<\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-size: 10pt\"><img loading=\"lazy\" decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/01\/18-01-2024-1705583489-erosion contour - using oka model based UDF.png\" alt=\"The achieved erosion contour when any UDF is applied and when any erosion simulation is run in steady state\" width=\"170\" height=\"263\"><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"font-size: 10pt\">Thank you.<\/span><\/p>\n","protected":false},"template":"","class_list":["post-345375","topic","type-topic","status-closed","hentry","topic-tag-contour","topic-tag-erosion-1","topic-tag-fluent","topic-tag-udf"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["302810","199","337234"],"_bbp_author_ip":["96.7.218.215"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["475"],"_bbp_topic_status":["unanswered"],"_bbp_topic_id":["345375"],"_bbp_forum_id":["27792"],"_bbp_engagement":["199","302810"],"_bbp_voice_count":["2"],"_bbp_reply_count":["6"],"_bbp_reply_count_hidden":["1"],"_bbp_last_reply_id":["345540"],"_bbp_last_active_id":["345540"],"_bbp_last_active_time":["2024-01-19 11:44:51"]},"test":"s136116student-squ-edu-om"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/345375","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\/345375\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=345375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}