|
[Sponsors] |
DEFINE_DPM_BC -- mass flow rate of aborted particle |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 13, 2015, 23:42 |
DEFINE_DPM_BC -- mass flow rate of aborted particle
|
#1 |
Senior Member
Sangwoo Kim
Join Date: Jul 2014
Location: Seoul, South Korea
Posts: 115
Rep Power: 12 |
I'm trying to practice DEFINE_DPM_BC example of UDF manual.
There, some particles are active and some aborted. I want to calculate the mass flow rate of aborted particles and display it in contour. My first idea was using user defined memory and P_FLOW_RATE(p). --> cell_t c; --> C_UDMI(c,t,0)=P_FLOW_RATE(p); But it didn't work. I don't know whether this idea is bad or there was just some mistake in coding. How can I do it? I just begin to learn about UDF and I don't know almost everything about UDF. So any help or idea will be highly appreciated!
__________________
Best regards Last edited by swtbkim; October 14, 2015 at 04:29. |
|
October 14, 2015, 12:03 |
|
#2 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Code:
I want to calculate the mass flow rate of aborted particles and display it in contour. If your only goal would be to get the number, you can stop programming because it is already implemented in Fluent. But if you want to learn how to make UDFs, it is a good exercise. You say: Quote:
So, how would you calculate the mass flow rate if you were the computer? Just make a simple plan (in English or another "human" language) that the computer should follow. That is 80% of programming. If you do this properly, you will get a short, simple, easy, program. The other 20% is translating the human language into computer language. If you did the first 80% correctly, it will be just a few lines. If you did the first 80% poorly, this will be very annoying work. So spend time on getting the 'plan' ok. Last edited by pakk; October 14, 2015 at 12:10. Reason: actually you tried to be clear |
||
October 17, 2015, 01:49 |
|
#3 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
It sounds like you want to calculate the mass flow rate of particles on a cell-by-cell basis and display this distribution with contours. Try looping through all particles and adding their flow rate to the cell in which they reside (with user-defined memory). Because of the discrete nature of Lagrangian particle tracking, the contours may have patches (increase the number of particles to smooth the distribution).
|
|
January 11, 2018, 05:00 |
|
#4 | |
New Member
BigZ
Join Date: Jan 2018
Posts: 11
Rep Power: 8 |
Quote:
|
||
January 11, 2018, 09:23 |
|
#5 |
Senior Member
Join Date: Sep 2017
Posts: 246
Rep Power: 12 |
The recent discussion of bigfish_1023's case might be useful: see UDF for statistics of dpm trapped on the wall.
The overall plan of adding to User-Defined Memory during calls to DEFINE_DPM_BC sounds like a good start to me. My preference would be to aim for mesh-independent values, and hence to divide face impact rates by face area. Note that the parameters passed to DEFINE_DPM_BC relate to the wall face, not the cell. If you allocate a User-Defined Memory, then wall faces have it as well as cells, so you can add to F_UDMI(f,ft). You will eventually want a UDF (maybe DEFINE_ON_DEMAND) to set the UDM back to zero. Plotted contours typically use cell values, so you might also want to look up the cell and add to C_UDMI(c,ct) -- see the code snippets I posted in that other thread. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mass flow rate: calculation v/s computation | beguxa | FLUENT | 5 | December 2, 2018 22:02 |
Target Mass Flow Rate | Nitin | FLUENT | 9 | June 17, 2017 11:30 |
DEM - Post Processing : Particle Mass Flow Rate | yesaswi92 | STAR-CCM+ | 4 | August 27, 2014 16:23 |
How to define a fixed velocity for a given mass flow rate on inlet | mqasimali | FLUENT | 2 | April 12, 2013 18:24 |
mass flow rate error | Masood | FLUENT | 0 | May 22, 2005 01:32 |