


{"id":303645,"date":"2023-08-28T12:57:01","date_gmt":"2023-08-28T12:57:01","guid":{"rendered":"\/forum\/forums\/topic\/reaction-rate-for-a-particular-domain\/"},"modified":"2023-08-28T12:57:01","modified_gmt":"2023-08-28T12:57:01","slug":"reaction-rate-for-a-particular-domain","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/reaction-rate-for-a-particular-domain\/","title":{"rendered":"Reaction rate for a particular domain"},"content":{"rendered":"<p>Hi everyone!<\/p>\n<p>I am simulating decomposition of Ammonia in a channel. i have 3 zones, all fluid and I want to select a particular zone where the reaction takes place.&nbsp;<\/p>\n<p>second, I want to define the reaction rate as temperature dependent. how can I get the temperature of that cell where the UDF is being calculated.<\/p>\n<p>&nbsp;<\/p>\n<p>Thankyou.&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>My code is as follows:<\/p>\n<div>#include &#8220;udf.h&#8221;<\/div>\n<div>#define A 4e15<\/div>\n<div>#define E 196200.0<\/div>\n<div>&nbsp;<\/div>\n<div>DEFINE_VR_RATE(my_rate, c, t, r, mole_weight, species_mf, rate, rr_t)<\/div>\n<div>{<\/div>\n<div>real s1 = species_mf[1];<\/div>\n<div>real mw1 = mole_weight[1];<\/div>\n<div>if (FLUID_THREAD_P(t)&amp;&amp;ZONE_ID(5))<\/div>\n<div>*rate = A * exp(-E \/ 8.31412 \/ 1000) * s1\/100000;<\/div>\n<div>else<\/div>\n<div>*rate = 0;<\/div>\n<div>*rr_t = *rate;<\/div>\n<div>}<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"template":"","class_list":["post-303645","topic","type-topic","status-closed","hentry","topic-tag-fluent","topic-tag-fluid","topic-tag-reaction-kinetics","topic-tag-udf"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["9798","14311"],"_bbp_author_ip":["96.7.218.215"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["549"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["303645"],"_bbp_forum_id":["27792"],"_bbp_engagement":["9798","14311"],"_bbp_voice_count":["2"],"_bbp_reply_count":["5"],"_bbp_last_reply_id":["304883"],"_bbp_last_active_id":["304883"],"_bbp_last_active_time":["2023-09-05 03:01:41"]},"test":"ydleekentech-ac-kr"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/303645","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\/303645\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=303645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}