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

Mass sources - help!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 22, 2008, 19:48
Default Mass sources - help!
  #1
Emmanuel Resch
Guest
 
Posts: n/a
My overall mass balance doesn't make any sense. I have a mass sink, i.e. negative mass source, that ends up ADDING mass to a stream instead of subtracting. I'm pretty sure that I have FLUINJ.F and SORSCA.F written correctly... Does anyone have any suggestions?
  Reply With Quote

Old   April 23, 2008, 03:20
Default Re: Mass sources - help!
  #2
Richard
Guest
 
Posts: n/a
Turn on the conservation checks in the info file. Look at whether the continuity equation is converged (negligible imbalance) and, if so, whether msor really is the opposite sign to what you expect. Also check that the sorsca sources sum to zero in each cell. If there's no imbalance and sorsca is correct but msor is not, then the suspicion falls the fluinj coding.
  Reply With Quote

Old   April 23, 2008, 14:26
Default Re: Mass sources - help!
  #3
Emmanuel Resch
Guest
 
Posts: n/a
Thanks for the response, I have checked the .info (data below). In one stream, H2 should have a sink, H2O should have a source. In the other stream, O2 should have a sink, and N2 + O2 = 1. I do not get this at all...

Quick question, how do I monitor mass sources for EACH cell? Is it via the Monitor Cell Behavior Panel in the Star Guide?

From the .info file, FLUINJ showed mass balance. SORSCA shows very strange results... N2 should by no means have a negative MSOR. Any ideas?

Data from info:

MATERIALWISE SPECIES BALANCE (kg/s)

MAT. NO. SCALAR MDIFF SCIN SCOUT MTRAN MSOR MDROP MTRNS

1 H2 2.2304E-11 7.4521E-11 8.6296E-11 0.0000E+00 -1.0528E-11 0.0000E+00 0.0000E+00

1 H2O -1.5517E-10 1.0792E-10 1.3040E-10 0.0000E+00 1.7765E-10 0.0000E+00 0.0000E+00

1 O2 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00

1 N2 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00

2 H2 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00

2 H2O 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00

2 O2 7.8965E-11 1.0280E-09 1.0057E-09 0.0000E+00 -1.0120E-10 0.0000E+00 0.0000E+00

2 N2 3.2677E-12 3.3833E-09 3.3233E-09 0.0000E+00 -6.3273E-11 0.0000E+00 0.0000E+00

  Reply With Quote

Old   April 24, 2008, 04:21
Default Re: Mass sources - help!
  #4
Richard
Guest
 
Posts: n/a
The problem looks to be that your sorsca sources are incorrect. Remember that one of your species (N2?) is probably not being solved using a transport equation, but is just algebraic. It has a sink for msor because that is what is required for the sources to sum to zero. Even if it was being solved using a transport equation and so sorsca was called for it, it would be your responsibility to make the sources sum to zero so once the other species sources have been specified, you have no choice over the value of the N2 source. Check your sorsca, it is almost certainly wrong.

You can't monitor the sources in each cell unless your coding copies them into a passive scalar.
  Reply With Quote

Old   April 24, 2008, 09:29
Default Re: Mass sources - help!
  #5
Emmanuel Resch
Guest
 
Posts: n/a
Thanks for the further guidance, but here's something else that puzzles me. In stream 2, the background fluid is N2, with O2 and N2 defined as scalars. My O2 sink is:

S1P=1e-20

S2P=16.7/SCALAR(O2) ![kg/s/m^3]

I have dropped the source term for the N2 scalar, such that any redistribution in mass will be made up by the N2 background fluid. Would this be a mistake?

Even so, in stream 1, I am still quite confused as to why H2 gets added instead of subtracted. My background fluid is He, and these are my two source and sink terms...

H2 sink term:

S1P=1e-20 S2P=2.10/SCALAR(H2) ![kg/s/m^3]

H2O source term:

S1P=18 ![kg/s/m^3] S2P=1e-20

Does anyone see any ovbious errors? I am really stumped here... Thanks.
  Reply With Quote

Old   April 24, 2008, 09:46
Default Re: Mass sources - help!
  #6
Emmanuel Resch
Guest
 
Posts: n/a
Could it also be that the residual tolerances on my scalar transport equations (currently set at 0.1) are way too large and these inner solver eq's just aren't being solved to give any accuracy?
  Reply With Quote

Old   May 6, 2008, 08:07
Default Re: Mass sources - help!
  #7
Richard
Guest
 
Posts: n/a
You say you are applying

S1P=1e-20

S2P=16.7/SCALAR(O2)

which means

source(O2) = 1e-20 - SCALAR(O2)*16.7/SCALAR(O2) = 16.7 [kg/s/m^3]

i.e. it's a fixed source of 16.7 kg/s/m^3. Is this really what you intend? Or do you want

source(O2) = 1e-20 - SCALAR(O2)*16.7

meaning

S1P=1e-20

S2P=16.7

  Reply With Quote

Old   May 22, 2008, 12:12
Default Re: Mass sources - help!
  #8
Emmanuel Resch
Guest
 
Posts: n/a
Thanks to you Richard for the help, but I think I have figured out one of the problems, as I seem to have finally balanced the mass sources and sinks properly.

I unfortunately still have large error in my MDIFF values in the "MATERIALWISE SPECIES BALANCE" section. Any ideas?

This is how mass is injected/removed in STAR-CD, according to my understanding. I am posting this in case it might help others who have been in the same predicament as myself.

First, any mass injected or removed must be specified in FLUINJ.F. In my case, I am adding H2O to stream 1, and subtracting O2 from stream 2. This gets tricky, because when injecting mass, one must specifiy which species to inject. WHEREAS, when removing mass, one cannot specify which species will be removed - STAR will simply remove whatever flux in [kg/s/m3] and then each species will be consumed according to the local mass fraction. My previous expression for mass flux from stream 1 was thus wrong. This also explains why I was properly predicting the sources for H2, but not for H2O and O2.

I was under the impression that FLUINJ.F and SORSCA.F work independently of each other, but that was indeed wrong. Whatever mass injection/removal is specified in FLUINJ.F will show up in the info file in the "MATERIALWISE SPECIES BALANCE" section as well. That is why my MSOR values in the info file were not making sense.

What I've done...

1. In FLUINJ, a mass source is specified in stream 1, the scalar to which that mass source pertains is also specified. A mass sink is specified for stream 2 also, but it affects the general density of stream 2, and it removes mass from oxygen according to the local mass fraction. In this way, the background fluid (nitrogen) is removed as well, which is undesirable.

2. These mass sources/sinks from FLUINJ show up in the info file in the scalar mass balance section, even when there are no source terms specified in SORSCA. Any undesirable sources/sinks must thus be accounted for in in SORSCA, and that is what I have done.

  Reply With Quote

Old   May 23, 2008, 03:15
Default Re: Mass sources - help!
  #9
Richard
Guest
 
Posts: n/a
Sounds like you've done the right thing.
  Reply With Quote

Old   May 23, 2008, 10:55
Default Re: Mass sources - help!
  #10
Emmanuel Resch
Guest
 
Posts: n/a
Thanks Richard, as the MSOR values agree with my predicted source values, the problem is now with the MDIFF values. For the life of me I can't figure out why there are still errors in the "MATERIALWISE SPECIES BALANCE (kg/s)" section, and it seems that STAR-CD support not able to help me with this problem either...

If you think you might be able to help, my info file is here... 66.49.189.70/star/case.info

Namely, I have the following problem:

SCIN + MSOR does not equal SCOUT.

would the errors likely be:

1. a function of my small flow rates ( ~10^-10 kg/s)? 2. a function of the high resistances to flow in the cells that contain these source terms (alpha and beta flow resistance coefficents on the order of 10^5 and higher)? 3. a function of grid - even though grid density is very high?

  Reply With Quote

Old   May 29, 2008, 03:24
Default Re: Mass sources - help!
  #11
Richard
Guest
 
Posts: n/a
It could be that the low flow rates are a problem: maybe they are the same order as the convergence error. Have you tried tightening the residual tolerance on the equations?
  Reply With Quote

Old   May 29, 2008, 10:20
Default Re: Mass sources - help!
  #12
Emmanuel Resch
Guest
 
Posts: n/a
Yes, I have tried tightening the residuals, from 0.1 to 1e-5. This has had no effect unfortunately. Nor does increasing the inlet flow rates...
  Reply With Quote

Reply


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
Mass sources Nikolaos FLOW-3D 1 January 10, 2009 00:22
Mass sources and sinks for multiPhaseFoam newbee OpenFOAM Running, Solving & CFD 0 July 7, 2006 03:44
URGENT:mass sources karthik FLUENT 0 February 23, 2006 13:28
URGENT:mass sources karthik Main CFD Forum 0 February 23, 2006 10:05
Mass sources in CFX4.4 Carl CFX 3 January 10, 2004 14:05


All times are GMT -4. The time now is 07:21.