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