TAGGED: DPM-UDF-Parallel
-
-
March 3, 2022 at 8:56 amSaxon_HUISubscriber
I 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_HUISubscriberI 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 amRobForum ModeratorHave 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_HUISubscriber@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 pmRobForum ModeratorWhat cell zone functions are you using?
March 4, 2022 at 12:43 amSaxon_HUISubscriber@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 pmRobForum ModeratorAre you using any cell loops etc?
March 5, 2022 at 12:16 amSaxon_HUISubscriberI did't use any cell loops in my UDF code.
March 8, 2022 at 1:50 pmRobForum ModeratorTry 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_HUISubscriberThank 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 amAmine Ben Hadj AliAnsys 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_HUISubscriberThank 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- The topic ‘About DPM UDF Parallelisation’ is closed to new replies.
Ansys Innovation SpaceTrending discussions- 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
Top Contributors-
1281
-
591
-
544
-
524
-
366
Top Rated Tags© 2024 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.
-