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

reactingEulerFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 27, 2015, 05:20
Default reactingEulerFoam
  #1
Member
 
Mattia de\' Michieli Vitturi
Join Date: Mar 2009
Posts: 42
Rep Power: 8
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: 42
Rep Power: 8
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: 42
Rep Power: 8
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: Delft, Netherlands
Posts: 265
Rep Power: 11
tomf is on a distinguished road
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

Reply

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



All times are GMT -4. The time now is 21:36.