CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Constrained Species in Multicomponent flow (http://www.cfd-online.com/Forums/cfx/19948-constrained-species-multicomponent-flow.html)

Jonathan October 17, 2003 13:28

Constrained Species in Multicomponent flow
 
Hello everyone,

I am trying to model a solid oxide fuel cell with CFX 5.6. (Is anyone else out there modelling fuel cells?) My current problem is a with how CFX deals with multiple fluid streams that are separated by a solid. I have two domains defined one solid and one liquid. The liquid domain consists of two unconnected sections. Both the anode gas and the cathode gas consist of multiple components.

I would like to set two different constraint species one for each stream. CFX only lets me use one constraint and if I use a mass sink on one side and a mass source on the other, I end up with some of the constrined gas (Nitrogen) in both streams. I don't want any Nitrogen on the anode side.

I understand why I'm only allowed one constraint species, but I'm not sure how to get around this problem. Can anyone out there suggest a solution?

I would appreciate that very much.

Jonathan


Bart Prast October 20, 2003 03:46

Re: Constrained Species in Multicomponent flow
 
As the constrained omponent is only there to "fix" the sum of all concentrations (=1), you can add a bogus component with a very small concentration to both streams that has no influence on your computations. This might work.

Jonathan October 20, 2003 13:20

Re: Constrained Species in Multicomponent flow
 
Bart,

Thank you for your reply and your suggestion. I gave your suggestion a try - unfortunately too much of the bogus component shows up.

I believe the problem lies in the fact that there is no way to remove mass from the domain that is specific only to one species in a multicomponent flow. (You can sink a particular component, but it doesn't carry any mass.) A mass sink at any spot in the domain behaves much like an outlet would.

I'm not sure what to try next. Perhaps I can use additional variables for my components ...

Thanks again (and let me know if you need a clearer description of my problem.)

Jonathan

Robin October 20, 2003 15:36

Re: Constrained Species in Multicomponent flow
 
Hi Jonathan,

I believe the problem lies in the fact that there is no way to remove mass from the domain that is specific only to one species in a multicomponent flow. (You can sink a particular component, but it doesn't carry any mass.) A mass sink at any spot in the domain behaves much like an outlet would.

The contraint is needed to preserve mass in the presence of round-off errors in the species calculation. Similarly, if you remove a species without removing the corresponding mass, the balance will be made up of your constraint. If you intend to remove a species entirely, you must also remove the corresponding mass from the mass equation.

This is relatively straightforward to do. If you already have an equation source for your mass fraction, say A [kg/m^3/s], then add a corresponding Continuity source equal to A [kg/m^3/s] * volcvol to get the mass source. Then enter the corresponding mass fraction and fluid properties for the continuity source(the properties are only used if mass is to be added, not removed).

Regards, Robin

Robin October 20, 2003 15:41

D'oh!
 
Nevermind my previous post. I now see that you cannot remove a specific species, only introduce it.

-Robin

Bart Prast October 21, 2003 03:32

Re: D'oh!
 
Still,

I you have an inert carrier gas you can make a constrained component with the same properties as this carrier gas. Should be possible. It's only about roundoff errors so you can have a very small fraction of your constrained component

Jonathan October 21, 2003 10:23

Re: D'oh!
 
Bart,

Thank you for your suggestions. I think I understand what you are saying and I think what you are hitting at is part of the solution.

But a problem still remains: The sum of all component sources must be zero according to the code. Therefore, as soon as you try remove a species (to try simulate transport through an electrolyte) it is automatically replaced with the constraint component. I guess the trick is to make sure the constraint component has the correct properties. This isn't easy, but I think it is what I have to do.

Any thoughts?

Bart Prast October 21, 2003 10:31

Re: D'oh!
 
I'm moving towards uncharted teritories here (for me). In CFX5 you can model chemical reactions. This would have to be done with a multicomponent simulation and thus with a constrained component. Components will be removed due to reactions and re-appear in a different species. That seems like a similar problem. My question then is how's that done in CFX? Or are mass sources treated different than chemical reactions? I'm hoping for an answer from CFX here (Robin, over to you).

Robin October 21, 2003 12:51

Re: Eureka!
 
Bart,

The problem is not the reaction, it is that Jonathan wants to draw material out of the domain with a mass sink, simulating transport through an electrolyte.

He has added an equation source to remove one component, but mass conservation requires the balance to be made up of the constraint. If he adds a corresponding mass sink, the mass sink draws out mass uniformly across all components.

I suppose you could formulate expressions for all the components to give you the correct proportions of each, then add a corresponding mass sink. If the proportions are correct, it won't matter that the mass is removed uniformly.

Regards, Robin


Jonathan October 21, 2003 13:54

Re: Eureka!
 
Thanks to both of you for helping me see this situation a little bit clearer. I will try adjust the fluid properties to get the proper behaviour.

One more question: Is it possible to change material properties (such as thermal diffusivity or density) using the value of an additional variable or a mass fraction?

rho = f(AV1, AV2 ...)

Is that possible using Junction Boxes?

Thanks again, Jonathan

Robin October 22, 2003 21:44

Re: Eureka!
 
You can write a CEL function for Thermal Diffusivity as a function of your additional variables, there is no need for Fortran unless you want to create a more specialized function. However, you cannot define density as a function of anything other than pressure and temperature.

-Robin


All times are GMT -4. The time now is 03:35.