


{"id":187004,"date":"2021-07-28T19:14:24","date_gmt":"2021-07-28T19:14:24","guid":{"rendered":"\/forum\/forums\/reply\/187004\/"},"modified":"2021-07-28T19:14:24","modified_gmt":"2021-07-28T19:14:24","slug":"187004","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/187004\/","title":{"rendered":"Reply To: Remove parcels at defined cell zone"},"content":{"rendered":"<p>Hey everybody, I found the solution:<br \/>\nHowever, the only non-dynamic thing is that I have the cell-zone-id hard-coded. Is there a way to set it via TUI ? <\/p>\n<p>DEFINE_DPM_SCALAR_UPDATE(parcelRemoval, c, t, initialize, tp)<br \/>\n{<br \/>\nif (initialize)<br \/>\n{<br \/>\n\/\/ Fluid domain<br \/>\nDomain *domain = Get_Domain(1);<\/p>\n<p>\/\/ Cell zone id<br \/>\nint Cell_Zone_ID = 598;<\/p>\n<p>cell_t cCZ;<br \/>\nThread *tCZ = Lookup_Thread(domain, Cell_Zone_ID);<\/p>\n<p>\/\/ Looping over all cells of the cell zone<br \/>\nbegin_c_loop(cCZ, tCZ)<br \/>\n{<br \/>\n\/\/ Check if cCZ == c -> parcel inside<br \/>\nif (cCZ == c)<br \/>\n{<br \/>\nMARK_TP(tp, P_FL_REMOVED);<br \/>\n}<br \/>\n}<br \/>\nend_c_loop(cCZ, tCZ)<br \/>\n}<br \/>\n}<\/p>\n","protected":false},"template":"","class_list":["post-187004","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/187004","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\/187004\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=187004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}