Skip to content
Snippets Groups Projects
Unverified Commit d8222614 authored by Dmitri Naumov's avatar Dmitri Naumov Committed by GitHub
Browse files

Merge pull request #2272 from wenqing/time_dependent_D_BC

Dirichlet boundary condition within a time interval
parents 9d4144fd 96ded078
No related merge requests found
Showing
with 666 additions and 79 deletions
/**
* \copyright
* Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
* File: TimeInterval.cpp
*
* Created on November 27, 2018, 5:06 PM
*
*/
#include "TimeInterval.h"
#include "BaseLib/ConfigTree.h"
namespace BaseLib
{
std::unique_ptr<TimeInterval> createTimeInterval(
BaseLib::ConfigTree const& config)
{
//! \ogs_file_param{prj__time_loop__processes__process__time_interval}
auto const& time_interval_config = config.getConfigSubtree("time_interval");
const double start_time =
//! \ogs_file_param{prj__time_loop__processes__process__time_interval__start}
time_interval_config.getConfigParameter<double>("start");
const double end_time =
//! \ogs_file_param{prj__time_loop__processes__process__time_interval__end}
time_interval_config.getConfigParameter<double>("end");
return std::make_unique<BaseLib::TimeInterval>(start_time, end_time);
}
} // end of namespace
/**
*
* \copyright
* Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
* File: TimeInterval.h
*
* Created on November 26, 2018, 4:44 PM
*/
#pragma once
#include <memory>
namespace BaseLib
{
class ConfigTree;
/*!
* Class for a time interval, which has a member to check whether the given time
* is in this time interval.
*/
class TimeInterval final
{
public:
TimeInterval(const double start_time, const double end_time)
: _start_time(start_time), _end_time(end_time)
{
}
bool contains(const double current_time) const
{
return (current_time >= _start_time && current_time <= _end_time);
}
private:
const double _start_time;
const double _end_time;
};
std::unique_ptr<TimeInterval> createTimeInterval(
BaseLib::ConfigTree const& config);
} // end of namespace
It defines a Dirichlet boundary condition that exists only in a time interval.
Benchmark:
Tests/Data/Parabolic/LiquidFlow/TimeIntervalDirichletBC/TimeIntervalDirichletBC.prj
The value of the Dirichlet boundary condition within the
specified time interval.
\copydoc ogs_file_param__prj__time_loop__processes__process__time_interval
It defines a time interval.
The end time of the time interval.
The start time of the time interval.
......@@ -13,6 +13,7 @@
#include "BoundaryConditionConfig.h"
#include "ConstraintDirichletBoundaryCondition.h"
#include "DirichletBoundaryCondition.h"
#include "DirichletBoundaryConditionWithinTimeInterval.h"
#include "NeumannBoundaryCondition.h"
#include "NonuniformDirichletBoundaryCondition.h"
#include "NonuniformNeumannBoundaryCondition.h"
......@@ -20,6 +21,9 @@
#include "NormalTractionBoundaryCondition.h"
#include "PhaseFieldIrreversibleDamageOracleBoundaryCondition.h"
#include "RobinBoundaryCondition.h"
#include "BaseLib/TimeInterval.h"
#ifdef OGS_USE_PYTHON
#include "Python/PythonBoundaryCondition.h"
#endif
......@@ -54,6 +58,12 @@ std::unique_ptr<BoundaryCondition> createBoundaryCondition(
config.config, config.boundary_mesh, dof_table, variable_id,
*config.component_id, parameters);
}
if (type == "DirichletWithinTimeInterval")
{
return ProcessLib::createDirichletBoundaryConditionWithinTimeInterval(
config.config, config.boundary_mesh, dof_table, variable_id,
*config.component_id, parameters);
}
if (type == "Neumann")
{
return ProcessLib::createNeumannBoundaryCondition(
......
......@@ -12,46 +12,44 @@
#include <algorithm>
#include <logog/include/logog.hpp>
#include <vector>
#include "DirichletBoundaryConditionAuxiliaryFunctions.h"
#include "BaseLib/ConfigTree.h"
#include "NumLib/IndexValueVector.h"
#include "NumLib/DOF/LocalToGlobalIndexMap.h"
#include "ProcessLib/Parameter/Parameter.h"
#include "ProcessLib/Utils/ProcessUtils.h"
namespace ProcessLib
{
void DirichletBoundaryCondition::getEssentialBCValues(
const double t, GlobalVector const& /*x*/,
NumLib::IndexValueVector<GlobalIndexType>& bc_values) const
DirichletBoundaryCondition::DirichletBoundaryCondition(
Parameter<double> const& parameter, MeshLib::Mesh const& bc_mesh,
NumLib::LocalToGlobalIndexMap const& dof_table_bulk, int const variable_id,
int const component_id)
: _parameter(parameter),
_bc_mesh(bc_mesh),
_variable_id(variable_id),
_component_id(component_id)
{
SpatialPosition pos;
checkParametersOfDirichletBoundaryCondition(_bc_mesh, dof_table_bulk,
_variable_id, _component_id);
bc_values.ids.clear();
bc_values.values.clear();
std::vector<MeshLib::Node*> const& bc_nodes = bc_mesh.getNodes();
MeshLib::MeshSubset bc_mesh_subset(_bc_mesh, bc_nodes);
// convert mesh node ids to global index for the given component
bc_values.ids.reserve(bc_values.ids.size() + _bc_mesh.getNumberOfNodes());
bc_values.values.reserve(bc_values.values.size() +
_bc_mesh.getNumberOfNodes());
for (auto const* const node : _bc_mesh.getNodes())
{
auto const id = node->getID();
pos.setNodeID(node->getID());
// TODO: that might be slow, but only done once
auto const global_index = _dof_table_boundary->getGlobalIndex(
{_bc_mesh.getID(), MeshLib::MeshItemType::Node, id}, _variable_id,
_component_id);
if (global_index == NumLib::MeshComponentMap::nop)
continue;
// For the DDC approach (e.g. with PETSc option), the negative
// index of global_index means that the entry by that index is a ghost
// one, which should be dropped. Especially for PETSc routines
// MatZeroRows and MatZeroRowsColumns, which are called to apply the
// Dirichlet BC, the negative index is not accepted like other matrix or
// vector PETSc routines. Therefore, the following if-condition is
// applied.
if (global_index >= 0)
{
bc_values.ids.emplace_back(global_index);
bc_values.values.emplace_back(_parameter(t, pos).front());
}
}
// Create local DOF table from the BC mesh subset for the given variable
// and component id.
_dof_table_boundary.reset(dof_table_bulk.deriveBoundaryConstrainedMap(
variable_id, {component_id}, std::move(bc_mesh_subset)));
}
void DirichletBoundaryCondition::getEssentialBCValues(
const double t, GlobalVector const& x,
NumLib::IndexValueVector<GlobalIndexType>& bc_values) const
{
getEssentialBCValuesLocal(_parameter, _bc_mesh, *_dof_table_boundary,
_variable_id, _component_id, t, x, bc_values);
}
std::unique_ptr<DirichletBoundaryCondition> createDirichletBoundaryCondition(
......@@ -70,8 +68,8 @@ std::unique_ptr<DirichletBoundaryCondition> createDirichletBoundaryCondition(
auto& param = findParameter<double>(param_name, parameters, 1);
// In case of partitioned mesh the boundary could be empty, i.e. there is no
// boundary condition.
// In case of partitioned mesh the boundary could be empty, i.e. there is no
// boundary condition.
#ifdef USE_PETSC
// This can be extracted to createBoundaryCondition() but then the config
// parameters are not read and will cause an error.
......
......@@ -9,13 +9,18 @@
#pragma once
#include "NumLib/DOF/LocalToGlobalIndexMap.h"
#include "NumLib/IndexValueVector.h"
#include "ProcessLib/Parameter/Parameter.h"
#include "BoundaryCondition.h"
namespace BaseLib
{
class ConfigTree;
}
namespace ProcessLib
{
template <typename T>
struct Parameter;
// TODO docu
/// The DirichletBoundaryCondition class describes a constant in space
/// and time Dirichlet boundary condition.
......@@ -27,47 +32,7 @@ public:
DirichletBoundaryCondition(
Parameter<double> const& parameter, MeshLib::Mesh const& bc_mesh,
NumLib::LocalToGlobalIndexMap const& dof_table_bulk,
int const variable_id, int const component_id)
: _parameter(parameter),
_bc_mesh(bc_mesh),
_variable_id(variable_id),
_component_id(component_id)
{
if (variable_id >=
static_cast<int>(dof_table_bulk.getNumberOfVariables()) ||
component_id >=
dof_table_bulk.getNumberOfVariableComponents(variable_id))
{
OGS_FATAL(
"Variable id or component id too high. Actual values: (%d, "
"%d), maximum values: (%d, %d).",
variable_id, component_id,
dof_table_bulk.getNumberOfVariables(),
dof_table_bulk.getNumberOfVariableComponents(variable_id));
}
if (!_bc_mesh.getProperties().existsPropertyVector<std::size_t>(
"bulk_node_ids"))
{
OGS_FATAL(
"The required bulk node ids map does not exist in the boundary "
"mesh '%s'.", _bc_mesh.getName().c_str());
}
std::vector<MeshLib::Node*> const& bc_nodes = _bc_mesh.getNodes();
DBUG(
"Found %d nodes for Dirichlet BCs for the variable %d and "
"component "
"%d",
bc_nodes.size(), variable_id, component_id);
MeshLib::MeshSubset bc_mesh_subset(_bc_mesh, bc_nodes);
// Create local DOF table from the BC mesh subset for the given variable
// and component id.
_dof_table_boundary.reset(dof_table_bulk.deriveBoundaryConstrainedMap(
variable_id, {component_id}, std::move(bc_mesh_subset)));
}
int const variable_id, int const component_id);
void getEssentialBCValues(
const double t, GlobalVector const& x,
......
/**
*
* \copyright
* Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
* File: DirichletBoundaryConditionAuxiliaryFunctions.cpp
*
* Created on November 28, 2018, 11:26 AM
*/
#include "DirichletBoundaryConditionAuxiliaryFunctions.h"
#include "NumLib/IndexValueVector.h"
#include "NumLib/DOF/LocalToGlobalIndexMap.h"
#include "ProcessLib/Parameter/Parameter.h"
namespace ProcessLib
{
void checkParametersOfDirichletBoundaryCondition(
MeshLib::Mesh const& bc_mesh,
NumLib::LocalToGlobalIndexMap const& dof_table_bulk,
int const variable_id,
int const component_id)
{
if (variable_id >=
static_cast<int>(dof_table_bulk.getNumberOfVariables()) ||
component_id >=
dof_table_bulk.getNumberOfVariableComponents(variable_id))
{
OGS_FATAL(
"Variable id or component id too high. Actual values: (%d, "
"%d), maximum values: (%d, %d).",
variable_id, component_id, dof_table_bulk.getNumberOfVariables(),
dof_table_bulk.getNumberOfVariableComponents(variable_id));
}
if (!bc_mesh.getProperties().existsPropertyVector<std::size_t>(
"bulk_node_ids"))
{
OGS_FATAL(
"The required bulk node ids map does not exist in the boundary "
"mesh '%s'.",
bc_mesh.getName().c_str());
}
DBUG(
"Found %d nodes for Dirichlet BCs for the variable %d and "
"component "
"%d",
bc_mesh.getNodes().size(), variable_id, component_id);
}
void getEssentialBCValuesLocal(
Parameter<double> const& parameter, MeshLib::Mesh const& bc_mesh,
NumLib::LocalToGlobalIndexMap const& dof_table_boundary,
int const variable_id, int const component_id, const double t,
GlobalVector const& /*x*/,
NumLib::IndexValueVector<GlobalIndexType>& bc_values)
{
SpatialPosition pos;
bc_values.ids.clear();
bc_values.values.clear();
// convert mesh node ids to global index for the given component
bc_values.ids.reserve(bc_values.ids.size() + bc_mesh.getNumberOfNodes());
bc_values.values.reserve(bc_values.values.size() +
bc_mesh.getNumberOfNodes());
for (auto const* const node : bc_mesh.getNodes())
{
auto const id = node->getID();
pos.setNodeID(node->getID());
// TODO: that might be slow, but only done once
auto const global_index = dof_table_boundary.getGlobalIndex(
{bc_mesh.getID(), MeshLib::MeshItemType::Node, id}, variable_id,
component_id);
if (global_index == NumLib::MeshComponentMap::nop)
continue;
// For the DDC approach (e.g. with PETSc option), the negative
// index of global_index means that the entry by that index is a ghost
// one, which should be dropped. Especially for PETSc routines
// MatZeroRows and MatZeroRowsColumns, which are called to apply the
// Dirichlet BC, the negative index is not accepted like other matrix or
// vector PETSc routines. Therefore, the following if-condition is
// applied.
if (global_index >= 0)
{
bc_values.ids.emplace_back(global_index);
bc_values.values.emplace_back(parameter(t, pos).front());
}
}
}
} // end of name space
/**
*
* \copyright
* Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
* \brief
* Defines functions that are shared by DirichletBoundaryCondition
* and DirichletBoundaryConditionWithinTimeInterval, which avoid the way of
* inheritance for reducing source code duplication.
*
* File: DirichletBoundaryConditionAuxiliaryFunctions.h
*
* Created on November 28, 2018, 11:26 AM
*/
#pragma once
#include "MathLib/LinAlg/GlobalMatrixVectorTypes.h"
namespace MeshLib
{
class Mesh;
}
namespace NumLib
{
class LocalToGlobalIndexMap;
template <typename>
struct IndexValueVector;
}
namespace ProcessLib
{
template <typename T>
struct Parameter;
void checkParametersOfDirichletBoundaryCondition(
MeshLib::Mesh const& bc_mesh,
NumLib::LocalToGlobalIndexMap const& dof_table_bulk,
int const variable_id,
int const component_id);
void getEssentialBCValuesLocal(
Parameter<double> const& parameter, MeshLib::Mesh const& bc_mesh,
NumLib::LocalToGlobalIndexMap const& dof_table_boundary,
int const variable_id, int const component_id, const double t,
GlobalVector const& x,
NumLib::IndexValueVector<GlobalIndexType>& bc_values);
} // end of name space
/**
*
* \copyright
* Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
* File: DirichletBoundaryConditionWithinTimeInterval.cpp
*
* Created on November 26, 2018, 4:59 PM
*/
#include "DirichletBoundaryConditionWithinTimeInterval.h"
#include "DirichletBoundaryCondition.h"
#include "DirichletBoundaryConditionAuxiliaryFunctions.h"
#include "BaseLib/ConfigTree.h"
#include "BaseLib/TimeInterval.h"
#include "NumLib/DOF/LocalToGlobalIndexMap.h"
#include "NumLib/IndexValueVector.h"
#include "ProcessLib/Parameter/Parameter.h"
#include "ProcessLib/Utils/ProcessUtils.h"
namespace ProcessLib
{
DirichletBoundaryConditionWithinTimeInterval::
DirichletBoundaryConditionWithinTimeInterval(
std::unique_ptr<BaseLib::TimeInterval> time_interval,
Parameter<double> const& parameter, MeshLib::Mesh const& bc_mesh,
NumLib::LocalToGlobalIndexMap const& dof_table_bulk,
int const variable_id, int const component_id)
: _parameter(parameter),
_bc_mesh(bc_mesh),
_variable_id(variable_id),
_component_id(component_id),
_time_interval(std::move(time_interval))
{
checkParametersOfDirichletBoundaryCondition(_bc_mesh, dof_table_bulk,
_variable_id, _component_id);
std::vector<MeshLib::Node*> const& bc_nodes = bc_mesh.getNodes();
MeshLib::MeshSubset bc_mesh_subset(_bc_mesh, bc_nodes);
// Create local DOF table from the BC mesh subset for the given variable
// and component id.
_dof_table_boundary.reset(dof_table_bulk.deriveBoundaryConstrainedMap(
variable_id, {component_id}, std::move(bc_mesh_subset)));
}
void DirichletBoundaryConditionWithinTimeInterval::getEssentialBCValues(
const double t, GlobalVector const& x,
NumLib::IndexValueVector<GlobalIndexType>& bc_values) const
{
if (_time_interval->contains(t))
{
getEssentialBCValuesLocal(_parameter, _bc_mesh, *_dof_table_boundary,
_variable_id, _component_id, t, x, bc_values);
return;
}
bc_values.ids.clear();
bc_values.values.clear();
}
std::unique_ptr<DirichletBoundaryConditionWithinTimeInterval>
createDirichletBoundaryConditionWithinTimeInterval(
BaseLib::ConfigTree const& config, MeshLib::Mesh const& bc_mesh,
NumLib::LocalToGlobalIndexMap const& dof_table_bulk, int const variable_id,
int const component_id,
const std::vector<std::unique_ptr<ProcessLib::ParameterBase>>& parameters)
{
DBUG(
"Constructing DirichletBoundaryConditionWithinTimeInterval from "
"config.");
//! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__type}
config.checkConfigParameter("type", "DirichletWithinTimeInterval");
//! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__DirichletWithinTimeInterval__parameter}
auto const param_name = config.getConfigParameter<std::string>("parameter");
DBUG("Using parameter %s", param_name.c_str());
auto& param = findParameter<double>(param_name, parameters, 1);
// In case of partitioned mesh the boundary could be empty, i.e. there is no
// boundary condition.
#ifdef USE_PETSC
// This can be extracted to createBoundaryCondition() but then the config
// parameters are not read and will cause an error.
// TODO (naumov): Add a function to ConfigTree for skipping the tags of the
// subtree and move the code up in createBoundaryCondition().
if (bc_mesh.getDimension() == 0 && bc_mesh.getNumberOfNodes() == 0 &&
bc_mesh.getNumberOfElements() == 0)
{
return nullptr;
}
#endif // USE_PETSC
//! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__DirichletWithinTimeInterval__time_interval}
config.peekConfigParameter<std::string>("time_interval");
return std::make_unique<DirichletBoundaryConditionWithinTimeInterval>(
BaseLib::createTimeInterval(config), param, bc_mesh, dof_table_bulk,
variable_id, component_id);
}
} // namespace ProcessLib
/**
*
* \copyright
* Copyright (c) 2012-2018, OpenGeoSys Community (http://www.opengeosys.org)
* Distributed under a Modified BSD License.
* See accompanying file LICENSE.txt or
* http://www.opengeosys.org/project/license
*
* File: DirichletBoundaryConditionWithinTimeInterval.h
*
* Created on November 26, 2018, 4:59 PM
*/
#pragma once
#include <memory>
#include "BoundaryCondition.h"
namespace BaseLib
{
class ConfigTree;
class TimeInterval;
}
namespace ProcessLib
{
template <typename T>
struct Parameter;
class DirichletBoundaryConditionWithinTimeInterval final
: public BoundaryCondition
{
public:
DirichletBoundaryConditionWithinTimeInterval(
std::unique_ptr<BaseLib::TimeInterval> time_interval,
Parameter<double> const& parameter, MeshLib::Mesh const& bc_mesh,
NumLib::LocalToGlobalIndexMap const& dof_table_bulk,
int const variable_id, int const component_id);
void getEssentialBCValues(
const double t, GlobalVector const& x,
NumLib::IndexValueVector<GlobalIndexType>& bc_values) const override;
private:
Parameter<double> const& _parameter;
MeshLib::Mesh const& _bc_mesh;
std::unique_ptr<NumLib::LocalToGlobalIndexMap const> _dof_table_boundary;
int const _variable_id;
int const _component_id;
std::unique_ptr<BaseLib::TimeInterval> _time_interval;
};
std::unique_ptr<DirichletBoundaryConditionWithinTimeInterval>
createDirichletBoundaryConditionWithinTimeInterval(
BaseLib::ConfigTree const& config, MeshLib::Mesh const& bc_mesh,
NumLib::LocalToGlobalIndexMap const& dof_table_bulk, int const variable_id,
int const component_id,
const std::vector<std::unique_ptr<ProcessLib::ParameterBase>>& parameters);
} // namespace ProcessLib
......@@ -82,6 +82,20 @@ AddTest(
hex.vtu isotropic_gravity_driven3D_pcs_0_ts_1_t_1.000000.vtu analytic_pressure pressure 1e-6 1e-6
)
AddTest(
NAME LiquidFlowDirichletBCWithinTimeInterval
PATH Parabolic/LiquidFlow/TimeIntervalDirichletBC
EXECUTABLE ogs
EXECUTABLE_ARGS TimeIntervalDirichletBC.prj
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT OGS_USE_MPI
DIFF_DATA
mesh2D.vtu dirichlet_bc_wihin_interval_pcs_0_ts_2_t_10.000000.vtu analytical_solution_t_lt_10 pressure 1e-6 1e-12
mesh2D.vtu dirichlet_bc_wihin_interval_pcs_0_ts_4_t_20.000000.vtu analytical_solution_t_gt_10 pressure 1e-6 1e-12
)
#===============================================================================
# PETSc/MPI
AddTest(
......@@ -153,3 +167,16 @@ AddTest(
DIFF_DATA
hex.vtu isotropic_gravity_driven3D_pcs_0_ts_1_t_1_000000_0.vtu analytic_pressure pressure 1e-6 1e-6
)
AddTest(
NAME LiquidFlowDirichletBCWithinTimeInterval
PATH Parabolic/LiquidFlow/TimeIntervalDirichletBC
EXECUTABLE_ARGS TimeIntervalDirichletBC.prj
WRAPPER mpirun
WRAPPER_ARGS -np 1
TESTER vtkdiff
REQUIREMENTS OGS_USE_MPI
DIFF_DATA
mesh2D.vtu dirichlet_bc_wihin_interval_pcs_0_ts_2_t_10_000000_0.vtu analytical_solution_t_lt_10 pressure 1e-6 1e-12
mesh2D.vtu dirichlet_bc_wihin_interval_pcs_0_ts_4_t_20_000000_0.vtu analytical_solution_t_gt_10 pressure 1e-6 1e-12
)
<?xml version="1.0" encoding="ISO-8859-1"?>
<OpenGeoSysProject>
<mesh>mesh2D.vtu</mesh>
<geometry>square.gml</geometry>
<processes>
<process>
<name>LiquidFlow</name>
<type>LIQUID_FLOW</type>
<integration_order>2</integration_order>
<darcy_gravity>
<!-- axis_id: 0, 1, or the dimension of space minus one -->
<axis_id>1</axis_id>
<!-- g>=0. g=0: non gravity term -->
<g>0.0</g>
</darcy_gravity>
<process_variables>
<process_variable>pressure</process_variable>
</process_variables>
<secondary_variables>
<secondary_variable type="static" internal_name="darcy_velocity" output_name="v"/>
</secondary_variables>
<material_property>
<fluid>
<density>
<type>Constant</type>
<value> 1.e3 </value>
</density>
<viscosity>
<type>Constant</type>
<value> 1.e-3 </value>
</viscosity>
</fluid>
<porous_medium>
<porous_medium id="0">
<permeability>
<permeability_tensor_entries>kappa1</permeability_tensor_entries>
<type>Constant</type>
</permeability>
<porosity>
<type>Constant</type>
<porosity_parameter>constant_porosity_parameter</porosity_parameter>
</porosity>
<storage>
<type>Constant</type>
<value> 0.0 </value>
</storage>
</porous_medium>
</porous_medium>
</material_property>
</process>
</processes>
<time_loop>
<processes>
<process ref="LiquidFlow">
<nonlinear_solver>basic_picard</nonlinear_solver>
<convergence_criterion>
<type>DeltaX</type>
<norm_type>NORM2</norm_type>
<abstol>1.e-6</abstol>
</convergence_criterion>
<time_discretization>
<type>BackwardEuler</type>
</time_discretization>
<output>
<variables>
<variable> pressure </variable>
<variable> v </variable>
</variables>
</output>
<time_stepping>
<type>FixedTimeStepping</type>
<t_initial> 0.0 </t_initial>
<t_end> 20 </t_end>
<timesteps>
<pair>
<repeat>5</repeat>
<delta_t>5.0</delta_t>
</pair>
</timesteps>
</time_stepping>
</process>
</processes>
<output>
<type>VTK</type>
<prefix>dirichlet_bc_wihin_interval</prefix>
<timesteps>
<pair>
<repeat> 1 </repeat>
<each_steps> 2 </each_steps>
</pair>
</timesteps>
</output>
</time_loop>
<parameters>
<parameter>
<name>p0</name>
<type>Constant</type>
<value>0</value>
</parameter>
<parameter>
<name>bc_top</name>
<type>Constant</type>
<value>1.e5</value>
</parameter>
<parameter>
<name>bc_bottom</name>
<type>Constant</type>
<value>1.e6</value>
</parameter>
<parameter>
<name>constant_porosity_parameter</name>
<type>Constant</type>
<value>0.2</value>
</parameter>
<parameter>
<name>kappa1</name>
<type>Constant</type>
<values>1.e-12</values>
</parameter>
</parameters>
<process_variables>
<process_variable>
<name>pressure</name>
<components>1</components>
<order>1</order>
<initial_condition>p0</initial_condition>
<boundary_conditions>
<boundary_condition>
<geometrical_set>square</geometrical_set>
<geometry>top</geometry>
<type>Dirichlet</type>
<parameter>bc_top</parameter>
</boundary_condition>
<boundary_condition>
<geometrical_set>square</geometrical_set>
<geometry>bottom</geometry>
<type>DirichletWithinTimeInterval</type>
<parameter>bc_bottom</parameter>
<time_interval>
<start> 0.0 </start>
<end> 10.0 </end>
</time_interval>
</boundary_condition>
</boundary_conditions>
</process_variable>
</process_variables>
<nonlinear_solvers>
<nonlinear_solver>
<name>basic_picard</name>
<type>Picard</type>
<max_iter>10</max_iter>
<linear_solver>general_linear_solver</linear_solver>
</nonlinear_solver>
</nonlinear_solvers>
<linear_solvers>
<linear_solver>
<name>general_linear_solver</name>
<lis>-i cg -p jacobi -tol 1e-20 -maxiter 10000</lis>
<eigen>
<solver_type>CG</solver_type>
<precon_type>DIAGONAL</precon_type>
<max_iteration_step>10000</max_iteration_step>
<error_tolerance>1e-20</error_tolerance>
</eigen>
<petsc>
<prefix>lf</prefix>
<parameters>-lf_ksp_type cg -lf_pc_type bjacobi -lf_ksp_rtol 1e-16 -lf_ksp_max_it 10000</parameters>
</petsc>
</linear_solver>
</linear_solvers>
</OpenGeoSysProject>
File added
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment