From bad1ffe43ddf3803c46005900af55d17f95e2875 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Tue, 8 May 2018 13:12:45 +0200 Subject: [PATCH] [volvars] Fix includes --- dumux/porousmediumflow/1p/volumevariables.hh | 2 +- .../porousmediumflow/1pnc/volumevariables.hh | 1 + dumux/porousmediumflow/2p/volumevariables.hh | 4 +- .../porousmediumflow/2p1c/volumevariables.hh | 1 + .../porousmediumflow/2p2c/volumevariables.hh | 1 + .../porousmediumflow/2pnc/volumevariables.hh | 2 +- dumux/porousmediumflow/3p/volumevariables.hh | 2 +- .../porousmediumflow/3p3c/volumevariables.hh | 1 + .../3pwateroil/volumevariables.hh | 14 +----- dumux/porousmediumflow/co2/volumevariables.hh | 2 +- .../porousmediumflow/mpnc/volumevariables.hh | 44 +++++++++---------- .../richards/volumevariables.hh | 1 + .../richardsnc/volumevariables.hh | 1 + .../tracer/volumevariables.hh | 1 + dumux/porousmediumflow/volumevariables.hh | 2 - 15 files changed, 34 insertions(+), 45 deletions(-) diff --git a/dumux/porousmediumflow/1p/volumevariables.hh b/dumux/porousmediumflow/1p/volumevariables.hh index c9883a02af..e242bce44b 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 21b001a6c8..82b640507f 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 deb6cdbf76..2df8525c7c 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 ddad4413a1..9e8c0fae80 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 435e1bcb79..7772544288 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 29d60d100f..60ea4afe5f 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 69294787d4..d4d219db26 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 bdb6ba3608..7d27a8a3a6 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 c9a06f1699..876cfc9fa8 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 35b6e3833c..e7e279469c 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 af27b0712a..10f6c0e9fe 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 1c6f9de444..1cf02a9265 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 dff11d746e..29cbbd1cb2 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 5c0613ba39..cabf1ee670 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 394ad09102..1dcbcea810 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 { /*! -- GitLab