{"id":164974,"date":"2023-03-17T08:59:08","date_gmt":"2023-03-17T08:59:08","guid":{"rendered":"\/knowledge\/forums\/topic\/is-there-a-way-to-get-the-volume-of-a-register-using-expression\/"},"modified":"2023-07-31T12:26:39","modified_gmt":"2023-07-31T12:26:39","slug":"is-there-a-way-to-get-the-volume-of-a-register-using-expression","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/is-there-a-way-to-get-the-volume-of-a-register-using-expression\/","title":{"rendered":"Is there a way to get the volume of a register using expression ?"},"content":{"rendered":"<p>Cell registers are available as Booleans in the expression system. Simply calculate the sum over the register with an if-condition.  Sum(IF(<register>, 1, 0), [<locations>], Weight=&#8221;Volume&#8221;)  <register> is the name of the cell register and <locations> is the list of cell zones. If the name of the register is &#8220;myregister&#8221; and the affected cell zones &#8220;fluid1&#8221; and &#8220;fluid2&#8243; the expression is:  Sum(IF(myregister, 1, 0), [&#8216;fluid1&#8217;, &#8216;fluid2&#8217;], Weight=&#8221;Volume&#8221;)<\/p>\n","protected":false},"template":"","class_list":["post-164974","topic","type-topic","status-publish","hentry","topic-tag-2020-r2","topic-tag-fluent","topic-tag-fluid-dynamics","topic-tag-general-fluent","topic-tag-hpc-gpu-cloud"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_bbp_last_active_time":["3-15-2023  20:20:55"],"_bbp_forum_id":["27796"],"_bbp_author_ip":["23.56.168.180"],"_btv_view_count":["38313"],"siebel_km_number":["2063396"],"product_version":["2020 R2"],"km_published_date":["2020-10-12T00:00:00.000Z"],"family":["Fluid Dynamics"],"application_name":["FLUENT"]},"test":"articlesansys-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/164974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/164974\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=164974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}