I'm simulating a porous isotropic media and would like to add co-ordinate based diffusionn coefficient to the model.

CFX allows permeability only, how can I add diffusion to the model?

- 624 Views
- Last Post 24 April 2018

ssr46
posted this
13 April 2018

I'm simulating a porous isotropic media and would like to add co-ordinate based diffusionn coefficient to the model.

CFX allows permeability only, how can I add diffusion to the model?

raul.raghav
posted this
17 April 2018

What do you mean by coordinate based diffusion coefficient? You mean like a different diffusion coefficient value for different regions of your model? If that's what you're asking, you can use inside() function to define a certain value for a particular region.

However, if you are wondering how to define the diffusion coefficient, depending on the fluid properties, you would have to define the kinematic diffusivity through an additional variable or in the Fluids Tab of the simulation setup. Refer to the following resources for more information:

Multi-component Flow; with emphasis on sections

- 1.2.11.2.5. Additional Variable,
- 1.2.11.3. Multicomponent Flow Examples,
- 1.2.11.3.2. Example 2: Smoke in Air
- 1.2.11.4.2. Kinematic Diffusivity and Bulk Viscosity

And again you need to remember that you are working with a porous medium and the effective diffusivity is of interest here. The effective diffusivity would be a function of the porosity and the molecular diffusivity. I'm not really familiar with porous media but if I was in your place, I'd look into the following information in detail:

Rahul

ssr46
posted this
18 April 2018

I have a excel file with the diffusion coefficient values as follows:

x[m] y[m] z[m] Diff[m^2/s]

0.002 0.004 0.11 2e-10

0.004 0.001 0.118 2e-12

....................................

Is there a way to import this data into ANSYS CFX Fluent.

Fluent has the option of mass diffusivity but, I'm unable to write a UDF to import this data.

CFX has a 'Initialize profile data' function to import this data, but I'm unable to assign mass diffusivity in CFX

raul.raghav
posted this
20 April 2018

In Ansys CFX, as I mentioned earlier, you would have to define an additional variable to define the kinematic diffusivity in the Fluids tab. You should input the diffusion coefficient values as a profile data and call it when you define the kinematic diffusivity in the Fluids tab. Refer:

Ansys CFX: Profile Data and CEL functions

In Ansys Fluent, you would need a profile file (.prof) to input the mass diffusivity values. Its simple to write a profile data if you have all the information. Refer:

Rahul

ssr46
posted this
21 April 2018

I'm trying to solve the "Diffusive transport Equation for Additional variable" for a porous media.

How can I specify the source term for the equation?

Also even after changing the diffusion coefficient by any factor, the mass flow at outlet doesn't change.(IN CFX)

Can we set up a webex client meeting to discuss?

raul.raghav
posted this
22 April 2018

Would you be able to upload the workbench archive file so I could take a look into it?

If you’re not sure how to create the workbench archive, refer to: create and share workbench archive

Rahul

raul.raghav
posted this
23 April 2018

There are several things that requires your attention in your setup.

1. Mesh: Use multizone method with body sizing.

2. Setup:

- Forget about transient simulation for now. Try to get the steady state solution to your problem first.
- So you defined a specific additional variable by the name of "Kinematic Diffusivity". You would have to read the section on additional variables to understand what the units of the additional variable should be. If you use a specific AV, it would be dimensionless, and if you use a volumetric additional variable, the units would be [kg m^-3]. For your case, you can use a dimesionless specific AV. Refer to the diffusive transport equation in the link below. The phi you see in the equation is the specific additional volume. It is multiplied with the density of the fluid which is defined as O2 in your case. I've attached the modified workbench archive file with the post.

- Boundary conditions: What are you trying to model here? Can you try to explain in a few works or with a schematic. I can see the TOP and BOTTOM boundaries defined as 0 [atm] Opening BC. And in the initialization, you have defined a pressure of 1.487 [atm]. Its a little confusing to understand the problem in hand.
- Boundary conditions for the AV's should be either 0 or 1, depending on where they can enter the fluid domain from.

Look into the the attached file and read a little more into the AV's. If you have any questions, feel free to ask. And try to attach a schematic of what you're modeling so that we get that right.

Rahul

ssr46
posted this
24 April 2018
- Last edited 24 April 2018

Cork is a material containing oxygen gas in small amount. At the time of production of wine bottles, the cork is compressed and placed inside the bottle.

'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.** 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?

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)

I'm running ANSYS workbench 18.1, can you upload the compatible file for my version?

raul.raghav
posted this
24 April 2018

The post I made earlier is the exact way to solve the diffusion transport equation. The “phi” in the equation is the specific additional variable and the “D_phi” is the kinematic diffusivity.

Quick question: The oxygen concentration in the cork body is 1 right?

Not sure how the time steps you mention is going to work but it doesn’t seem like a difficult simulation overall.

I don’t have Ansys 18.1 but I can share the workbench file with Ansys 17.2 which can be opened by you. I’ll send it to you tomorrow.

Rahul

ssr46
posted this
24 April 2018

Oxygen concentration inside the cork body is 1.487 times higher than the concentration at outlets.

Also, will the mass flow at the outlets change, as I increase or decrease the diffusion coefficient?

- BenjaminStarling 5
- peteroznewman 4
- metalhead@IITD 2
- Ali1 2
- aydiincann 2
- Tom Doan 2
- natheodore182 2
- Isna.Kaira98 2
- Nimaizadyar 1
- maaz007 1

Ammar has been awarded the First Anniversary badge

OzgeMetu34 is a new member in the forum

shehabi has an updated profile

zaberaust is a new member in the forum

Afzal is a new member in the forum