CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Anisotropic Species Diffusion

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By A CFD free user

Reply
 
LinkBack Thread Tools Display Modes
Old   January 4, 2017, 12:02
Default Anisotropic Species Diffusion
  #1
Member
 
Join Date: Jun 2016
Posts: 64
Rep Power: 3
Baden is on a distinguished road
Hello all.

I am attempting to model multi-component species transport through a randomized porosity field. My model dictates that I use the following equations for the axial and transverse dispersion coefficients respectively:



Where α_os , λ_X, and λ_Y are numerical constants, D_m is effective molecular diffusivity of the acid species,|u|is the magnitude of Darcy velocity, r_p is the radius of the pore, and ɛ is the porosity.

From what I have gathered from the help manual as well as previous posts on this forum, I need to use the anisotropic species diffusion porous cell zone condition in ANSYS Fluent. Unfortunately, the manual did not help me understand how I would apply these equations using this method. Enabling anisotropic species diffusion only allows the input of a matrix as seen by the following image taken from the manual:



My question is as follows: how would I apply the equations listed previously as the dispersion coefficients? I am familiar with UDFs and have looked into using the DEFINE_DIFFUSIVITY macro but do not understand how to apply it to anisotropic diffusion or even if that is its proper usage. I have also considered the possibility of using UDS, but I am not sure if that is applicable either and if it is, how to use it.
Baden is offline   Reply With Quote

Old   January 8, 2017, 03:11
Default
  #2
Member
 
Join Date: Jun 2016
Posts: 64
Rep Power: 3
Baden is on a distinguished road
I've been stuck on this problem for about a week with no end in sight.

The only thing I can think of is to rewrite the species transport equation using UDS but that seems rather complicated to simply implement anisotropic diffusivity. Any advice or ideas would be appreciated.
Baden is offline   Reply With Quote

Old   January 8, 2017, 06:47
Default
  #3
Senior Member
 
A CFD free user's Avatar
 
A-A Azarafza
Join Date: Jan 2013
Posts: 219
Rep Power: 7
A CFD free user is on a distinguished road
Hi Baden,
You need to write your own anisotropic diffusivity using UDS macros and UDF provided for this aim. I've done this before for my PEMFC model a few times. It is pretty straightforward and easy to work. For getting some insights, you can see the examples has been offered in Fluent UDF manual. Be careful that you need to learn how to correctly compile or interpret the written UDF too.

I hope it helps.
Abouzar
__________________
Regard yours
A CFD free user is offline   Reply With Quote

Old   January 8, 2017, 13:11
Default
  #4
Member
 
Join Date: Jun 2016
Posts: 64
Rep Power: 3
Baden is on a distinguished road
Quote:
Originally Posted by A CFD free user View Post
Hi Baden,
You need to write your own anisotropic diffusivity using UDS macros and UDF provided for this aim. I've done this before for my PEMFC model a few times. It is pretty straightforward and easy to work. For getting some insights, you can see the examples has been offered in Fluent UDF manual. Be careful that you need to learn how to correctly compile or interpret the written UDF too.

I hope it helps.
Abouzar
I am familiar with UDFs, so that is not a problem. Will the UDS I use replace the built-in species transport equation? ie. should I disable species transport in lieu of using a UDS?
Baden is offline   Reply With Quote

Old   January 8, 2017, 17:22
Default
  #5
Senior Member
 
A CFD free user's Avatar
 
A-A Azarafza
Join Date: Jan 2013
Posts: 219
Rep Power: 7
A CFD free user is on a distinguished road
Quote:
Originally Posted by Baden View Post
I am familiar with UDFs, so that is not a problem. Will the UDS I use replace the built-in species transport equation? ie. should I disable species transport in lieu of using a UDS?
You right. As there is no anisotropic diffusivity UDF for species transport equations in Fluent, you should employ generic scalar transport equation to use its capability of using user-defined function for your purpose. Please, refer to the related section in UDF manual.
Baden likes this.
__________________
Regard yours
A CFD free user is offline   Reply With Quote

Old   January 9, 2017, 11:49
Default
  #6
Member
 
Join Date: Jun 2016
Posts: 64
Rep Power: 3
Baden is on a distinguished road
Quote:
Originally Posted by A CFD free user View Post
You right. As there is no anisotropic diffusivity UDF for species transport equations in Fluent, you should employ generic scalar transport equation to use its capability of using user-defined function for your purpose. Please, refer to the related section in UDF manual.
Thank you for your response. I have read the manual as well as a relevant forum threads and still have the following questions. Note that the scalar I am solving for in my UDS will be the mass fraction of the species in order to replace the species transport equation built-in to Fluent.
  1. Am I correct in assuming that I need a UDS for each species I want to solve for minus 1? As in if I want to model a mixture with 3 species, I would need 2 UDS since the third species is just 1 - sum of other species?
  2. How do I assign the UDS scalars (which represent a species mass fraction) to have a velocity when they enter through the inlet? I believe that the correct method is to access the U, V, and W velocity components from the "generic fluid" that is injected and use it where needed in my UDFs, but I am not sure.

Last edited by Baden; January 10, 2017 at 14:49.
Baden is offline   Reply With Quote

Old   January 17, 2017, 05:06
Default
  #7
Senior Member
 
A CFD free user's Avatar
 
A-A Azarafza
Join Date: Jan 2013
Posts: 219
Rep Power: 7
A CFD free user is on a distinguished road
Quote:
Originally Posted by Baden View Post
Thank you for your response. I have read the manual as well as a relevant forum threads and still have the following questions. Note that the scalar I am solving for in my UDS will be the mass fraction of the species in order to replace the species transport equation built-in to Fluent.
  1. Am I correct in assuming that I need a UDS for each species I want to solve for minus 1? As in if I want to model a mixture with 3 species, I would need 2 UDS since the third species is just 1 - sum of other species?
  2. How do I assign the UDS scalars (which represent a species mass fraction) to have a velocity when they enter through the inlet? I believe that the correct method is to access the U, V, and W velocity components from the "generic fluid" that is injected and use it where needed in my UDFs, but I am not sure.

Hi,
In reference to your questions:
1- Yes. Only two UDS are employed; however, in your UDF you should ensure the conservation of mass for the last species using only a simple algebraic equation.

2- For the UDS inlet velocities, as far as I know, you can again employ a macro to inject the UDSs in your simulations.

I hope it helps, and sorry for late response!
__________________
Regard yours
A CFD free user is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generalized gradient diffusion hypothesis for species CeesH FLUENT 0 December 15, 2016 09:19
Problems setting up case for running with chtMultiRegionFoam (mesh is from Salome) esujby OpenFOAM Pre-Processing 29 January 31, 2016 14:09
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
How to stop diffusion and advection in a zone for selected species. hda FLUENT 0 March 19, 2012 00:59
Species diffusion coefficient iceabc FLUENT 1 June 10, 2004 10:04


All times are GMT -4. The time now is 07:15.