-
-
June 26, 2019 at 12:11 pm
jianan.zhao
SubscriberHi everyone,
I'm trying to develop a DPM simulation using UDF to count particle deposition number on each wall region. The
deposition number is stored in a UDM.
The DPM was run in parallel using Hybrid method. However, when I try to write out the deposition number (UDM value)
to file, their values are all zero.
When I use Shared Memory method for DPM setup, the UDM values written to the file are correct, but simulation using
Shared Memory method is much slower than using Hybrid method.
So, my question is can I use hybrid method for DPM while write out the correct UDM data to file? Any comments and answers are appreciated. Thanks,
Jianan
-
June 26, 2019 at 12:12 pm
jianan.zhao
SubscriberI have attached the UDFs below. DEFINE_DPM_EROSION is developed to count for deposition number on each
cell surface and store the value in UDM. Then, DEFINE_EXECUTE_AT_END is used to caculate the deposition number on
each wall surface and write out the result in a txt file.
DEFINE_DPM_EROSION(particle_deposition_2, p, t, f, normal, alpha, Vmag, Mdot)
{
Thread *t1;
cell_t c1;
double A[ND_ND];
double area;
F_AREA(A, f, t);
area = NV_MAG(A);
t1 = THREAD_T0(t);
c1 = F_C0(f, t);
C_UDMI(c1, t1, 7) = C_UDMI(c1, t1, 7) + 1.0;
C_UDMI(c1, t1,
= C_UDMI(c1, t1, 7) / area;
CX_Message("UDMI_7 = %in", C_UDMI(c1, t1, 7));
} // end of DEFINE_DPM_EROSION
-
June 26, 2019 at 12:55 pm
Rob
Ansys EmployeeBreak the problem down. The DPM part in the main solver is working & giving consistent results. What triggers a particle to register on UDM, and why is only part of the code parallelised?
Note, I'm not debugging the code: I'm asking questions so you can review what you've done.
-
June 26, 2019 at 1:58 pm
jianan.zhao
SubscriberHi Rwoolhou,
Thank you for your comments.
Here is the idea behind the code:
(1) Since I only need to count for the deposition number, particle doesn't have to register on UDM. So, basically UDMI is only a counter. Every time a particle hits a wall surface, DEFINE_DPM_EROSION is executed automatically, and then the value stored in UDMI plus 1.
(2) About parallel issue, do you suggest to parallelize UDF DEFINE_DPM_EROSION, too? Is that the reason why Hybrid method cannot give the correct output?
I have read following in Fluent Customization Manual:
"Since all fluid variables needed for DPM models are held in data structures of the tracked particles, no special care is needed when using DPM UDFs in parallel ANSYS Fluent"
so I thought it is not necessary to parallelize UDF DEFINE_DPM_EROSION, and the code works when using Shared Memory method.
Anyway, I can give it a try and see if parallelization can solve the problem.
-
June 26, 2019 at 3:00 pm
jianan.zhao
SubscriberSo, I guess my question is where is UDMI data stored, in HOST or NODE? How does Hybrid and Shared Memory methods affect the data output?
Thank you.
Jianan
-
June 26, 2019 at 5:17 pm
jianan.zhao
SubscriberI think I have found the problem.
The UDMI value is stored in NODEs, so that if using Hybrid method for DPM, one has to first gather data on NODEs and then pass the data to the HOST. After that HOST can process the data correctly, such as write to a local file. I have updated my UDF and posted here in case that anyone gets the same problem in the future.
-
June 27, 2019 at 4:56 am
DrAmine
Ansys EmployeeEither host or node0 write data -
June 27, 2019 at 5:04 am
DrAmine
Ansys EmployeeAnd nothing is stored on host. And the problem has nothing brto do with DPM parallel method. Thanks for sharing your solution.
Please mark this then as Is Solved.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
-
3720
-
2570
-
1783
-
1236
-
594
© 2023 Copyright ANSYS, Inc. All rights reserved.