CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Siemens (https://www.cfd-online.com/Forums/siemens/)
-   -   Mass removal and injection...Please help! (https://www.cfd-online.com/Forums/siemens/54714-mass-removal-injection-please-help.html)

Richard July 18, 2005 05:30

Re: Mass removal and injection...Please help!
 
There's not really cause for concern here: you will always have an imbalance in the scalar transport as star is only converging the equations to a finite tolerance. You can make this tolerance as fine as you need it to be, until round-off error etc stops you converging even more. I guess you have this tolerance as 0.001, the default. The balance is roughly SCIN + MSOR = SCOUT + MDIFF. Or maybe MDIFF should be on the left-hand side, but anyway, the point is you should be able to reduce MDIFF by tightening the tolerance, if you're not happy with its current level.

Kevin Till July 18, 2005 14:07

Re: Mass removal and injection...Please help!
 
Richard,

Sounds like the difference in the MSOR and calculated MSOR values is not a big deal. I will work with that tolerance level.

How about this though...

For O2 I have from the info file:

4.2468E-07 inlet and 4.2489E-07 outlet from the info file. These have a difference of 2.10E-10.

Which does not make sense because it is positive, and oxygen is supposed to be being CONSUMED.

- Kevin


Kevin Till July 19, 2005 11:02

Re: Mass removal and injection...Please help!
 
Richard,

Let me start over and try to explain what I believe to now be happening. The MSOR numbers are what they should be. They match the production and consumption numbers that I have input into the subroutines. I am having a problem, however, with the model still. Based on the info file it seems that the oxygen scalar is not behaving correctly. It shows an increase in flux where as it should be a decrease like my subroutines and the MSOR values suggest. Furthermore, even though the sign on the hydrogen flux is correct, I do not know that it is numerically accurate. When I load the .pst of my model and check out some graphical displays, I get some interesting things happening. First, if I plot the concentrations of either scalar, they are moving in the right directions (oxygen decreases, water increases). But, this only occurs for the first oh, 1/40, I would say of the model. After that the concetration apperears to remain constant. This boggles me. The same goes for the overall density plot. The pressure plots seem reasonable as the pressure decreases steadily throughout the entire model. I tried to attempt a simulation of near complete oxygen consumption in the model so that I could see if the velocity would decrease significantly near the end of the model but the velocity plot did not turn out as I had hope. It merely looked as it did for a smaller consumption of oxygen. Lastly, i have tried to increase percision by decreasing tolerances in the scalar equations as well as the overall max residual tolerance. In doing that the solution will not converge.

Any ideas would be awesome. Thanks again.

- Kevin

Richard July 19, 2005 14:54

Re: Mass removal and injection...Please help!
 
What are the SCIN, MSOR, SCOUT and MDIFF values at convergence for your two scalars? And what about the overall mass balance (FDIFF etc)?

What model are you using for the density? Ideal gas?

And do you have any warnings in the info file when you reach convergence?

Kevin Till July 19, 2005 18:29

Re: Mass removal and injection...Please help!
 
Richard,

For density I am using compressible ideal (T,P). There are no warnings in the info file when I reach convergence. Here are the other values (at the last iteration) you wanted to know about:

Overall... FDIFF=8.6402E-12 TotalFlowIn=2.2351E-06 TotalFlowOut=2.2415E-06 FLINJ=6.3477E-09

For O2... SCIN=4.2468E-07 MSOR=-5.0300E-08 SCOUT=4.2491E-07 MDIFF=5.0524E-08

For H2O... SCIN=2.2344E-08 MSOR=5.6608E-08 SCOUT=2.3487E-08 MDIFF=-5.5466E-08

If I revert back to smaller consumption/production rates, it will converge but the plots and info file data do not make sense, as I previously mentioned (the numbers above are from this case). If I attempt to increase the consumption/production rates to where almost all oxygen is consumed by the outlet (80% reduction let say) I run into convergance problems with the mass terms.

Let me know what you make of it. Thanks.

- Kevin

John Luo July 25, 2005 06:25

Re: Mass removal and injection...Please help!
 
Just as a matter of interest, are you trying to simulate Fuel Cell?

Kevin Till July 25, 2005 10:02

Re: Mass removal and injection...Please help!
 
Trying, yes.

John Luo July 25, 2005 13:09

Re: Mass removal and injection...Please help!
 
Try this:

1. In prostar, activate posdat.f Analysis Controls=>Analysis Output>User Subroutine, then Ususb write posdat.f

2. creat a common block, say

common/kevin1/kevin

kevin=0 3. in sorsca.f, copy the same common block and set

kevin=1 4. in fluinj.f, copy the same common block and before return

if(kevin.eq.1) FLUXI=0.0

This way, you should be able to see eaxctly the source balance. This is just saying that for scalar equations, fluid injection should not contribute to source as the exact source is already specified by sorsca.

Hope this is of help to you.


All times are GMT -4. The time now is 06:20.