diff --git a/dumux/implicit/mpnc/diffusion/fluxvariables.hh b/dumux/implicit/mpnc/diffusion/fluxvariables.hh index 531b732b2bb130e2b906b9f2abd306e1566d2b3f..9dc508705bad8ad1ed7fd9b7c58f1981f981e97d 100644 --- a/dumux/implicit/mpnc/diffusion/fluxvariables.hh +++ b/dumux/implicit/mpnc/diffusion/fluxvariables.hh @@ -181,7 +181,7 @@ public: /*! * \brief The binary diffusion coefficient for each component in the gas phase. * \param compIIdx The local index of the first component in the phase - * \param compIJdx The local index of the second component in the phase + * \param compJIdx The local index of the second component in the phase */ Scalar porousDiffCoeffG(const unsigned int compIIdx, const unsigned int compJIdx) const diff --git a/dumux/implicit/mpnc/diffusion/volumevariables.hh b/dumux/implicit/mpnc/diffusion/volumevariables.hh index 10d117fe7e016be1858580c8160283b537d2d0d5..006f9765969fed29598f3a60c6dca110afd0b820 100644 --- a/dumux/implicit/mpnc/diffusion/volumevariables.hh +++ b/dumux/implicit/mpnc/diffusion/volumevariables.hh @@ -178,7 +178,7 @@ public: /*! * \brief The binary diffusion coefficient for each component in the gas phase. * \param compIIdx The local index of the first component in the phase - * \param compIJdx The local index of the second component in the phase + * \param compJIdx The local index of the second component in the phase */ Scalar diffCoeffG(const unsigned int compIIdx, const unsigned int compJIdx) const { return 0; } diff --git a/dumux/implicit/mpnc/energy/mpnclocalresidualenergy.hh b/dumux/implicit/mpnc/energy/mpnclocalresidualenergy.hh index 0572e6da3572e149d56401deffb66afcc2ef3b2d..c66a65e4d929a990a5b7d0c6833f96369d96f717 100644 --- a/dumux/implicit/mpnc/energy/mpnclocalresidualenergy.hh +++ b/dumux/implicit/mpnc/energy/mpnclocalresidualenergy.hh @@ -89,7 +89,7 @@ public: /*! * \brief the advective Flux of the enthalpy * - * \param enthalpy Flux advective Flux of the enthalpy + * \param enthalpyFlux advective Flux of the enthalpy * \param phaseIdx The local index of the phases * \param compMolFlux * \param volVars the Volume Variables @@ -122,8 +122,9 @@ public: * over a face of a sub-control volume. * * \param flux The flux over the SCV (sub-control-volume) face for each component + * \param fluxVars The flux variables * \param volVars The volume variables - * \param molarPhaseComponentValuesMassTransport[numPhases] + * \param molarPhaseComponentValuesMassTransport */ static void computeFlux(PrimaryVariables & flux, const FluxVariables & fluxVars, @@ -136,7 +137,8 @@ public: * \brief Calculate the source term of the equation * * \param source The source/sink in the sub-control volume for each component - * \param componentIntoPhaseMassTransfer[numPhases] + * \param componentIntoPhaseMassTransfer + * \param volVars The volume variables */ static void computeSource(PrimaryVariables &source, const VolumeVariables &volVars, @@ -220,8 +222,8 @@ public: * * \param flux The flux over the SCV (sub-control-volume) face for each component * \param fluxVars The flux Variables - * \param volVars The volume variables - * \param molarPhaseComponentValuesMassTransport[numPhases] + * \param elemVolVars The volume variables of the current element + * \param molarPhaseComponentValuesMassTransport */ static void computeFlux(PrimaryVariables & flux, const FluxVariables & fluxVars, @@ -247,8 +249,9 @@ public: * \brief the advective Flux of the enthalpy * \param flux The flux over the SCV (sub-control-volume) face for each component * \param fluxVars The flux Variables - * \param volVars The volume variables + * \param elemVolVars The volume variables of the current element * \param phaseIdx The local index of the phases + * \param molarComponentValuesMassTransport */ static void computePhaseEnthalpyFlux(PrimaryVariables & flux, const FluxVariables & fluxVars, @@ -295,7 +298,7 @@ public: * * \param source The source/sink in the sub-control volume for each component * \param volVars The volume variables - * \param componentIntoPhaseMassTransfer[numPhases] + * \param componentIntoPhaseMassTransfer */ static void computeSource(PrimaryVariables &source, diff --git a/dumux/implicit/mpnc/energy/mpncvolumevariablesenergy.hh b/dumux/implicit/mpnc/energy/mpncvolumevariablesenergy.hh index f37cb439e505d077ee286917e2652834478c0cf9..a6bef56ff877da09f8c26e588d639534465bd2ed 100644 --- a/dumux/implicit/mpnc/energy/mpncvolumevariablesenergy.hh +++ b/dumux/implicit/mpnc/energy/mpncvolumevariablesenergy.hh @@ -67,7 +67,7 @@ public: /*! * \brief Update the temperature of the sub-control volume. * - * \param fluidState Container for all the secondary variables concerning the fluids + * \param fs Container for all the secondary variables concerning the fluids * \param paramCache Container for cache parameters * \param priVars The primary Variables * \param element The finite element @@ -91,7 +91,7 @@ public: /*! * \brief Update the enthalpy and the internal energy for a given * control volume. - * \param fluidState Container for all the secondary variables concerning the fluids + * \param fs Container for all the secondary variables concerning the fluids * \param paramCache Container for cache parameters * \param element The finite element * \param fvGeometry The finite-volume geometry in the fully implicit scheme @@ -138,7 +138,7 @@ public: * * Since we are isothermal, we don't need to do anything! * - * \param fluidState Container for all the secondary variables concerning the fluids + * \param fs Container for all the secondary variables concerning the fluids * \param message A string returning the error message for this module */ const void physicalnessError(const FluidState & fs, @@ -177,7 +177,7 @@ public: /*! * \brief Update the temperature of the sub-control volume. * - * \param fluidState Container for all the secondary variables concerning the fluids + * \param fs Container for all the secondary variables concerning the fluids * \param paramCache Container for cache parameters * \param sol The primary Vaiables * \param element The finite element @@ -201,7 +201,7 @@ public: /*! * \brief Update the enthalpy and the internal energy for a given * control volume. - * \param fluidState Container for all the secondary variables concerning the fluids + * \param fs Container for all the secondary variables concerning the fluids * \param paramCache Container for cache parameters * \param element The finite element * \param fvGeometry The finite-volume geometry in the fully implicit scheme @@ -260,7 +260,7 @@ public: /*! * \brief Check whether the calculated values are reasonable. * - * \param fluidState Container for all the secondary variables concerning the fluids + * \param fs Container for all the secondary variables concerning the fluids * \param globalPos The position at which the check is conducted */ bool physicalness(const FluidState & fs, @@ -278,7 +278,7 @@ public: * \brief Output for the case that the current state is not physical. * This is called if the physicalness funcitons returned false. * - * \param fluidState Container for all the secondary variables concerning the fluids + * \param fs Container for all the secondary variables concerning the fluids * \param message A string returning the error message for this module */ const void physicalnessError(const FluidState & fs, diff --git a/dumux/implicit/mpnc/energy/mpncvolumevariablesenergykinetic.hh b/dumux/implicit/mpnc/energy/mpncvolumevariablesenergykinetic.hh index 2101542811ca49307c7a8b76ee12eb6a88f8ee15..32325b79324e9c5a0573afecde5091611615f057 100644 --- a/dumux/implicit/mpnc/energy/mpncvolumevariablesenergykinetic.hh +++ b/dumux/implicit/mpnc/energy/mpncvolumevariablesenergykinetic.hh @@ -66,8 +66,8 @@ public: /*! * \brief Update the temperature of the sub-control volume. * - * \param The primary variables - * \param element The finit Element + * \param priVars The primary variables + * \param element The finite Element * \param fvGeometry The finite-volume geometry in the fully implicit scheme * \param scvIdx The index of the sub-control volume * \param problem The problem diff --git a/dumux/implicit/mpnc/mass/mpncvolumevariablesmass.hh b/dumux/implicit/mpnc/mass/mpncvolumevariablesmass.hh index c66c98c7516f2e24a6e62b6d1db611d22756782e..77a51eaacff58f0215ffcbbe7cb97d0986a6b00d 100644 --- a/dumux/implicit/mpnc/mass/mpncvolumevariablesmass.hh +++ b/dumux/implicit/mpnc/mass/mpncvolumevariablesmass.hh @@ -67,7 +67,7 @@ public: * \brief Update composition of all phases in the mutable * parameters from the primary variables. * - * \param fluidState Container for all the secondary variables concerning the fluids + * \param fs Container for all the secondary variables concerning the fluids * \param paramCache Container for cache parameters * \param priVars The primary Variables * \param *hint the volume variables @@ -119,7 +119,7 @@ public: /*! * \brief Check whether the calculated values are reasonable. * - * \param fluidState Container for all the secondary variables concerning the fluids + * \param fs Container for all the secondary variables concerning the fluids * \param globalPos The position at which the check is conducted */ bool physicalness(const FluidState & fs, @@ -142,7 +142,7 @@ public: * \brief Output for the case that the current state is not physical. * This is called if the physicalness funcitons returned false. * - * \param fluidState Container for all the secondary variables concerning the fluids + * \param fs Container for all the secondary variables concerning the fluids * \param message A string returning the error message for this module */ const void physicalnessError(const FluidState & fs, diff --git a/dumux/implicit/mpnc/mass/mpncvolumevariablesmasskinetic.hh b/dumux/implicit/mpnc/mass/mpncvolumevariablesmasskinetic.hh index 4eaea1464664c2c31eda6febcbfdcba490086447..c80a4d4cfe2a6ffb62ac7ca1850caf0d852c5b6f 100644 --- a/dumux/implicit/mpnc/mass/mpncvolumevariablesmasskinetic.hh +++ b/dumux/implicit/mpnc/mass/mpncvolumevariablesmasskinetic.hh @@ -75,7 +75,7 @@ public: * \brief Update composition of all phases in the mutable * parameters from the primary variables. * - * \param fluidState Container for all the secondary variables concerning the fluids + * \param actualFluidState Container for all the secondary variables concerning the fluids * \param paramCache Container for cache parameters * \param priVars The primary Variables * \param *hint the volume variables @@ -84,7 +84,7 @@ public: * \param fvGeometry The finite-volume geometry in the fully implicit scheme * \param scvIdx The index of the sub-control volume */ - void update(FluidState & actualFluiState, + void update(FluidState & actualFluidState, ParameterCache & paramCache, const PrimaryVariables & priVars, const VolumeVariables * hint, @@ -97,7 +97,7 @@ public: for(int smallLoopPhaseIdx=0; smallLoopPhaseIdx<numPhases; ++smallLoopPhaseIdx){ // set the component mole fractions for (int compIdx = 0; compIdx < numComponents; ++compIdx) { - actualFluiState.setMoleFraction(smallLoopPhaseIdx, + actualFluidState.setMoleFraction(smallLoopPhaseIdx, compIdx, priVars[moleFrac00Idx + smallLoopPhaseIdx*numComponents + @@ -109,17 +109,17 @@ public: // THIS IS ONLY FOR silencing Valgrind but is not used in this model for(int smallLoopPhaseIdx=0; smallLoopPhaseIdx<numPhases; ++smallLoopPhaseIdx) for (int compIdx = 0; compIdx < numComponents; ++compIdx) { - const Scalar phi = FluidSystem::fugacityCoefficient(actualFluiState, + const Scalar phi = FluidSystem::fugacityCoefficient(actualFluidState, paramCache, smallLoopPhaseIdx, compIdx); - actualFluiState.setFugacityCoefficient(smallLoopPhaseIdx, + actualFluidState.setFugacityCoefficient(smallLoopPhaseIdx, compIdx, phi); } FluidState equilFluidState; // the fluidState *on the interface* i.e. chemical equilibrium - equilFluidState.assign(actualFluiState) ; + equilFluidState.assign(actualFluidState) ; ConstraintSolver::solve(equilFluidState, paramCache, /*setViscosity=*/false, @@ -134,8 +134,8 @@ public: // compute densities of all phases for(int smallLoopPhaseIdx=0; smallLoopPhaseIdx<numPhases; ++smallLoopPhaseIdx){ - const Scalar rho = FluidSystem::density(actualFluiState, paramCache, smallLoopPhaseIdx); - actualFluiState.setDensity(smallLoopPhaseIdx, rho); + const Scalar rho = FluidSystem::density(actualFluidState, paramCache, smallLoopPhaseIdx); + actualFluidState.setDensity(smallLoopPhaseIdx, rho); } // let Valgrind check whether everything is properly defined. diff --git a/dumux/implicit/mpnc/mpncmodelkinetic.hh b/dumux/implicit/mpnc/mpncmodelkinetic.hh index 42e7e0f3b003703d68c4722aec9544856bad1e35..6e9485d60598905eddfad4d7d0bec7fef733b295 100644 --- a/dumux/implicit/mpnc/mpncmodelkinetic.hh +++ b/dumux/implicit/mpnc/mpncmodelkinetic.hh @@ -296,6 +296,7 @@ public: /*! * \brief Access to the averaged (magnitude of) velocity for each vertex. * + * \param phaseIdx The index of the fluid phase * \param globalIdx The global index of the degree of freedom * */ @@ -306,6 +307,7 @@ public: /*! * \brief Access to the averaged velocity for each vertex. * + * \param phaseIdx The index of the fluid phase * \param globalIdx The global index of the degree of freedom */ const DimVector volumeDarcyVelocity(const unsigned int phaseIdx, diff --git a/dumux/implicit/mpnc/mpncvolumevariables.hh b/dumux/implicit/mpnc/mpncvolumevariables.hh index 3cc26809b4a6b4eaf8d6c184ab26c8bb843e309a..7920ed1a3ac9052d2ae4d35a85304bcbe8ec419a 100644 --- a/dumux/implicit/mpnc/mpncvolumevariables.hh +++ b/dumux/implicit/mpnc/mpncvolumevariables.hh @@ -247,6 +247,7 @@ public: scvIdx); IAVolumeVariables::checkDefined(); checkDefined(); + } /*! diff --git a/dumux/implicit/mpnc/mpncvolumevariablesia.hh b/dumux/implicit/mpnc/mpncvolumevariablesia.hh index ee78137578e736c4429cd7580776276cb65bfec2..11efd44ede974ed4454ab04a8cf239b34d27dbaf 100644 --- a/dumux/implicit/mpnc/mpncvolumevariablesia.hh +++ b/dumux/implicit/mpnc/mpncvolumevariablesia.hh @@ -56,6 +56,9 @@ class MPNCVolumeVariablesIA typedef typename GET_PROP_TYPE(TypeTag, FluidState) FluidState; typedef typename FluidSystem::ParameterCache ParameterCache; typedef typename GridView::template Codim<0>::Entity Element; + typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + enum {dimWorld=GridView::dimensionworld}; + typedef Dune::FieldVector<Scalar,dimWorld> GlobalPosition; public: /*! @@ -78,6 +81,34 @@ public: */ void checkDefined() const { } + + /*! + * \brief Check the set variables as to whether they are in physically possible ranges. + * + * \param fluidState Container for all the secondary variables concerning the fluids + * \param globalPos The position at which the check is conducted + * + * Since we are in equilibrium, we don't need to do anything! + */ + bool physicalness(const FluidState & fluidState, + const GlobalPosition & globalPos) + { + return true; // all the checks went through: tell calling function, nothing bad could be found. + } + + /*! + * \brief Output for the case that the current state is not physical. + * This calls the output functions of the modules and throws and exception: + * i.e. a smaller timestep is tried. + * + * Since we are in equilibrium, we don't need to do anything! + * + * \param fs Container for all the secondary variables concerning the fluids + * \param message A string returning the error message for this module + */ + const void physicalnessError(const FluidState & fs, + std::stringstream & message) + { } }; } // namespace Dumux