Flow123d  jenkins-Flow123d-windows32-release-multijob-51
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  /**
83  * Formula to calculate the dispersivity tensor.
84  * @param velocity Fluid velocity.
85  * @param Dm Molecular diffusivity.
86  * @param alphaL Longitudal dispersivity.
87  * @param alphaT Transversal dispersivity.
88  * @param porosity Porosity.
89  * @param cross_cut Cross-section.
90  * @param K Dispersivity tensor (output).
91  */
92  void calculate_dispersivity_tensor(const arma::vec3 &velocity,
93  double Dm,
94  double alphaL,
95  double alphaT,
96  double porosity,
97  double cross_cut,
98  arma::mat33 &K);
99 
100  /// Indicator of change in advection vector field.
102 
103 
104 public:
105 
107 
108  void set_component_names(std::vector<string> &names, const Input::Record &in_rec) override;
109 
111  const ElementAccessor<3> &ele_acc,
112  std::vector<double> &mm_coef) override;
113 
114 
115 
117  const std::vector<arma::vec3> &velocity,
118  const ElementAccessor<3> &ele_acc,
120  std::vector<std::vector<arma::mat33> > &dif_coef) override;
121 
122  void compute_init_cond(const std::vector<arma::vec3> &point_list,
123  const ElementAccessor<3> &ele_acc,
124  std::vector< arma::vec > &init_values) override;
125 
126  void compute_dirichlet_bc(const std::vector<arma::vec3> &point_list,
127  const ElementAccessor<3> &ele_acc,
128  std::vector< arma::vec > &bc_values) override;
129 
131  const ElementAccessor<3> &ele_acc,
132  std::vector<arma::vec> &sources_conc,
133  std::vector<arma::vec> &sources_density,
134  std::vector<arma::vec> &sources_sigma) override;
135 
136  void compute_sources_sigma(const std::vector<arma::vec3> &point_list,
137  const ElementAccessor<3> &ele_acc,
138  std::vector<arma::vec> &sources_sigma) override;
139 
140  ~ConcentrationTransportModel() override;
141 };
142 
143 
144 
145 
146 
147 
148 
149 
150 #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.