TAGGED: dpm, fluent, particle-residence-time, particles, udf
-
-
January 24, 2023 at 4:29 pmcibiSubscriber
Hello everyone,
I would like to compute the residence time of blood in my CFD simulations (steady state).Â
I know I can use the DPM model but I would like to have a spatial distribution of the residence time to do something like this in post-processing:
I have read that I can use these macros: P_TIME0 and P_TIME, so I wrote a udf but when running my simulation at the first iteration I get abnormal exit which I think is due to the udf.
This is my udf:
I am not sure if I can use P_TIME0 and P_TIME in a define_execute_at_end function. I have tried to use define_dpm_source but I couldn't understand how to return the values or save them in S. Also, I do not know if the pointer p to the particle is correctly used in my udf.
Does anybody know how to solve this?
Thank you!
-
January 25, 2023 at 7:57 amSRPAnsys Employee
Hi,
For more details on define_dpm_source please refer to fluent customization manual: 2.5. Discrete Phase Model (DPM) DEFINE Macros (ansys.com)
If you are not able to access the link, please refer to this forum discussion: /forum/forums/topic/using-help-with-links/#latest
Thank you
Saurabh
-
January 25, 2023 at 8:47 amAmine Ben Hadj AliAnsys Employee
I think you need to use the approach of "Mean Age of Air" with UDS if you want a spatial distribution.
Your UDF is wrong as you are trying to use Particle related variables in Eulerian Sense.
-
January 30, 2023 at 3:49 pmcibiSubscriber
Thank you!
I have used Mean Age of Air and it worked
-
-
January 30, 2023 at 4:21 pmAmine Ben Hadj AliAnsys Employee
Super!
-
- The topic ‘Error in computing Residence Time with P_TIME0 macro’ is closed to new replies.
- Non-Intersected faces found for matching interface periodic-walls
- Script error Code: 800a000d
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Fluent fails with Intel MPI protocol on 2 nodes
- Cyclone (Stairmand) simulation using RSM
- error udf
- Diesel with Ammonia/Hydrogen blend combustion
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
-
1341
-
594
-
591
-
540
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.