idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.77k stars 1.05k forks source link

Enhance chemical reactions (just in PorousFlow?) to multiphase situations #11049

Closed WilkAndy closed 6 years ago

WilkAndy commented 6 years ago

Rationale

Currently the chemical reactions (module and those in PorousFlow) are only relevant for aqueous chemistry where the liquid saturation is assumed to be unity. The ETH people use the aqueous chemistry, but in multiphase situations, and this is a pretty simple enhancement (multiply by S_liquid in various places).

I'm not sure whether this is relevant to the chemical_reactions module. In any case, i won't be enhancing the stuff there as part of this Issue. What do you think, @cpgr ? Should chemical_reactions just work for one phase? What's its overall design and goals? If you think this enhancement is warranted in chemical_reactions, do you want to do it as part of this Issue?

Description

In PorousFlow the "aqueous_saturation" will have to appear in one formula:

M = M_old + phi_old aqueous_saturation reaction_rate * dt

These classes have this formula:

I think i'll include another parameter in the PorousFlowDictator which is aqueous_phase_number, and then the user interface to the above classes won't have to change as i'll just multiply by _saturation[_qp][aqueous_phase_number] at the appropriate place.

Impact

Ability to do aqueous chemistry in multi-phase scenarios.

WilkAndy commented 6 years ago

Hmm, because of the multiphase situation i'm also going to have aqueous_phase_number on all my mass fractions, etc. Not hard, just a mess.

cpgr commented 6 years ago

At the moment, the chemical reactions module isn't set up for multiple phases at all. I'm not sure how messy it would be to add to it.

cpgr commented 6 years ago

BTW, keep these coming Andy. It's good to know what other people are interested in and what we can add to make the code more useful for them

WilkAndy commented 6 years ago

OK, so i'll just do PorousFlow. What the ETH people currently want, and what i'm going to do, is just to ignore the non-aqueous phases completely. All the chemistry occurs only in the aqueous phase and is unaffected by anything else, so basically you just have a S_w * porosity appearing in the mineralisation wherever you used to have porosity.

cpgr commented 6 years ago

Sounds good