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

Equilibrium thru Interface

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

Like Tree7Likes
  • 1 Post By akidess
  • 1 Post By Cyp
  • 5 Post By Cyp

Reply
 
LinkBack Thread Tools Display Modes
Old   November 19, 2012, 03:23
Question Equilibrium thru Interface
  #1
Member
 
Hanniel Freitas
Join Date: Jan 2012
Location: Natal, Brazil
Posts: 33
Rep Power: 5
hfsf is on a distinguished road
Hi Foamers!
I'm having a little bit of trouble trying to remake the work done at the work of Waheed et al (2002) (http://www.sciencedirect.com/science...17931002001242), where some axissymetric wedge section of a drop inside a cilinder is taken, this drop containing solute, and the outer phase is solute-free. So, essencially I want to computate the solute transfer.

The main problem is that i need to establish a equilibrium of the solute concentration inside and outside the drop, what I believe I could do by phisically stablishing a interface boundary in my domain and using groovyBC to ser the dragient expression. So, essencially, my domain would consist of 2 regions: the drop and the outer phase. By now, the mesh construction is OK, and I could stablish this phisical boundary and the paraFoam recognizes it.

But running my case in my own implementation of interfoam (interfoam + solute transport), i noticed that the interface bondary (so called defaultFaces) is not needed. In fact, I can remove it from the boundary listed in the 0 directory with no problem! That's not right, my solver just ignores my equilibrium condition. What should I do? My master depends on this series of simulation

I'm attaching my case files. Thanks in advance, I hope someone out there could help me.

PS: In order to save space, after download and extraction please run blockMesh.
Attached Files
File Type: zip Drop.zip (14.6 KB, 18 views)
hfsf is offline   Reply With Quote

Old   November 19, 2012, 04:28
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
I think you need two domains with non-identical vertices, which you then couple using some sort of a baffle boundary condition. Have a look at the tutorials for chtMultiRegionFoam, where this is done for the temperature equation.

- Anton
hfsf likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Help define the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oam-technology
akidess is offline   Reply With Quote

Old   November 19, 2012, 06:51
Default
  #3
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 228
Rep Power: 9
Cyp is on a distinguished road
Do you have a partitioning relationship between the concentration in both side of the interface ?

Something like :

C_{g} = H C_{l} \texttt{   at   } \mathcal{A}_{gl}

If it is the case, you can add a transport equation in interFoam solver using the theory of distributions (see Haroun (2012) for exemple)). The concentration jump will be considered as an additional term in your transport equation.

Best,
Cyp
hfsf likes this.

Last edited by Cyp; November 19, 2012 at 09:27.
Cyp is offline   Reply With Quote

Old   November 19, 2012, 07:07
Default
  #4
Member
 
Hanniel Freitas
Join Date: Jan 2012
Location: Natal, Brazil
Posts: 33
Rep Power: 5
hfsf is on a distinguished road
Dear Cyp and Anton,

Thanks for the fast reply. I will check your suggetions, thanks in advance.

And yes Cyp, i have a partitioning condition like the one you showed. But how could I implement this on the solver to consider this jump only thru the interface boundary? I will check the reference you suggested.
hfsf is offline   Reply With Quote

Old   November 19, 2012, 08:27
Default
  #5
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 228
Rep Power: 9
Cyp is on a distinguished road
I can explain it to you through a simple example. Consider only the diffusion between two phases (beta and gamma for instance) :

In the beta-phase you have
\nabla \cdot  D_{\beta}\nabla C_{\beta} = 0,

and in the gamma-phase
\nabla \cdot  D_{\gamma} \nabla C_{\gamma} = 0.

Both phases are connected through a flux continuity at the interface
\textbf{n}_{\beta\gamma} \cdot D_{\beta} \nabla C_{\beta} = 
\textbf{n}_{\beta\gamma} \cdot D_{\gamma} \nabla C_{\gamma} \texttt{  at  } \mathcal{A}_{\beta \gamma},

and the thermodynamic equilibrium condition reads:
C_{\beta}=H C_{\gamma} \texttt{  at  } \mathcal{A}_{\beta \gamma}


What you look for is an partial differential equation that govern
C = \alpha C_{\beta} + (1-\alpha) C_{\gamma}
where \alpha is the phase indicator provided from the VOF solution. With such a formulation, C is defined on the whole domain. In the same manner, you can defined a diffusion field as
D = \alpha D_{\beta} + (1-\alpha) D_{\gamma}

Now you express the derivative of C :
\nabla C = \alpha \nabla C_{\beta} + (1-\alpha) \nabla C_{\gamma} + (C_{\beta} - C_{\gamma})\nabla \alpha

multiplying this relation by D and applying the divergence operator, you get :

\nabla \cdot D \nabla C = \alpha \nabla \cdot D_{\beta}\nabla C_{\beta} + (1-\alpha) \nabla \cdot D_{\gamma} \nabla C_{\gamma}
+ (D_{\beta}\nabla C_{\beta}-D_{\gamma} \nabla C_{\gamma})\nabla \alpha + \nabla \cdot D (C_{\beta} - C_{\gamma})\nabla \alpha

Just keep in mind that according to the distribution theory you have : \textbf{n}_{\beta\gamma} = -\nabla \alpha. Consequently, the previous equation reduces to:

\nabla\cdot D \nabla C = \nabla \cdot D (C_{\beta} - C_{\gamma})\nabla \alpha,

This additional term represents the interfacial jump condition. If there is a continuity, you can get rid of it. However, if you have a partitioning relation, you have to consider it.

At the interface, we have C_{\beta}=H C_{\gamma}.

Consequently, C_{\beta} - C_{\gamma}= (1-H)C_{\gamma}

more over, C = \alpha C_{\beta} + (1-\alpha) C_{\gamma} = (\alpha H + (1-\alpha))C_{\gamma}

So C_{\beta} - C_{\gamma}= \frac{(1-H)}{\alpha H + (1-\alpha)} C

So your diffusion equation becomes :
\nabla\cdot D \nabla C = \nabla \cdot D \frac{(1-H)}{\alpha H + (1-\alpha)} C \nabla \alpha,

With such a formulation, you will automaticly have a jump condition at the interface between beta and gamma.

You can also optimised the solution with D = \frac{D_{\beta} D_{\gamma}}{\alpha D_{\gamma} + (1-\alpha)D_{\beta}}

I let you adapt this exemple to the advection-diffusion equation.

Best regards,
Cyp

Last edited by Cyp; November 19, 2012 at 09:26.
Cyp is offline   Reply With Quote

Old   June 28, 2013, 02:55
Default
  #6
Member
 
Luca Giannelli
Join Date: Jun 2010
Location: Kobe, Japan
Posts: 58
Rep Power: 7
voingiappone is on a distinguished road
Quote:
Originally Posted by Cyp View Post
So your diffusion equation becomes :
\nabla\cdot D \nabla C = \nabla \cdot D \frac{(1-H)}{\alpha H + (1-\alpha)} C \nabla \alpha,

With such a formulation, you will automaticly have a jump condition at the interface between beta and gamma.

You can also optimised the solution with D = \frac{D_{\beta} D_{\gamma}}{\alpha D_{\gamma} + (1-\alpha)D_{\beta}}

I let you adapt this exemple to the advection-diffusion equation.

Best regards,
Cyp
Cyp,

I don't actually know if you are still following this tread but I have a couple of questions.
It came for me too the time to implement the phase jump condition so I came back to this useful thread. In my previous case (a non-volatile tracer) I just had the Laplacian of a bunch of constants and alpha1: no problem in the solution if you insert the explicit laplacian (alpha1 already calculated). But in this case it is different because we have C an alpha1 simultaneously in the laplacian.

For what I can see in the other terms OpenFOAM always expects in the laplacian a dimensionedScalar and a volScalarField. So, I gathered all the constant terms in the fraction and calculated them before the C equation:

H =  D \frac{(1-H)}{\alpha H + (1-\alpha)}

Being this a function of alpha1 I had to define it in the Createfields.H as another volScalarField. Again, no problem. What I actually cannot understand is: how do I formulate this in C++??

\nabla\cdot D \nabla C = \nabla \cdot H \cdot C \nabla \alpha,

should become

Code:
fvm::laplacian(DC, C)
But if I code it this way, my solver won't compile. For what I see, the compiled does not like the fact that C is in the Laplacian.
Moreover my low C++ knowledge prevents me for finding an alternative formulation.
Do you have any hint?

Thanks!
voingiappone is offline   Reply With Quote

Reply

Tags
drop, interface position, interfoam, openfoam

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
Wind turbine simulation Saturn CFX 34 October 16, 2014 05:27
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


All times are GMT -4. The time now is 23:05.