|
[Sponsors] |
February 24, 2016, 03:50 |
Dpm
|
#1 |
Senior Member
Join Date: Mar 2014
Posts: 375
Rep Power: 13 |
Hi
Is it possible to call a DPM udf only for particles in a specific cell? apparently if a UDF is called if a particle is in a particular cell, the UDF ends up being called for all the other particles as well? So, its not called at all, or if called based on the cell property it is called for all the particles not just the one in that cell? Or am i missing out something here. |
|
February 29, 2016, 18:54 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
I'm not aware of a direct method, but you could loop through all particles and use a conditional if statement to restrict dealing with only particles residing in a certain cell. What are you trying to achieve overall?
|
|
February 29, 2016, 22:06 |
|
#3 |
Senior Member
Join Date: Mar 2014
Posts: 375
Rep Power: 13 |
I was wrong, I got multiple print messages because the UDF was called every time step when the if condition for that cell was true.
So it was called multiple times for every cell. The idea is to go through the calculation in the UDF only as a particle enters a new cell and not at every time step the particle is inside the cell to reduce the computational expense. Is there a DEFINE_DPM macro which is only called once for every cell and not every particle time step? I was thinking to run through all the code when values for particle properties at entry to current cell were available e.g. P_POS0(p), otherwise perform no calculation. But I am not sure how to implement this? Can it be checked that a certain property is available with Data_Valid_P() or is this idea totally wrong? |
|
February 29, 2016, 23:24 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
There's no DPM macro called once per particle step per cell (very specific!). It could be worthwhile to see if checking P_POS0 == P_POS works. Otherwise, you could explore UDM on either the cell or particle; both of which might be more computationally costly compared with running a line of code at each particle time step within the cell.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dem v.s dpm? | Amir1 | Main CFD Forum | 1 | November 3, 2019 10:52 |
DPM injection mass flow rate | kingpots | ANSYS | 0 | November 22, 2012 12:12 |
DPM modeling | Mohsin | FLUENT | 0 | March 31, 2010 23:11 |
DPM - do the particles affect the liquid? | Nikhil Dani | FLUENT | 0 | January 1, 2009 12:58 |
slow after mesh for enhanced wall treat DPM | joshkemp | FLUENT | 0 | May 1, 2007 18:20 |