use opm property system, improvments to the parameter system

This commit is contained in:
Andreas Lauser 2013-09-23 20:25:58 +02:00
parent 7cf471162e
commit c906d5931d
48 changed files with 242 additions and 492 deletions

View File

@ -1,88 +0,0 @@
\chapter{Creating a new directory for source code}
In this section, we describe how setting up a new directory for source
code. In fact, it is very easy to create a new directory, but getting
\Dune build system to recognize the new folder takes some steps which
will be explained in more detail below:
\begin{itemize}
\item Create new directory with content. Quite often an existing
directory can be used as a base for the new one.
\item Adapt \texttt{Makefile.am} in the new directory and add this
direcory to the \texttt{SUBDIRS} list of the \texttt{Makefile.am} in
the directory above the one which you just created.
\item Adapt \texttt{configure.ac} in the \eWoms base directory (the
directory to which you checked out or unpacked the \eWoms source
code, probably \texttt{ewoms})
\item Run the command \texttt{automake} in the \eWoms base directory.
\item Re-compile \eWoms by typing \texttt{make} in the \eWoms base
directory.
\end{itemize}
\noindent In more detail:
\textbf{First} of all, the new directory including all relevant files
needs to be created (see section \ref{tutorial-coupled} for a
description of how to define problems).
\textbf{Second}, a new \texttt{Makefile.am} for the new directory
needs to be created. It is good practice to simply copy and modify an
existing file. For example, the file \texttt{tutorial/Makefile.am}
looks as follows:
\begin{verbatim}
# programs just to build when "make check" is used
check_PROGRAMS = tutorial_coupled
noinst_HEADERS= *.hh
EXTRA_DIST = CMakeLists.txt
tutorial_coupleddir = $(datadir)/ewoms/tutorial
tutorial_coupled_SOURCES = tutorial_coupled.cc
tutorial_coupled_DATA = $(tutorial_coupled_SOURCES)
include $(top_srcdir)/am/global-rules
\end{verbatim}
All occurrences of \texttt{tutorial\_coupled} need to be replaced by
the name of the new project, e.g. \texttt{new\_project}. At least if
the name of the source file as well as the name of the new project are
\texttt{new\_project}.
\textbf{Third}: In the parent directory of the directory which you
created, there is also a \texttt{Makefile.am}. In this file the
sub-directories are listed. As you introduced a new sub-directory, it
needs to be included there. In this case, the name of the new
directory is \texttt{new\_project}.
\begin{verbatim}
...
SUBDIRS = doc ewoms m4 test tutorial new_project
...
\end{verbatim}
\textbf{Fourth}: In \eWoms base directory there is a file
\texttt{configure.ac}. In this file, the respective Makefiles are
listed. After a line reading
\texttt{AC\_CONFIG\_FILES([Makefile}
\noindent a line, declaring a new Makefile, needs to be added. The
Makefile itself will be generated automatically from the
\texttt{Makefile.am} file which you just generated. For keeping track
of the included files, it is adviced to insert new Makefiles in
alphabetical order. The new line could read:
\texttt{new\_project/Makefile}
\textbf{Fifth}: Run the command \texttt{automake} in the \eWoms base
directory.
\textbf{Sixth}: Re-compile \eWoms as described in Section \ref{install}.
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:

View File

@ -44,11 +44,12 @@
#include <dune/common/fmatrix.hh>
namespace Ewoms {
// forward declaration of the problem class
template <class TypeTag>
class TutorialProblemCoupled;
}
namespace Opm {
namespace Properties {
// Create a new type tag for the problem
NEW_TYPE_TAG(TutorialProblemCoupled, INHERITS_FROM(VcfvImmiscibleTwoPhase)); /*@\label{tutorial-coupled:create-type-tag}@*/
@ -111,7 +112,9 @@ SET_INT_PROP(TutorialProblemCoupled, CellsX, 100);
SET_INT_PROP(TutorialProblemCoupled, CellsY, 1);
SET_INT_PROP(TutorialProblemCoupled, CellsZ, 1); /*@\label{tutorial-coupled:default-params-end}@*/
} // namespace Properties
}
namespace Ewoms {
//! Tutorial problem using the fully-implicit immiscible model.
template <class TypeTag>
class TutorialProblemCoupled

View File

@ -1,197 +0,0 @@
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* Copyright (C) 2010-2012 by Bernd Flemisch *
* Copyright (C) 2010-2012 by Andreas Lauser *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
*
* \brief This file tests the properties system.
*
* We define a few type tags and property tags, then we attach values
* to (TypeTag, PropertyTag) tuples and finally we use them in the
* main function and print some diagnostic messages.
*/
#include "config.h"
#include <ewoms/common/propertysystem.hh>
#include <iostream>
namespace Ewoms {
namespace Properties {
///////////////////
// Define some hierarchy of type tags:
//
// Vehicle -- CompactCar -- Sedan -_
// \ \.
// \ +- Pickup ---_
// \ / \.
// +-- Truck ---------------^ \.
// \ \.
// +- Tank ----------------------------------+- HummerH1
///////////////////
NEW_TYPE_TAG(Vehicle);
NEW_TYPE_TAG(CompactCar, INHERITS_FROM(Vehicle));
NEW_TYPE_TAG(Truck, INHERITS_FROM(Vehicle));
NEW_TYPE_TAG(Tank, INHERITS_FROM(Vehicle));
NEW_TYPE_TAG(Sedan, INHERITS_FROM(CompactCar));
NEW_TYPE_TAG(Pickup, INHERITS_FROM(Sedan, Truck));
NEW_TYPE_TAG(HummerH1, INHERITS_FROM(Sedan, Pickup, Tank));
///////////////////
// Define the property tags:
// TopSpeed, NumSeats, CanonCaliber, GasUsage, AutomaticTransmission, Payload
///////////////////
NEW_PROP_TAG(TopSpeed); // [km/h]
NEW_PROP_TAG(NumSeats); // []
NEW_PROP_TAG(CanonCaliber); // [mm]
NEW_PROP_TAG(GasUsage); // [l/100km]
NEW_PROP_TAG(AutomaticTransmission); // true/false
NEW_PROP_TAG(Payload); // [t]
///////////////////
// Make the AutomaticTransmission default to false
SET_BOOL_PROP(Vehicle, AutomaticTransmission, false);
///////////////////
// Define some values for the properties on the type tags:
//
// (CompactCar, TopSpeed) = GasUsage*35
// (CompactCar, NumSeats) = 5
// (CompactCar, GasUsage) = 4
//
// (Truck, TopSpeed) = 100
// (Truck, NumSeats) = 2
// (Truck, GasUsage) = 12
// (Truck, Payload) = 35
//
// (Tank, TopSpeed) = 60
// (Tank, GasUsage) = 65
// (Tank, CanonCaliber) = 120
//
// (Sedan, GasUsage) = 7
// (Sedan, AutomaticTransmission) = true
//
// (Pickup, TopSpeed) = 120
// (Pickup, Payload) = 5
//
// (HummmerH1, TopSpeed) = (Pickup, TopSpeed)
///////////////////
SET_INT_PROP(CompactCar, TopSpeed, GET_PROP_VALUE(TypeTag, GasUsage) * 30);
SET_INT_PROP(CompactCar, NumSeats, 5);
SET_INT_PROP(CompactCar, GasUsage, 4);
SET_INT_PROP(Truck, TopSpeed, 100);
SET_INT_PROP(Truck, NumSeats, 2);
SET_INT_PROP(Truck, GasUsage, 12);
SET_INT_PROP(Truck, Payload, 35);
SET_INT_PROP(Tank, TopSpeed, 60);
SET_INT_PROP(Tank, GasUsage, 65);
SET_INT_PROP(Tank, CanonCaliber, 120);
SET_INT_PROP(Sedan, GasUsage, 7);
SET_BOOL_PROP(Sedan, AutomaticTransmission, true);
SET_INT_PROP(Pickup, TopSpeed, 120);
SET_INT_PROP(Pickup, Payload, 5);
SET_INT_PROP(HummerH1, TopSpeed, GET_PROP_VALUE(TTAG(Pickup), TopSpeed));
///////////////////
// Unmount the canon from the Hummer
UNSET_PROP(HummerH1, CanonCaliber);
} // namespace Properties
} // namespace Ewoms
int main()
{
// print all properties for all type tags
std::cout << "---------------------------------------\n";
std::cout << "-- Property values\n";
std::cout << "---------------------------------------\n";
std::cout << "---------- Values for CompactCar ----------\n";
std::cout << "(CompactCar, TopSpeed) = " << GET_PROP_VALUE(TTAG(CompactCar), TopSpeed) << "\n";
std::cout << "(CompactCar, NumSeats) = " << GET_PROP_VALUE(TTAG(CompactCar), NumSeats) << "\n";
std::cout << "(CompactCar, GasUsage) = " << GET_PROP_VALUE(TTAG(CompactCar), GasUsage) << "\n";
std::cout << "(CompactCar, AutomaticTransmission) = " << GET_PROP_VALUE(TTAG(CompactCar), AutomaticTransmission) << "\n";
std::cout << "---------- Values for Truck ----------\n";
std::cout << "(Truck, TopSpeed) = " << GET_PROP_VALUE(TTAG(Truck), TopSpeed) << "\n";
std::cout << "(Truck, NumSeats) = " << GET_PROP_VALUE(TTAG(Truck), NumSeats) << "\n";
std::cout << "(Truck, GasUsage) = " << GET_PROP_VALUE(TTAG(Truck), GasUsage) << "\n";
std::cout << "(Truck, Payload) = " << GET_PROP_VALUE(TTAG(Truck), Payload) << "\n";
std::cout << "(Truck, AutomaticTransmission) = " << GET_PROP_VALUE(TTAG(Truck), AutomaticTransmission) << "\n";
std::cout << "---------- Values for Tank ----------\n";
std::cout << "(Tank, TopSpeed) = " << GET_PROP_VALUE(TTAG(Tank), TopSpeed) << "\n";
std::cout << "(Tank, GasUsage) = " << GET_PROP_VALUE(TTAG(Tank), GasUsage) << "\n";
std::cout << "(Tank, AutomaticTransmission) = " << GET_PROP_VALUE(TTAG(Tank), AutomaticTransmission) << "\n";
std::cout << "(Tank, CanonCaliber) = " << GET_PROP_VALUE(TTAG(Tank), CanonCaliber) << "\n";
std::cout << "---------- Values for Sedan ----------\n";
std::cout << "(Sedan, TopSpeed) = " << GET_PROP_VALUE(TTAG(Sedan), TopSpeed) << "\n";
std::cout << "(Sedan, NumSeats) = " << GET_PROP_VALUE(TTAG(Sedan), NumSeats) << "\n";
std::cout << "(Sedan, GasUsage) = " << GET_PROP_VALUE(TTAG(Sedan), GasUsage) << "\n";
std::cout << "(Sedan, AutomaticTransmission) = " << GET_PROP_VALUE(TTAG(Sedan), AutomaticTransmission) << "\n";
std::cout << "---------- Values for Pickup ----------\n";
std::cout << "(Pickup, TopSpeed) = " << GET_PROP_VALUE(TTAG(Pickup), TopSpeed) << "\n";
std::cout << "(Pickup, NumSeats) = " << GET_PROP_VALUE(TTAG(Pickup), NumSeats) << "\n";
std::cout << "(Pickup, GasUsage) = " << GET_PROP_VALUE(TTAG(Pickup), GasUsage) << "\n";
std::cout << "(Pickup, Payload) = " << GET_PROP_VALUE(TTAG(Pickup), Payload) << "\n";
std::cout << "(Pickup, AutomaticTransmission) = " << GET_PROP_VALUE(TTAG(Pickup), AutomaticTransmission) << "\n";
std::cout << "---------- Values for HummerH1 ----------\n";
std::cout << "(HummerH1, TopSpeed) = " << GET_PROP_VALUE(TTAG(HummerH1), TopSpeed) << "\n";
std::cout << "(HummerH1, NumSeats) = " << GET_PROP_VALUE(TTAG(HummerH1), NumSeats) << "\n";
std::cout << "(HummerH1, GasUsage) = " << GET_PROP_VALUE(TTAG(HummerH1), GasUsage) << "\n";
std::cout << "(HummerH1, Payload) = " << GET_PROP_VALUE(TTAG(HummerH1), Payload) << "\n";
std::cout << "(HummerH1, AutomaticTransmission) = " << GET_PROP_VALUE(TTAG(HummerH1), AutomaticTransmission) << "\n";
// CanonCaliber is explcitly unset for the Hummer -> this would not compile:
// std::cout << "(HummerH1, CanonCaliber) = " << GET_PROP_VALUE(TTAG(HummerH1), CanonCaliber) << "\n";
std::cout << "\n";
std::cout << "---------------------------------------\n";
std::cout << "-- Diagnostic messages\n";
std::cout << "---------------------------------------\n";
std::cout << "---- All properties for Sedan ---\n";
Ewoms::Properties::print<TTAG(Sedan)>();
std::cout << "---- Message for (HummerH1, CanonCaliber) ---\n"
<< PROP_DIAGNOSTIC(TTAG(HummerH1), CanonCaliber);
std::cout << "---- Message for (HummerH1, GasUsage) ---\n"
<< PROP_DIAGNOSTIC(TTAG(HummerH1), GasUsage);
std::cout << "---- Message for (HummerH1, AutomaticTransmission) ---\n"
<< PROP_DIAGNOSTIC(TTAG(HummerH1), AutomaticTransmission);
return 0;
}

View File

@ -33,7 +33,7 @@
#include "problems/co2injectionflash.hh"
#include "problems/co2injectionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionFlashProblem, INHERITS_FROM(VcfvFlash, Co2InjectionBaseProblem));
@ -55,7 +55,6 @@ SET_TYPE_PROP(Co2InjectionFlashProblem, Scalar, quad);
#else
SET_SCALAR_PROP(Co2InjectionFlashProblem, NewtonRelativeTolerance, 1e-5);
#endif
}
}

View File

@ -30,7 +30,7 @@
#include "problems/co2injectionflash.hh"
#include "problems/co2injectionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionFlashNIProblem, INHERITS_FROM(VcfvFlash, Co2InjectionBaseProblem));

View File

@ -27,7 +27,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/co2injectionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionImmiscibleProblem, INHERITS_FROM(VcfvImmiscible, Co2InjectionBaseProblem));
} }

View File

@ -28,12 +28,13 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/co2injectionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionImmiscibleNIProblem, INHERITS_FROM(VcfvImmiscible, Co2InjectionBaseProblem));
SET_BOOL_PROP(Co2InjectionImmiscibleNIProblem, EnableEnergy, true);
} }
}
}
////////////////////////
// the main function

View File

@ -28,10 +28,11 @@
#include <ewoms/models/ncp/ncpmodel.hh>
#include "problems/co2injectionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionNcpProblem, INHERITS_FROM(VcfvNcp, Co2InjectionBaseProblem));
} }
}
}
int main(int argc, char** argv)
{

View File

@ -28,7 +28,7 @@
#include <ewoms/models/ncp/ncpmodel.hh>
#include "problems/co2injectionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionNcpNIProblem, INHERITS_FROM(VcfvNcp, Co2InjectionBaseProblem));
SET_BOOL_PROP(Co2InjectionNcpNIProblem, EnableEnergy, true);

View File

@ -27,7 +27,7 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/co2injectionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionPvsProblem, INHERITS_FROM(VcfvPvs, Co2InjectionBaseProblem));
} }

View File

@ -27,7 +27,7 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/co2injectionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionPvsNIProblem, INHERITS_FROM(VcfvPvs, Co2InjectionBaseProblem));

View File

@ -27,14 +27,14 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/cuvetteproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(CuvetteProblem, INHERITS_FROM(VcfvPvs, CuvetteBaseProblem));
}}
}
}
int main(int argc, char** argv)
{
typedef TTAG(CuvetteProblem) ProblemTypeTag;
// typedef TTAG(ColumnProblem) ProblemTypeTag;
return Ewoms::start<ProblemTypeTag>(argc, argv);
}

View File

@ -27,10 +27,11 @@
#include <ewoms/models/flash/flashmodel.hh>
#include "problems/diffusionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(DiffusionProblem, INHERITS_FROM(VcfvFlash, DiffusionBaseProblem));
} }
}
}
int main(int argc, char** argv)
{

View File

@ -27,10 +27,11 @@
#include <ewoms/models/ncp/ncpmodel.hh>
#include "problems/diffusionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(DiffusionProblem, INHERITS_FROM(VcfvNcp, DiffusionBaseProblem));
} }
}
}
int main(int argc, char** argv)
{

View File

@ -27,10 +27,11 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/diffusionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(DiffusionProblem, INHERITS_FROM(VcfvPvs, DiffusionBaseProblem));
} }
}
}
int main(int argc, char** argv)
{

View File

@ -27,7 +27,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/fingerproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(FingerProblem, INHERITS_FROM(VcfvImmiscibleTwoPhase, FingerBaseProblem));
}}

View File

@ -27,7 +27,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/groundwaterproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(GroundWaterProblem, INHERITS_FROM(VcfvImmiscibleOnePhase, GroundWaterBaseProblem));
}}

View File

@ -27,7 +27,7 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/infiltrationproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(InfiltrationProblem, INHERITS_FROM(VcfvPvs, InfiltrationBaseProblem));
}}

View File

@ -28,7 +28,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/lensproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(LensProblem, INHERITS_FROM(VcfvImmiscibleTwoPhase, LensBaseProblem));
}}

View File

@ -28,7 +28,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/obstacleproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(ObstacleProblem, INHERITS_FROM(VcfvImmiscible, ObstacleBaseProblem));
}}

View File

@ -28,7 +28,7 @@
#include "problems/obstacleproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(ObstacleProblem, INHERITS_FROM(VcfvNcp, ObstacleBaseProblem));
}}

View File

@ -28,7 +28,7 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/obstacleproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(ObstacleProblem, INHERITS_FROM(VcfvPvs, ObstacleBaseProblem));

View File

@ -27,7 +27,7 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/outflowproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(OutflowProblem, INHERITS_FROM(VcfvPvs, OutflowBaseProblem));

View File

@ -27,7 +27,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/powerinjectionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(PowerInjectionProblem, INHERITS_FROM(VcfvImmiscibleTwoPhase, PowerInjectionBaseProblem));

View File

@ -27,7 +27,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/powerinjectionproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(PowerInjectionProblem, INHERITS_FROM(VcfvImmiscibleTwoPhase, PowerInjectionBaseProblem));

View File

@ -56,7 +56,9 @@ class Co2InjectionProblem;
namespace Co2Injection {
#include <opm/material/components/co2tables.inc>
}
}
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionBaseProblem);
@ -154,7 +156,9 @@ SET_SCALAR_PROP(Co2InjectionBaseProblem, InitialTimeStepSize, 250);
// The default DGF file to load
SET_STRING_PROP(Co2InjectionBaseProblem, GridFile, "grids/co2injection.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
*
@ -230,17 +234,17 @@ public:
{
eps_ = 1e-6;
temperatureLow_ = GET_PARAM(TypeTag, Scalar, FluidSystemTemperatureLow);
temperatureHigh_ = GET_PARAM(TypeTag, Scalar, FluidSystemTemperatureHigh);
nTemperature_ = GET_PARAM(TypeTag, int, FluidSystemNumTemperature);
temperatureLow_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemTemperatureLow);
temperatureHigh_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemTemperatureHigh);
nTemperature_ = EWOMS_GET_PARAM(TypeTag, int, FluidSystemNumTemperature);
nPressure_ = GET_PARAM(TypeTag, int, FluidSystemNumPressure);
pressureLow_ = GET_PARAM(TypeTag, Scalar, FluidSystemPressureLow);
pressureHigh_ = GET_PARAM(TypeTag, Scalar, FluidSystemPressureHigh);
nPressure_ = EWOMS_GET_PARAM(TypeTag, int, FluidSystemNumPressure);
pressureLow_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemPressureLow);
pressureHigh_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemPressureHigh);
maxDepth_ = GET_PARAM(TypeTag, Scalar, MaxDepth);
temperature_ = GET_PARAM(TypeTag, Scalar, Temperature);
name_ = GET_PARAM(TypeTag, std::string, SimulationName);
maxDepth_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxDepth);
temperature_ = EWOMS_GET_PARAM(TypeTag, Scalar, Temperature);
name_ = EWOMS_GET_PARAM(TypeTag, std::string, SimulationName);
// initialize the tables of the fluid system
//FluidSystem::init();
@ -286,17 +290,17 @@ public:
{
ParentType::registerParameters();
REGISTER_PARAM(TypeTag, Scalar, FluidSystemTemperatureLow, "The lower temperature [K] for tabulation of the fluid system");
REGISTER_PARAM(TypeTag, Scalar, FluidSystemTemperatureHigh, "The upper temperature [K] for tabulation of the fluid system");
REGISTER_PARAM(TypeTag, int, FluidSystemNumTemperature, "The number of intervals between the lower and upper temperature");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, FluidSystemTemperatureLow, "The lower temperature [K] for tabulation of the fluid system");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, FluidSystemTemperatureHigh, "The upper temperature [K] for tabulation of the fluid system");
EWOMS_REGISTER_PARAM(TypeTag, int, FluidSystemNumTemperature, "The number of intervals between the lower and upper temperature");
REGISTER_PARAM(TypeTag, Scalar, FluidSystemPressureLow, "The lower pressure [Pa] for tabulation of the fluid system");
REGISTER_PARAM(TypeTag, Scalar, FluidSystemPressureHigh, "The upper pressure [Pa] for tabulation of the fluid system");
REGISTER_PARAM(TypeTag, int, FluidSystemNumPressure, "The number of intervals between the lower and upper pressure");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, FluidSystemPressureLow, "The lower pressure [Pa] for tabulation of the fluid system");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, FluidSystemPressureHigh, "The upper pressure [Pa] for tabulation of the fluid system");
EWOMS_REGISTER_PARAM(TypeTag, int, FluidSystemNumPressure, "The number of intervals between the lower and upper pressure");
REGISTER_PARAM(TypeTag, Scalar, Temperature, "The temperature [K] in the reservoir");
REGISTER_PARAM(TypeTag, Scalar, MaxDepth, "The maximum depth [m] of the reservoir");
REGISTER_PARAM(TypeTag, std::string, SimulationName, "The name of the simulation used for the output files");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, Temperature, "The temperature [K] in the reservoir");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, MaxDepth, "The maximum depth [m] of the reservoir");
EWOMS_REGISTER_PARAM(TypeTag, std::string, SimulationName, "The name of the simulation used for the output files");
}

View File

@ -44,10 +44,11 @@
#include <string>
namespace Ewoms {
template <class TypeTag>
class CuvetteProblem;
}
namespace Opm {
namespace Properties {
// create a new type tag for the cuvette steam injection problem
@ -118,8 +119,9 @@ SET_SCALAR_PROP(CuvetteBaseProblem, InitialTimeStepSize, 1);
// The default DGF file to load
SET_STRING_PROP(CuvetteBaseProblem, GridFile, "./grids/cuvette_11x4.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
*

View File

@ -42,7 +42,9 @@ namespace Ewoms {
template <class TypeTag>
class DiffusionProblem;
}
namespace Opm {
//////////
// Specify the properties for the powerInjection problem
//////////
@ -54,7 +56,7 @@ NEW_TYPE_TAG(DiffusionBaseProblem);
SET_TYPE_PROP(DiffusionBaseProblem, Grid, Dune::YaspGrid</*dim=*/1>);
// set the GridCreator property
SET_TYPE_PROP(DiffusionBaseProblem, GridCreator, CubeGridCreator<TypeTag>);
SET_TYPE_PROP(DiffusionBaseProblem, GridCreator, Ewoms::CubeGridCreator<TypeTag>);
// Set the problem property
SET_TYPE_PROP(DiffusionBaseProblem, Problem, Ewoms::DiffusionProblem<TypeTag>);
@ -101,7 +103,9 @@ SET_SCALAR_PROP(DiffusionBaseProblem, EndTime, 1e6);
// The default for the initial time step size of the simulation
SET_SCALAR_PROP(DiffusionBaseProblem, InitialTimeStepSize, 1000);
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
* \brief 1D problem which is driven by molecular diffusion.

View File

@ -24,7 +24,7 @@
#define EWOMS_FINGER_GRID_CREATOR_HH
#include <ewoms/parallel/mpihelper.hh>
#include <ewoms/common/propertysystem.hh>
#include <opm/core/utility/PropertySystem.hpp>
#include <ewoms/common/parametersystem.hh>
#if HAVE_ALUGRDID
@ -36,15 +36,16 @@
#include <vector>
namespace Ewoms
{
namespace Ewoms {
// some hacky defines for the grid creator
#define FINGER_DIM 2
#define FINGER_CUBES 1
template <class TypeTag>
class FingerProblem;
}
namespace Opm {
//////////
// Specify the properties for the finger problem
//////////
@ -64,7 +65,9 @@ NEW_PROP_TAG(CellsZ);
NEW_PROP_TAG(GridGlobalRefinements);
}
}
namespace Ewoms {
/*!
* \brief Helper class for grid instantiation of the finger problem.
*/
@ -84,16 +87,16 @@ public:
*/
static void registerParameters()
{
REGISTER_PARAM(TypeTag, unsigned, GridGlobalRefinements, "The number of global refinements of the grid executed after it was loaded");
REGISTER_PARAM(TypeTag, Scalar, DomainSizeX, "The size of the domain in x direction");
REGISTER_PARAM(TypeTag, int, CellsX, "The number of intervalls in x direction");
EWOMS_REGISTER_PARAM(TypeTag, unsigned, GridGlobalRefinements, "The number of global refinements of the grid executed after it was loaded");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeX, "The size of the domain in x direction");
EWOMS_REGISTER_PARAM(TypeTag, int, CellsX, "The number of intervalls in x direction");
if (dim > 1) {
REGISTER_PARAM(TypeTag, Scalar, DomainSizeY, "The size of the domain in y direction");
REGISTER_PARAM(TypeTag, int, CellsY, "The number of intervalls in y direction");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeY, "The size of the domain in y direction");
EWOMS_REGISTER_PARAM(TypeTag, int, CellsY, "The number of intervalls in y direction");
}
if (dim > 2) {
REGISTER_PARAM(TypeTag, Scalar, DomainSizeZ, "The size of the domain in z direction");
REGISTER_PARAM(TypeTag, int, CellsZ, "The number of intervalls in z direction");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeZ, "The size of the domain in z direction");
EWOMS_REGISTER_PARAM(TypeTag, int, CellsZ, "The number of intervalls in z direction");
}
}
@ -109,17 +112,17 @@ public:
Dune::FieldVector<Scalar, dim> lowerLeft;
lowerLeft = 0.0;
upperRight[0] = GET_PARAM(TypeTag, Scalar, DomainSizeX);
upperRight[1] = GET_PARAM(TypeTag, Scalar, DomainSizeY);
upperRight[0] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeX);
upperRight[1] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeY);
cellRes[0] = GET_PARAM(TypeTag, int, CellsX);
cellRes[1] = GET_PARAM(TypeTag, int, CellsY);
cellRes[0] = EWOMS_GET_PARAM(TypeTag, int, CellsX);
cellRes[1] = EWOMS_GET_PARAM(TypeTag, int, CellsY);
if (dim == 3) {
upperRight[2] = GET_PARAM(TypeTag, Scalar, DomainSizeZ);
cellRes[2] = GET_PARAM(TypeTag, int, CellsZ);
upperRight[2] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeZ);
cellRes[2] = EWOMS_GET_PARAM(TypeTag, int, CellsZ);
}
unsigned numRefinments = GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
unsigned numRefinments = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
Dune::GridFactory<Grid> factory(grid_);
@ -300,16 +303,16 @@ public:
*/
static void registerParameters()
{
REGISTER_PARAM(TypeTag, unsigned, GridGlobalRefinements, "The number of global refinements of the grid executed after it was loaded");
REGISTER_PARAM(TypeTag, Scalar, DomainSizeX, "The size of the domain in x direction");
REGISTER_PARAM(TypeTag, int, CellsX, "The number of intervalls in x direction");
EWOMS_REGISTER_PARAM(TypeTag, unsigned, GridGlobalRefinements, "The number of global refinements of the grid executed after it was loaded");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeX, "The size of the domain in x direction");
EWOMS_REGISTER_PARAM(TypeTag, int, CellsX, "The number of intervalls in x direction");
if (dim > 1) {
REGISTER_PARAM(TypeTag, Scalar, DomainSizeY, "The size of the domain in y direction");
REGISTER_PARAM(TypeTag, int, CellsY, "The number of intervalls in y direction");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeY, "The size of the domain in y direction");
EWOMS_REGISTER_PARAM(TypeTag, int, CellsY, "The number of intervalls in y direction");
}
if (dim > 2) {
REGISTER_PARAM(TypeTag, Scalar, DomainSizeZ, "The size of the domain in z direction");
REGISTER_PARAM(TypeTag, int, CellsZ, "The number of intervalls in z direction");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeZ, "The size of the domain in z direction");
EWOMS_REGISTER_PARAM(TypeTag, int, CellsZ, "The number of intervalls in z direction");
}
}
@ -325,17 +328,17 @@ public:
grid_ = 0;
lowerLeft[1] = 0.0;
upperRight[0] = GET_PARAM(TypeTag, Scalar, DomainSizeX);
upperRight[1] = GET_PARAM(TypeTag, Scalar, DomainSizeY);
upperRight[0] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeX);
upperRight[1] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeY);
cellRes[0] = GET_PARAM(TypeTag, int, CellsX);
cellRes[1] = GET_PARAM(TypeTag, int, CellsY);
cellRes[0] = EWOMS_GET_PARAM(TypeTag, int, CellsX);
cellRes[1] = EWOMS_GET_PARAM(TypeTag, int, CellsY);
if (dim == 3) {
upperRight[2] = GET_PARAM(TypeTag, Scalar, DomainSizeZ);
cellRes[2] = GET_PARAM(TypeTag, int, CellsZ);
upperRight[2] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeZ);
cellRes[2] = EWOMS_GET_PARAM(TypeTag, int, CellsZ);
}
unsigned numRefinments = GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
unsigned numRefinments = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
grid_ = new Dune::YaspGrid<FINGER_DIM>(
#ifdef HAVE_MPI

View File

@ -46,10 +46,11 @@
#include <string>
namespace Ewoms {
template <class TypeTag>
class FingerProblem;
}
namespace Opm {
//////////
// Specify the properties for the finger problem
//////////
@ -57,7 +58,7 @@ namespace Properties {
NEW_TYPE_TAG(FingerBaseProblem);
// set the GridCreator property
SET_TYPE_PROP(FingerBaseProblem, GridCreator, FingerGridCreator<TypeTag>);
SET_TYPE_PROP(FingerBaseProblem, GridCreator, Ewoms::FingerGridCreator<TypeTag>);
// Retrieve the grid type from the grid creator
SET_TYPE_PROP(FingerBaseProblem, Grid, typename GET_PROP_TYPE(TypeTag, GridCreator)::Grid);
@ -139,7 +140,9 @@ SET_SCALAR_PROP(FingerBaseProblem, EndTime, 1e3);
// The default for the initial time step size of the simulation
SET_SCALAR_PROP(FingerBaseProblem, InitialTimeStepSize, 10);
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
*
@ -233,7 +236,7 @@ public:
{
ParentType::registerParameters();
REGISTER_PARAM(TypeTag, Scalar, InitialWaterSaturation, "The initial saturation in the domain [] of the wetting phase");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, InitialWaterSaturation, "The initial saturation in the domain [] of the wetting phase");
}
/*!
@ -452,7 +455,7 @@ private:
auto &fs = initialFluidState_;
fs.setPressure(wPhaseIdx, /*pressure=*/1e5);
Scalar Sw = GET_PARAM(TypeTag, Scalar, InitialWaterSaturation);
Scalar Sw = EWOMS_GET_PARAM(TypeTag, Scalar, InitialWaterSaturation);
fs.setSaturation(wPhaseIdx, Sw);
fs.setSaturation(nPhaseIdx, 1 - Sw);

View File

@ -48,10 +48,11 @@
#include <string>
namespace Ewoms {
template <class TypeTag>
class FractureProblem;
}
namespace Opm {
namespace Properties {
// Create a type tag for the problem
NEW_TYPE_TAG(FractureProblem, INHERITS_FROM(VcfvDiscreteFracture));
@ -137,7 +138,9 @@ SET_SCALAR_PROP(FractureProblem, EndTime, 1e6);
// Set the default value for the initial time step size
SET_SCALAR_PROP(FractureProblem, InitialTimeStepSize, 100);
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
*

View File

@ -40,12 +40,12 @@
#include <string>
namespace Ewoms {
template <class TypeTag>
class GroundWaterProblem;
}
namespace Properties
{
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(GroundWaterBaseProblem);
NEW_PROP_TAG(LensLowerLeftX);
@ -95,9 +95,10 @@ SET_SCALAR_PROP(GroundWaterBaseProblem, InitialTimeStepSize, 1);
// The default DGF file to load
SET_STRING_PROP(GroundWaterBaseProblem, GridFile, "./grids/groundwater_2d.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
*
@ -150,20 +151,20 @@ public:
{
eps_ = 1.0e-3;
lensLowerLeft_[0] = GET_PARAM(TypeTag, Scalar, LensLowerLeftX);
lensLowerLeft_[0] = EWOMS_GET_PARAM(TypeTag, Scalar, LensLowerLeftX);
if (dim > 1)
lensLowerLeft_[1] = GET_PARAM(TypeTag, Scalar, LensLowerLeftY);
lensLowerLeft_[1] = EWOMS_GET_PARAM(TypeTag, Scalar, LensLowerLeftY);
if (dim > 2)
lensLowerLeft_[2] = GET_PARAM(TypeTag, Scalar, LensLowerLeftY);
lensLowerLeft_[2] = EWOMS_GET_PARAM(TypeTag, Scalar, LensLowerLeftY);
lensUpperRight_[0] = GET_PARAM(TypeTag, Scalar, LensUpperRightX);
lensUpperRight_[0] = EWOMS_GET_PARAM(TypeTag, Scalar, LensUpperRightX);
if (dim > 1)
lensUpperRight_[1] = GET_PARAM(TypeTag, Scalar, LensUpperRightY);
lensUpperRight_[1] = EWOMS_GET_PARAM(TypeTag, Scalar, LensUpperRightY);
if (dim > 2)
lensUpperRight_[2] = GET_PARAM(TypeTag, Scalar, LensUpperRightY);
lensUpperRight_[2] = EWOMS_GET_PARAM(TypeTag, Scalar, LensUpperRightY);
intrinsicPerm_ = this->toDimMatrix_(GET_PARAM(TypeTag, Scalar, Permeability));
intrinsicPermLens_ = this->toDimMatrix_(GET_PARAM(TypeTag, Scalar, PermeabilityLens));
intrinsicPerm_ = this->toDimMatrix_(EWOMS_GET_PARAM(TypeTag, Scalar, Permeability));
intrinsicPermLens_ = this->toDimMatrix_(EWOMS_GET_PARAM(TypeTag, Scalar, PermeabilityLens));
}
/*!
@ -173,21 +174,21 @@ public:
{
ParentType::registerParameters();
REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftX, "The x-coordinate of the lens' lower-left corner [m].");
REGISTER_PARAM(TypeTag, Scalar, LensUpperRightX, "The x-coordinate of the lens' upper-right corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftX, "The x-coordinate of the lens' lower-left corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensUpperRightX, "The x-coordinate of the lens' upper-right corner [m].");
if (dimWorld > 1) {
REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftY, "The y-coordinate of the lens' lower-left corner [m].");
REGISTER_PARAM(TypeTag, Scalar, LensUpperRightY, "The y-coordinate of the lens' upper-right corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftY, "The y-coordinate of the lens' lower-left corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensUpperRightY, "The y-coordinate of the lens' upper-right corner [m].");
}
if (dimWorld > 2) {
REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftZ, "The z-coordinate of the lens' lower-left corner [m].");
REGISTER_PARAM(TypeTag, Scalar, LensUpperRightZ, "The z-coordinate of the lens' upper-right corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftZ, "The z-coordinate of the lens' lower-left corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensUpperRightZ, "The z-coordinate of the lens' upper-right corner [m].");
}
REGISTER_PARAM(TypeTag, Scalar, Permeability, "The intrinsic permeability [m^2] of the ambient material.");
REGISTER_PARAM(TypeTag, Scalar, PermeabilityLens, "The intrinsic permeability [m^2] of the lens.");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, Permeability, "The intrinsic permeability [m^2] of the ambient material.");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, PermeabilityLens, "The intrinsic permeability [m^2] of the lens.");
}
/*!

View File

@ -44,12 +44,12 @@
#include <string>
namespace Ewoms {
template <class TypeTag>
class InfiltrationProblem;
}
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(InfiltrationBaseProblem);
// Set the grid type
@ -116,7 +116,9 @@ SET_SCALAR_PROP(InfiltrationBaseProblem, InitialTimeStepSize, 60);
// The default DGF file to load
SET_STRING_PROP(InfiltrationBaseProblem, GridFile, "./grids/infiltration_50x3.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
* \brief Isothermal NAPL infiltration problem where LNAPL

View File

@ -24,7 +24,7 @@
#define EWOMS_LENS_GRID_CREATOR_HH
#include <ewoms/parallel/mpihelper.hh>
#include <ewoms/common/propertysystem.hh>
#include <opm/core/utility/PropertySystem.hpp>
#include <ewoms/common/parametersystem.hh>
#if HAVE_UG
@ -43,12 +43,13 @@ namespace Ewoms {
template <class TypeTag>
class LensProblem;
}
//////////
// Specify the properties for the lens problem
//////////
namespace Opm {
namespace Properties {
// declare the properties required by the for the lens grid creator
NEW_PROP_TAG(Grid);
NEW_PROP_TAG(Scalar);
@ -63,7 +64,9 @@ NEW_PROP_TAG(CellsZ);
NEW_PROP_TAG(GridGlobalRefinements);
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
*
@ -91,16 +94,16 @@ public:
*/
static void registerParameters()
{
REGISTER_PARAM(TypeTag, unsigned, GridGlobalRefinements, "The number of global refinements of the grid executed after it was loaded");
REGISTER_PARAM(TypeTag, Scalar, DomainSizeX, "The size of the domain in x direction");
REGISTER_PARAM(TypeTag, int, CellsX, "The number of intervalls in x direction");
EWOMS_REGISTER_PARAM(TypeTag, unsigned, GridGlobalRefinements, "The number of global refinements of the grid executed after it was loaded");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeX, "The size of the domain in x direction");
EWOMS_REGISTER_PARAM(TypeTag, int, CellsX, "The number of intervalls in x direction");
if (dim > 1) {
REGISTER_PARAM(TypeTag, Scalar, DomainSizeY, "The size of the domain in y direction");
REGISTER_PARAM(TypeTag, int, CellsY, "The number of intervalls in y direction");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeY, "The size of the domain in y direction");
EWOMS_REGISTER_PARAM(TypeTag, int, CellsY, "The number of intervalls in y direction");
}
if (dim > 2) {
REGISTER_PARAM(TypeTag, Scalar, DomainSizeZ, "The size of the domain in z direction");
REGISTER_PARAM(TypeTag, int, CellsZ, "The number of intervalls in z direction");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeZ, "The size of the domain in z direction");
EWOMS_REGISTER_PARAM(TypeTag, int, CellsZ, "The number of intervalls in z direction");
}
}
@ -114,14 +117,14 @@ public:
Dune::FieldVector<Scalar, dim> lowerLeft;
lowerLeft = 0.0;
upperRight[0] = GET_PARAM(TypeTag, Scalar, DomainSizeX);
upperRight[1] = GET_PARAM(TypeTag, Scalar, DomainSizeY);
upperRight[0] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeX);
upperRight[1] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeY);
cellRes[0] = GET_PARAM(TypeTag, int, CellsX);
cellRes[1] = GET_PARAM(TypeTag, int, CellsY);
cellRes[0] = EWOMS_GET_PARAM(TypeTag, int, CellsX);
cellRes[1] = EWOMS_GET_PARAM(TypeTag, int, CellsY);
if (dim == 3) {
upperRight[2] = GET_PARAM(TypeTag, Scalar, DomainSizeZ);
cellRes[2] = GET_PARAM(TypeTag, int, CellsZ);
upperRight[2] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeZ);
cellRes[2] = EWOMS_GET_PARAM(TypeTag, int, CellsZ);
}
Dune::GridFactory<Grid> factory;
@ -255,7 +258,7 @@ public:
grid_ = factory.createGrid();
unsigned numRefinements = GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
unsigned numRefinements = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
grid_->globalRefine(numRefinements);
}
@ -305,16 +308,16 @@ public:
*/
static void registerParameters()
{
REGISTER_PARAM(TypeTag, unsigned, GridGlobalRefinements, "The number of global refinements of the grid executed after it was loaded");
REGISTER_PARAM(TypeTag, Scalar, DomainSizeX, "The size of the domain in x direction");
REGISTER_PARAM(TypeTag, int, CellsX, "The number of intervalls in x direction");
EWOMS_REGISTER_PARAM(TypeTag, unsigned, GridGlobalRefinements, "The number of global refinements of the grid executed after it was loaded");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeX, "The size of the domain in x direction");
EWOMS_REGISTER_PARAM(TypeTag, int, CellsX, "The number of intervalls in x direction");
if (dim > 1) {
REGISTER_PARAM(TypeTag, Scalar, DomainSizeY, "The size of the domain in y direction");
REGISTER_PARAM(TypeTag, int, CellsY, "The number of intervalls in y direction");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeY, "The size of the domain in y direction");
EWOMS_REGISTER_PARAM(TypeTag, int, CellsY, "The number of intervalls in y direction");
}
if (dim > 2) {
REGISTER_PARAM(TypeTag, Scalar, DomainSizeZ, "The size of the domain in z direction");
REGISTER_PARAM(TypeTag, int, CellsZ, "The number of intervalls in z direction");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, DomainSizeZ, "The size of the domain in z direction");
EWOMS_REGISTER_PARAM(TypeTag, int, CellsZ, "The number of intervalls in z direction");
}
}
@ -330,17 +333,17 @@ public:
grid_ = 0;
lowerLeft[1] = 0.0;
upperRight[0] = GET_PARAM(TypeTag, Scalar, DomainSizeX);
upperRight[1] = GET_PARAM(TypeTag, Scalar, DomainSizeY);
upperRight[0] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeX);
upperRight[1] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeY);
cellRes[0] = GET_PARAM(TypeTag, int, CellsX);
cellRes[1] = GET_PARAM(TypeTag, int, CellsY);
cellRes[0] = EWOMS_GET_PARAM(TypeTag, int, CellsX);
cellRes[1] = EWOMS_GET_PARAM(TypeTag, int, CellsY);
if (dim == 3) {
upperRight[2] = GET_PARAM(TypeTag, Scalar, DomainSizeZ);
cellRes[2] = GET_PARAM(TypeTag, int, CellsZ);
upperRight[2] = EWOMS_GET_PARAM(TypeTag, Scalar, DomainSizeZ);
cellRes[2] = EWOMS_GET_PARAM(TypeTag, int, CellsZ);
}
unsigned numRefinements = GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
unsigned numRefinements = EWOMS_GET_PARAM(TypeTag, unsigned, GridGlobalRefinements);
grid_ = new Dune::YaspGrid<LENS_DIM>(
#ifdef HAVE_MPI

View File

@ -49,12 +49,10 @@ namespace Ewoms {
template <class TypeTag>
class LensProblem;
}
//////////
// Specify the properties for the lens problem
//////////
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(LensBaseProblem);
// declare the properties specific for the lens problem
@ -66,7 +64,7 @@ NEW_PROP_TAG(LensUpperRightY);
NEW_PROP_TAG(LensUpperRightZ);
// set the GridCreator property
SET_TYPE_PROP(LensBaseProblem, GridCreator, LensGridCreator<TypeTag>);
SET_TYPE_PROP(LensBaseProblem, GridCreator, Ewoms::LensGridCreator<TypeTag>);
// Retrieve the grid type from the grid creator
SET_TYPE_PROP(LensBaseProblem, Grid, typename GET_PROP_TYPE(TypeTag, GridCreator)::Grid);
@ -150,7 +148,9 @@ SET_SCALAR_PROP(LensBaseProblem, EndTime, 30e3);
// The default for the initial time step size of the simulation
SET_SCALAR_PROP(LensBaseProblem, InitialTimeStepSize, 250);
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
*
@ -227,14 +227,14 @@ public:
FluidSystem::init();
temperature_ = 273.15 + 20; // -> 20°C
lensLowerLeft_[0] = GET_PARAM(TypeTag, Scalar, LensLowerLeftX);
lensLowerLeft_[1] = GET_PARAM(TypeTag, Scalar, LensLowerLeftY);
lensUpperRight_[0] = GET_PARAM(TypeTag, Scalar, LensUpperRightX);
lensUpperRight_[1] = GET_PARAM(TypeTag, Scalar, LensUpperRightY);
lensLowerLeft_[0] = EWOMS_GET_PARAM(TypeTag, Scalar, LensLowerLeftX);
lensLowerLeft_[1] = EWOMS_GET_PARAM(TypeTag, Scalar, LensLowerLeftY);
lensUpperRight_[0] = EWOMS_GET_PARAM(TypeTag, Scalar, LensUpperRightX);
lensUpperRight_[1] = EWOMS_GET_PARAM(TypeTag, Scalar, LensUpperRightY);
if (dimWorld == 3) {
lensLowerLeft_[2] = GET_PARAM(TypeTag, Scalar, LensLowerLeftZ);
lensUpperRight_[2] = GET_PARAM(TypeTag, Scalar, LensUpperRightZ);
lensLowerLeft_[2] = EWOMS_GET_PARAM(TypeTag, Scalar, LensLowerLeftZ);
lensUpperRight_[2] = EWOMS_GET_PARAM(TypeTag, Scalar, LensUpperRightZ);
}
// parameters for the Van Genuchten law
@ -260,14 +260,14 @@ public:
{
ParentType::registerParameters();
REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftX, "The x-coordinate of the lens' lower-left corner [m].");
REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftY, "The y-coordinate of the lens' lower-left corner [m].");
REGISTER_PARAM(TypeTag, Scalar, LensUpperRightX, "The x-coordinate of the lens' upper-right corner [m].");
REGISTER_PARAM(TypeTag, Scalar, LensUpperRightY, "The y-coordinate of the lens' upper-right corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftX, "The x-coordinate of the lens' lower-left corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftY, "The y-coordinate of the lens' lower-left corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensUpperRightX, "The x-coordinate of the lens' upper-right corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensUpperRightY, "The y-coordinate of the lens' upper-right corner [m].");
if (dimWorld == 3) {
REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftZ, "The z-coordinate of the lens' lower-left corner [m].");
REGISTER_PARAM(TypeTag, Scalar, LensUpperRightZ, "The z-coordinate of the lens' upper-right corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensLowerLeftZ, "The z-coordinate of the lens' lower-left corner [m].");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, LensUpperRightZ, "The z-coordinate of the lens' upper-right corner [m].");
}
};

View File

@ -44,13 +44,12 @@
#include <dune/common/fvector.hh>
namespace Ewoms {
template <class TypeTag>
class NavierStokesTestProblem;
}
// Specify the properties for the stokes problem
namespace Properties
{
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(NavierStokesTestProblem, INHERITS_FROM(VcfvNavierStokes));
// Set the grid type
@ -88,7 +87,9 @@ SET_SCALAR_PROP(NavierStokesTestProblem, InitialTimeStepSize, 1e-3);
// Default grid file to load
SET_STRING_PROP(NavierStokesTestProblem, GridFile, "grids/test_navierstokes.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvStokesModel
* \ingroup VcfvTestProblems

View File

@ -49,12 +49,12 @@
#include <iostream>
namespace Ewoms {
template <class TypeTag>
class ObstacleProblem;
}
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(ObstacleBaseProblem);
// Set the grid type
@ -113,8 +113,9 @@ SET_SCALAR_PROP(ObstacleBaseProblem, InitialTimeStepSize, 250);
// The default DGF file to load
SET_STRING_PROP(ObstacleBaseProblem, GridFile, "./grids/obstacle_24x16.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
*

View File

@ -34,12 +34,12 @@
#include <dune/common/fmatrix.hh>
namespace Ewoms {
template <class TypeTag>
class OutflowProblem;
}
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(OutflowBaseProblem);
// Set the grid type
@ -71,10 +71,10 @@ SET_SCALAR_PROP(OutflowBaseProblem, InitialTimeStepSize, 1);
// The default DGF file to load
SET_STRING_PROP(OutflowBaseProblem, GridFile, "./grids/outflow.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
*

View File

@ -44,22 +44,19 @@
#include <iostream>
namespace Ewoms {
template <class TypeTag>
class PowerInjectionProblem;
}
//////////
// Specify the properties for the powerInjection problem
//////////
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(PowerInjectionBaseProblem);
// Set the grid implementation to be used
SET_TYPE_PROP(PowerInjectionBaseProblem, Grid, Dune::YaspGrid</*dim=*/1>);
// set the GridCreator property
SET_TYPE_PROP(PowerInjectionBaseProblem, GridCreator, CubeGridCreator<TypeTag>);
SET_TYPE_PROP(PowerInjectionBaseProblem, GridCreator, Ewoms::CubeGridCreator<TypeTag>);
// Set the problem property
SET_TYPE_PROP(PowerInjectionBaseProblem, Problem, Ewoms::PowerInjectionProblem<TypeTag>);
@ -121,7 +118,9 @@ SET_SCALAR_PROP(PowerInjectionBaseProblem, EndTime, 100);
// The default for the initial time step size of the simulation
SET_SCALAR_PROP(PowerInjectionBaseProblem, InitialTimeStepSize, 1e-3);
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
* \brief 1D Problem with very fast injection of gas on the left.

View File

@ -38,10 +38,11 @@
#include <string>
namespace Ewoms {
template <class TypeTag>
class ReservoirProblem;
}
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(ReservoirBaseProblem);
@ -101,7 +102,9 @@ SET_SCALAR_PROP(ReservoirBaseProblem, InitialTimeStepSize, 10);
// The default DGF file to load
SET_STRING_PROP(ReservoirBaseProblem, GridFile, "grids/reservoir.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
*
@ -174,9 +177,9 @@ public:
{
eps_ = 1e-6;
temperature_ = GET_PARAM(TypeTag, Scalar, Temperature);
maxDepth_ = GET_PARAM(TypeTag, Scalar, MaxDepth);
name_ = GET_PARAM(TypeTag, std::string, SimulationName);
temperature_ = EWOMS_GET_PARAM(TypeTag, Scalar, Temperature);
maxDepth_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxDepth);
name_ = EWOMS_GET_PARAM(TypeTag, std::string, SimulationName);
FluidSystem::initBegin();
std::vector<std::pair<Scalar, Scalar> > Bg = {
@ -292,9 +295,9 @@ public:
{
ParentType::registerParameters();
REGISTER_PARAM(TypeTag, Scalar, Temperature, "The temperature [K] in the reservoir");
REGISTER_PARAM(TypeTag, Scalar, MaxDepth, "The maximum depth [m] of the reservoir");
REGISTER_PARAM(TypeTag, std::string, SimulationName, "The name of the simulation used for the output files");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, Temperature, "The temperature [K] in the reservoir");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, MaxDepth, "The maximum depth [m] of the reservoir");
EWOMS_REGISTER_PARAM(TypeTag, std::string, SimulationName, "The name of the simulation used for the output files");
}
/*!

View File

@ -39,15 +39,12 @@
#include <dune/common/fmatrix.hh>
namespace Ewoms {
template <class TypeTag>
class RichardsLensProblem;
}
//////////
// Specify the properties for the lens problem
//////////
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(RichardsLensProblem, VcfvRichards);
// Use 2d YaspGrid
@ -115,7 +112,9 @@ SET_SCALAR_PROP(RichardsLensProblem, InitialTimeStepSize, 100);
// The default DGF file to load
SET_STRING_PROP(RichardsLensProblem, GridFile, "./grids/richardslens_24x16.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
*

View File

@ -31,15 +31,15 @@
#include <dune/common/fvector.hh>
namespace Ewoms {
template <class TypeTag>
class Stokes2cTestProblem;
}
namespace Opm {
//////////
// Specify the properties for the stokes2c problem
//////////
namespace Properties {
NEW_TYPE_TAG(Stokes2cTestProblem, INHERITS_FROM(VcfvStokes));
// Set the grid type
@ -73,7 +73,9 @@ SET_SCALAR_PROP(Stokes2cTestProblem, InitialTimeStepSize, 0.1);
// Default grid file to load
SET_STRING_PROP(Stokes2cTestProblem, GridFile, "grids/test_stokes2c.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvStokes2cModel
* \ingroup VcfvTestProblems

View File

@ -30,24 +30,20 @@
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dune/common/fvector.hh>
namespace Ewoms
{
namespace Ewoms {
template <class TypeTag>
class StokesNITestProblem;
}
//////////
// Specify the properties for the stokes problem
//////////
namespace Properties
{
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(StokesNITestProblem, INHERITS_FROM(VcfvStokes));
// Set the grid type
SET_TYPE_PROP(StokesNITestProblem, Grid, Dune::YaspGrid<2>);
// Set the problem property
SET_TYPE_PROP(StokesNITestProblem, Problem, StokesNITestProblem<TypeTag>);
SET_TYPE_PROP(StokesNITestProblem, Problem, Ewoms::StokesNITestProblem<TypeTag>);
//! Select the fluid system
SET_TYPE_PROP(StokesNITestProblem,
@ -77,7 +73,9 @@ SET_SCALAR_PROP(StokesNITestProblem, InitialTimeStepSize, 0.1);
// Default grid file to load
SET_STRING_PROP(StokesNITestProblem, GridFile, "grids/test_stokes2cni.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvStokesNIModel
* \ingroup VcfvTestProblems

View File

@ -34,15 +34,12 @@
#include <dune/common/fvector.hh>
namespace Ewoms {
template <class TypeTag>
class StokesTestProblem;
}
//////////
// Specify the properties for the stokes problem
//////////
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(StokesTestProblem, INHERITS_FROM(VcfvStokes));
// Set the grid type
@ -76,7 +73,9 @@ SET_SCALAR_PROP(StokesTestProblem, InitialTimeStepSize, 10.0);
// Default grid file to load
SET_STRING_PROP(StokesTestProblem, GridFile, "grids/test_stokes.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvStokesModel
* \ingroup VcfvTestProblems

View File

@ -47,12 +47,12 @@
#include <string>
namespace Ewoms {
template <class TypeTag>
class WaterAirProblem;
}
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(WaterAirBaseProblem);
// Set the grid type
@ -120,8 +120,9 @@ SET_SCALAR_PROP(WaterAirBaseProblem, InitialTimeStepSize, 250);
// The default DGF file to load
SET_STRING_PROP(WaterAirBaseProblem, GridFile, "./grids/waterair.dgf");
}
}
namespace Ewoms {
/*!
* \ingroup VcfvTestProblems
* \brief Non-isothermal gas injection problem where a air

View File

@ -27,7 +27,7 @@
#include <ewoms/models/blackoil/blackoilmodel.hh>
#include "problems/reservoirproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(ReservoirProblem, INHERITS_FROM(VcfvBlackOil, ReservoirBaseProblem));
}}

View File

@ -27,7 +27,7 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/waterairproblem.hh"
namespace Ewoms {
namespace Opm {
namespace Properties {
NEW_TYPE_TAG(WaterAirProblem, INHERITS_FROM(VcfvPvs, WaterAirBaseProblem));