Flow123d  jenkins-Flow123d-windows-release-multijob-285
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 
58 
59 
60 
61  ModelEqData();
62 
63  static constexpr const char * name() { return "SoluteTransport"; }
64 
65  static string default_output_field() { return "conc"; }
66 
67  static IT::Selection &get_output_selection_input_type(const string &implementation, const string &description);
68 
69  };
70 
71 protected:
72 
73  /// Derived class should implement getter for ModelEqData instance.
74  virtual ModelEqData &data() = 0;
75 
76  /**
77  * Create input type that can be passed to the derived class.
78  * @param implementation String characterizing the numerical method, e.g. DG, FEM, FVM.
79  * @param description Comment used to describe the record key.
80  * @return
81  */
82  static IT::Record &get_input_type(const string &implementation, const string &description);
83 
84  /**
85  * Formula to calculate the dispersivity tensor.
86  * @param velocity Fluid velocity.
87  * @param Dm Molecular diffusivity.
88  * @param alphaL Longitudal dispersivity.
89  * @param alphaT Transversal dispersivity.
90  * @param porosity Porosity.
91  * @param cross_cut Cross-section.
92  * @param K Dispersivity tensor (output).
93  */
94  void calculate_dispersivity_tensor(const arma::vec3 &velocity,
95  double Dm,
96  double alphaL,
97  double alphaT,
98  double porosity,
99  double cross_cut,
100  arma::mat33 &K);
101 
102  /// Indicator of change in advection vector field.
104 
105 
106 public:
107 
109 
110  static string balance_prefix() { return "mass"; }
111 
113 
114  void set_components(SubstanceList &substances, const Input::Record &in_rec) override;
115 
117  const ElementAccessor<3> &ele_acc,
118  std::vector<double> &mm_coef) override;
119 
120 
121 
123  const std::vector<arma::vec3> &velocity,
124  const ElementAccessor<3> &ele_acc,
126  std::vector<std::vector<arma::mat33> > &dif_coef) override;
127 
128  void compute_init_cond(const std::vector<arma::vec3> &point_list,
129  const ElementAccessor<3> &ele_acc,
130  std::vector< arma::vec > &init_values) override;
131 
132  void compute_dirichlet_bc(const std::vector<arma::vec3> &point_list,
133  const ElementAccessor<3> &ele_acc,
134  std::vector< arma::vec > &bc_values) override;
135 
137  const ElementAccessor<3> &ele_acc,
138  std::vector<arma::vec> &sources_conc,
139  std::vector<arma::vec> &sources_density,
140  std::vector<arma::vec> &sources_sigma) override;
141 
142  void compute_sources_sigma(const std::vector<arma::vec3> &point_list,
143  const ElementAccessor<3> &ele_acc,
144  std::vector<arma::vec> &sources_sigma) override;
145 
146  ~ConcentrationTransportModel() override;
147 };
148 
149 
150 
151 
152 
153 
154 
155 
156 #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: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
void set_components(SubstanceList &substances, const Input::Record &in_rec) override
Read or set names of solution components.
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)
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.
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.