CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Diffusive transport equation for additional variable

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 21, 2018, 15:45
Unhappy Diffusive transport equation for additional variable
  #1
New Member
 
Swapnil Rane
Join Date: Sep 2017
Posts: 23
Rep Power: 9
swapnil313 is on a distinguished road
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?
swapnil313 is offline   Reply With Quote

Old   April 22, 2018, 07:06
Default
  #2
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28
Gert-Jan will become famous soon enough
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?
Gert-Jan is offline   Reply With Quote

Old   April 22, 2018, 07:10
Question Boundary conditions
  #3
New Member
 
Swapnil Rane
Join Date: Sep 2017
Posts: 23
Rep Power: 9
swapnil313 is on a distinguished road
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?
swapnil313 is offline   Reply With Quote

Old   April 22, 2018, 08:21
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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).
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is online now   Reply With Quote

Old   April 22, 2018, 08:29
Exclamation Change the diffusion value
  #5
New Member
 
Swapnil Rane
Join Date: Sep 2017
Posts: 23
Rep Power: 9
swapnil313 is on a distinguished road
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?
swapnil313 is offline   Reply With Quote

Old   April 22, 2018, 08:41
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is online now   Reply With Quote

Old   April 22, 2018, 08:47
Default
  #7
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28
Gert-Jan will become famous soon enough
Quote:
Originally Posted by swapnil313 View Post
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........

Last edited by Gert-Jan; April 22, 2018 at 10:37.
Gert-Jan is offline   Reply With Quote

Old   April 22, 2018, 11:34
Exclamation Convective flow
  #8
New Member
 
Swapnil Rane
Join Date: Sep 2017
Posts: 23
Rep Power: 9
swapnil313 is on a distinguished road
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?
swapnil313 is offline   Reply With Quote

Old   April 22, 2018, 16:56
Default
  #9
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28
Gert-Jan will become famous soon enough
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..........
Gert-Jan is offline   Reply With Quote

Old   April 22, 2018, 21:49
Unhappy Model
  #10
New Member
 
Swapnil Rane
Join Date: Sep 2017
Posts: 23
Rep Power: 9
swapnil313 is on a distinguished road
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?
swapnil313 is offline   Reply With Quote

Old   April 23, 2018, 09:33
Default
  #11
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
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.
Opaque is offline   Reply With Quote

Old   April 23, 2018, 13:46
Question model
  #12
New Member
 
Swapnil Rane
Join Date: Sep 2017
Posts: 23
Rep Power: 9
swapnil313 is on a distinguished road
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?
swapnil313 is offline   Reply With Quote

Old   April 23, 2018, 16:01
Default
  #13
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
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?
Opaque is offline   Reply With Quote

Old   April 23, 2018, 18:00
Red face Equation
  #14
New Member
 
Swapnil Rane
Join Date: Sep 2017
Posts: 23
Rep Power: 9
swapnil313 is on a distinguished road
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.
Attached Images
File Type: png Untitled.png (29.1 KB, 25 views)
swapnil313 is offline   Reply With Quote

Old   April 23, 2018, 19:18
Default
  #15
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is online now   Reply With Quote

Old   April 23, 2018, 22:17
Post expert parameter
  #16
New Member
 
Swapnil Rane
Join Date: Sep 2017
Posts: 23
Rep Power: 9
swapnil313 is on a distinguished road
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.
swapnil313 is offline   Reply With Quote

Old   April 23, 2018, 22:41
Default
  #17
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is online now   Reply With Quote

Old   April 25, 2018, 09:00
Default
  #18
Senior Member
 
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 1,188
Rep Power: 23
evcelica is on a distinguished road
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)
Attached Images
File Type: png DiffEq.png (100.6 KB, 14 views)
evcelica is offline   Reply With Quote

Old   April 25, 2018, 09:07
Smile Model
  #19
New Member
 
Swapnil Rane
Join Date: Sep 2017
Posts: 23
Rep Power: 9
swapnil313 is on a distinguished road
Can you upload a archieve file for reference? I really got confused with all discussions and solutions.
swapnil313 is offline   Reply With Quote

Old   April 25, 2018, 09:42
Default
  #20
Senior Member
 
Erik
Join Date: Feb 2011
Location: Earth (Land portion)
Posts: 1,188
Rep Power: 23
evcelica is on a distinguished road
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.
Attached Images
File Type: png Cork.png (29.8 KB, 15 views)
evcelica is offline   Reply With Quote

Reply

Tags
additional variable, diffusive term


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding diffusion term to interFoam transport equation Gearb0x OpenFOAM Programming & Development 3 February 14, 2023 05:16
Solving Transport equation for additional variable using CFX creddy_trddc CFX 11 April 2, 2015 22:07
solve only transport equation and not Navier-Stokes cosine CFX 2 November 19, 2011 03:58
UDF Transport equation for transition momentum thickness Reynolds number Wantami FLUENT 0 April 9, 2011 03:50
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 05:35


All times are GMT -4. The time now is 18:21.