CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Diffusive transport equation for additional variable (https://www.cfd-online.com/Forums/cfx/201093-diffusive-transport-equation-additional-variable.html)

swapnil313 April 21, 2018 14:45

Diffusive transport equation for additional variable
 
I'm trying to solve a porous media problem with the 'Diffusive transport equation for additional variable' equation.
But I'm facing trouble assigning diffusion value and source value for the model

Can anyone help me?

Gert-Jan April 22, 2018 06:06

What troubles? Need more info.
Don't you know how to do it?
You tried it but CFX gives an error?
You get unrealistic results?
Divergence?

What is your problem?

swapnil313 April 22, 2018 06:10

Boundary conditions
 
How can I set up the source term to be zero value according to the equation?

What’s the value of additional variable i.e diffusion at the outlets?

ghorrocks April 22, 2018 07:21

If you do not add a source term then the source term is zero. Is that what you mean?

When you define the diffusion coefficient that diffusion value is used everywhere. There is nothing special at outlets (except that values are convected from the upstream control volume, as normal for outlets).

swapnil313 April 22, 2018 07:29

Change the diffusion value
 
Yes. The source term to be zero.
Also, even though when I change the diffusion coefficient by any factor, the mass flow at outlet remains same.
How can I fix this?

ghorrocks April 22, 2018 07:41

If you want the source term to be zero then don't add any source terms. Simple.

Mass flow at the outlet is a function of the pressure difference over your modelled domain. The additional variable usually does not affect this. So you can change the diffusion constant all day and the mass flow rate will remain unchanged.

Gert-Jan April 22, 2018 07:47

Quote:

Originally Posted by swapnil313 (Post 689811)
Yes. The source term to be zero.
Also, even though when I change the diffusion coefficient by any factor, the mass flow at outlet remains same.
How can I fix this?


Apparently, you don't have convective flow, since you are only solving the diffusion equation for your scalar, not?
Then the massflow does not change indeed since this is determined by convection of your fluid, which is absent.
But does the scalar variable at your outlet change? If your setup is correct, I think it should change........

swapnil313 April 22, 2018 10:34

Convective flow
 
I’m working on wine cork material which mostly has diffusive flow of air through it. How can make the diffusive term have more impact on the mass flow at outlets?
Should I add convective flow ? And how can I do it?

Gert-Jan April 22, 2018 15:56

Diffusion is about Concentration differences. So, as long as you define mass fractions (or Mole fraction), you have to count the molecules that travel through the cork and convert that into an amount of mass.
I don't expect CFX to be the most appropriate software to solve this. It sounds like a quasi 1D/2D diffusion problem. You'd either solve it analytical or numerical using Matlab or similar..........

swapnil313 April 22, 2018 20:49

Model
 
I've the solution through MATLAB.
But I'm trying to model the flow pattern using CFD software.

How can I add concentration of oxygen to the body? i.e concentration of oxygen is 1.487 times that of outlets.

Can't I use diffusive transport equation for my problem?
If Yes, Can anyone set up a simple problem and upload it?

Opaque April 23, 2018 08:33

If you already solved in MATLAB, what mathematical problem did you solve ?

If you state the mathematical problem, i.e. the equations and the boundary conditions, those in the forum may be able to help. Otherwise, the description is getting lost in translation.

swapnil313 April 23, 2018 12:46

model
 
Cork is a material containing oxygen gas in its pores. At the time of production of wine bottles, the cork is compressed and placed inside the bottle.
I'm using the diffusive transport equation to simulate the flow pattern.
Boundary conditions are--
1) The cork is compressed which leads to a pressure (1.487 atm/1.487 oxygen concentration) in the cork body.
2) The two outlets, one in the bottle and other to atmosphere are at atmospheric pressure (1 atm/zero oxygen concentration)
3) The diffusion coefficient is 2E-10 [m^2 s^-1]
4) Total time 6 months, timestep is one month

To get--
1) The total mass flow graph at the outlets to be same.
2) The start point and end point of the total mass flow graph to be same, even after changing the diffusion coefficient by any factor. (just the curve should change)

Do you need any more information?

Opaque April 23, 2018 15:01

Thank you for the physical description of your model, interesting.

However, you have not provided the mathematical model you are using. What equation are you trying to solve?

In your MATLAB model, which PDE's are you solving? Are you solving for the mass fraction/concentration of O2 in the cork only? Which PDE equation, which terms are active?

If your setup is an elliptic PDE for the mass conservation of O2 in the cork only, i.e. d (density * Y_O2)/dt - div (gamma * grad (Y_O2)) = 0. NOTICE, there is no advection. Your boundary conditions must be setup as either mass fraction for O2, or mass fluxes for O2. The total mass flow of O2 will be a function of those mass fractions.

If your setup includes the Navier-Stokes equations in the porous media, are you including the bottle in the calculation, or just the cork?

swapnil313 April 23, 2018 17:00

Equation
 
1 Attachment(s)
I'm just trying to solve the diffusive transport equation (ANSYS CFX solver theory guide 11.0 ) Eq 137 page 41 (I've attached a screenshot of the equation)

It's NOT a porous media problem.

I just want to solve the equation using diffusion coefficient of oxygen through wine cork.

ghorrocks April 23, 2018 18:18

This does not sound like a CFD question, it looks like just a diffusion equation. The Navier Stokes equations are for when fluid inertia is significant and that does not appear to be the case for you.

If this is correct and you want to do this in CFX I would turn off the fluid solvers using expert parameters and just leave the additional variables on. Set up an additional variable to do the diffusion equation and this should be a simple and quick simulation to perform.

And by the way - do not say the time step is 1 month unless you have verified that 1 month is acceptable. A very common mistake is to use too large a time step. You should determine the time step size based on a sensitivity study.

Finally: Please do not post multiple identical posts.

swapnil313 April 23, 2018 21:17

expert parameter
 
Which parameters should I turn off? How can I do it?

In comsol, this problem is mainly solved under the section of transport of concentrated species with the above equation. Can I use any other ansys product for this problem?

I know the timestep and total time sounds absurd, but the flow of oxygen through wine cork is important for a year of storage.

ghorrocks April 23, 2018 21:41

You can turn the solvers off with expert parameters. Look in the documentation under expert parameters for how to do this. Then you will just be left with the additional variable solver operating. But note you will still have to set up some form of flow condition so CFX-Pre accepts it - it just won't do anything with it if you turn the solver off.

You missed my point with my comment about the time step. The total simulation time is set by the physics of what you are looking at. If you want to see what happens after a year then the total time will be a year. But the time step is set by what the numerical model needs to run accurately. You need to determine what time step will give an accurate simulation. It is a very common beginner mistake to guess what the user thinks is a good time step and it turns out to be far too large - don't fall into this trap.

evcelica April 25, 2018 08:00

1 Attachment(s)
Sounds like a 1 dimensional diffusion problem? Center of the cork is a symmetry plane? Since oxygen goes out both directions to 0%?

I solved this years ago, (very early in my career) and made an equation based off the results of numerical models. There already existed an equation for diffusion of semi-infinite thickness, but I made an equation for finite thickness material, which to my knowledge didn't exist before.

My analysis uses water concentration and outgassing rate from teflon, but this can really be any scalar: heat, mass, etc.

My paper: http://microboone-docdb.fnal.gov/cgi....pdf&version=1

Basic form of Equation:
Your "thickness" would be 1/2 of the cork thickness, since it is a symmetry plane at the center (if that is correct)

swapnil313 April 25, 2018 08:07

Model
 
Can you upload a archieve file for reference? I really got confused with all discussions and solutions.

evcelica April 25, 2018 08:42

1 Attachment(s)
Here is your solution:
Note the volume porosity of 3% that I'm just guessing on, but should be part of your equation they way I'm understanding it.

You don't care about all the stuff with the diffusion coefficient changing with temperature. You just need the basic form of the equation which I posted earlier.


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