Tagged: DPM-UDF-Parallel
-
-
March 3, 2022 at 8:56 am
Saxon_HUI
SubscriberI have compiled a UDF of particle combustion, which describes the heat and mass transfer laws of particles after entering a high temperature environment. According to the needs of calculation, I need to obtain the fluid parameters in the cell where the particles are located, such as calculating the Prandtl number. When I need to obtain physical parameters such as dynamic viscosity and specific heat of the fluid in the cell where the particles are located, I assign the calculated values to TP_USER_REAL according to the UDF help manual. There is no problem in the serial calculation of the program. When I start the parallel calculation(6 nodes), the calculated Prandtl number curve will be discontinuous. I observed that the number of discontinuous "cusps" is equal to the node numbers of the parallel operation I opened.
I would be very grateful if anyone could provide any advice and help!
March 3, 2022 at 9:03 amSaxon_HUI
SubscriberI am attaching part of the code below:
DEFINE_DPM_SCALAR_UPDATE(dTdt_update, cell, thread, initialize, tp)
{
cphase_state_t *c = &(tp->cphase[0]);
......
TP_USER_REAL(tp,42) = c->sHeat * c->mu / c->tCond;
......
}
And on the DPM model template, I chose the parallelized computation method of message passing
March 3, 2022 at 11:31 amRob
Ansys EmployeeHave a look in the UDF manual for the parallel chapter. There are a number of macros that get called on host/node and this can result in cells being checked or calculated twice (or more) as they're on a partition boundary.
March 3, 2022 at 12:19 pmSaxon_HUI
Subscriber@RobYes, I've checked the relevant section of the UDF manual on DPM parallel computing and it says "In the case of parallel simulations, you must use user variables specific to particles, as they can be accessed via macros TP_USER_REAL(tp, i) (tp is the type of Tracked_Particle *) and PP_USER_REAL( p, i) (p is the type of particle *). Only this information is in partition boundaries, while other local or global variables will not cross partition boundaries." , I have used TP_USER_REAL(tp, i) to save my calculations according to the instructions, but the fluent parallel calculation does not return a "continuous" result for me.
March 3, 2022 at 1:53 pmRob
Ansys EmployeeWhat cell zone functions are you using?
March 4, 2022 at 12:43 amSaxon_HUI
Subscriber@RobSorry, I didn't quite understand what you meant. What do you mean by "cell zone functions"? I have attached my part of the code above. I just want to calculate the Prandtl number of the fluid in the cell where the particle is located: TP_USER_REAL(tp,42) = c->sHeat * c->mu / c->tCond; further I can obtain the convective heat transfer coefficient h to calculate the convective heat transfer of the fluid to the particle.Thank you sincerely for your positive response and help´╝ü
March 4, 2022 at 4:53 pmRob
Ansys EmployeeAre you using any cell loops etc?
March 5, 2022 at 12:16 amSaxon_HUI
SubscriberI did't use any cell loops in my UDF code.
March 8, 2022 at 1:50 pmRob
Ansys EmployeeTry hybrid, I'm sure there was a flag on an old case that suggested Message Passing memory was being retired.
March 9, 2022 at 4:11 amSaxon_HUI
SubscriberThank you very much for your reply! I have tried message passing,shared memory and a hybrid approach and the calculations show that memory sharing gives me the right result in parallelising DPM, at least it doesn't have discontinuous "spikes" at the moment.
March 9, 2022 at 7:02 amDrAmine
Ansys EmployeeSorry but what you are doing is not completely correct. If you want to get the Prandtl Number in the cell your particle is actually located you need to access that cell and there you can store the Prandtl Number in a cell memory. What you are doing now you are doing it first right but then you store value as particle user variable.
I assume now that the Prandtl Number of the continuous phase has nothing to do with the DPM particles I won't rely on any DPM Macros here. So you can then via DEFINE_ADJUT calculate Pr for every cell store it in memory and then if you require that value for DPM customization you just need to get into the cell index and cell thread the particle is currently located in it.
March 9, 2022 at 7:21 amSaxon_HUI
SubscriberThank you very much for your valuable advice, I will try to use this approach in my subsequent work. But I still have a question, what is wrong with storing the parameters (e.g. Prandtl number) calculated from the cell in the particle scalar (TP_USER_REAL(tp,i))? Or even any serious error problems that can occur? At least in my current work, the results obtained by fluent calculations are respectable. I hope to get your reply, and thanks again sincerely!
Viewing 11 reply threads- You must be logged in to reply to this topic.
Ansys Innovation SpaceEarth 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.
Trending discussions- 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
Top Contributors-
2600
-
2088
-
1319
-
1108
-
459
Top Rated Tags© 2023 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-