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

Creating surface concentration boundary condition

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2014, 00:17
Default Creating surface concentration boundary condition
  #1
Member
 
Join Date: Aug 2011
Posts: 89
Rep Power: 15
MachZero is on a distinguished road
Hello all. I am working an interesting problem that is similar to a membrane problem from what I can tell. I am trying to apply a custom boundary condition using a udf but am somewhat stuck.

We have adapted our problem to use Henry's law. Therefore I am able to say that on one side of a solid barrier the concentration of water (in kmoles per cubic meter) is proportional to the partial pressure on the other side However, I want to apply this as a boundary condition value.

I was told that I could simply take this volume concentration, multiply by a cell volume and divide by the cell surface area, and then I would have kmoles per square meter, which I could then multiply by the face area at the boundary to get kmoles. However, this is giving me obviously incorrect answers.

Does anyone have any clue about how I can convert this volume concentration to a surface concentration?

Thanks in advance!
MachZero is offline   Reply With Quote

Old   February 25, 2014, 10:09
Default
  #2
Member
 
Join Date: Aug 2011
Posts: 89
Rep Power: 15
MachZero is on a distinguished road
So we have discovered that the boundary condition can be applied if we simply
Multiply the volume of the cell by the volumetric concentration. This works but seems like it shouldn't be correct. Anyone have any ideas as to why this works?
MachZero is offline   Reply With Quote

Old   February 25, 2014, 10:49
Default
  #3
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Quote:
We have adapted our problem to use Henry's law. Therefore I am able to say that on one side of a solid barrier the concentration of water (in kmoles per cubic meter) is proportional to the partial pressure on the other side.
So, you want to calculate the concentration of water, with unit kmoles per cubic meter. This makes sense.
Quote:
I was told that I could simply take this volume concentration, multiply by a cell volume and divide by the cell surface area, and then I would have kmoles per square meter, which I could then multiply by the face area at the boundary to get kmoles.
But here you calculate the total amount of water in that cell (or something proportional to that, depending on what you mean with "cell surface area"), measured in kmoles... Why would you do that? You already said before that you were interested in the concentration of water with unit kmoles per cubic meter, why do you want to multiply/divide this by the cell volume or surface area?
pakk is offline   Reply With Quote

Old   February 25, 2014, 15:50
Default
  #4
Member
 
Join Date: Aug 2011
Posts: 89
Rep Power: 15
MachZero is on a distinguished road
Pakk

Thanks for engaging. I am using a user defines scalar to represent moles of water. Inside my solid region I am trying to place a boundary condition on the wall and then let diffusion take over. I believe therefore that my boundary condition needs to be miles of water (forgive me I am using k moles and moles interchangeably in this post). By Henry's law I can get miles per cubic meter for the first infinitesimally small layer, so therefore need to convert units.

I am not a chemistry specialist but was therefore told that I could simply multiply by the volume of the cell and dived by the entire surface area to get a surface concentration in moles per square meter. Then multiply by the boundary face area and get the vales of moles on the wall that I can use as a bc. We found out this morning that simply multiplying by the cell volume gets us the predicted answer but I can't understand why this might work. Do you have any insight?
MachZero is offline   Reply With Quote

Old   February 26, 2014, 12:52
Default
  #5
Senior Member
 
A CFD free user's Avatar
 
A-A Azarafza
Join Date: Jan 2013
Posts: 226
Rep Power: 14
A CFD free user is on a distinguished road
@ MachZero
Hi,
What you calculated is actually the concentration integral ( sum (Ci *Vi)). If you want to prescribe it in B.C, the value must be in rate form (mol or Kmol/s). You can get it using:

mass fraction of species i*density* velocity/molecular weight of species i

the above definition has unit (kg/m^3 *m/s/Kg)/Kmol =Kmol/m2.s

now, you can multiply this value by surface area (boundary thread) and receive Kmol/s. C_YI(c,t,i) and C_R(c,t) are the macros you need to get density and mass fraction of the species.

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

Old   February 26, 2014, 15:37
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Quote:
Originally Posted by MachZero View Post
Pakk

Thanks for engaging. I am using a user defines scalar to represent moles of water.
If this is really what you are doing, then you are doing it in a complicated way. You should have the scalar represent moles of water per cubic meter.

In the analogy of temperature: you want to store the temperature in each element, not the thermal energy in each element. The temperature is independent of element size, just as the molarity in moles per cubic meter.
Quote:
Inside my solid region I am trying to place a boundary condition on the wall and then let diffusion take over. I believe therefore that my boundary condition needs to be miles of water (forgive me I am using k moles and moles interchangeably in this post).
No, you should not use moles of water. You need something that does not depend on boundary size.

This could be: molarity (in moles per cubic meter) at the interface. Or the amount of water going through the wall per surface area per time unit (in moles per square meter per second).

In the analogy of temperature, you can specify temperature at the boundary, or heat flux at the boundary.
Quote:
By Henry's law I can get moles per cubic meter for the first infinitesimally small layer, so therefore need to convert units.
And in my opinion you don't need to. You work with moles per volume, and the boundary condition gives you moles per volume, so you don't need to convert it.
Quote:
I am not a chemistry specialist but was therefore told that I could simply multiply by the volume of the cell and dived by the entire surface area to get a surface concentration in moles per square meter. Then multiply by the boundary face area and get the vales of moles on the wall that I can use as a bc. We found out this morning that simply multiplying by the cell volume gets us the predicted answer but I can't understand why this might work. Do you have any insight?
The only reason I can think of why it worked is that you made a different mistake in applying Henry's law that cancels it. You never say what you multiply with the cell volume, and what you do with that quantity, so I can not comment on that.

You should really think about dimensions. Does your scalar represent amount of substance (moles) or molar concentration (moles per cubic meter)? Does Henry's law give you molar concentration (moles per cubic meter) or molar area concentration (moles per square meter)? What do you need to apply as a boundary condition, the local molar concentration (moles per cubic meter), the local molar area concentration (moles per square meter) or the amount of substance in the first layer of elements (moles)?

I can simply tell you the answers, but that won't help you to understand the problem. If you understand the problem, the questions above will be much simpler.

By the way: I am also not a chemical specialist, but if someone tells me that I can use a simple trick to do something, and that trick fails, I would take a little time to understand the problem, and not try to solve it by changing things in the code (such as multiplying by the volume) until the result is fine...
pakk is offline   Reply With Quote

Reply

Tags
boundary condition, fluent - udf, membrane separation

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Surface Solution Data as Boundary Condition matari OpenFOAM Pre-Processing 0 August 30, 2012 10:46
RIPPLE's free surface boundary condition alongalong2 Main CFD Forum 4 February 10, 2011 00:35
External Radiation Boundary Condition (Two sided wall), Grid Interface CFD XUE FLUENT 0 July 8, 2010 07:49
boundary condition at free surface mike Fidelity CFD 3 June 8, 2006 07:23
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


All times are GMT -4. The time now is 06:48.