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

Two-Fluid model for melting

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

Like Tree1Likes
  • 1 Post By rdbisme

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 28, 2017, 12:26
Default Two-Fluid model for melting
  #1
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
Hello,

I'm working with reactingTwoPhaseEulerFoam for the simulation of slush flows (i.e. slurry flows in which the solid particulate is the same fluid as the carrier but solidified) and I would like to investigate the possibility of allowing melting phase change between the two phases.

I looked quite a bit into ThermalPhaseChangePhaseSystem and InterPhaseCompositionPhaseSystem but they require to have a phaseModel that returns mass fraction equations (returned by the multiComponentPhaseModel) and in particular the way they handle mass transfer doesn't translate into a change in the volumetric phase fraction (there is no source term in the phase fraction equations for what I understand).

The model I'd like to implement is:

\frac{\partial \rho_i\alpha_i}{\partial t} = \nabla \cdot (\rho_i \alpha_i u_i) = \dot{m}_i

where the mass source term is retrieved from the latent heat
\dot{m}L = \dot{q}

And then there are source terms in the energy equation and momentum equation accordingly.

Do you have any hints or suggestions?

In particular do you know someone or some material I could look for this? Moreover do you have any reference for the ThermalPhaseChangePhaseSystem and InterphaseCompositionPhaseSystem code?
erinsam likes this.

Last edited by rdbisme; June 9, 2017 at 11:52.
rdbisme is offline   Reply With Quote

Old   May 28, 2017, 12:56
Default
  #2
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
As reference, for what concerns the volume fraction source term, there's a clarifying explanation from the developers:

https://bugs.openfoam.org/view.php?id=1881

Last edited by rdbisme; May 29, 2017 at 04:07.
rdbisme is offline   Reply With Quote

Old   June 9, 2017, 11:37
Default
  #3
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Dear Ruben,

Based on the link you gave, the source or sink term for the volume fraction is included into the tdgdt in fluid.solve() function. Did you find the relation between dmdt and divU as mentioned in that bug report?

Thanks.
openfoammaofnepo is offline   Reply With Quote

Old   June 9, 2017, 11:46
Default
  #4
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 Ruben,

Based on the link you gave, the source or sink term for the volume fraction is included into the tdgdt in fluid.solve() function. Did you find the relation between dmdt and divU as mentioned in that bug report?

Thanks.
Hi, yes. The divU term is created in the pressure equation pEqn.H (OpenFOAM 4.x)

Code:
// Set the phase dilatation rates
            if (phase1.compressible())
            {
                phase1.divU(-pEqnComp1 & p_rgh);
            }
            if (phase2.compressible())
            {
                phase2.divU(-pEqnComp2 & p_rgh);
            }
where the terms pEqnComp1/2 are always created in the same file for pressure equation

Code:
if (fluid.transfersMass())
    {
        if (pEqnComp1.valid())
        {
            pEqnComp1.ref() -= fluid.dmdt()/rho1;
        }
        else
        {
            pEqnComp1 = fvm::Su(-fluid.dmdt()/rho1, p_rgh);
        }

        if (pEqnComp2.valid())
        {
            pEqnComp2.ref() += fluid.dmdt()/rho2;
        }
        else
        {
            pEqnComp2 = fvm::Su(fluid.dmdt()/rho2, p_rgh);
        }
    }
Is this what you ask?

Moreover I would really like if someone has some reference that talks about this dilatation term. I cannot understand where it comes from, my compressible background is not incredible, I would like to read a bit about it.
rdbisme is offline   Reply With Quote

Old   June 9, 2017, 11:52
Default
  #5
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Dear Ruben,

Thank you - This makes sense.

Recently I am using this solver and reading some of its source files. I think we can discuss when necessary.

Thank you so much!
openfoammaofnepo is offline   Reply With Quote

Old   June 9, 2017, 11:54
Default
  #6
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 Ruben,

Thank you - This makes sense.

Recently I am using this solver and reading some of its source files. I think we can discuss when necessary.

Thank you so much!
I already implemented a mockup code for the melting, it compiles but surely is gonna have some flaws. Did not have time to test it. As I'll have time I'll post it so we can work on it and the community can make comments to help. Feel free to comment if you need something.
rdbisme is offline   Reply With Quote

Old   June 9, 2017, 11:58
Default
  #7
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Do you mean you have already implemented a mass transfer model (or also heat transfer model) for melting under /PhaseSystems?
openfoammaofnepo is offline   Reply With Quote

Old   June 9, 2017, 12:01
Default
  #8
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
Do you mean you have already implemented a mass transfer model (or also heat transfer model) for melting under /PhaseSystems?
Yes, I created a MeltingPhaseSystem that provides the dmdt term computed as I wrote in the first post. It inherits from HeatAndMassTransferPhaseSystem that already handles the source terms in momentum. I took inspiration from the ThermalPhaseChangePhaseSystem and the InterphaseCompositionPhaseSystem.

I don't know by the way if that is the correct way to go. . And still untested, so maybe it's just bulls***.
rdbisme is offline   Reply With Quote

Old   June 9, 2017, 12:04
Default
  #9
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Dear Ruben,

Thank you so much. I am working on implementing a pyrolysis model for the phase change. Is it possible for you to post that file so that I can make a reference for my implementation? Thanks!
openfoammaofnepo is offline   Reply With Quote

Old   June 9, 2017, 12:06
Default
  #10
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 Ruben,

Thank you so much. I am working on implementing a pyrolysis model for the phase change. Is it possible for you to post that file so that I can make a reference for my implementation? Thanks!
Did you check first the two other phase change PhaseSystems? I'm no expert about Pyrolisys, but I imagine you're working with multicomponent or reacting phases. If that is the case, the other two models would be a better starting point than mine.

I'll by the way post it as soon as I have something, at least, running...
rdbisme is offline   Reply With Quote

Old   June 9, 2017, 12:07
Default
  #11
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
OK, thank you so much for the suggestions!
openfoammaofnepo is offline   Reply With Quote

Old   June 10, 2017, 11:57
Default
  #12
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Dear Ruben,

Thank you for your explanation. When solving the alpha equation, the source term is included into dgdt, as mentioned in the link you provided. So dgdt is related to divU(). Also, the dilatation rate divU() is updated in pEqn.H, which is computed from pEqnComp. pEqnComp includes the mass addition or loss effects. Is this line of reasoning right?

Thanks!
openfoammaofnepo is offline   Reply With Quote

Old   June 23, 2017, 04:54
Default
  #13
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 Ruben,

Thank you for your explanation. When solving the alpha equation, the source term is included into dgdt, as mentioned in the link you provided. So dgdt is related to divU(). Also, the dilatation rate divU() is updated in pEqn.H, which is computed from pEqnComp. pEqnComp includes the mass addition or loss effects. Is this line of reasoning right?

Thanks!
From my understanding, I would say yes.

Sent by my Honor 8 using Tapatalk
rdbisme is offline   Reply With Quote

Reply

Tags
melting, reactingmultiphaseeulerf, reactingtwophaseeulerfoam

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
Velocity vector in impeller passage ngoc_tran_bao CFX 24 May 3, 2016 21:16
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
how to incorporate the temperature of fluid in pressure based cavitation model arindamsantra7 Main CFD Forum 0 September 23, 2014 10:46
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 14:32
How to apply negtive pressure to outlet bioman66 CFX 5 June 3, 2006 01:40


All times are GMT -4. The time now is 00:14.