From 263bea9961b3e003ef973c98296a9ddfa3cd8207 Mon Sep 17 00:00:00 2001 From: Nicolas Schwenck <nicolas.schwenck@iws.uni-stuttgart.de> Date: Wed, 12 Jan 2011 16:05:08 +0000 Subject: [PATCH] Changed comments. Adapted bc indices for Neumann in lensproblem1p2c.hh. git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4992 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- appl/lecture/msm/1p2cvs2p/lens_1p2c.cc | 2 +- appl/lecture/msm/1p2cvs2p/lens_2p.cc | 4 +-- appl/lecture/msm/1p2cvs2p/lensproblem1p2c.hh | 26 ++++++++++--------- appl/lecture/msm/1p2cvs2p/lensproblem2p.hh | 18 ++++++++----- .../msm/1p2cvs2p/lensspatialparameters1p2c.hh | 8 +++--- .../lecture/msm/1p2cvs2p/water_contaminant.hh | 6 ++--- 6 files changed, 34 insertions(+), 30 deletions(-) diff --git a/appl/lecture/msm/1p2cvs2p/lens_1p2c.cc b/appl/lecture/msm/1p2cvs2p/lens_1p2c.cc index 5e9836c649..47cb726d67 100755 --- a/appl/lecture/msm/1p2cvs2p/lens_1p2c.cc +++ b/appl/lecture/msm/1p2cvs2p/lens_1p2c.cc @@ -175,7 +175,7 @@ int main(int argc, char** argv) // specify dimensions of the low-permeable lens GlobalPosition lowerLeftLens, upperRightLens; - lowerLeftLens[0] = 1.0; + lowerLeftLens[0] = 0.8; lowerLeftLens[1] = 2.0; upperRightLens[0] = 4.0; upperRightLens[1] = 3.0; diff --git a/appl/lecture/msm/1p2cvs2p/lens_2p.cc b/appl/lecture/msm/1p2cvs2p/lens_2p.cc index 66fda19300..57f6a214a8 100755 --- a/appl/lecture/msm/1p2cvs2p/lens_2p.cc +++ b/appl/lecture/msm/1p2cvs2p/lens_2p.cc @@ -165,7 +165,7 @@ int main(int argc, char** argv) upperRight[0] = 5.0; upperRight[1] = 4.0; res[0] = 40; - res[1] = 32; + res[1] = 64; std::auto_ptr<Grid> grid(CreateGrid<Grid, Scalar>::create(upperRight, res)); @@ -182,7 +182,7 @@ int main(int argc, char** argv) // instantiate and run the concrete problem TimeManager timeManager; - Problem problem(timeManager, grid->leafView(), lowerLeftLens, upperRightLens); + Problem problem(timeManager, grid->leafView(), lowerLeft, upperRight, lowerLeftLens, upperRightLens); timeManager.init(problem, 0, dt, tEnd, !restart); if (restart) problem.restart(restartTime); diff --git a/appl/lecture/msm/1p2cvs2p/lensproblem1p2c.hh b/appl/lecture/msm/1p2cvs2p/lensproblem1p2c.hh index c825b14b36..effb4f05a9 100644 --- a/appl/lecture/msm/1p2cvs2p/lensproblem1p2c.hh +++ b/appl/lecture/msm/1p2cvs2p/lensproblem1p2c.hh @@ -112,7 +112,7 @@ namespace Dumux * The whole problem is symmetric. * * The domain is sized 5m times 4m and features a rectangular lens - * with low permeablility which spans from (1 m , 2 m) to (4 m, 3 m) + * with low permeablility which spans from (0.8 m , 2 m) to (4 m, 3 m) * and is surrounded by a medium with higher permability. * * On the top and the bottom of the domain Dirichlet boundary conditions @@ -126,11 +126,11 @@ namespace Dumux * This problem uses the \ref TwoPBoxModel. * * This problem should typically simulated until \f$t_{\text{end}} = - * 50\,000\;s\f$ is reached. A good choice for the initial time step size - * is \f$t_{\text{inital}} = 1\,000\;s\f$. + * 30\,000\;s\f$ is reached. A good choice for the initial time step size + * is \f$t_{\text{inital}} = 100\;s\f$. * * To run the simulation execute the following line in shell: - * <tt>./lens_1p2c 50000 100</tt> + * <tt>./lens_1p2c 30000 100</tt> */ template <class TypeTag > class LensProblem : public OnePTwoCBoxProblem<TypeTag> @@ -146,9 +146,12 @@ namespace Dumux dim = GridView::dimension, dimWorld = GridView::dimensionworld, - // indices of the primary variables + // indices of the equations contiEqIdx = Indices::contiEqIdx, - transEqIdx = Indices::transEqIdx + transEqIdx = Indices::transEqIdx, + // indices of the primary variables + pressureIdx = Indices::pressureIdx, + x1Idx = Indices::x1Idx }; typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; @@ -187,8 +190,7 @@ namespace Dumux upperPressure_ = interfaceProbProps.IPP_UpperPressure; lowerPressure_ = interfaceProbProps.IPP_LowerPressure; infiltrationRate_ = interfaceProbProps.IPP_InfiltrationRate; - //infiltrationStartTime_= interfaceProbProps.IPP_InfiltrationStartTime; - infiltrationStartTime_= 1.0e-9;//The infiltrations starts always after the first time step! + infiltrationStartTime_= 1.0e-9;//The infiltrations starts always after the first time step! infiltrationEndTime_= interfaceProbProps.IPP_InfiltrationEndTime; } @@ -268,13 +270,13 @@ namespace Dumux if (onUpperBoundary_(globalPos)) { - values[contiEqIdx] = upperPressure_; - values[transEqIdx] = 0.0; + values[pressureIdx] = upperPressure_; + values[x1Idx] = 0.0; } else if (onLowerBoundary_(globalPos)) { - values[contiEqIdx] = lowerPressure_; - values[transEqIdx] = 0.0; + values[pressureIdx] = lowerPressure_; + values[x1Idx] = 0.0; } else values = 0.0; diff --git a/appl/lecture/msm/1p2cvs2p/lensproblem2p.hh b/appl/lecture/msm/1p2cvs2p/lensproblem2p.hh index eafe554d0d..06b8677049 100644 --- a/appl/lecture/msm/1p2cvs2p/lensproblem2p.hh +++ b/appl/lecture/msm/1p2cvs2p/lensproblem2p.hh @@ -105,7 +105,7 @@ SET_PROP(LensProblem, SpatialParameters) }; // Enable gravity -SET_BOOL_PROP(LensProblem, EnableGravity, true); +SET_BOOL_PROP(LensProblem, EnableGravity, false); } /*! @@ -113,7 +113,7 @@ SET_BOOL_PROP(LensProblem, EnableGravity, true); * \brief Soil decontamination problem where DNAPL infiltrates a fully * water saturated medium. * - * The domain is sized 6m times 4m and features a rectangular lens + * The domain is sized 5m times 4m and features a rectangular lens * with low permeablility which spans from (1 m , 2 m) to (4 m, 3 m) * and is surrounded by a medium with higher permability. * @@ -192,14 +192,17 @@ class LensProblem : public TwoPProblem<TypeTag> public: LensProblem(TimeManager &timeManager, const GridView &gridView, + const GlobalPosition &lowerLeft, + const GlobalPosition &upperRight, const GlobalPosition &lensLowerLeft, const GlobalPosition &lensUpperRight) : ParentType(timeManager, gridView) { this->spatialParameters().setLensCoords(lensLowerLeft, lensUpperRight); - bboxMin_ = 0.0; - bboxMax_[0] = 5.0; - bboxMax_[1] = 4.0; + bboxMin_[0] = lowerLeft[0]; + bboxMin_[1] = lowerLeft[1]; + bboxMax_[0] = upperRight[0]; + bboxMax_[1] = upperRight[1]; //load interface-file Dumux::InterfaceProblemProperties interfaceProbProps("interface2p.xml"); @@ -207,7 +210,8 @@ public: lowerPressure_ = interfaceProbProps.IPP_LowerPressure; upperPressure_ = interfaceProbProps.IPP_UpperPressure; infiltrationRate_ = interfaceProbProps.IPP_InfiltrationRate; - infiltrationStartTime_= interfaceProbProps.IPP_InfiltrationStartTime; + //infiltrationStartTime_= interfaceProbProps.IPP_InfiltrationStartTime; + infiltrationStartTime_= 1.0e-9;//The infiltrations starts always after the first time step! infiltrationEndTime_= interfaceProbProps.IPP_InfiltrationEndTime; } @@ -224,7 +228,7 @@ public: const char *name() const { std::string simName = "lens-2p_run"; - Dumux::InterfaceProblemProperties interfaceProbProps("interface_BL.xml"); + Dumux::InterfaceProblemProperties interfaceProbProps("interface2p.xml"); Scalar simNum = interfaceProbProps.IPP_SimulationNumber; return (str(boost::format("%s-%02d") diff --git a/appl/lecture/msm/1p2cvs2p/lensspatialparameters1p2c.hh b/appl/lecture/msm/1p2cvs2p/lensspatialparameters1p2c.hh index c850b96792..6f3a8432bf 100644 --- a/appl/lecture/msm/1p2cvs2p/lensspatialparameters1p2c.hh +++ b/appl/lecture/msm/1p2cvs2p/lensspatialparameters1p2c.hh @@ -77,11 +77,9 @@ public: lensPorosity_ = interfaceSoilProps.ISP_FinePorosity; outerPorosity_ = interfaceSoilProps.ISP_CoarsePorosity; - //TODO: longitudinalDispersivity_ = interfaceSoilProps.ISP_LongitudinalDispersivity; - //TODO: transverseDispersivity_ = interfaceSoilProps.ISP_TransverseDispersivity; - longitudinalDispersivity_ = 0.0; - transverseDispersivity_ = 0.0; - //TODO: The example is very bad! The numerical diffusion is very high, so that the dispersion/diffusion coefficients nearly do not have any influence! + longitudinalDispersivity_ = 1.0e-5; + transverseDispersivity_ = 1.0e-6; + //Remark: The example is very bad. The numerical diffusion is very high, so that the dispersion/diffusion coefficients nearly do not have any influence. for(int i = 0; i < dim; i++){ diff --git a/appl/lecture/msm/1p2cvs2p/water_contaminant.hh b/appl/lecture/msm/1p2cvs2p/water_contaminant.hh index 990aae37e8..a966fb52cf 100644 --- a/appl/lecture/msm/1p2cvs2p/water_contaminant.hh +++ b/appl/lecture/msm/1p2cvs2p/water_contaminant.hh @@ -126,18 +126,18 @@ public: const FluidState &fluidState) { //TODO: return diffCoefficient_; - return 0.0; // in [m^2/s] + return 1.0e-9; // in [m^2/s] //TODO: The example is very bad! The numerical diffusion is very high, so that the diffusion/dispersion coefficients nearly do not have any influence! } - WaterContaminant( ) +/* WaterContaminant( ) { //load interface-file Dumux::InterfaceFluidProperties interfaceFluidProps("interface1p2c.xml"); diffCoefficient_ = interfaceFluidProps.IFP_MolecularDiffusionCoefficient; - } + }*/ //private: -- GitLab