CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Questions about Mass Sources (https://www.cfd-online.com/Forums/cfx/88685-questions-about-mass-sources.html)

jiguozhao May 23, 2011 19:19

Questions about Mass Sources
 
Dear all:
I would like to set a Fluid Mass Flux source on a boundary. After setting the quantity of the Mass Flux Source, some other settings are following like component fraction, temperature and velocity. But I know if the source is negative (that means the fluid disappeared as outflow), the CFX software dosen't consider the following settings anymore. what I am wondering is what is the fraction of component disappearing from the boundary. I checked the result, the mass dosen't obey the fraction which I set following the Mass Flux.
Is there any person who can tell me what fraction the disappeared fluid is based on?
Kind regards

Ji Guozhao
g.ji@uq.edu.au

ghorrocks May 23, 2011 19:55

It does not depend on the fraction (mass or volume). It just consumes whatever fluid is next to it - all phases/components.

jiguozhao May 24, 2011 00:34

Quote:

Originally Posted by ghorrocks (Post 308918)
It does not depend on the fraction (mass or volume). It just consumes whatever fluid is next to it - all phases/components.

Thank you!
Do you meand by that it is disappeared by the local fraction next to the boundary on which I set the source?

Kind regards

Ji Guozhao
g.ji@uq.edu.au

ghorrocks May 24, 2011 08:42

Yes, to rephrase what you said - the volume/mass fraction of the fluid leaving the domain in the mass sink is set by the volume/mass fraction in the control volume adjacent to the mass sink.

jiguozhao June 2, 2011 00:52

why my result is 100% decieded by initialization
 
Dear all:

i was trying to simulate a gas mixture(H2/Argon) going through a gas separation module. there is a change in H2 fraction(or Argon fraction) due to the selectivity of the membrane(more H2 is going through the membrane).
but the H2 fraction distribution result is 100% decided by my initial guess in initialization. if i set 0.1 as H2 fraction in initialization, i get 0.9925 at retentate outlet; if i set 0.3 as H2 fraction in initialiazation, i get 0.293072 at retentate; when i set 0.5 initially, i get 0.491635 at retentate; for setting 0.7 initially, i get 0.692509 finally. in all the cases above, the solving can converge to 10e-5. so which one is the really result?

is there anyone can help me?

kind regards

Ji Guozhao
g.ji@uq.edu.au

NCle May 16, 2012 15:48

[QUOTE=ghorrocks;308995]Yes, to rephrase what you said - the volume/mass fraction of the fluid leaving the domain in the mass sink is set by the volume/mass fraction in the control volume adjacent to the mass sink.[/QUOTED]

I want my sink to remove only one type of fluid, not both, but it seems that I am losing the other type of fluid as well, even though set the volume fraction of that fluid in the sink to zero. Does the specifying of volume fraction allow any selective control over what passes through the sink? I am trying to let only one type of fluid pass through the sink (I am trying to model free surface in a vacuum, and the vacuum is air that I want to escape freely).

ghorrocks May 16, 2012 19:54

Can you explain what you are trying to model? Why does removing only one phase help?

NCle May 17, 2012 08:50

I'm modeling a micron-scale imprinting process: A solid stamp material presses down into the free surface of a viscous melted polymer. In reality, a vacuum is drawn in this process, so the free surface is a polymer-vacuum interface. But in CFX, I must prescribe a gas to the vacuum.
The mass of polymer is conserved during the stamping: the same amount of polymer is in the chamber at start and end. So I don't want it to pass through the sink. However, the "air" must disappear from the chamber, because it is really a vacuum. I want to model a vacuum with air that disappears as if it were never there. So I want to make the air the only phase that passes through the sink. I'll try to attach a picture (cant figure it out).

ghorrocks May 17, 2012 09:00

So why not put an outlet away from the polymer so it never gets there? Then you can just suck stuff out and the polymer will never leave.

Are you sure CFX is the appropriate simulation code for this material? It sounds more like an FEA simualtion to me.

NCle May 18, 2012 10:44

Quote:

Originally Posted by ghorrocks (Post 361650)
So why not put an outlet away from the polymer so it never gets there? Then you can just suck stuff out and the polymer will never leave.

Are you sure CFX is the appropriate simulation code for this material? It sounds more like an FEA simualtion to me.

So, I tried the outlet away fropm polymer and sink method, and I get the same problem: gradually disappearing polymer. When I end the simulation, there is about 2 - 5% less polymer liquid than when I started either way; sink or outlet. I just recently went to an ANSYS informational conference and was counseled by one of the specialists there. They said it seems that the leaking liquid is simply from too coarse a timestep, or too coarse a grid or both. I was just told similarly by the online ANSYS support specialist that it was the timestep being too large.

Good point about the FEA. My Re # is so low its practically a solid, but its right on the line; I am trying to validate this model against another that was done as a thick liquid.

In summary, I guess I am not conserving liquid for reasons other than the sink/outlet issue; just needs temporal/grid refinement.

ghorrocks May 19, 2012 08:11

And convergence is another possibility. You might not have converged tight enough.

lostking18 April 9, 2018 16:57

Quote:

Originally Posted by ghorrocks (Post 308918)
It does not depend on the fraction (mass or volume). It just consumes whatever fluid is next to it - all phases/components.

Hi, Glenn, Thanks for your explanation! It seems to me that the source term should be independent of the other variables? But why do we have to assign the temperature and velocity in the mass Source?

At very beginning I thought it is used only for the convenience of convergence. But after trying several rounds of tests, I find that the solution is rather sensitive to the assigned temperature and velocity. Thanks!

lostking18 April 9, 2018 17:02

Quote:

Originally Posted by lostking18 (Post 688167)
Hi, Glenn, Thanks for your explanation! It seems to me that the source term should be independent of the other variables? But why do we have to assign the temperature and velocity in the mass Source?

At very beginning I thought it is used only for the convenience of convergence. But after trying several rounds of tests, I find that the solution is rather sensitive to the assigned temperature and velocity. Thanks!

https://www.sharcnet.ca/Software/Ans....html#i1299353

From here it states that these variables are used to compute the secondary course term. But since we haven't obtained any solution, how could we assign these values considering that these variables are rather sensitive to the solution.

ghorrocks April 9, 2018 19:25

Assuming your MFC/Energy sink option is "Local Mass Fractions and Temperature" (which is the default):

If the source is removing mass from the system then all the settings should be ignored. The temperature/mass fraction/volume fraction/turbulence of the mass leaving the domain is just that already present in the control volume where it left from.

If the source is adding material to the system then you need to define all the fluid variables associated with it. As this is new material which the solver has no history for you need to define all flow variables for the solver to use.

Also: note the secondary source terms are used in mass sources to assign the initial velocity, temperature and other variables to the introduced mass in the other equations. The source term coefficients are used to assist convergence. The source term coefficients are used regardless of whether the mass source term is positive or negative, so this is the factor which may be influencing convergence.

Opaque April 9, 2018 20:10

Another view to Glenn response is that a positive mass source is effectively an inlet; therefore, the incoming values must be provided.

On the other side, a negative mass flux is an outlet; therefore, the outgoing values are the local values.

lostking18 April 11, 2018 10:07

Quote:

Originally Posted by ghorrocks (Post 688178)
Assuming your MFC/Energy sink option is "Local Mass Fractions and Temperature" (which is the default):

If the source is removing mass from the system then all the settings should be ignored. The temperature/mass fraction/volume fraction/turbulence of the mass leaving the domain is just that already present in the control volume where it left from.

If the source is adding material to the system then you need to define all the fluid variables associated with it. As this is new material which the solver has no history for you need to define all flow variables for the solver to use.

Also: note the secondary source terms are used in mass sources to assign the initial velocity, temperature and other variables to the introduced mass in the other equations. The source term coefficients are used to assist convergence. The source term coefficients are used regardless of whether the mass source term is positive or negative, so this is the factor which may be influencing convergence.


Hi, Glenn:

Thank you very much for your always helpful answers! I can understand the new coming mass flow has no history therefore some inlet condition need to be assigned to it. But if we think about the continuity equation, the source term there is basically volumetric integral of mass source term:
int( S_m ) dV
The assignment of S_m is independent to the any other quantities. Then why do we need to assign the temperature and velocity for the new coming flow? Or is the definition of the source term in CFX is different from 'int( S_m ) dV'? Thanks!~

Opaque April 11, 2018 10:56

If we follow the analogy of positive mass source as an inlet, every equation that includes an advection term must also include the contribution of the incoming mass to its quantity, say momentum (velocity), energy (temperature), turbulence (k,epsilon, omega) and so on.

A mass source is not an isolated amount for continuity only, it is a full amount for all equations. There is no need to account for it separately, i.e. built-in so-called secondary sources

lostking18 April 12, 2018 13:29

Quote:

Originally Posted by Opaque (Post 688437)
If we follow the analogy of positive mass source as an inlet, every equation that includes an advection term must also include the contribution of the incoming mass to its quantity, say momentum (velocity), energy (temperature), turbulence (k,epsilon, omega) and so on.

A mass source is not an isolated amount for continuity only, it is a full amount for all equations. There is no need to account for it separately, i.e. built-in so-called secondary sources

Hi, Obaque,

Thanks for your reply! I have understanded the meanning of adding temperature and velocity in CFX. But what confuses me is the code implementation of secondary source term. Suppose we add a mass source term in continuity equation:
int( S_m ) dV
where int means the volumetric integration, S_m is the mass source term and V is the finite volume.
Do you mean we also need to add int( S_m * u ) in momentum equation where u is the assigned velocity in mass source set up and add int( S_m *Cp*T ) in engergy equation?

Thank you very much!

Opaque April 12, 2018 16:03

the mathematical model of adding a source term to the continuity equation, implies adding corresponding terms to the other equations as you described.

The implementation of ANSYS CFX mass sources takes care of that for you during the setup, i.e. once you include a Fluid Mass Source/Flux, the software adds the source M_dot times Area or Volume depending of the source type (subdomain, boundary) as follows

M_dot * Area|Volume to continuity

M_dot * Area|Volume * velocity_x/y/z to the momentum

M_dot * Area|Volume* Static Enthalpy (Thermal Energy model) | Total Enthalpy (Total Energy Model) | Rothalpy (Rotating Frame model) to the energy equation

M_dot * Area|Volume* TKE|TED|TEF to the TKE|TED|TEF equations

You do not have to do anything else.

M_dot *

lostking18 April 13, 2018 08:51

Hi, Opaque, thank you very much! Now I'm clear.


All times are GMT -4. The time now is 11:49.