|
[Sponsors] |
DEFINE_SOURCE, injection in one Cell, mass balance |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 27, 2007, 07:51 |
DEFINE_SOURCE, injection in one Cell, mass balance
|
#1 |
Guest
Posts: n/a
|
Hi everybody! I do some injection of methane in one Cell in zone. But if I calculate mass balance after, I see, that it was more injected in Cell. Is somebody know, what I do wrong?
I use "boudary condition" and I activated "Source Terms" in GUI. Then I can see in the list all species that I use (CH4, O2, CO2 and H20), mass (kg/m3-s), axial momentum and more. After I set my DEFINE_SOURCE in UDF to the methane in the list. I use UDF, because my injected mass of methan must be change and so I can quick change the location of injection's point and I don't need create a new zone. I inject only in one Cell, which I marked with UDM equal 1. Then I can proof in looping, is it my cell for injection or not. I tried it with steady and unsteady problem, and got the same result. It was injected to many methane. source has units [kg/(m3*s)], so I use formel source = mass flow of Methan that I inject [kg/s] / C_VOLUME(c,t)[ m3] the part of my C-code: DEFINE_SOURCE(injection_in_Cell, c, t, dS, eqn) { float source=0., mass_flow=0.001; /* kg/s */ if (C_UDMI(c,t,UDM_SOURCE) ==1.0) { Message("######## Injection in Cell ID=%i\n",c); source=mass_flow / C_VOLUME(c,t); dS[eqn]=0.0; } return source; } for test mass balance I use: /report species-mass-flow Vitali |
|
April 27, 2007, 14:58 |
Re: DEFINE_SOURCE, injection in one Cell, mass bal
|
#2 |
Guest
Posts: n/a
|
Lets try this again. If you just type in the mass source, i.e. 0.001 without using your UDF, does it work.
Now for your UDF, can you explain which variable passes the source term back, since you have set dS[eqn]=0.0 ? Why do you use the type "float" rather than real? |
|
April 27, 2007, 17:39 |
Re: DEFINE_SOURCE, injection in one Cell, mass bal
|
#3 |
Guest
Posts: n/a
|
Hi,
>> Lets try this again. If you just type in the mass source, i.e. 0.001 without using your UDF, does it work. if I do it without UDF, then I cann't find my marked for injection Cell with UDM. if (C_UDMI(c,t,UDM_SOURCE)==1.0) I know, that I can create a new zone and then set source for this zone. And it works fine, mass balance is correctly My UDF return variable source. If my cell for injection was fount, I set source equal mass_flow / C_VOLUME(c,t), if not then source remains zero. > type "float" rather than real? I donn't know, I will change it and hope that is the problem., but I'm not sure. I hope some day understand, how DEFINE_SOURCE work with separate cell Thank's for your support! |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Particle Injection Mass Flow Rate and Position | leonozx | FLUENT | 3 | March 9, 2018 10:58 |
DPM mass balance help | jpinho | FLUENT | 1 | April 25, 2014 07:48 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
Variable mass flow rate injection. | Eng_mech78 | FLUENT | 0 | April 4, 2011 12:49 |
mass injection in a 2D axi-symmetric problem | hyun | Main CFD Forum | 1 | April 26, 2006 01:25 |