{"id":161740,"date":"2023-01-25T07:16:50","date_gmt":"2023-01-25T07:16:50","guid":{"rendered":"\/knowledge\/forums\/topic\/obtaining-the-current-simulation-time-from-the-current_time-macro\/"},"modified":"2023-07-31T12:35:49","modified_gmt":"2023-07-31T12:35:49","slug":"obtaining-the-current-simulation-time-from-the-current_time-macro","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/obtaining-the-current-simulation-time-from-the-current_time-macro\/","title":{"rendered":"Obtaining the current simulation time from the CURRENT_TIME macro"},"content":{"rendered":"<p>You may want to define a time-dependent geometry for MDM.  For instance, if you want to model a membrane, which is changing shape as a function of time, you will need to take the current time from the solver for DEFINE_GEOM macro.  Due to the time this function is called, if you use CURRENT_TIME macro, it will actually be the previous time.  This can be easily verified by printing out the CURRENT_TIME.  The solution is the following:  dt =  CURRENT_TIMESTEP; time = CURRENT_TIME + dt;  A new macro is defined for this, which is DYNAMESH_CURRENT_TIME.  So, you can use this one to access current time in DEFINE_GEOM macro.  This new macro is basically CURRENT_TIME + dt.<\/p>\n","protected":false},"template":"","class_list":["post-161740","topic","type-topic","status-publish","hentry","topic-tag-16-1","topic-tag-dynamic-meshing","topic-tag-fluent","topic-tag-fluid-dynamics","topic-tag-moving-deforming-mesh","topic-tag-scripting-journaling-udf","topic-tag-udf"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_bbp_forum_id":["27796"],"_bbp_author_ip":["23.56.168.180"],"_bbp_last_active_time":["1-24-2023  20:20:25"],"_btv_view_count":["3310"],"siebel_km_number":["1145"],"product_version":["16.1"],"km_published_date":["2005-01-12T17:30:00.000Z"],"family":["Fluid Dynamics"],"application_name":["FLUENT"]},"test":"articlesansys-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/161740","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\/161740\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=161740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}