CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

reactingEulerFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 27, 2015, 05:20
Default reactingEulerFoam
  #1
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 50
Rep Power: 17
demichie is on a distinguished road
Hi all,
I am trying to understand how mass transfer is implemented in the new reactingEulerFoam in OpenFOAM-dev and I've seend tht the contribution to the momentum trafner between the phases associated with the mass transfer is in HeatAndMassTransferPhaseSystem.C:


*eqns[pair.phase1().name()] += dmdt21*U2 - fvm::Sp(dmdt21, U1);
*eqns[pair.phase2().name()] -= dmdt12*U1 - fvm::Sp(dmdt12, U2);

where

const volScalarField dmdt(this->dmdt(pair));
const volScalarField dmdt21(posPart(dmdt));
const volScalarField dmdt12(negPart(dmdt));

I think it should be:

*eqns[pair.phase1().name()] += dmdt21*U2 - fvm::Sp(dmdt12, U1);
*eqns[pair.phase2().name()] -= dmdt12*U1 - fvm::Sp(dmdt21, U2);

because the speed associated to a mass transfer from phase 1 to phase 2 is U1.

In addition, this formulation does not take into account that a positive mass transfer could be the result of transfers in the two directions (condensation of one component and evaporation of another one). These two contributions should be kept separated when considering the momentum and heat transfer. Considering only the positive and negative part of dmdt does not allow to do that.

Should I report this as a bug in the bug tracker?

Mattia
demichie is offline   Reply With Quote

Old   October 27, 2015, 05:40
Default
  #2
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 50
Rep Power: 17
demichie is on a distinguished road
I am digging more into the solver and I have noticed that when the face momentum equations are used (pUf instead of pU) the correct formulation is used:

U1Eqn =
(
fvm::div(alphaRhoPhi1, U1) - fvm::Sp(fvc::div(alphaRhoPhi1), U1)
+ fvm::Sp(dmdt12, U1) + dmdt21*U2

So, the problem is only in the centered formulation for the momentum equation. This could be an explanation of the difference in the convergence for the two formulations.

Still regarding the mass transfer terms in the equations, I have not found it in the alpha equation, where mass transfer should be accounted too.
demichie is offline   Reply With Quote

Old   October 27, 2015, 09:56
Default
  #3
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 50
Rep Power: 17
demichie is on a distinguished road
I think there are similar problems also with the heatTrasfer term:

const volScalarField dmdt(this->dmdt(pair));
const volScalarField dmdt21(posPart(dmdt));
const volScalarField dmdt12(negPart(dmdt));
const volScalarField& Tf(*Tf_[pair]);

*eqns[phase1.name()] +=
dmdt21*(phase1.thermo().he(phase1.thermo().p(), Tf))
- fvm::Sp(dmdt21, he1)
+ dmdt21*(K2 - K1);

*eqns[phase2.name()] -=
dmdt12*(phase2.thermo().he(phase2.thermo().p(), Tf))
- fvm::Sp(dmdt12, he2)
+ dmdt12*(K1 - K2);

In the first equations it should be:

*eqns[phase1.name()] +=
- dmdt21*(phase2.thermo().he(phase2.thermo().p(), Tf))
+ fvm::Sp(dmdt12, he1)
- dmdt21*K2
+ - dmdt12*K1;


Can someone suggest me what is the best way to communicate these things to the developers?

Thank you
Mattia
demichie is offline   Reply With Quote

Old   October 28, 2015, 05:38
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
I think the bug tracker would be the best way to communicate with the developers.

http://www.openfoam.org/mantisbt/my_view_page.php

They may ask for a particular simple test case.

Regards,
Tom
tomf is offline   Reply With Quote

Old   May 16, 2017, 11:08
Default
  #5
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Dear demichie,

I am also checking these lines about how to implement the momentum transfer due to the mass transfer. So here dmdt21 is positive, dmdt12 is always negative. So if the mass is from phase 2 to phase 1, then the change of mass is assumed positive, if the mass is from phase 1 to phase 2, then the change of mass is assumed to be negative.

So for phase 1, the velocity for dmdt21 is U2, which is OK,
for phase 1 again, the velocity for dmdt12 is U1, which is OK.

For phase 2, the velocity for dmdt12 is U1, the velocity for dmdt21 is U2.

Quote:
Originally Posted by demichie View Post
Hi all,
I am trying to understand how mass transfer is implemented in the new reactingEulerFoam in OpenFOAM-dev and I've seend tht the contribution to the momentum trafner between the phases associated with the mass transfer is in HeatAndMassTransferPhaseSystem.C:


*eqns[pair.phase1().name()] += dmdt21*U2 - fvm::Sp(dmdt21, U1);
*eqns[pair.phase2().name()] -= dmdt12*U1 - fvm::Sp(dmdt12, U2);

where

const volScalarField dmdt(this->dmdt(pair));
const volScalarField dmdt21(posPart(dmdt));
const volScalarField dmdt12(negPart(dmdt));

I think it should be:

*eqns[pair.phase1().name()] += dmdt21*U2 - fvm::Sp(dmdt12, U1);
*eqns[pair.phase2().name()] -= dmdt12*U1 - fvm::Sp(dmdt21, U2);

because the speed associated to a mass transfer from phase 1 to phase 2 is U1.

In addition, this formulation does not take into account that a positive mass transfer could be the result of transfers in the two directions (condensation of one component and evaporation of another one). These two contributions should be kept separated when considering the momentum and heat transfer. Considering only the positive and negative part of dmdt does not allow to do that.

Should I report this as a bug in the bug tracker?

Mattia
openfoammaofnepo is offline   Reply With Quote

Old   May 17, 2017, 11:32
Default
  #6
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Dear Demichie,

I found the same problem as you mentioned:

PHP Code:
Still regarding the mass transfer terms in the equationsI have not found it in the alpha equationwhere mass transfer should be accounted too
Did you finally confirm this issue for the source terms of mass transfer in the alpha equation?




Quote:
Originally Posted by demichie View Post
I am digging more into the solver and I have noticed that when the face momentum equations are used (pUf instead of pU) the correct formulation is used:

U1Eqn =
(
fvm::div(alphaRhoPhi1, U1) - fvm::Sp(fvc::div(alphaRhoPhi1), U1)
+ fvm::Sp(dmdt12, U1) + dmdt21*U2

So, the problem is only in the centered formulation for the momentum equation. This could be an explanation of the difference in the convergence for the two formulations.

Still regarding the mass transfer terms in the equations, I have not found it in the alpha equation, where mass transfer should be accounted too.
openfoammaofnepo is offline   Reply With Quote

Old   May 28, 2017, 13:46
Default
  #7
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 12
rdbisme is on a distinguished road
Quote:
Originally Posted by openfoammaofnepo View Post
Dear Demichie,

I found the same problem as you mentioned:

PHP Code:
Still regarding the mass transfer terms in the equationsI have not found it in the alpha equationwhere mass transfer should be accounted too
Did you finally confirm this issue for the source terms of mass transfer in the alpha equation?
[EDIT]
Here you can find an explanation for what concerns the mass source in the alpha equations.
https://bugs.openfoam.org/view.php?id=1881
rdbisme is offline   Reply With Quote

Old   March 7, 2018, 13:41
Default
  #8
us7
New Member
 
Umer
Join Date: Aug 2016
Posts: 29
Rep Power: 9
us7 is on a distinguished road
Hello,
i am looking for something that explains “bubbleColumnEvaporatingDissolving” tutorial. I am not sure about few things in it like (air.gas, air.water) I set in the “0” directory. When I see results on paraView>air.gas . Can anyone say few quick words about it. May be it will work for me.

1. air.gas, air.liquid shows mass fraction or volume fraction? or Is it showing mass fraction in each phase gas/liquid? It means mass fraction "Yair" is multiplied with "alpha.gas"?
2. How diffusivity Df is calculated in the solver? Or its just a constant?
3. How this solver calculate concentration gradient dY? Is it coming from Henry’s Law Ys=k.Yg.rhog/rhos then it is multiplied with rho.phase to get the concentration gradient dY for mass transfer term? mass transfer= K. Df. dY

Best Regards,
Umer
us7 is offline   Reply With Quote

Reply

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



All times are GMT -4. The time now is 10:38.