|
[Sponsors] |
January 19, 2010, 05:12 |
Add Mass to a Particle with UDF (DPM)
|
#1 |
Senior Member
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20 |
Hello World.
I'm using the Discrete Phase Model and I'm toying around with the UDF. So I want to "simply" add mass to the particle with an UDF: Code:
#include "udf.h" #include "dpm.h" DEFINE_DPM_SOURCE(dpm_source,c,t,S,strength,p) { P_MASS(p) = 2 * P_MASS(p); } Here is the log-file: Code:
myudf.c:1:2: error: invalid preprocessing directive #inlcude myudf.c:2:2: error: invalid preprocessing directive #inlcude myudf.c:6: warning: return type defaults to int myudf.c: In function DEFINE_DPM_SOURCE: myudf.c:7: warning: implicit declaration of function P_MASS myudf.c:7: error: lvalue required as left operand of assignment
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!" |
|
January 19, 2010, 05:27 |
|
#2 |
Senior Member
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20 |
Well, it's not working because I mistyped "include" ...
I have correted it, can compile but the UDF is not doing what I want: add mass to the particle ...
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!" |
|
January 19, 2010, 14:46 |
|
#3 |
Member
Allan Walsh
Join Date: Mar 2009
Posts: 56
Rep Power: 17 |
Why don't you use the DPM laws to describe coal particle combustion? You can customize each of the laws through the UDF's. For example, I don't know when your DPM_SOURCE macro would even be visited by the code to change the particle mass. Keep in mind that modifying macros may require weeks or months of work to do what you want.
|
|
January 19, 2010, 16:02 |
|
#4 | |
Senior Member
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20 |
Quote:
I think customizing the laws may be the right approach to this kind of problem. But at this stage I'm simply toying around with the UDF in general. Obviously this was misleading. So what do you think maybe the right approch to this kind of problem? I have to define a particle with different mineral fractions, introduce and solve the reaction kinetics equations for each of them and thus alter the composition of the particle. (An UDF for the calculation of the viscosity and thus to decide if the particle adheres to the wall allready exists.) Will this be possible with the coal combustion laws?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!" |
||
January 20, 2010, 13:56 |
|
#5 |
Member
Allan Walsh
Join Date: Mar 2009
Posts: 56
Rep Power: 17 |
The use of udfs for particle laws seems to be the logical approach. You can define variables external to the macros, such that they are available where needed-probably not the proper method for c++ but it works. Then you will need a customized wall boundary condition to determine if the particle sticks. The example in the UDF manual for erosion gives some hints. Good luck.
|
|
January 20, 2010, 14:10 |
|
#6 | |
Senior Member
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20 |
Quote:
Corrently I am more interessted in the reaction kinetics. Are there some examples available anywhere?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!" |
||
October 24, 2013, 23:14 |
UDF for particle sticking to wall
|
#7 | |
New Member
Ali Hosseini
Join Date: Jun 2013
Location: Edmonton
Posts: 3
Rep Power: 13 |
Quote:
I'm also working on slag formation during coal gasification and I need to write UDF to give criterion to FLUENT to say which particles will stick to wall and which particles won't stick, do you have any idea or any sample UDF in this matter? |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HELP! adding a mass source to VOF eqn. by UDF??? | ROOZBEH | FLUENT | 5 | December 3, 2016 18:53 |
particle, parcel and mass flow rate balance | flybird | FLUENT | 0 | May 24, 2007 11:44 |
UDF solution variable for time-averaged mass frac? | A. S. | FLUENT | 0 | May 14, 2007 17:44 |
Particle mass flow rate | Jeff | CFX | 3 | September 17, 2004 11:46 |
Help: UDF problem--How to add bodyfore to the DPM | KE | FLUENT | 3 | August 18, 2003 09:02 |