Flow123d  jenkins-Flow123d-windows-release-multijob-285
isotherm.cc
Go to the documentation of this file.
1 /*
2  * isotherm.cc
3  *
4  * Created on: Mar 15, 2013
5  * Author: lukas
6  */
7 #include <utility>
8 
9 #include "reaction/isotherm.hh"
10 
11 void Isotherm::make_table(int nr_of_points)
12 {
13  if(table_limit_ > 0.0) switch(adsorption_type_)
14  {
15  case 0: // none
16  {
17  None obj_isotherm;
18  make_table(obj_isotherm, 1);
19  }
20  break;
21  case 1: // linear:
22  {
23  Linear obj_isotherm(mult_coef_);
24  make_table(obj_isotherm, nr_of_points);
25  }
26  break;
27  case 2: // freundlich:
28  {
29  Freundlich obj_isotherm(mult_coef_, second_coef_);
30  make_table(obj_isotherm, nr_of_points);
31  }
32  break;
33  case 3: // langmuir:
34  {
35  Langmuir obj_isotherm(mult_coef_, second_coef_);
36  make_table(obj_isotherm, nr_of_points);
37  }
38  break;
39  default:
40  {
41  ;
42  }
43  break;
44  }
45  return;
46 }
47 
48 
50 {
51  return c_pair;
52 }
53 
54 template<> void Isotherm::make_table(const None &isotherm, int n_steps)
55 {
56  // Solve_conc returns the same, so we need to do that also in compute_projection.
57  // We set size of the table to 1, so it follow the conditions into solve_conc again.
58 
59  limited_solubility_on_ = false; // so it cannot go in precipitate function
60 
61  total_mass_step_ = 1; // set just one step in the table, so we void zero division
62  interpolation_table.resize(1,0); // set one value in the table so the condition in compute_projection fails
63  return;
64 }
double mult_coef_
Multiplication parameter of the isotherm.
Definition: isotherm.hh:255
double second_coef_
Optional secod parameter of the isotherm.
Definition: isotherm.hh:258
Definition: isotherm.hh:76
ConcPair solve_conc(ConcPair c_pair, const Func &isotherm)
Definition: isotherm.hh:404
double total_mass_step_
Definition: isotherm.hh:284
vector< double > interpolation_table
Definition: isotherm.hh:280
bool limited_solubility_on_
Solubility limit flag.
Definition: isotherm.hh:266
Pair of soluted and adsorbed concentration.
Definition: isotherm.hh:170
void make_table(int n_points)
Definition: isotherm.cc:11
double table_limit_
Definition: isotherm.hh:263
enum SorptionType adsorption_type_
Type of isotherm.
Definition: isotherm.hh:252