Commit ff4d2ee9 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

merged release with trunk

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/releases/2.0@5213 2fb0f335-1f38-0410-981e-8018bf24f1b0
parents c2fa4984 e53700ec
DuMuX is a joint project of the following institutions:
DuMuX is developed at
University of Stuttgart
Institute of Hydraulic Engineering
Department of Hydromechanics and Modeling of Hydrosystems
http://www.hydrosys.uni-stuttgart.de/index.en.php
http://dumux.org
University of Stuttgart
Institute of Applied Analysis and Numerical Simulation
Department of High Performance Scientific Computing
http://www.ians.uni-stuttgart.de/nmh/
# $Id: duneproject 5842 2010-01-20 18:48:34Z joe $
# we need the module file to be able to build via dunecontrol
EXTRA_DIST=dune.module
EXTRA_DIST = dune.module \
CMake/Modules/*.cmake CMakeLists.txt \
CONTRIBUTORS INSTALL.cmake LICENSE
SUBDIRS = doc dumux m4 test tutorial
SUBDIRS = appl doc dumux m4 test tutorial
if BUILD_DOCS
# TODO: set up documentation tree automatically
......
check_PROGRAMS = lens_1p2c lens_2p
noinst_HEADERS = *.hh
lens_1p2c_SOURCES = lens_1p2c.cc
lens_2p_SOURCES = lens_2p.cc
......
......@@ -54,7 +54,7 @@ public:
{
using namespace std;
std::cout
<< "-----> ISP: Interface Soil Properties Initialization ...\n";
<< "-----> ISP: Interface Soil Properties Initialization ...\n";
//ISP input file defenition
ifstream input;
......@@ -65,7 +65,7 @@ public:
cout << "\n";
cout << "-----> ISP: Fatal error! - Data read \n";
cout << "-----> ISP: Could not open the input data file: \""
<< isp_filename << "\n";
<< isp_filename << "\n";
}
//iPCM input file reading
......@@ -81,21 +81,21 @@ public:
input >> reader;
ISP_Permeability = atof(reader);
cout << "-----> ISP: Permeability: " << ISP_Permeability
<< "\n";
<< "\n";
}
if (reader == string("<FinePermeability>"))
{
input >> reader;
ISP_FinePermeability = atof(reader);
cout << "-----> ISP: Fine permeability: "
<< ISP_FinePermeability << "\n";
<< ISP_FinePermeability << "\n";
}
if (reader == string("<CoarsePermeability>"))
{
input >> reader;
ISP_CoarsePermeability = atof(reader);
cout << "-----> ISP: Coarse permeability: "
<< ISP_CoarsePermeability << "\n";
<< ISP_CoarsePermeability << "\n";
}
if (reader == string("<Porosity>"))
{
......@@ -108,91 +108,91 @@ public:
input >> reader;
ISP_FinePorosity = atof(reader);
cout << "-----> ISP: Fine porosity: " << ISP_FinePorosity
<< "\n";
<< "\n";
}
if (reader == string("<CoarsePorosity>"))
{
input >> reader;
ISP_CoarsePorosity = atof(reader);
cout << "-----> ISP: Coarse porosity: " << ISP_CoarsePorosity
<< "\n";
<< "\n";
}
if (reader == string("<LeakageWellPermeability>"))
{
input >> reader;
ISP_LeakageWellPermeability = atof(reader);
cout << "-----> ISP: Leakage Well Permeability: "
<< ISP_LeakageWellPermeability << "\n";
<< ISP_LeakageWellPermeability << "\n";
}
if (reader == string("<LongitudinalDispersivity>"))
{
input >> reader;
ISP_LongitudinalDispersivity = atof(reader);
cout << "-----> ISP: Longitudinal dispersivity: "
<< ISP_LongitudinalDispersivity << "\n";
<< ISP_LongitudinalDispersivity << "\n";
}
if (reader == string("<TransverseDispersivity>"))
{
input >> reader;
ISP_TransverseDispersivity = atof(reader);
cout << "-----> ISP: Transverse dispersivity: "
<< ISP_TransverseDispersivity << "\n";
<< ISP_TransverseDispersivity << "\n";
}
if (reader == string("<FineBrooksCoreyLambda>"))
{
input >> reader;
ISP_FineBrooksCoreyLambda = atof(reader);
cout << "-----> ISP: Brooks-Corey lambda, fine: "
<< ISP_FineBrooksCoreyLambda << "\n";
<< ISP_FineBrooksCoreyLambda << "\n";
}
if (reader == string("<FineBrooksCoreyEntryPressure>"))
{
input >> reader;
ISP_FineBrooksCoreyEntryPressure = atof(reader);
cout << "-----> ISP: Brooks-Corey entry pressure, fine: "
<< ISP_FineBrooksCoreyEntryPressure << "\n";
<< ISP_FineBrooksCoreyEntryPressure << "\n";
}
if (reader == string("<CoarseBrooksCoreyLambda>"))
{
input >> reader;
ISP_CoarseBrooksCoreyLambda = atof(reader);
cout << "-----> ISP: Brooks-Corey lambda, coarse: "
<< ISP_CoarseBrooksCoreyLambda << "\n";
<< ISP_CoarseBrooksCoreyLambda << "\n";
}
if (reader == string("<CoarseBrooksCoreyEntryPressure>"))
{
input >> reader;
ISP_CoarseBrooksCoreyEntryPressure = atof(reader);
cout << "-----> ISP: Brooks-Corey entry pressure, coarse: "
<< ISP_CoarseBrooksCoreyEntryPressure << "\n";
<< ISP_CoarseBrooksCoreyEntryPressure << "\n";
}
if (reader == string("<FineResidualSaturationWetting>"))
{
input >> reader;
ISP_FineResidualSaturationWetting = atof(reader);
cout << "-----> ISP: Residual saturation wetting phase, fine: "
<< ISP_FineResidualSaturationWetting << "\n";
<< ISP_FineResidualSaturationWetting << "\n";
}
if (reader == string("<FineResidualSaturationNonWetting>"))
{
input >> reader;
ISP_FineResidualSaturationNonWetting = atof(reader);
cout << "-----> ISP: Residual saturation nonwetting phase, fine: "
<< ISP_FineResidualSaturationNonWetting << "\n";
<< ISP_FineResidualSaturationNonWetting << "\n";
}
if (reader == string("<CoarseResidualSaturationWetting>"))
{
input >> reader;
ISP_CoarseResidualSaturationWetting = atof(reader);
cout << "-----> ISP: Residual saturation wetting phase, coarse: "
<< ISP_CoarseResidualSaturationWetting << "\n";
<< ISP_CoarseResidualSaturationWetting << "\n";
}
if (reader == string("<CoarseResidualSaturationNonWetting>"))
{
input >> reader;
ISP_CoarseResidualSaturationNonWetting = atof(reader);
cout << "-----> ISP: Residual saturation nonwetting phase, coarse: "
<< ISP_CoarseResidualSaturationNonWetting << "\n";
<< ISP_CoarseResidualSaturationNonWetting << "\n";
}
}
input.close();
......@@ -216,7 +216,7 @@ public:
{
using namespace std;
std::cout
<< "-----> IFP: Interface Fluid Properties Initialization ...\n";
<< "-----> IFP: Interface Fluid Properties Initialization ...\n";
//IFP input file defenition
ifstream input;
......@@ -227,7 +227,7 @@ public:
cout << "\n";
cout << "-----> IFP: Fatal error! - Data read \n";
cout << "-----> IFP: Could not open the input data file: \""
<< ifp_filename << "\n";
<< ifp_filename << "\n";
}
//iPCM input file reading
......@@ -244,21 +244,21 @@ public:
input >> reader;
IFP_GasDiffCoeff = atof(reader);
cout << "-----> IFP: Gas Diffusion Coefficient: "
<< IFP_GasDiffCoeff << "\n";
<< IFP_GasDiffCoeff << "\n";
}
if (reader == string("<CO2ResidualSaturation>"))
{
input >> reader;
IFP_CO2ResidSat = atof(reader);
cout << "-----> IFP: Residual Saturation of CO2: "
<< IFP_CO2ResidSat << "\n";
<< IFP_CO2ResidSat << "\n";
}
if (reader == string("<MolecularDiffusionCoefficient>"))
{
input >> reader;
IFP_MolecularDiffusionCoefficient = atof(reader);
cout << "-----> IFP: Molecular diffusion coefficient: "
<< IFP_MolecularDiffusionCoefficient << "\n";
<< IFP_MolecularDiffusionCoefficient << "\n";
}
}
input.close();
......@@ -288,8 +288,7 @@ public:
//Initialization of IPP Parameters
{
using namespace std;
std::cout
<< "-----> IPP: Interface Soil Properties Initialization ...\n";
std::cout << "-----> IPP: Interface Soil Properties Initialization ...\n";
//IPP input file defenition
ifstream input;
......@@ -300,7 +299,7 @@ public:
cout << "\n";
cout << "-----> IPP: Fatal error! - Data read \n";
cout << "-----> IPP: Could not open the input data file: \""
<< ipp_filename << "\n";
<< ipp_filename << "\n";
}
//iPCM input file reading
......@@ -323,63 +322,63 @@ public:
input >> reader;
IPP_InjectionWellRate = atof(reader);
cout << "-----> IPP: Injection Well Rate: "
<< IPP_InjectionWellRate << "\n";
<< IPP_InjectionWellRate << "\n";
}
if (reader == string("<InjectionWellWindowSize>"))
{
input >> reader;
IPP_InjectionWindowSize = atof(reader);
cout << "-----> IPP: Injection Well Window Size: "
<< IPP_InjectionWindowSize << "\n";
<< IPP_InjectionWindowSize << "\n";
}
if (reader == string("<UpperPressure>"))
{
input >> reader;
IPP_UpperPressure = atof(reader);
cout << "-----> IPP: Upper pressure: "
<< IPP_UpperPressure << "\n";
<< IPP_UpperPressure << "\n";
}
if (reader == string("<LowerPressure>"))
{
input >> reader;
IPP_LowerPressure = atof(reader);
cout << "-----> IPP: Lower pressure: "
<< IPP_LowerPressure << "\n";
<< IPP_LowerPressure << "\n";
}
if (reader == string("<InfiltrationRate>"))
{
input >> reader;
IPP_InfiltrationRate = atof(reader);
cout << "-----> IPP: Infiltration rate: "
<< IPP_InfiltrationRate << "\n";
<< IPP_InfiltrationRate << "\n";
}
if (reader == string("<MaxTimeStepSize>"))
{
input >> reader;
IPP_MaxTimeStepSize = atof(reader);
cout << "-----> IPP: Maximum time step size: "
<< IPP_MaxTimeStepSize << "\n";
<< IPP_MaxTimeStepSize << "\n";
}
if (reader == string("<InfiltrationStartTime>"))
{
input >> reader;
IPP_InfiltrationStartTime = atof(reader);
cout << "-----> IPP: Start time of infiltration: "
<< IPP_InfiltrationStartTime << "\n";
<< IPP_InfiltrationStartTime << "\n";
}
if (reader == string("<InfiltrationEndTime>"))
{
input >> reader;
IPP_InfiltrationEndTime = atof(reader);
cout << "-----> IPP: End time of infiltration: "
<< IPP_InfiltrationEndTime << "\n";
<< IPP_InfiltrationEndTime << "\n";
}
if (reader == string("<SimulationNumber>"))
{
input >> reader;
IPP_SimulationNumber = atof(reader);
cout << "-----> IPP: Output Name: "
<< IPP_SimulationNumber << "\n";
<< IPP_SimulationNumber << "\n";
}
}
input.close();
......
......@@ -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;
......
......@@ -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);
......
......@@ -63,6 +63,7 @@ SET_PROP(LensProblem, Grid)
#endif
};
#if HAVE_DUNE_PDELAB
SET_PROP(LensProblem, LocalFEMSpace)
{
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
......@@ -73,6 +74,7 @@ public:
typedef Dune::PDELab::Q1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for cubes
// typedef Dune::PDELab::P1LocalFiniteElementMap<Scalar,Scalar,dim> type; // for simplices
};
#endif // HAVE_DUNE_PDELAB
// Set the problem property
SET_PROP(LensProblem, Problem)
......@@ -105,7 +107,7 @@ SET_PROP(LensProblem, SpatialParameters)
};
// Enable gravity
SET_BOOL_PROP(LensProblem, EnableGravity, true);
SET_BOOL_PROP(LensProblem, EnableGravity, false);
}
/*!
......@@ -113,7 +115,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.
*
......@@ -151,7 +153,7 @@ class LensProblem : public TwoPProblem<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem;
typedef TwoPFluidState<TypeTag> FluidState;
enum
enum
{
numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)),
......@@ -186,20 +188,22 @@ class LensProblem : public TwoPProblem<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
typedef Dune::FieldVector<Scalar, dim> LocalPosition;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
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 +211,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,11 +229,11 @@ 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")
%simName%simNum).c_str());
%simName%simNum).c_str());
}
/*!
......@@ -237,8 +242,8 @@ public:
* This problem assumes a temperature of 10 degrees Celsius.
*/
Scalar temperature(const Element &element,
const FVElementGeometry &fvElemGeom,
int scvIdx) const
const FVElementGeometry &fvElemGeom,
int scvIdx) const
{
return 273.15 + 10; // -> 10°C
};
......@@ -263,7 +268,7 @@ public:
const GlobalPosition globalPos = vertex.geometry().center();
if (onUpperBoundary_(globalPos) || onLowerBoundary_(globalPos))
if (onUpperBoundary_(globalPos) || onLowerBoundary_(globalPos))
values.setAllDirichlet();
else
values.setAllNeumann();
......@@ -296,7 +301,7 @@ public:
values[SnIdx] = 0.0;
}
else
values = 0.0;
values = 0.0;
// Scalar densityW = this->wettingPhase().density();
//
......@@ -341,11 +346,11 @@ public:
const Scalar& time = this->timeManager().time();
if (time >= infiltrationStartTime_ && time <= infiltrationEndTime_)
{
if (onInlet_(globalPos))
values[contiNEqIdx] = -infiltrationRate_; // kg / (m * s)
}
if (time >= infiltrationStartTime_ && time <= infiltrationEndTime_)
{
if (onInlet_(globalPos))
values[contiNEqIdx] = -infiltrationRate_; // kg / (m * s)
}
}
// \}
......@@ -419,8 +424,8 @@ private:
{
Scalar width = this->bboxMax()[0] - this->bboxMin()[0];
Scalar lambda = (this->bboxMax()[0] - globalPos[0])/width;
return onUpperBoundary_(globalPos) && (bboxMax_[0]-0.35*width)/width > lambda && lambda > (bboxMax_[0]-0.55*width)/width;
}
return onUpperBoundary_(globalPos) && (bboxMax_[0]-0.35*width)/width > lambda && lambda > (bboxMax_[0]-0.55*width)/width;
}
static const Scalar eps_ = 3e-6;
GlobalPosition bboxMin_;
......
......@@ -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++){
......
......@@ -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:
......
dist_noinst_DATA = buckleyleverett_ff
check_PROGRAMS = buckleyleverett_ff
noinst_PROGRAMS = buckleyleverett_ff
noinst_HEADERS = *.hh
buckleyleverett_ff_SOURCES = buckleyleverett_ff.cc
buckleyleverett_ff_LDFLAGGS = static
include $(top_srcdir)/am/global-rules
......@@ -77,8 +77,8 @@ int main(int argc, char** argv)
Dune::FieldVector<Scalar, dim> upperRight(300);
upperRight[1] = 75;
int cellNumberX = 300/discretizationLength;
int cellNumberY = 75/discretizationLength;
int cellNumberX = static_cast<int>(300/discretizationLength);
int cellNumberY = static_cast<int>(75/discretizationLength);
Dune::FieldVector<int, dim> cellNumbers(cellNumberX);
cellNumbers[1] = cellNumberY;
......
......@@ -259,8 +259,10 @@ public:
BoundaryConditions::Flags bctypeSat(const GlobalPosition& globalPos, const Intersection& intersection) const
{
if (globalPos[0]> (upperRight_[0] - eps_) || globalPos[0] < eps_)
if (globalPos[0] < eps_)
return Dumux::BoundaryConditions::dirichlet;
else if (globalPos[0] > upperRight_[0] - eps_)
return Dumux::BoundaryConditions::outflow;
else
return Dumux::BoundaryConditions::neumann;
}
......@@ -281,7 +283,7 @@ public:
return 0.2;
}
std::vector<Scalar> neumannPress(const GlobalPosition& globalPos, const Intersection& intersection) const
std::vector<Scalar> neumann(const GlobalPosition& globalPos, const Intersection& intersection) const
{
std::vector<Scalar> neumannFlux(2, 0.0);
if (globalPos[0]> upperRight_[0] - eps_)
......@@ -294,12 +296,6 @@ public:
return neumannFlux;
}
Scalar neumannSat(const GlobalPosition& globalPos, const Intersection& intersection, Scalar factor) const
{
if (globalPos[0] > upperRight_[0] - eps_)
return factor;
return 0;
}
Scalar initSat(const GlobalPosition& globalPos, const Element& element) const
{
if (globalPos[0] < eps_)
......
dist_noinst_DATA = mcwhorter_ff
check_PROGRAMS = mcwhorter_ff
noinst_PROGRAMS = mcwhorter_ff
noinst_HEADERS = *.hh
mcwhorter_ff_SOURCES = mcwhorter_ff.cc
......