CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Mass/continuity sink question (https://www.cfd-online.com/Forums/cfx/151322-mass-continuity-sink-question.html)

khariel April 8, 2015 14:41

Mass/continuity sink question
 
Hello there,

I'm currently modelling a fuel cell where I have a solution (water+ethanol) that, once in contact with a certain surface (catalyst), reacts. Both water and ethanol are consumed, so I'm working on the sink/source terms as of now.

Water is the constraint in my fluid, so my question is: how can I set up a sink for the consumption of water at the catalyst surface? I've seen people suggesting adding a bogus component with a sufficiently low mass fraction so that it doesn't affect the composition, and set it as constraint. Is there any better solution?

Also, if I set up a continuity sink, is it a sink for the whole fluid in the case of a multicomponent fluid such as mine?

Thanks in advance.

ghorrocks April 8, 2015 18:08

I don't know this off the top of my head and don't have time to test anything, but my suggestions are:

* I have no idea what you mean about a bogus mass fraction component and set it as a constraint. In my experience bogus work-arounds create more trouble than they are worth. Model what is happening as it is intended, so ethanol with water mixture as a constraint mass fraction.
* Have you read the documentation about source terms? There are a lot of options for multicomponent mixtures. You may find one of the options is what you are looking for.

khariel April 10, 2015 09:30

The idea behind adding the third 'bogus' component is that I can't seem to find a way to add a sink for the water, if water is set as a constraint for the mixture. I need two separate sinks for both water and ethanol in my model.

Yes, I've read the documentation before posting this, and my answer doesn't seem to be there. The closest thing I found that could lead to something are the 'continuity sinks', which I couldn't figure out how exactly they work.

ghorrocks April 12, 2015 07:58

You should look closer into the documentation. I think you will find what you want is already implemented.

Opaque April 13, 2015 14:29

Not sure I understand your concerns. Because mass is conserved, your sinks must also satisfy continuity, i.e.

rate of change of mass in the volume = mass in - mass out

where

mass in = mass through inlet, opening (mdot > 0) and sources of species/components

mass out = mass through outlet/opening (mdot <0) and sinks of species/components.

Do you know the fluid mass flux for the sink ? If you are trying to add both sinks, I think you do since the fluid mass flux for the sink is the summation of the sinks.

The software should take care of the rest. Recall for a sink, you cannot specify the composition, but the fluid mass flux. For a source, the composition is defined by the user.

khariel April 13, 2015 14:39

Quote:

Originally Posted by Opaque (Post 541500)
Not sure I understand your concerns. Because mass is conserved, your sinks must also satisfy continuity, i.e.

rate of change of mass in the volume = mass in - mass out

where

mass in = mass through inlet, opening (mdot > 0) and sources of species/components

mass out = mass through outlet/opening (mdot <0) and sinks of species/components.

Do you know the fluid mass flux for the sink ? If you are trying to add both sinks, I think you do since the fluid mass flux for the sink is the summation of the sinks.

The software should take care of the rest. Recall for a sink, you cannot specify the composition, but the fluid mass flux. For a source, the composition is defined by the user.

Thanks for the reply. I do understand the concept of sourcers/sinks, and I do know the mass flux I need to input for the sinks of both components.

My question is: since water is the constraint in my two-component fluid, I cannot set a sink specifically for water, just the way I can for ethanol. My options for sinks/sources, from the CFX-Pre interface are (as shown in image attached): Ethanol.mf and continuity. So how do I properly set a sink for water, since water is also consumed at the catalyst surface?

http://i.imgur.com/ofOUnFR.png

From what you told me, would it work if I set things up this way?
Ethanol.mf sink: (ethanol mass flux)
Continuity sink: (ethanol mass flux+water mass flux)

DaveD! February 11, 2021 13:26

For those of you who are facing the same problem, here is the solution:

Suppose you have two fluids 1 and 2 in a homogenous Variable Composition Mixture. You want to add a mass flux of fluid 1 to the mixture and at the same time extract a mass flux of fluid 2 from the mixture:

\hat{\dot{m}}_{\textrm{sink}}=\underbrace{\hat{\dot{m}}_{1,\textrm{source}}}_{>0}+\underbrace{\hat{\dot{m}}_{2,\textrm{sink}}}_{<0}\:(1)


Provided, that fluid 2 is the constraint component:
  • Adding mass flux of fluid 1 increases the mass fraction of fluid 1.
  • Extracting mass flux of fluid 2 increases the mass fraction of fluid 1 too.
Hence, we need to find the right value of the local mass fraction of fluid 1, at which the overall fluid has to be extracted and which corresponds to both the source and the sink. Rearranging eq. (1) gives:

\hat{\dot{m}}_{\textrm{sink}}=\underbrace{x_{1,\textrm{sink}}}_{<0}\cdot\underbrace{\hat{\dot{m}}_{\textrm{sink}}}_{<0}+(\underbrace{1-x_{1,\textrm{sink}})}_{>1}\cdot\underbrace{\hat{\dot{m}}_{\textrm{sink}}}_{<0}\:(2)

Comparing eqs. (1) and (2) leads to:

x_{1,\textrm{sink}}=\frac{\overbrace{\hat{\dot{m}}_{1,\textrm{source}}}^{>0}}{\underbrace{\hat{\dot{m}}_{1,\textrm{source}}}_{>0}+\underbrace{\hat{\dot{m}}_{2,\textrm{sink}}}_{<0}}


Please note, that x_{1,\textrm{sink}} is smaller than zero, since for an overall mass sink, the mass source of fluid 1 is smaller than the mass sink of fluid 2. However, this is no problem for CFX.

Then you have to set the Continuity Source as follows:

Option: Fluid Mass
FluxFlux: \hat{\dot{m}}_{\textrm{sink}}
MCF/Energy Sink Option: Spec. Mass Frac and Loc. Temp
Fluid 1.mf: x_{1,\textrm{sink}}


Attention: No further mass fraction source (Fluid 1.mf) is needed!

Regards,
DaveD!


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