From 1ccc9faaedc81c2212b7568b5ac0938b0fcf163d Mon Sep 17 00:00:00 2001 From: Benjamin Faigle <benjamin.faigle@posteo.de> Date: Wed, 15 Dec 2010 15:46:12 +0000 Subject: [PATCH] adapted doxygen module definitions git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4880 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/decoupled/1p/1pproperties.hh | 5 +- dumux/decoupled/2p/2pproperties.hh | 15 +--- .../2p/diffusion/fvmpfa/mpfaproperties.hh | 5 +- dumux/decoupled/2p/impes/impesproblem2p.hh | 6 +- .../2p/transport/transportproperties.hh | 4 - dumux/decoupled/2p2c/2p2cproblem.hh | 3 - dumux/decoupled/2p2c/2p2cproperties.hh | 12 --- .../decoupled/2p2c/boundaryconditions2p2c.hh | 3 +- dumux/decoupled/2p2c/fvpressure2p2c.hh | 58 ++++++++++--- .../2p2c/fvpressure2p2cmultiphysics.hh | 81 ++++++++++++++----- dumux/decoupled/common/decoupledproperties.hh | 4 +- dumux/decoupled/common/impetproblem.hh | 4 - dumux/decoupled/common/impetproperties.hh | 4 - 13 files changed, 112 insertions(+), 92 deletions(-) diff --git a/dumux/decoupled/1p/1pproperties.hh b/dumux/decoupled/1p/1pproperties.hh index 45deb8d41f..e7289fc1f6 100644 --- a/dumux/decoupled/1p/1pproperties.hh +++ b/dumux/decoupled/1p/1pproperties.hh @@ -15,10 +15,7 @@ * * * This program is distributed WITHOUT ANY WARRANTY. * *****************************************************************************/ -/*! - * \ingroup IMPES - * \defgroup FV1p Single Phase Finite-Volume - */ + /*! * \ingroup FV1p * \file diff --git a/dumux/decoupled/2p/2pproperties.hh b/dumux/decoupled/2p/2pproperties.hh index 3a40cf938c..dcbcc30d04 100644 --- a/dumux/decoupled/2p/2pproperties.hh +++ b/dumux/decoupled/2p/2pproperties.hh @@ -15,20 +15,7 @@ * * * This program is distributed WITHOUT ANY WARRANTY. * *****************************************************************************/ -/*! - * \ingroup IMPET - * \defgroup IMPES Immiscible IMPES - */ -/*! - * \ingroup IMPES - * \defgroup FV2p Finite-Volume - */ -/*! \ingroup IMPES - * \defgroup MPFA2p MPFA - */ -/*! \ingroup IMPES - * \defgroup mimetic Mimetic FiniteDifference - */ + /*! * \ingroup IMPES * \ingroup Properties diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/mpfaproperties.hh b/dumux/decoupled/2p/diffusion/fvmpfa/mpfaproperties.hh index 7dbdbeb437..ee01d6977f 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/mpfaproperties.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/mpfaproperties.hh @@ -14,10 +14,7 @@ * * * This program is distributed WITHOUT ANY WARRANTY. * *****************************************************************************/ -/*! - * \ingroup IMPES - * \addtogroup MPFA2p - */ + /*! * \ingroup MPFA2p * \file diff --git a/dumux/decoupled/2p/impes/impesproblem2p.hh b/dumux/decoupled/2p/impes/impesproblem2p.hh index b94255cd0f..b8b2e49daf 100644 --- a/dumux/decoupled/2p/impes/impesproblem2p.hh +++ b/dumux/decoupled/2p/impes/impesproblem2p.hh @@ -31,11 +31,8 @@ namespace Dumux { /*! + * \ingroup IMPESproblem * \ingroup IMPES - * \defgroup IMPESproblems IMPES problems - */ -/*! - * \ingroup IMPESproblems * \brief Base class for all 2-phase problems which use an impes algorithm * * \todo Please doc me more! @@ -145,7 +142,6 @@ public: // \} private: - //! Returns the implementation of the problem (i.e. static polymorphism) GlobalPosition gravity_; // fluids and material properties diff --git a/dumux/decoupled/2p/transport/transportproperties.hh b/dumux/decoupled/2p/transport/transportproperties.hh index cb80f54c1e..db1f7de32c 100644 --- a/dumux/decoupled/2p/transport/transportproperties.hh +++ b/dumux/decoupled/2p/transport/transportproperties.hh @@ -16,10 +16,6 @@ #ifndef DUMUX_TRANSPORT_PROPERTIES_HH #define DUMUX_TRANSPORT_PROPERTIES_HH -/*! - * \ingroup FV2p - * \defgroup Transport2p Immiscible Transport - */ /*! * \ingroup Transport2p * \ingroup Properties diff --git a/dumux/decoupled/2p2c/2p2cproblem.hh b/dumux/decoupled/2p2c/2p2cproblem.hh index 3cc84bbe70..efe84e697a 100644 --- a/dumux/decoupled/2p2c/2p2cproblem.hh +++ b/dumux/decoupled/2p2c/2p2cproblem.hh @@ -31,9 +31,6 @@ namespace Dumux { /*! * \ingroup IMPEC - * \defgroup IMPECproblems IMPEC problems - */ -/*! * \ingroup IMPECproblems * \brief Base class for all compositional 2-phase problems which use an impet algorithm * diff --git a/dumux/decoupled/2p2c/2p2cproperties.hh b/dumux/decoupled/2p2c/2p2cproperties.hh index 6f307f1768..3e6282354d 100644 --- a/dumux/decoupled/2p2c/2p2cproperties.hh +++ b/dumux/decoupled/2p2c/2p2cproperties.hh @@ -14,18 +14,6 @@ * This program is distributed WITHOUT ANY WARRANTY. * *****************************************************************************/ -/*! - * \ingroup IMPET - * \defgroup IMPEC Miscible IMPEC - */ -/*! - * \ingroup IMPEC - * \defgroup multiphase Multiphase Compositional Models - */ -/*! - * \ingroup IMPEC - * \defgroup multiphysics Multiphysics Compositional Models - */ /*! * \ingroup IMPEC Properties * \file diff --git a/dumux/decoupled/2p2c/boundaryconditions2p2c.hh b/dumux/decoupled/2p2c/boundaryconditions2p2c.hh index 7dc5fcae3d..96e20ae49f 100644 --- a/dumux/decoupled/2p2c/boundaryconditions2p2c.hh +++ b/dumux/decoupled/2p2c/boundaryconditions2p2c.hh @@ -24,7 +24,8 @@ namespace Dumux { -/** \ingroup IMPEC +/** + * \ingroup IMPEC IMPETbc * \brief Defines type of boundary conditions for 2p2c processes * * This is to distinguish BC types for 2p2c processes similar to diff --git a/dumux/decoupled/2p2c/fvpressure2p2c.hh b/dumux/decoupled/2p2c/fvpressure2p2c.hh index 44bb92d6d0..beb25afbff 100644 --- a/dumux/decoupled/2p2c/fvpressure2p2c.hh +++ b/dumux/decoupled/2p2c/fvpressure2p2c.hh @@ -185,7 +185,7 @@ public: { problem().variables().addOutputVtkFields(writer); -#if DUNE_MINIMAL_DEBUG_LEVEL <= 3 +#if DUNE_MINIMAL_DEBUG_LEVEL <= 2 // add debug stuff Dune::BlockVector<Dune::FieldVector<double,1> > *errorCorrPtr = writer.template createField<double, 1> (dv_dp.size()); *errorCorrPtr = errorCorrection; @@ -220,7 +220,7 @@ public: problem_.gridView()); problem().variables().addOutputVtkFields(debugWriter_); - #if DUNE_MINIMAL_DEBUG_LEVEL <= 3 + #if DUNE_MINIMAL_DEBUG_LEVEL <= 2 // output porosity, permeability Dune::BlockVector<Dune::FieldVector<double,1> > *poroPtr = debugWriter_.template createField<double, 1> (dv_dp.size()); Dune::BlockVector<Dune::FieldVector<double,1> > *permPtr = debugWriter_.template createField<double, 1> (dv_dp.size()); @@ -359,12 +359,12 @@ void FVPressure2P2C<TypeTag>::initialize(bool solveTwice) // initialguess: set saturations, determine visco and mobility for initial pressure equation // at this moment, the pressure is unknown. Hence, dont regard compositional effects. initialMaterialLaws(false); Dune::dinfo << "first saturation guess"<<std::endl; //=J: initialGuess() - #if DUNE_MINIMAL_DEBUG_LEVEL <= 3 + #if DUNE_MINIMAL_DEBUG_LEVEL <= 2 debugOutput(); #endif assemble(true); Dune::dinfo << "first pressure guess"<<std::endl; solve(); - #if DUNE_MINIMAL_DEBUG_LEVEL <= 3 + #if DUNE_MINIMAL_DEBUG_LEVEL <= 2 debugOutput(1e-6); #endif // update the compositional variables (hence true) @@ -375,7 +375,7 @@ void FVPressure2P2C<TypeTag>::initialize(bool solveTwice) problem_.transportModel().update(0., dt_estimate, problem_.variables().updateEstimate(), false); Dune::dinfo << "secant guess"<< std::endl; dt_estimate = std::min ( problem_.timeManager().timeStepSize(), dt_estimate); problem_.variables().updateEstimate() *= dt_estimate; - #if DUNE_MINIMAL_DEBUG_LEVEL <= 3 + #if DUNE_MINIMAL_DEBUG_LEVEL <= 2 debugOutput(2e-6); #endif // pressure calculation @@ -752,8 +752,6 @@ void FVPressure2P2C<TypeTag>::assemble(bool first) } else if(pressureType==pn) { - //TODO: take pC from variables or from MaterialLaw? - // if the latter, one needs Sw pcBound = problem_.variables().capillaryPressure(globalIdxI); pressBC = pressBound - pcBound; } @@ -1174,6 +1172,8 @@ void FVPressure2P2C<TypeTag>::updateMaterialLaws() int globalIdx = problem_.variables().index(*eIt); Scalar temperature_ = problem_.temperature(globalPos, *eIt); + // reset volume error + problem_.variables().volErr()[globalIdx] = 0; // get the overall mass of component 1 Z1 = C^k / (C^1+C^2) [-] @@ -1181,6 +1181,44 @@ void FVPressure2P2C<TypeTag>::updateMaterialLaws() / (problem_.variables().totalConcentration(globalIdx, wCompIdx) + problem_.variables().totalConcentration(globalIdx, nCompIdx)); + + // make shure only physical quantities enter flash calculation +// #if DUNE_MINIMAL_DEBUG_LEVEL <= 3 + if(Z1<0. || Z1 > 1.) + { + Dune::dgrave << "Feed mass fraction unphysical: Z1 = " << Z1 + << " at global Idx " << globalIdx + << " , because totalConcentration(globalIdx, wCompIdx) = " + << problem_.variables().totalConcentration(globalIdx, wCompIdx) + << " and totalConcentration(globalIdx, nCompIdx) = " + << problem_.variables().totalConcentration(globalIdx, nCompIdx)<< std::endl; + if(Z1<0.) + { + Z1 = 0.; + // add this error to volume error term for correction in next TS + problem_.variables().volErr()[globalIdx] += + problem_.variables().totalConcentration(globalIdx, wCompIdx) + / problem_.variables().densityWetting(globalIdx); + //regul! + problem_.variables().totalConcentration(globalIdx, wCompIdx) = 0.; + Dune::dgrave << "Regularize totalConcentration(globalIdx, wCompIdx) = " + << problem_.variables().totalConcentration(globalIdx, wCompIdx)<< std::endl; + } + else + { + Z1 = 1.; + // add this error to volume error term for correction in next TS + problem_.variables().volErr()[globalIdx] += + problem_.variables().totalConcentration(globalIdx, nCompIdx) + / problem_.variables().densityNonwetting(globalIdx); + //regul! + problem_.variables().totalConcentration(globalIdx, nCompIdx) = 0.; + Dune::dgrave << "Regularize totalConcentration(globalIdx, nCompIdx) = " + << problem_.variables().totalConcentration(globalIdx, nCompIdx)<< std::endl; + } + } +// #endif + //determine phase pressures from primary pressure variable Scalar pressW(0.), pressNW(0.); switch (pressureType) @@ -1253,7 +1291,7 @@ void FVPressure2P2C<TypeTag>::updateMaterialLaws() Scalar vol = massw / problem_.variables().densityWetting(globalIdx) + massn / problem_.variables().densityNonwetting(globalIdx); if (dt != 0) { - problem_.variables().volErr()[globalIdx] = (vol - problem_.spatialParameters().porosity(globalPos, *eIt)); + problem_.variables().volErr()[globalIdx] += (vol - problem_.spatialParameters().porosity(globalPos, *eIt)); Scalar volErrI = problem_.variables().volErr(globalIdx); if (std::isnan(volErrI)) @@ -1265,10 +1303,6 @@ void FVPressure2P2C<TypeTag>::updateMaterialLaws() << ", poro = " << problem_.spatialParameters().porosity(globalPos, *eIt) << ", dt = " << dt); } } - else - { - problem_.variables().volErr()[globalIdx] = 0; - } } return; } diff --git a/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh b/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh index 58c0c9cc6e..1d07e0a7f0 100644 --- a/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh +++ b/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh @@ -1019,7 +1019,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::assemble(bool first) //calculate right hand side rightEntry = (lambdaW * densityW * dV_w + lambdaNW * densityNW * dV_n) * (permeability * gravity) * faceArea ; - + } //end 2p subdomain // set diagonal entry and right hand side entry @@ -1306,36 +1306,73 @@ void FVPressure2P2CMultiPhysics<TypeTag>::updateMaterialLaws() int globalIdx = problem_.variables().index(*eIt); Scalar temperature_ = problem_.temperature(globalPos, *eIt); + // reset volErr + problem_.variables().volErr()[globalIdx] = 0; // get the overall mass of component 1: Z1 = C^k / (C^1+C^2) [-] Scalar Z1 = problem_.variables().totalConcentration(globalIdx, wCompIdx) / (problem_.variables().totalConcentration(globalIdx, wCompIdx) + problem_.variables().totalConcentration(globalIdx, nCompIdx)); - - if (problem_.variables().subdomain(globalIdx)==2) //=> 2p domain + // make shure only physical quantities enter flash calculation + #if DUNE_MINIMAL_DEBUG_LEVEL <= 3 + if(Z1<0. || Z1 > 1.) { - //determine phase pressures from primary pressure variable - Scalar pressW(0.), pressNW(0.); - switch (pressureType) + std::cout << "Feed mass fraction unphysical: Z1 = " << Z1 + << " at global Idx " << globalIdx + << " , because totalConcentration(globalIdx, wCompIdx) = " + << problem_.variables().totalConcentration(globalIdx, wCompIdx) + << " and totalConcentration(globalIdx, nCompIdx) = " + << problem_.variables().totalConcentration(globalIdx, nCompIdx)<< std::endl; + if(Z1<0.) { - case pw: - { - pressW = problem_.variables().pressure()[globalIdx]; - Scalar oldSatW = problem_.variables().saturation(globalIdx); - pressNW = problem_.variables().pressure()[globalIdx] - + MaterialLaw::pC(problem_.spatialParameters().materialLawParams(globalPos, *eIt), oldSatW); - break; + Z1 = 0.; + // add this error to volume error term for correction in next TS + problem_.variables().volErr()[globalIdx] += + problem_.variables().totalConcentration(globalIdx, wCompIdx) + / problem_.variables().densityWetting(globalIdx); + //regul! + problem_.variables().totalConcentration(globalIdx, wCompIdx) = 0.; + Dune::dgrave << "Regularize totalConcentration(globalIdx, wCompIdx) = " + << problem_.variables().totalConcentration(globalIdx, wCompIdx)<< std::endl; } - case pn: + else { - //todo: check this case for consistency throughout the model! - pressNW = problem_.variables().pressure()[globalIdx]; - Scalar oldSatW = problem_.variables().saturation(globalIdx); - pressW = problem_.variables().pressure()[globalIdx] - - MaterialLaw::pC(problem_.spatialParameters().materialLawParams(globalPos, *eIt), oldSatW); - break; - } + Z1 = 1.; + // add this error to volume error term for correction in next TS + problem_.variables().volErr()[globalIdx] += + problem_.variables().totalConcentration(globalIdx, nCompIdx) + / problem_.variables().densityNonwetting(globalIdx); + //regul! + problem_.variables().totalConcentration(globalIdx, nCompIdx) = 0.; + Dune::dgrave << "Regularize totalConcentration(globalIdx, nCompIdx) = " + << problem_.variables().totalConcentration(globalIdx, nCompIdx)<< std::endl; } + } + #endif + + if (problem_.variables().subdomain(globalIdx)==2) //=> 2p domain + { + //determine phase pressures from primary pressure variable + Scalar pressW(0.), pressNW(0.); + switch (pressureType) + { + case pw: + { + pressW = problem_.variables().pressure()[globalIdx]; + + pressNW = problem_.variables().pressure()[globalIdx]; + break; + } + case pn: + { + //todo: check this case for consistency throughout the model! + pressNW = problem_.variables().pressure()[globalIdx]; + + pressW = problem_.variables().pressure()[globalIdx]; + + break; + } + } //complete fluid state fluidState.update(Z1, pressW, problem_.spatialParameters().porosity(globalPos, *eIt), temperature_); @@ -1381,7 +1418,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::updateMaterialLaws() + massn / problem_.variables().densityNonwetting(globalIdx); if (dt != 0) { - problem_.variables().volErr()[globalIdx] = (vol - problem_.spatialParameters().porosity(globalPos, *eIt)); + problem_.variables().volErr()[globalIdx] += (vol - problem_.spatialParameters().porosity(globalPos, *eIt)); Scalar volErrI = problem_.variables().volErr(globalIdx); if (std::isnan(volErrI)) diff --git a/dumux/decoupled/common/decoupledproperties.hh b/dumux/decoupled/common/decoupledproperties.hh index 08bcc4b284..48501c683f 100644 --- a/dumux/decoupled/common/decoupledproperties.hh +++ b/dumux/decoupled/common/decoupledproperties.hh @@ -21,9 +21,7 @@ #include <dumux/decoupled/2p/diffusion/mimetic/mimeticoperator.hh> #include <dumux/decoupled/2p/diffusion/mimetic/mimeticgroundwater.hh> -/*! - * \defgroup Sequential Sequential Scheme - */ + /*! * \ingroup Sequential * \ingroup Properties diff --git a/dumux/decoupled/common/impetproblem.hh b/dumux/decoupled/common/impetproblem.hh index c4833bf2e5..24f16d0f17 100644 --- a/dumux/decoupled/common/impetproblem.hh +++ b/dumux/decoupled/common/impetproblem.hh @@ -30,10 +30,6 @@ namespace Dumux { -/*! - * \ingroup IMPET - * \defgroup IMPETproblems IMPET problems - */ /*! * \ingroup IMPETproblems * @brief base class for problems using a sequential implicit-explicit strategy diff --git a/dumux/decoupled/common/impetproperties.hh b/dumux/decoupled/common/impetproperties.hh index 2a8c5c7d43..54e85af93a 100644 --- a/dumux/decoupled/common/impetproperties.hh +++ b/dumux/decoupled/common/impetproperties.hh @@ -17,10 +17,6 @@ #define DUMUX_IMPET_PROPERTIES_HH #include <dumux/decoupled/common/decoupledproperties.hh> -/*! - * \ingroup Sequential - * \defgroup IMPET IMPET (Implicit Pressure Explicit Transport) - */ /*! * \ingroup IMPET * \ingroup Properties -- GitLab