diff --git a/dumux/porousmediumflow/1p/volumevariables.hh b/dumux/porousmediumflow/1p/volumevariables.hh index c9883a02af6de946d8ee66d9e36e9954148e7996..e242bce44bb1654f83a0fd6147b78d03045bd268 100644 --- a/dumux/porousmediumflow/1p/volumevariables.hh +++ b/dumux/porousmediumflow/1p/volumevariables.hh @@ -24,10 +24,10 @@ #ifndef DUMUX_1P_VOLUME_VARIABLES_HH #define DUMUX_1P_VOLUME_VARIABLES_HH -#include <dumux/common/properties.hh> #include <dumux/porousmediumflow/volumevariables.hh> #include <dumux/porousmediumflow/nonisothermal/volumevariables.hh> #include <dumux/material/fluidstates/immiscible.hh> +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> namespace Dumux { diff --git a/dumux/porousmediumflow/1pnc/volumevariables.hh b/dumux/porousmediumflow/1pnc/volumevariables.hh index 21b001a6c879152d02c62773c67707807d656916..82b640507ff9e5f63555bb05028c1fa69e38efac 100644 --- a/dumux/porousmediumflow/1pnc/volumevariables.hh +++ b/dumux/porousmediumflow/1pnc/volumevariables.hh @@ -29,6 +29,7 @@ #include <dumux/porousmediumflow/volumevariables.hh> #include <dumux/porousmediumflow/nonisothermal/volumevariables.hh> +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> namespace Dumux { diff --git a/dumux/porousmediumflow/2p/volumevariables.hh b/dumux/porousmediumflow/2p/volumevariables.hh index deb6cdbf7641d1b00ee748660e6c6f57f13b405a..2df8525c7c9476c4831c597e68374c5361d9e568 100644 --- a/dumux/porousmediumflow/2p/volumevariables.hh +++ b/dumux/porousmediumflow/2p/volumevariables.hh @@ -27,8 +27,8 @@ #include <dumux/porousmediumflow/volumevariables.hh> #include <dumux/porousmediumflow/nonisothermal/volumevariables.hh> - -#include "indices.hh" +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> +#include <dumux/porousmediumflow/2p/formulation.hh> namespace Dumux { diff --git a/dumux/porousmediumflow/2p1c/volumevariables.hh b/dumux/porousmediumflow/2p1c/volumevariables.hh index ddad4413a1382efde7fc547be1b03c2d9e98b3a1..9e8c0fae8083604d527cb0c237632b58dc3c02a1 100644 --- a/dumux/porousmediumflow/2p1c/volumevariables.hh +++ b/dumux/porousmediumflow/2p1c/volumevariables.hh @@ -29,6 +29,7 @@ #include <dumux/common/valgrind.hh> #include <dumux/porousmediumflow/volumevariables.hh> #include <dumux/porousmediumflow/nonisothermal/volumevariables.hh> +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> namespace Dumux { diff --git a/dumux/porousmediumflow/2p2c/volumevariables.hh b/dumux/porousmediumflow/2p2c/volumevariables.hh index 435e1bcb79ac51e6a3150e67261c68661b55d800..7772544288777ec6bd6f4fcdb433c512158fff9b 100644 --- a/dumux/porousmediumflow/2p2c/volumevariables.hh +++ b/dumux/porousmediumflow/2p2c/volumevariables.hh @@ -33,6 +33,7 @@ #include <dumux/porousmediumflow/volumevariables.hh> #include <dumux/porousmediumflow/nonisothermal/volumevariables.hh> #include <dumux/porousmediumflow/2p/formulation.hh> +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> namespace Dumux { diff --git a/dumux/porousmediumflow/2pnc/volumevariables.hh b/dumux/porousmediumflow/2pnc/volumevariables.hh index 29d60d100f4b10b4568437bae993f1077be0ea09..60ea4afe5f5768874299d87ab0c690ee31f88a50 100644 --- a/dumux/porousmediumflow/2pnc/volumevariables.hh +++ b/dumux/porousmediumflow/2pnc/volumevariables.hh @@ -29,13 +29,13 @@ #include <vector> #include <dumux/common/math.hh> -#include <dumux/common/properties.hh> #include <dumux/discretization/methods.hh> #include <dumux/porousmediumflow/volumevariables.hh> #include <dumux/porousmediumflow/nonisothermal/volumevariables.hh> #include <dumux/material/fluidstates/compositional.hh> +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> #include <dumux/material/constraintsolvers/computefromreferencephase.hh> #include <dumux/material/constraintsolvers/misciblemultiphasecomposition.hh> diff --git a/dumux/porousmediumflow/3p/volumevariables.hh b/dumux/porousmediumflow/3p/volumevariables.hh index 69294787d45f6453db5873a55732ad1aae72e12d..d4d219db267f34c5d87a0724bbeedb61d613e538 100644 --- a/dumux/porousmediumflow/3p/volumevariables.hh +++ b/dumux/porousmediumflow/3p/volumevariables.hh @@ -28,7 +28,7 @@ #include <dumux/material/fluidstates/immiscible.hh> #include <dumux/porousmediumflow/volumevariables.hh> #include <dumux/porousmediumflow/nonisothermal/volumevariables.hh> - +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> namespace Dumux { diff --git a/dumux/porousmediumflow/3p3c/volumevariables.hh b/dumux/porousmediumflow/3p3c/volumevariables.hh index bdb6ba36081630f369e01529dc7399772eba7d5f..7d27a8a3a6254ccf192aedf75247833d764e2980 100644 --- a/dumux/porousmediumflow/3p3c/volumevariables.hh +++ b/dumux/porousmediumflow/3p3c/volumevariables.hh @@ -31,6 +31,7 @@ #include <dumux/material/constraintsolvers/misciblemultiphasecomposition.hh> #include <dumux/porousmediumflow/volumevariables.hh> #include <dumux/porousmediumflow/nonisothermal/volumevariables.hh> +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> namespace Dumux { diff --git a/dumux/porousmediumflow/3pwateroil/volumevariables.hh b/dumux/porousmediumflow/3pwateroil/volumevariables.hh index c9a06f1699fe00a1c5dc331cec3b667a03407108..876cfc9fa8636889a85d7fc9690ed9ca14e6d509 100644 --- a/dumux/porousmediumflow/3pwateroil/volumevariables.hh +++ b/dumux/porousmediumflow/3pwateroil/volumevariables.hh @@ -28,11 +28,7 @@ #include <vector> #include <iostream> -#include <dune/common/deprecated.hh> - #include <dumux/common/math.hh> -#include <dumux/common/properties.hh> -#include <dumux/discretization/methods.hh> #include <dumux/porousmediumflow/volumevariables.hh> #include <dumux/porousmediumflow/nonisothermal/volumevariables.hh> @@ -40,6 +36,7 @@ #include <dumux/material/fluidstates/compositional.hh> #include <dumux/material/constraintsolvers/computefromreferencephase.hh> #include <dumux/material/constraintsolvers/misciblemultiphasecomposition.hh> +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> namespace Dumux { @@ -828,15 +825,6 @@ public: Scalar permeability() const { return permeability_; } - /*! - * \brief Returns the diffusivity coefficient matrix - */ - DUNE_DEPRECATED_MSG("diffusionCoefficient() is deprecated. Use diffusionCoefficient(int phaseIdx) instead.") - Dune::FieldVector<Scalar, numPs> diffusionCoefficient() const - { - return diffusionCoefficient_; - } - /*! * \brief Returns the diffusion coefficient */ diff --git a/dumux/porousmediumflow/co2/volumevariables.hh b/dumux/porousmediumflow/co2/volumevariables.hh index 35b6e3833c5d52bcdf7180571740fa78ec306a97..e7e279469c125433ae1024e17ce702f6d795a273 100644 --- a/dumux/porousmediumflow/co2/volumevariables.hh +++ b/dumux/porousmediumflow/co2/volumevariables.hh @@ -27,9 +27,9 @@ #include <dune/common/exceptions.hh> -#include <dumux/common/properties.hh> #include <dumux/porousmediumflow/volumevariables.hh> #include <dumux/porousmediumflow/2p/formulation.hh> +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> namespace Dumux { diff --git a/dumux/porousmediumflow/mpnc/volumevariables.hh b/dumux/porousmediumflow/mpnc/volumevariables.hh index af27b0712a40eb23354c0ab81c6b352a6bc34439..10f6c0e9feb2ed8d8e560fbb5e6bf461ce666e7e 100644 --- a/dumux/porousmediumflow/mpnc/volumevariables.hh +++ b/dumux/porousmediumflow/mpnc/volumevariables.hh @@ -25,21 +25,16 @@ #ifndef DUMUX_MPNC_VOLUME_VARIABLES_HH #define DUMUX_MPNC_VOLUME_VARIABLES_HH -#include "indices.hh" - -#include <dumux/common/properties.hh> - #include <dumux/porousmediumflow/volumevariables.hh> #include <dumux/porousmediumflow/nonisothermal/volumevariables.hh> #include <dumux/material/constraintsolvers/ncpflash.hh> #include <dumux/material/constraintsolvers/compositionfromfugacities.hh> #include <dumux/material/constraintsolvers/misciblemultiphasecomposition.hh> - +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> #include "pressureformulation.hh" -namespace Dumux -{ +namespace Dumux { // forward declaration template <class Traits, bool enableChemicalNonEquilibrium> @@ -55,8 +50,8 @@ using MPNCVolumeVariables = MPNCVolumeVariablesImplementation<Traits, Traits::M template <class Traits> class MPNCVolumeVariablesImplementation<Traits, false> - : public PorousMediumFlowVolumeVariables<Traits> - , public EnergyVolumeVariables<Traits, MPNCVolumeVariables<Traits> > +: public PorousMediumFlowVolumeVariables<Traits> +, public EnergyVolumeVariables<Traits, MPNCVolumeVariables<Traits> > { using ParentType = PorousMediumFlowVolumeVariables<Traits>; using EnergyVolVars = EnergyVolumeVariables<Traits, MPNCVolumeVariables<Traits> >; @@ -222,22 +217,23 @@ public: for (int compIdx = 0; compIdx < numFluidComps; ++compIdx) fug[compIdx] = priVars[Indices::fug0Idx + compIdx]; - // calculate phase compositions - for (int phaseIdx = 0; phaseIdx < numPhases(); ++phaseIdx) { - // initial guess - for (int compIdx = 0; compIdx < numFluidComps; ++compIdx) { - Scalar x_ij = 1.0/numFluidComps; - - // set initial guess of the component's mole fraction - fluidState.setMoleFraction(phaseIdx, - compIdx, - x_ij); - } - // calculate the phase composition from the component - // fugacities - CompositionFromFugacities::guessInitial(fluidState, paramCache, phaseIdx, fug); - CompositionFromFugacities::solve(fluidState, paramCache, phaseIdx, fug); + // calculate phase compositions + for (int phaseIdx = 0; phaseIdx < numPhases(); ++phaseIdx) { + // initial guess + for (int compIdx = 0; compIdx < numFluidComps; ++compIdx) { + Scalar x_ij = 1.0/numFluidComps; + + // set initial guess of the component's mole fraction + fluidState.setMoleFraction(phaseIdx, + compIdx, + x_ij); } + // calculate the phase composition from the component + // fugacities + CompositionFromFugacities::guessInitial(fluidState, paramCache, phaseIdx, fug); + CompositionFromFugacities::solve(fluidState, paramCache, phaseIdx, fug); + } + // dynamic viscosities for (int phaseIdx = 0; phaseIdx < numPhases(); ++phaseIdx) { // viscosities diff --git a/dumux/porousmediumflow/richards/volumevariables.hh b/dumux/porousmediumflow/richards/volumevariables.hh index 1c6f9de4445cf119cd41263e870bf070fcc537e6..1cf02a9265e4a021ae0dda75468f976898eb61b0 100644 --- a/dumux/porousmediumflow/richards/volumevariables.hh +++ b/dumux/porousmediumflow/richards/volumevariables.hh @@ -32,6 +32,7 @@ #include <dumux/porousmediumflow/nonisothermal/volumevariables.hh> #include <dumux/material/idealgas.hh> #include <dumux/material/constants.hh> +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> namespace Dumux { diff --git a/dumux/porousmediumflow/richardsnc/volumevariables.hh b/dumux/porousmediumflow/richardsnc/volumevariables.hh index dff11d746e7db625455cafa4dc9a53b6a39ed4a5..29cbbd1cb25fe4b3d1d55ea69824bdcfee85836c 100644 --- a/dumux/porousmediumflow/richardsnc/volumevariables.hh +++ b/dumux/porousmediumflow/richardsnc/volumevariables.hh @@ -27,6 +27,7 @@ #include <dumux/porousmediumflow/volumevariables.hh> #include <dumux/porousmediumflow/nonisothermal/volumevariables.hh> +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> namespace Dumux { diff --git a/dumux/porousmediumflow/tracer/volumevariables.hh b/dumux/porousmediumflow/tracer/volumevariables.hh index 5c0613ba39391f84f7c96afa1280c6f70cff3470..cabf1ee6700f93ed5f5fe07eb01a350b8fc31d25 100644 --- a/dumux/porousmediumflow/tracer/volumevariables.hh +++ b/dumux/porousmediumflow/tracer/volumevariables.hh @@ -25,6 +25,7 @@ #define DUMUX_TRACER_VOLUME_VARIABLES_HH #include <dumux/porousmediumflow/volumevariables.hh> +#include <dumux/material/solidstates/updatesolidvolumefractions.hh> namespace Dumux { diff --git a/dumux/porousmediumflow/volumevariables.hh b/dumux/porousmediumflow/volumevariables.hh index 394ad09102e223e55a2aa389e0d7fbc33e248e17..1dcbcea81072f3c0b0db4e2fa8ee743d49a87b17 100644 --- a/dumux/porousmediumflow/volumevariables.hh +++ b/dumux/porousmediumflow/volumevariables.hh @@ -25,8 +25,6 @@ #ifndef DUMUX_POROUSMEDIUMFLOW_VOLUME_VARIABLES_HH #define DUMUX_POROUSMEDIUMFLOW_VOLUME_VARIABLES_HH -#include <dumux/common/properties.hh> - namespace Dumux { /*!