


{"id":367502,"date":"2024-05-20T06:07:35","date_gmt":"2024-05-20T06:07:35","guid":{"rendered":"\/forum\/forums\/topic\/report-the-drag-lift-force-on-particles-in-dpm\/"},"modified":"2024-05-22T03:00:58","modified_gmt":"2024-05-22T03:00:58","slug":"report-the-drag-lift-force-on-particles-in-dpm","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/report-the-drag-lift-force-on-particles-in-dpm\/","title":{"rendered":"Report the drag\/lift force on particles in DPM"},"content":{"rendered":"<p>Hello, everyone!<\/p>\n<p>I am working on a project about particle-airflow interaction in a channel in Fluent 2023. I want to find out the magnitude of the drag force and lift force on each particle.&nbsp;<\/p>\n<p>I have opened the drag force, saffman lift force in physical models of discrete phase model (DPM). Generally, i can find particle related information at Results-Particle tracks-Particle variables. However, i can not find the drag force, saffman lift force under this option.<\/p>\n<p>I was told certain particle-related forces such as drag and lift force are not available directly through the standard Particle Tracks Reports interface. These specific forces require customization to view and analyze by UDF. And an example of UDF has been given in the last. However, this UDF did not work in my case and software (the content in this link also not work \/forum\/forums\/topic\/how-to-report-the-drag-force-on-particles-in-dpm\/ )<\/p>\n<p>Does anyone know how to report this when the solution is done, or how to write an correct UDF to obtain the forces on particles?<\/p>\n<p>Thanks!<\/p>\n<p>&nbsp;{<\/p>\n<div>#include &#8220;udf.h&#8221;<\/div>\n<div>&nbsp;<\/div>\n<div>\/* Define a UDF to track forces on particles *\/<\/div>\n<div>DEFINE_DPM_SCALAR_UPDATE(track_forces, cell, thread, initialize, p)<\/div>\n<div>{<\/div>\n<div>&nbsp; &nbsp; real drag_force[3];<\/div>\n<div>&nbsp; &nbsp; real lift_force[3];<\/div>\n<div>&nbsp; &nbsp; real virtual_mass_force[3];<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp; &nbsp; \/* Get the drag force *\/<\/div>\n<div>&nbsp; &nbsp; P_DRAG(p, drag_force);<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp; &nbsp; \/* Get the lift force *\/<\/div>\n<div>&nbsp; &nbsp; P_SAFFMAN_LIFT_FORCE(p, lift_force);<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp; &nbsp; \/* Get the virtual mass force *\/<\/div>\n<div>&nbsp; &nbsp; P_VIRTUAL_MASS_FORCE(p, virtual_mass_force);<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp; &nbsp; \/* Store the forces in user-defined memory (UDM) *\/<\/div>\n<div>&nbsp; &nbsp; P_USER_REAL(p, 0) = drag_force[0];<\/div>\n<div>&nbsp; &nbsp; P_USER_REAL(p, 1) = drag_force[1];<\/div>\n<div>&nbsp; &nbsp; P_USER_REAL(p, 2) = drag_force[2];<\/div>\n<div>&nbsp; &nbsp; P_USER_REAL(p, 3) = lift_force[0];<\/div>\n<div>&nbsp; &nbsp; P_USER_REAL(p, 4) = lift_force[1];<\/div>\n<div>&nbsp; &nbsp; P_USER_REAL(p, 5) = lift_force[2];<\/div>\n<div>&nbsp; &nbsp; P_USER_REAL(p, 6) = virtual_mass_force[0];<\/div>\n<div>&nbsp; &nbsp; P_USER_REAL(p, 7) = virtual_mass_force[1];<\/div>\n<div>&nbsp; &nbsp; P_USER_REAL(p, 8) = virtual_mass_force[2];<\/div>\n<div>}<\/div>\n<p>}<\/p>\n","protected":false},"template":"","class_list":["post-367502","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["74521","199"],"_bbp_author_ip":["23.32.16.81"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["612"],"_bbp_topic_status":["answered"],"_bbp_topic_id":["367502"],"_bbp_forum_id":["27792"],"_bbp_engagement":["199","74521"],"_bbp_voice_count":["2"],"_bbp_last_reply_id":["367983"],"_bbp_last_active_id":["367983"],"_bbp_last_active_time":["2024-05-22 03:00:35"]},"test":"leczjut-edu-cn"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/367502","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":1,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/367502\/revisions"}],"predecessor-version":[{"id":367984,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/367502\/revisions\/367984"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=367502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}