CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Defining diffusivity within a particular zone (http://www.cfd-online.com/Forums/fluent/89761-defining-diffusivity-within-particular-zone.html)

chires June 21, 2011 19:28

Defining diffusivity within a particular zone
 
Hello to all the smart people out there,

I've made a simple model of two counter flow channels separated by a membrane region. The fluid on both sides is water. A certain concentration of Urea is dissolved in one flow stream which I've represented as a UDS. I've defined the membrane region as a porus media and by manipulating the viscous and inertial resistance parameter I recieve a flow field conceptually close to what I'm expecting.
Currently i have the diffusivity of my UDS defined in water via the material properties of water. I would like to customize that diffusivity to a different value within the membrane region. I expect this can be done via a written UDF and I have attempted to do so using the DEFINE_DIFFUSIVITY macro. As far as I can tell this only hooks to the material properties menu which alters the value in all three regions (since they all contain water), not just the membrane region.
As a novice learning UDF coding does anyone have a coding suggestion or a different approach to achieving this?

Thanks in advance :-)

Amir June 22, 2011 02:03

Hi,
maybe it's better to define 2 material with the same properties except diffusivity and use them in desired region.

Amir

chires June 22, 2011 13:16

Ok, I think I can see how that would work.

Basically define materials Urea(1) for the channel region and Urea(2) for the membrane region. Write a UDF to create a positive source of Urea(2) equal to the value of Urea(1) on the membrane side of the channel/membrane boundary. Then create a source sink for Urea(1) on channel side setting the magnitude to 0...

Well, I expect that would work as long as the flow was in one direction (from the channel to membrane side) but not in the opposite direction.

Can you simply state the value of Urea(1) on one side of the boundary is equal to Urea(2) on the opposite side? and if so what about velocity direction and momentum? Do those properties also have to be assigned across the boundary from Urea(1) to Urea(2)?

Thanks for the reply!!! Really helps me think through this.

Amir June 23, 2011 02:37

Quote:

Originally Posted by chires (Post 313139)
Ok, I think I can see how that would work.

Basically define materials Urea(1) for the channel region and Urea(2) for the membrane region. Write a UDF to create a positive source of Urea(2) equal to the value of Urea(1) on the membrane side of the channel/membrane boundary. Then create a source sink for Urea(1) on channel side setting the magnitude to 0...

Well, I expect that would work as long as the flow was in one direction (from the channel to membrane side) but not in the opposite direction.

Can you simply state the value of Urea(1) on one side of the boundary is equal to Urea(2) on the opposite side? and if so what about velocity direction and momentum? Do those properties also have to be assigned across the boundary from Urea(1) to Urea(2)?

Thanks for the reply!!! Really helps me think through this.

Hi,
If you use 2 materials as discussed above, you won't need to write any UDFs as sinks or sources!!!
When you set a material for a region, the properties of that material are used for solving equations in that region's control volumes,i.e. these properties belongs to that specific region. In other words, the properties do not convect or diffuse, so it doesn't depend on flow direction. Check it for a simple case to understand.

Regards

ftab July 11, 2012 13:32

Dear Amir,
I read through this reply you have made a year ago.
What I do not understand is that if you define two different material to include difference of diffusivity inside porous and fluid domain, then how the conservation of momentum will be satisfied there as the same material leaves the fluid domain and enters the porous one and other way around.

To make it simple lets suppose I have an artery with a thick porous wall and diffusivity of an UDS is not the same inside the blood flow zone (inside lumen where blood flows) and inside the wall. How I can set two different diffusivity then? The flow inside porous wall is happening because of blood infiltration (passing) from lumen to the wall.
Thanks for your help

Amir July 12, 2012 02:50

Quote:

Originally Posted by ftab (Post 370890)
how the conservation of momentum will be satisfied there as the same material leaves the fluid domain and enters the porous one and other way around.

The discussion was about solving UDS in 2 different zones which can be considered decoupled from momentum eq. Note that the density and viscosity of these 2 material are the same, just UDS diffusivity is different. In the other word, at interfaces we need interpolations of density which obtained equal to each material density.
Quote:

Originally Posted by ftab (Post 370890)
To make it simple lets suppose I have an artery with a thick porous wall and diffusivity of an UDS is not the same inside the blood flow zone (inside lumen where blood flows) and inside the wall. How I can set two different diffusivity then? The flow inside porous wall is happening because of blood infiltration (passing) from lumen to the wall.

That's the same situation; just note that UDS values do not affect velocity field ....

Bests,

Kanarya February 7, 2014 10:45

Define_diffusivity
 
hi,

I am trying to use DEFINE_DIFFUSIVITY funtion in eulerian gas-solid flow but it gives me Access Vialotation Error. Is there anyone who use this function for multiphase flows?
thanks in advance!


All times are GMT -4. The time now is 02:51.