Flow123d  jenkins-Flow123d-linux-release-multijob-282
concentration_model.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2007 Technical University of Liberec. All rights reserved.
4  *
5  * Please make a following refer to Flow123d on your project site if you use the program for any purpose,
6  * especially for academic research:
7  * Flow123d, Research Centre: Advanced Remedial Technologies, Technical University of Liberec, Czech Republic
8  *
9  * This program is free software; you can redistribute it and/or modify it under the terms
10  * of the GNU General Public License version 3 as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along with this program; if not,
17  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
18  *
19  *
20  * $Id$
21  * $Revision$
22  * $LastChangedBy$
23  * $LastChangedDate$
24  *
25  * @file
26  * @brief Discontinuous Galerkin method for equation of transport with dispersion.
27  * @author Jan Stebel
28  */
29 
30 #ifndef CONC_TRANS_MODEL_HH_
31 #define CONC_TRANS_MODEL_HH_
32 
34 #include "fields/multi_field.hh"
35 
36 
37 
38 
40 public:
41 
43  public:
44 
45  /// Boundary conditions (Dirichlet) for concentrations.
47  /// Initial concentrations.
49  /// Longitudal dispersivity (for each substance).
51  /// Transversal dispersivity (for each substance).
53  /// Molecular diffusivity (for each substance).
55 
56  Field<3, FieldValue<3>::Scalar > rock_density; ///< Rock matrix density.
57  Field<3, FieldValue<3>::Vector > sorption_mult; ///< Coefficient of linear sorption.
58 
59 
61 
62 
63 
64  ModelEqData();
65 
66  static constexpr const char * name() { return "SoluteTransport"; }
67 
68  static string default_output_field() { return "conc"; }
69 
70  static IT::Selection &get_output_selection_input_type(const string &implementation, const string &description);
71 
72  };
73 
74 protected:
75 
76  /// Derived class should implement getter for ModelEqData instance.
77  virtual ModelEqData &data() = 0;
78 
79  /**
80  * Create input type that can be passed to the derived class.
81  * @param implementation String characterizing the numerical method, e.g. DG, FEM, FVM.
82  * @param description Comment used to describe the record key.
83  * @return
84  */
85  static IT::Record &get_input_type(const string &implementation, const string &description);
86 
87  /**
88  * Formula to calculate the dispersivity tensor.
89  * @param velocity Fluid velocity.
90  * @param Dm Molecular diffusivity.
91  * @param alphaL Longitudal dispersivity.
92  * @param alphaT Transversal dispersivity.
93  * @param porosity Porosity.
94  * @param cross_cut Cross-section.
95  * @param K Dispersivity tensor (output).
96  */
97  void calculate_dispersivity_tensor(const arma::vec3 &velocity,
98  double Dm,
99  double alphaL,
100  double alphaT,
101  double porosity,
102  double cross_cut,
103  arma::mat33 &K);
104 
105  /// Indicator of change in advection vector field.
107 
108  /// Pointer to list of substances (needed e.g. for access to molar masses).
110 
111  /// Density of liquid (a global constant).
113 
114 
115 public:
116 
118 
119  static string balance_prefix() { return "mass"; }
120 
122 
123  void init_from_input(const Input::Record &in_rec, SubstanceList &substances) override;
124 
126  const ElementAccessor<3> &ele_acc,
127  std::vector<double> &mm_coef) override;
128 
129 
131  const ElementAccessor<3> &ele_acc,
132  std::vector<std::vector<double> > &ret_coef) override;
133 
134 
136  const std::vector<arma::vec3> &velocity,
137  const ElementAccessor<3> &ele_acc,
139  std::vector<std::vector<arma::mat33> > &dif_coef) override;
140 
141  void compute_init_cond(const std::vector<arma::vec3> &point_list,
142  const ElementAccessor<3> &ele_acc,
143  std::vector< arma::vec > &init_values) override;
144 
145  void compute_dirichlet_bc(const std::vector<arma::vec3> &point_list,
146  const ElementAccessor<3> &ele_acc,
147  std::vector< arma::vec > &bc_values) override;
148 
150  const ElementAccessor<3> &ele_acc,
151  std::vector<arma::vec> &sources_conc,
152  std::vector<arma::vec> &sources_density,
153  std::vector<arma::vec> &sources_sigma) override;
154 
155  void compute_sources_sigma(const std::vector<arma::vec3> &point_list,
156  const ElementAccessor<3> &ele_acc,
157  std::vector<arma::vec> &sources_sigma) override;
158 
159  ~ConcentrationTransportModel() override;
160 };
161 
162 
163 
164 
165 
166 
167 
168 
169 #endif /* CONC_TRANS_MODEL_HH_ */
void compute_retardation_coefficient(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &ret_coef) override
Field< 3, FieldValue< 3 >::Vector > disp_l
Longitudal dispersivity (for each substance).
MultiField< 3, FieldValue< 3 >::Scalar > output_field
Field< 3, FieldValue< 3 >::Vector > disp_t
Transversal dispersivity (for each substance).
Field< 3, FieldValue< 3 >::Vector > diff_m
Molecular diffusivity (for each substance).
static IT::Record & get_input_type(const string &implementation, const string &description)
Class template representing a field with values dependent on: point, element, and region...
Definition: field.hh:52
void compute_dirichlet_bc(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &bc_values) override
bool flux_changed
Indicator of change in advection vector field.
static constexpr const char * name()
Field< 3, FieldValue< 3 >::Vector > init_conc
Initial concentrations.
void compute_mass_matrix_coefficient(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< double > &mm_coef) override
double solvent_density_
Density of liquid (a global constant).
Field< 3, FieldValue< 3 >::Scalar > rock_density
Rock matrix density.
void compute_init_cond(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &init_values) override
void compute_sources_sigma(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &sources_sigma) override
static IT::Selection & get_output_selection_input_type(const string &implementation, const string &description)
Accessor to the data with type Type::Record.
Definition: accessors.hh:327
void calculate_dispersivity_tensor(const arma::vec3 &velocity, double Dm, double alphaL, double alphaT, double porosity, double cross_cut, arma::mat33 &K)
Field< 3, FieldValue< 3 >::Vector > sorption_mult
Coefficient of linear sorption.
void init_from_input(const Input::Record &in_rec, SubstanceList &substances) override
Read necessary data from input record.
BCField< 3, FieldValue< 3 >::Vector > bc_conc
Boundary conditions (Dirichlet) for concentrations.
void compute_source_coefficients(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &sources_conc, std::vector< arma::vec > &sources_density, std::vector< arma::vec > &sources_sigma) override
SubstanceList * substances_
Pointer to list of substances (needed e.g. for access to molar masses).
Discontinuous Galerkin method for equation of transport with dispersion.
Record type proxy class.
Definition: type_record.hh:169
Class for representation of a vector of fields of the same physical quantity.
Definition: multi_field.hh:45
Class for representation SI units of Fields.
Definition: unit_si.hh:31
void compute_advection_diffusion_coefficients(const std::vector< arma::vec3 > &point_list, const std::vector< arma::vec3 > &velocity, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< arma::vec3 > > &ad_coef, std::vector< std::vector< arma::mat33 > > &dif_coef) override
virtual ModelEqData & data()=0
Derived class should implement getter for ModelEqData instance.
Template for classes storing finite set of named values.