


{"id":456150,"date":"2026-04-09T12:12:10","date_gmt":"2026-04-09T12:12:10","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-source-term-linearisation-for-cfd-pbe\/"},"modified":"2026-04-09T12:12:10","modified_gmt":"2026-04-09T12:12:10","slug":"udf-source-term-linearisation-for-cfd-pbe","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/udf-source-term-linearisation-for-cfd-pbe\/","title":{"rendered":"UDF Source Term Linearisation For CFD-PBE"},"content":{"rendered":"<p>&lt;p&gt;Hi,&lt;\/p&gt;&lt;p&gt;I am currently interested in modelling semi-batch precipitation in a stirred tank using the method of moments approach. I am treating the flow as pseudo-homogeneous (Stk &lt;&lt; 1), so I will not be using an inhomogeneous two-fluid solver. Also, I am tracking vortex shape. The current models I have:&lt;\/p&gt;<\/p>\n<ul>\n<li>VOF (track gas-liquid interface)<\/li>\n<li>RANS (SST k-w CC)<\/li>\n<li>Species Transport (track depletion of reacting species)<\/li>\n<li>User Defined Scalar (track crystal properties via population balance where scalars represent moments)<\/li>\n<\/ul>\n<p>&lt;p&gt;A UDF is used to calculate kinetics (nucleation and growth) and link species and uds equations via source terms.&nbsp;&lt;\/p&gt;&lt;p&gt;I have managed to run a simulation with a batch operation (no feed) with all flow equations switched off and the simulation works fine with physically realistic results. However, when I attempt to model semi-batch operation with flow equations switched on I am noticing some major issues, in particular the moments calculated (i.e., zeroth moment) becomes unrealistically large which has a cascade effect on crystal properties as mass and size become unphysical. As far as I am aware, the simulation set-up from the GUI has been optimised in terms of settings and numerical schemes.&nbsp;&lt;\/p&gt;&lt;p&gt;I am unsure of where to proceed from here, one thing that I can think of is that currently my source terms are non-linearised. I am aware this means the source terms are treated explicitly and can have a big impact on numerical stability. Given the complexity of what I am trying to simulate (especially for semi-batch process), is it recommended to linearise source terms and how would I do that. Currently the source term for zeroth moment is:&lt;\/p&gt;&lt;p&gt;S(m0) = alpha*rho*B&lt;\/p&gt;&lt;p&gt;[dS(m0)] = 0&lt;\/p&gt;&lt;p&gt;Where alpha = volume fraction of liquid; rho = liquid density; B = Nucleation rate, B = kb*(sigma)^b. where kb and b are constants and sigma is the supersaturation driving force.&lt;\/p&gt;&lt;p&gt;I do not know how to linearise this term&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-456150","topic","type-topic","status-publish","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_forum_id":["27792"],"_bbp_topic_id":["456150"],"_bbp_subscription":["282802","199"],"_bbp_author_ip":["88.97.179.170"],"_bbp_last_reply_id":["456169"],"_bbp_last_active_id":["456169"],"_bbp_last_active_time":["2026-04-09 15:42:19"],"_bbp_reply_count":["5"],"_bbp_reply_count_hidden":["0"],"_bbp_voice_count":["2"],"_bbp_engagement":["282802","199"],"_btv_view_count":["25"],"_bbp_topic_status":["unanswered"]},"test":"ll17s5rleeds-ac-uk"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/456150","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\/456150\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=456150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}