-
-
May 20, 2024 at 6:07 amlec chenSubscriber
Hello, everyone!
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.Â
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.
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/ )
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?
Thanks!
 {
#include "udf.h"Â/* Define a UDF to track forces on particles */DEFINE_DPM_SCALAR_UPDATE(track_forces, cell, thread, initialize, p){Â Â real drag_force[3];Â Â real lift_force[3];Â Â real virtual_mass_force[3];ÂÂ Â /* Get the drag force */Â Â P_DRAG(p, drag_force);ÂÂ Â /* Get the lift force */Â Â P_SAFFMAN_LIFT_FORCE(p, lift_force);ÂÂ Â /* Get the virtual mass force */Â Â P_VIRTUAL_MASS_FORCE(p, virtual_mass_force);ÂÂ Â /* Store the forces in user-defined memory (UDM) */Â Â P_USER_REAL(p, 0) = drag_force[0];Â Â P_USER_REAL(p, 1) = drag_force[1];Â Â P_USER_REAL(p, 2) = drag_force[2];Â Â P_USER_REAL(p, 3) = lift_force[0];Â Â P_USER_REAL(p, 4) = lift_force[1];Â Â P_USER_REAL(p, 5) = lift_force[2];Â Â P_USER_REAL(p, 6) = virtual_mass_force[0];Â Â P_USER_REAL(p, 7) = virtual_mass_force[1];Â Â P_USER_REAL(p, 8) = virtual_mass_force[2];}}
-
May 20, 2024 at 10:58 amRobForum Moderator
Please can you elaborate on "didn't work"? Note, you may want to use the current version of the manual too,  https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v241/en/flu_udf/flu_udf_DPMDEFINE.html%23flu_udf_sec_define_dpm_scalar_update
-
May 21, 2024 at 3:48 amlec chenSubscriber
Dear Rob,
Thank you so much for your kind reply.
1- When i build the UDF in compiled UDFs, the console has reported
{ scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly. File "F:\05 DPM model\libudf\win64\3ddp_host\SConstruct", line 20, in
. scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly. File "F:\05 DPM model\libudf\win64\3ddp_node\SConstruct", line 20, in
. Compiler path: xxx. Linker path: xxx. scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly. File "F:\05 DPM model\libudf\win64\3ddp_node\SConstruct", line 156, in
. C sources: ['track_forces.c']. lld-link: error: undefined symbol: P_DRAG >>> referenced by track_forces.obj:(track_forces)
lld-link: error: undefined symbol: P_SAFFMAN_LIFT_FORCE
>>> referenced by track_forces.obj:(track_forces)
lld-link: error: undefined symbol: P_VIRTUAL_MASS_FORCE
>>> referenced by track_forces.obj:(track_forces)
scons: *** [libudf.dll] Error 1}Â
2- When i load the library, the console has reported
{ERROR: The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform (win64). ���������������������
F:\\05 DPM model\\libudf\\win64\\3ddp_node\\libudf.dll. Error: An error occurred in the previous operation. The details can be found in the text output.
Error Object: #f }
3- Â Your suggestion to use the current version of the manual is very helpful. However, as I am new to UDF in Fluent, I need to spend more time solving the problem and reporting the drag/lift forces on particles in DPM.Â
Thanks
 -
May 21, 2024 at 9:10 amRobForum Moderator
Spaces in directory structures are generally not recommended, and starting labels with numbers can cause problems. Fluent was written for UNIX originally and some of the conventions carried over into the current builds. These rarely catch staff out as we either used UNIX when starting out (PCs were no where near powerful enough) or were taught by those who started out with UNIX.Â
Similarly, running on non local discs may not be ideal as data packet delays over the network may cause corruption when writing large files.Â
I don't recognise P_DRAG, P_SAFFMAN_LIFT_FORCE or P_VIRTUAL_MASS_FORCE, so assuming they're in the code make sure you include the appropriate headers.Â
-
May 22, 2024 at 3:00 amlec chenSubscriber
Dear Rob
Thanks for your comments, I may continue to learn this!
-
- The topic ‘Report the drag/lift force on particles in DPM’ is closed to new replies.
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Script error Code: 800a000d
- Cyclone (Stairmand) simulation using RSM
- Fluent fails with Intel MPI protocol on 2 nodes
- error udf
- Diesel with Ammonia/Hydrogen blend combustion
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
-
1241
-
543
-
523
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.