Commit c3fd7c01 authored by Lukas Riedel's avatar Lukas Riedel

Merge branch '124-remove-boundary-conditions-evaporation-and-limitedinflux' into 'master'

Resolve "Remove boundary conditions "evaporation" and "limitedInflux""

Closes #124

See merge request !120
parents fbb7f2fa dfacfe26
......@@ -134,7 +134,7 @@
### Removed
* The class `H5File::AttributeReader` was completely removed.
* Boundary conditions `evaporation` and `limitedInflux` !120
## 1.1.1 (2018-08-21)
......
spatial_resolution_north 0
spatial_resolution_south 0
spatial_resolution_west -1
spatial_resolution_east -1
number_BC_change_times 1
0 evaporation 3.55e-8 -6.0 dirichlet 0
\ No newline at end of file
spatial_resolution_north_we 0
spatial_resolution_north_fb 0
spatial_resolution_south_we 0
spatial_resolution_south_fb 0
spatial_resolution_west_sn -1
spatial_resolution_west_fb -1
spatial_resolution_east_sn -1
spatial_resolution_east_fb -1
spatial_resolution_front_sn -1
spatial_resolution_front_we -1
spatial_resolution_back_sn -1
spatial_resolution_back_we -1
number_BC_change_times 1
0 evaporation 3.55e-8 -6.0 dirichlet 0
\ No newline at end of file
......@@ -30,20 +30,6 @@ Neumann
Set a fixed volumetric flux [m/s] at the boundary. Positive values imply fluxes out of the domain, negative values imply fluxes into the domain.
Limited Influx
++++++++++++++
.. object:: limited_influx <flux>
Set a volumetric flux [m/s] at the boundary (Neumann BC). Fluxes into the domain are stopped as soon as the matric head at the respective boundary segment reaches :math:`h_m \geq 0.0 \, \text{m}`.
Evaporation
+++++++++++
.. object:: evaporation <flux> <head>
Set a volumetric flux [m/s] (Neumann BC) and a fallback matric head [m] (Dirichlet BC) at the boundary. The Neumann BC is invoked as long as the water content inside the soil can sustain the flux. Before every time step, the numeric flux caused by the given Dirichlet BC is estimated. If it is lower than the given Neumann flux, the Dirichlet BC is applied.
Datafile Structure
==================
......@@ -96,9 +82,8 @@ These lines follow a simple grammar:
.. productionlist:: bc
bc_line: time { group }*
time: `float`
group: ( bc_type1 `float` ) | ( bc_type2 `float` `float` )
bc_type1: "neumann" | "dirichlet" | "limited_influx"
bc_type2: "evaporation"
group: ( bc_type `float` )
bc_type: "neumann" | "dirichlet"
The boundary conditions defined here are parsed in the same order as the boundary segments have been specified. In 3D, the rectangular boundary segments are parsed in a tabular fashion, where columns run faster than rows. Columns are defined along the first direction specified in the `Boundary Segmentation`_, and rows are defined along the second direction.
......
......@@ -120,7 +120,7 @@ namespace Dorie{
/*-----------------------------------------------------------------------*//**
* @brief Read necessary parameters. Then read out BC data file
* with rectangular boundary decomposition.
*
*
* @throws Dune::IOError BC File path not specified
*
* @param[in] config The configuration
......@@ -643,19 +643,6 @@ namespace Dorie{
bcData[i][j].headValue.push_back(stod(buffer));
bcData[i][j].fluxValue.push_back(0.0);
}
else if(buffer == "limited_influx"){
bcData[i][j].type.push_back(BoundaryCondition::LimitedInFlux);
instream >> buffer;
bcData[i][j].fluxValue.push_back(stod(buffer));
bcData[i][j].headValue.push_back(0.0);
}
else if(buffer == "evaporation"){
bcData[i][j].type.push_back(BoundaryCondition::Evaporation);
instream >> buffer;
bcData[i][j].fluxValue.push_back(stod(buffer));
instream >> buffer;
bcData[i][j].headValue.push_back(stod(buffer));
}
else
DUNE_THROW(IOError,"In BC file line " + std::to_string(counter) + ": BC side "
+ std::to_string(i) + ": BC declaration " + std::to_string(j+1) + ": BC type unknown!");
......@@ -821,11 +808,6 @@ namespace Dorie{
std::cout << "neumann : ";
else if(bcData[i][j].type[k]==BoundaryCondition::Dirichlet)
std::cout << "dirichlet : ";
else if(bcData[i][j].type[k]==BoundaryCondition::LimitedInFlux)
std::cout << "limited_influx : ";
else if(bcData[i][j].type[k]==BoundaryCondition::Evaporation)
std::cout << "evaporation : ";
std::cout << bcData[i][j].fluxValue[k] << " , " << bcData[i][j].headValue[k] << std::endl;
}
index++;
}
......
......@@ -13,8 +13,6 @@ namespace Dune{
enum Type {
Neumann, //!< Fixed flux at boundary
Dirichlet, //!< Fixed matric head at boundary
Evaporation, //!< Special BC which switches between Neumann and Dirichlet depending on the water content
LimitedInFlux, //!< Special Neumann BC which stops infiltration into saturated medium
Other //!< UNUSED
};
......@@ -28,16 +26,6 @@ namespace Dune{
{
return (i == Neumann);
}
//! Test for Limited Flux boundary condition
static bool isLimitedInFlux (Type i)
{
return (i == LimitedInFlux);
}
//! Test for Evaporation boundary condition
static bool isEvaporation (Type i)
{
return (i == Evaporation);
}
//! UNUSED: Test for other(?) boundary condition
static bool isOther (Type i)
{
......
This diff is collapsed.
......@@ -49,13 +49,13 @@ RichardsSimulation<Traits>::RichardsSimulation (
const auto upwinding = std::get<OP::RichardsDGUpwinding::Type>(settings);
const auto weights = std::get<OP::RichardsDGWeights::Type>(settings);
slop = std::make_unique<SLOP>(inifile, *fparam, gv, *fboundary, *fsource,
slop = std::make_unique<SLOP>(inifile, *fparam, *fboundary, *fsource,
method, upwinding, weights);
#else
slop = std::make_unique<SLOP>(inifile, *fparam, gv, *fboundary, *fsource);
slop = std::make_unique<SLOP>(inifile, *fparam, *fboundary, *fsource);
#endif // EXPERIMENTAL_DG_FEATURES
tlop = std::make_unique<TLOP>(inifile, *fparam, gv);
tlop = std::make_unique<TLOP>(inifile, *fparam);
controller = std::make_unique<CalculationController>(
inifile, *fboundary, this->_log);
......
spatial_resolution_north 0
spatial_resolution_south 0
spatial_resolution_west -1
spatial_resolution_east -1
number_BC_change_times 1
0 evaporation 2e-7 -100 dirichlet 0
spatial_resolution_north 0
spatial_resolution_south 0
spatial_resolution_west -1
spatial_resolution_east -1
number_BC_change_times 3
0 neumann -5.55e-6 dirichlet 0
1e5 neumann 0 dirichlet 0
1e5 evaporation 1e-7 -10 dirichlet 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment