Flow123d  jenkins-Flow123d-windows32-release-multijob-28
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 
35 
36 
38 public:
39 
41  public:
42 
43  /// Boundary conditions (Dirichlet) for concentrations.
45  /// Initial concentrations.
47  /// Longitudal dispersivity (for each substance).
49  /// Transversal dispersivity (for each substance).
51  /// Molecular diffusivity (for each substance).
53 
54 
56 
57 
58 
59  ModelEqData();
60 
61  static string name() { return "SoluteTransport"; }
62 
63  static string default_output_field() { return "conc"; }
64 
65  static IT::Selection &get_output_selection_input_type(const string &implementation, const string &description);
66 
67  };
68 
69 protected:
70 
71  /// Derived class should implement getter for ModelEqData instance.
72  virtual ModelEqData &data() = 0;
73 
74  /**
75  * Create input type that can be passed to the derived class.
76  * @param implementation String characterizing the numerical method, e.g. DG, FEM, FVM.
77  * @param description Comment used to describe the record key.
78  * @return
79  */
80  static IT::Record &get_input_type(const string &implementation, const string &description);
81 
82  /// Indicator of change in advection vector field.
84 
85 
86 public:
87 
89 
90  void set_component_names(std::vector<string> &names, const Input::Record &in_rec) override;
91 
93  const ElementAccessor<3> &ele_acc,
94  std::vector<double> &mm_coef) override;
95 
96  /**
97  * Formula to calculate the dispersivity tensor.
98  * @param velocity Fluid velocity.
99  * @param Dm Molecular diffusivity.
100  * @param alphaL Longitudal dispersivity.
101  * @param alphaT Transversal dispersivity.
102  * @param porosity Porosity.
103  * @param cross_cut Cross-section.
104  * @param K Dispersivity tensor (output).
105  */
106  void calculate_dispersivity_tensor(const arma::vec3 &velocity,
107  double Dm,
108  double alphaL,
109  double alphaT,
110  double porosity,
111  double cross_cut,
112  arma::mat33 &K);
113 
115  const std::vector<arma::vec3> &velocity,
116  const ElementAccessor<3> &ele_acc,
118  std::vector<std::vector<arma::mat33> > &dif_coef) override;
119 
120  void compute_init_cond(const std::vector<arma::vec3> &point_list,
121  const ElementAccessor<3> &ele_acc,
122  std::vector< arma::vec > &init_values) override;
123 
124  void compute_dirichlet_bc(const std::vector<arma::vec3> &point_list,
125  const ElementAccessor<3> &ele_acc,
126  std::vector< arma::vec > &bc_values) override;
127 
129  const ElementAccessor<3> &ele_acc,
130  std::vector<arma::vec> &sources_conc,
131  std::vector<arma::vec> &sources_density,
132  std::vector<arma::vec> &sources_sigma) override;
133 
134  void compute_sources_sigma(const std::vector<arma::vec3> &point_list,
135  const ElementAccessor<3> &ele_acc,
136  std::vector<arma::vec> &sources_sigma) override;
137 
138  ~ConcentrationTransportModel() override;
139 };
140 
141 
142 
143 
144 
145 
146 
147 
148 #endif /* CONC_TRANS_MODEL_HH_ */
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:48
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.
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
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:308
void calculate_dispersivity_tensor(const arma::vec3 &velocity, double Dm, double alphaL, double alphaT, double porosity, double cross_cut, arma::mat33 &K)
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
Discontinuous Galerkin method for equation of transport with dispersion.
void set_component_names(std::vector< string > &names, const Input::Record &in_rec) override
Read or set names of solution components.
Record type proxy class.
Definition: type_record.hh:161
Class for representation of a vector of fields of the same physical quantity.
Definition: field.hh:309
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.