Flow123d
JS_before_hm-915-gc632be9
|
Transport with dispersion implemented using discontinuous Galerkin method. More...
#include <transport_dg.hh>
Classes | |
class | EqData |
Public Types | |
enum | DGVariant { non_symmetric = -1, incomplete = 0, symmetric = 1 } |
template<unsigned int dim> | |
using | MassAssemblyDim = MassAssemblyDG< dim, Model > |
template<unsigned int dim> | |
using | StiffnessAssemblyDim = StiffnessAssemblyDG< dim, Model > |
template<unsigned int dim> | |
using | SourcesAssemblyDim = SourcesAssemblyDG< dim, Model > |
template<unsigned int dim> | |
using | BdrConditionAssemblyDim = BdrConditionAssemblyDG< dim, Model > |
template<unsigned int dim> | |
using | InitConditionAssemblyDim = InitConditionAssemblyDG< dim, Model > |
Public Types inherited from Model< spacedim, Value > | |
typedef FieldAlgorithmBase< spacedim, Value > | FieldBaseType |
typedef std::shared_ptr< FieldBaseType > | FieldBasePtr |
Public Member Functions | |
TransportDG (Mesh &init_mesh, const Input::Record in_rec) | |
Constructor. More... | |
void | zero_time_step () override |
Initialize solution in the zero time. More... | |
bool | evaluate_time_constraint (double &) |
void | update_solution () override |
Computes the solution in one time instant. More... | |
void | output_data () |
Postprocesses the solution and writes to output file. More... | |
~TransportDG () override | |
Destructor. More... | |
void | initialize () override |
void | calculate_cumulative_balance () |
const Vec & | get_solution (unsigned int sbi) |
double ** | get_concentration_matrix () |
void | calculate_concentration_matrix () |
void | update_after_reactions (bool solution_changed) |
void | get_par_info (LongIdx *&el_4_loc, Distribution *&el_ds) |
LongIdx * | get_row_4_el () |
std::shared_ptr< Balance > | balance () const |
Access to balance object of Model. More... | |
const vector< unsigned int > | subst_idx () const |
Return vector of substances indices. More... | |
Static Public Member Functions | |
static const Input::Type::Record & | get_input_type () |
Declare input record type for the equation TransportDG. More... | |
static const Input::Type::Selection & | get_dg_variant_selection_input_type () |
Input type for the DG variant selection. More... | |
Static Public Member Functions inherited from Model< spacedim, Value > | |
template<typename Fn , class... InputFields> | |
static auto | create (Fn *fn, InputFields &&...inputs) -> decltype(auto) |
template<typename Function , typename Tuple , size_t... I> | |
static auto | call_create (Function f, Tuple t, std::index_sequence< I... >) |
template<typename Fn , class... InputFields> | |
static auto | create_multi (Fn *fn, InputFields &&...inputs) -> decltype(auto) |
Private Member Functions | |
Model::ModelEqData & | data () |
void | preallocate () |
void | set_initial_condition () |
Calculates the dispersivity (diffusivity) tensor from the velocity field. More... | |
void | output_region_statistics () |
Private Attributes | |
Physical parameters | |
std::shared_ptr< EqData > | data_ |
Field data for model parameters. More... | |
Solution of algebraic system | |
std::vector< Vec > | rhs |
Vector of right hand side. More... | |
std::vector< Mat > | stiffness_matrix |
The stiffness matrix. More... | |
std::vector< Mat > | mass_matrix |
The mass matrix. More... | |
std::vector< Vec > | mass_vec |
Mass from previous time instant (necessary when coefficients of mass matrix change in time). More... | |
double ** | solution_elem_ |
Element averages of solution (the array is passed to reactions in operator splitting). More... | |
Output to file | |
vector< VectorMPI > | output_vec |
Array for storing the output solution data. More... | |
Input::Record | input_rec |
Record with input specification. More... | |
ofstream | reg_stat_stream |
Auxiliary fields used during assembly | |
vector< double > | ret_sources |
Temporary values of increments due to retardation (e.g. sorption) More... | |
vector< double > | ret_sources_prev |
Other | |
bool | allocation_done |
Indicates whether matrices have been preallocated. More... | |
Static Private Attributes | |
static const int | registrar |
Registrar of class to factory. More... | |
Transport with dispersion implemented using discontinuous Galerkin method.
TransportDG implements the discontinuous Galerkin method for the transport and diffusion of substances. The concentration of the i-th substance is governed by the advection-diffusion equation
where is the fluid velocity and the -dimensional domain, respectively. The hydrodynamic dispersivity tensor is given by:
The molecular dispersivity , as well as the longitudal and transversal dispersivity are input parameters of the model.
For lower dimensions the advection-diffusion equation is multiplied by the fracture cross-cut .
The boundary is divided into three disjoint parts . We prescribe the following boundary conditions:
The transfer of mass through fractures is described by the transmission conditions on :
Here stands for the unit outward normal vector to . The coefficient determines the transfer of mass through fractures due to diffusion.
Definition at line 131 of file transport_dg.hh.
using TransportDG< Model >::BdrConditionAssemblyDim = BdrConditionAssemblyDG<dim, Model> |
Definition at line 138 of file transport_dg.hh.
using TransportDG< Model >::InitConditionAssemblyDim = InitConditionAssemblyDG<dim, Model> |
Definition at line 139 of file transport_dg.hh.
using TransportDG< Model >::MassAssemblyDim = MassAssemblyDG<dim, Model> |
Definition at line 135 of file transport_dg.hh.
using TransportDG< Model >::SourcesAssemblyDim = SourcesAssemblyDG<dim, Model> |
Definition at line 137 of file transport_dg.hh.
using TransportDG< Model >::StiffnessAssemblyDim = StiffnessAssemblyDG<dim, Model> |
Definition at line 136 of file transport_dg.hh.
enum TransportDG::DGVariant |
Enumerator | |
---|---|
non_symmetric | |
incomplete | |
symmetric |
Definition at line 232 of file transport_dg.hh.
TransportDG< Model >::TransportDG | ( | Mesh & | init_mesh, |
const Input::Record | in_rec | ||
) |
Constructor.
init_mesh | computational mesh |
in_rec | input record |
Definition at line 198 of file transport_dg.cc.
|
override |
Destructor.
Definition at line 349 of file transport_dg.cc.
|
inline |
Access to balance object of Model.
Definition at line 302 of file transport_dg.hh.
void TransportDG< Model >::calculate_concentration_matrix | ( | ) |
Definition at line 604 of file transport_dg.cc.
void TransportDG< Model >::calculate_cumulative_balance | ( | ) |
|
inlineprivate |
Definition at line 318 of file transport_dg.hh.
|
inline |
Definition at line 265 of file transport_dg.hh.
|
inline |
Definition at line 290 of file transport_dg.hh.
|
static |
Input type for the DG variant selection.
Definition at line 52 of file transport_dg.cc.
|
static |
Declare input record type for the equation TransportDG.
Definition at line 78 of file transport_dg.cc.
void TransportDG< Model >::get_par_info | ( | LongIdx *& | el_4_loc, |
Distribution *& | el_ds | ||
) |
Definition at line 697 of file transport_dg.cc.
LongIdx * TransportDG< Model >::get_row_4_el | ( | ) |
Definition at line 734 of file transport_dg.cc.
|
inline |
Definition at line 287 of file transport_dg.hh.
|
override |
void TransportDG< Model >::output_data | ( | void | ) |
Postprocesses the solution and writes to output file.
Definition at line 630 of file transport_dg.cc.
|
private |
|
private |
|
private |
Calculates the dispersivity (diffusivity) tensor from the velocity field.
K | The computed dispersivity tensor. |
velocity | The velocity field (at quadrature points). |
Dm | Molecular diffusivities. |
alphaL | Longitudal dispersivities. |
alphaT | Transversal dispersivities. |
porosity | Porosities. |
cross_cut | Cross-cuts of higher dimension. Sets the initial condition. |
This method just calls AssemblyDG::prepare_initial_condition() for each elements.
Definition at line 676 of file transport_dg.cc.
|
inline |
Return vector of substances indices.
Definition at line 307 of file transport_dg.hh.
void TransportDG< Model >::update_after_reactions | ( | bool | solution_changed | ) |
Definition at line 705 of file transport_dg.cc.
|
override |
Computes the solution in one time instant.
Definition at line 465 of file transport_dg.cc.
|
override |
Initialize solution in the zero time.
Definition at line 393 of file transport_dg.cc.
|
private |
Indicates whether matrices have been preallocated.
Definition at line 414 of file transport_dg.hh.
|
private |
Field data for model parameters.
Definition at line 354 of file transport_dg.hh.
|
private |
Record with input specification.
Definition at line 391 of file transport_dg.hh.
|
private |
The mass matrix.
Definition at line 370 of file transport_dg.hh.
|
private |
Mass from previous time instant (necessary when coefficients of mass matrix change in time).
Definition at line 373 of file transport_dg.hh.
|
private |
Array for storing the output solution data.
Vector of solution data.
Definition at line 388 of file transport_dg.hh.
|
private |
Definition at line 393 of file transport_dg.hh.
|
staticprivate |
Registrar of class to factory.
Definition at line 316 of file transport_dg.hh.
|
private |
Temporary values of increments due to retardation (e.g. sorption)
Definition at line 403 of file transport_dg.hh.
|
private |
Definition at line 403 of file transport_dg.hh.
|
private |
Vector of right hand side.
Definition at line 364 of file transport_dg.hh.
|
private |
Element averages of solution (the array is passed to reactions in operator splitting).
Definition at line 376 of file transport_dg.hh.
|
private |
The stiffness matrix.
Definition at line 367 of file transport_dg.hh.