CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

DEFINE_SOURCE, injection in one Cell, mass balance

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 27, 2007, 06:51
Default DEFINE_SOURCE, injection in one Cell, mass balance
  #1
Vitali
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
  Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Particle Injection Mass Flow Rate and Position leonozx FLUENT 3 March 9, 2018 09:58
DPM mass balance help jpinho FLUENT 1 April 25, 2014 06:48
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
Variable mass flow rate injection. Eng_mech78 FLUENT 0 April 4, 2011 11:49
mass injection in a 2D axi-symmetric problem hyun Main CFD Forum 1 April 26, 2006 00:25


All times are GMT -4. The time now is 01:48.