


{"id":367969,"date":"2024-05-21T23:19:40","date_gmt":"2024-05-21T23:19:40","guid":{"rendered":"\/forum\/forums\/topic\/creating-gas-separation-membrane-for-specific-species\/"},"modified":"2024-05-21T23:19:40","modified_gmt":"2024-05-21T23:19:40","slug":"creating-gas-separation-membrane-for-specific-species","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/creating-gas-separation-membrane-for-specific-species\/","title":{"rendered":"Creating gas separation membrane for specific species"},"content":{"rendered":"<p>Hi, I am trying to create a gas separation membrane (either in a cell zone or a wall) that allows certain gases to have higher permeability through it than others. I have tried to create a udf that allows for changing diffusivity for certain species over each cell in the membrane&#8217;s thread using DEFINE_DIFFUSIVITY and also tried to change the individual mass flux of each species using define_adjust. This method, however, isn&#8217;t seeming to work and I&#8217;m observing no difference of mass flux for each gas. Does anyone know how to go about implementing a semi-permeable membrane that has different permeability levels for different gas species? Here is the UDF I have been using:<\/p>\n<div>\n<div>#include &#8220;udf.h&#8221;<\/div>\n<p><\/p>\n<div>#define DEFAULT_DIFFUSIVITY 2.88e-04<\/div>\n<div>#define REDUCED_DIFFUSIVITY 1.0e-8 &nbsp;<\/div>\n<p><\/p>\n<div>DEFINE_DIFFUSIVITY(custom_diffusivity, c, t, i)<\/div>\n<div>{<\/div>\n<div>&nbsp; &nbsp; static int count = 0; &nbsp;<\/div>\n<div>&nbsp; &nbsp; real diffusivity = DEFAULT_DIFFUSIVITY;<\/div>\n<div>&nbsp; &nbsp;<\/div>\n<div>&nbsp; &nbsp; int zone_ID = THREAD_ID(t);<\/div>\n<p><\/p>\n<div>&nbsp; &nbsp; if (zone_ID == 4) &nbsp;<\/div>\n<div>&nbsp; &nbsp; {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; if (i != 0)<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; diffusivity = REDUCED_DIFFUSIVITY;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<p><\/p>\n<div>&nbsp; &nbsp; return diffusivity;<\/div>\n<div>}<\/div>\n<\/div>\n","protected":false},"template":"","class_list":["post-367969","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["349390","349666"],"_bbp_author_ip":["184.24.96.207"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["249"],"_bbp_topic_status":["unanswered"],"_bbp_topic_id":["367969"],"_bbp_forum_id":["27792"],"_bbp_engagement":["349390","349666"],"_bbp_voice_count":["2"],"_bbp_reply_count":["1"],"_bbp_last_reply_id":["368582"],"_bbp_last_active_id":["368582"],"_bbp_last_active_time":["2024-05-25 06:04:03"]},"test":"endaldumich-edu"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/367969","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\/367969\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=367969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}