TAGGED: dpm, fluent, particle-residence-time, particles, udf
-
-
January 24, 2023 at 4:29 pm
cibi
SubscriberHello 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 am
Saurabh R Patil
Ansys EmployeeHi,
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 am
Amine Ben Hadj Ali
Ansys EmployeeI 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 pm
cibi
SubscriberThank you!
I have used Mean Age of Air and it worked
-
-
January 30, 2023 at 4:21 pm
Amine Ben Hadj Ali
Ansys EmployeeSuper!
-
- The topic ‘Error in computing Residence Time with P_TIME0 macro’ is closed to new replies.
-
3407
-
1057
-
1051
-
896
-
877
© 2025 Copyright ANSYS, Inc. All rights reserved.