


{"id":371350,"date":"2024-07-10T16:44:11","date_gmt":"2024-07-10T16:44:11","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/371350\/"},"modified":"2024-07-10T16:44:11","modified_gmt":"2024-07-10T16:44:11","slug":"371350","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/371350\/","title":{"rendered":"Reply To: Momentum source UDF in Eulerian Multiphase Flow (Fluent)"},"content":{"rendered":"<pre class=\"screen\">If my understanding is correct:&lt;br&gt;for water (phase 1) - air (phase 2) flow (Eulerian Multiphase): &lt;br&gt;&lt;br&gt;A UDF for Phase 1 x-momentum source can be written as:&lt;br&gt;&lt;br&gt;<\/pre>\n<p>&lt;p&gt;<em>DEFINE_SOURCE(xmom_source,cell, <strong>mixture_thread<\/strong>, dS, eqn)<\/em>&lt;\/p&gt;&lt;p&gt;<em>{<\/em><em>&nbsp; &nbsp;&nbsp;<\/em>&lt;\/p&gt;<\/p>\n<pre class=\"screen\"><em>    int phase1_domain_index = 0;           \/* primary (water) phase-1 index is 0     *\/<\/em>&lt;br&gt;<em> &nbsp; &nbsp;int phase2_domain_index = 1;           \/* secondary (air) phase-2 index is 1    *\/<\/em>&lt;br&gt;<em>\n    Thread *<strong>mixture_thread<\/strong>;               \/* mixture-level thread pointer *\/&lt;br&gt;\n    Thread *<strong>water<\/strong> = THREAD_SUB_THREAD(mixture_thread,phase1_domain_index); <\/em><\/pre>\n<pre class=\"screen\"><em>    Thread *<strong>air<\/strong> = THREAD_SUB_THREAD(mixture_thread,phase2_domain_index);&lt;br&gt;&lt;br&gt;&lt;br&gt;<\/em><\/pre>\n<p>&lt;p&gt;<em>&nbsp; &nbsp; &nbsp; &nbsp;water_U_Velocity = C_U(cell, <strong>water<\/strong>);<\/em>&lt;\/p&gt;&lt;p&gt;<em>&nbsp; &nbsp; &nbsp; &nbsp;water_VOF = C_VOF(cell, <strong>water<\/strong>);<\/em>&lt;\/p&gt;&lt;p&gt;<em>&nbsp; &nbsp; &nbsp; &nbsp;air_U_Velocity = C_U(cell, <strong>air<\/strong>);<\/em>&lt;\/p&gt;&lt;p&gt;<em>&nbsp; &nbsp; &nbsp; &nbsp;air_VOF = C_VOF(cell, <strong>air<\/strong>);<\/em>&lt;\/p&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;&lt;p&gt;<em>&nbsp; &nbsp; &nbsp; &nbsp;source = water_VOF*water_U_Velocity*air_VOF*air_U_Velocity;<\/em>&lt;\/p&gt;&lt;p&gt;<em>&nbsp; &nbsp; &nbsp; &nbsp;return source ;<\/em>&lt;\/p&gt;&lt;p&gt;<em>}<\/em>&lt;\/p&gt;<\/p>\n<pre class=\"screen\">&lt;br&gt;Please let me know if my assumption is correct ?&lt;br&gt;Thanks in Advance<\/pre>\n","protected":false},"template":"","class_list":["post-371350","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/371350","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\/371350\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=371350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}