39 for(
unsigned int i_subst = 0; i_subst <
n_substances_; i_subst++)
41 double mult_coef = mult_coef_vec[i_subst];
42 double second_coef = second_coef_vec[i_subst];
43 Isotherm & isotherm = isotherms_vec[i_subst];
46 double scale_aqua = por_m,
47 scale_sorbed = (1 - por_m) * rock_density *
molar_masses_[i_subst];
49 if ( scale_sorbed == 0.0)
50 xprintf(
UsrErr,
"Parameter scale_sorbed ((1 - por_m) * rock_density * molar_masses[i_subst]) is equal to zero.");
51 bool limited_solubility_on =
false;
54 limited_solubility_on =
false;
57 limited_solubility_on =
true;
61 solvent_density_, scale_aqua, scale_sorbed, table_limit, mult_coef, second_coef);
65 END_TIMER(
"SorptionSimple::isotherm_reinit");
74 const string &output_conc_name,
75 const string &output_selection_name)
81 .
name(
"porosity_immobile");
96 :
SorptionDual(init_mesh, in_rec,
"conc_solid",
"SorptionMobile_Output")
119 double phi = por_m/(por_m + por_imm);
126 for(
unsigned int i_subst = 0; i_subst <
n_substances_; i_subst++)
128 double mult_coef = mult_coef_vec[i_subst];
129 double second_coef = second_coef_vec[i_subst];
130 Isotherm & isotherm = isotherms_vec[i_subst];
133 double scale_aqua, scale_sorbed;
135 scale_sorbed = phi * (1 - por_m - por_imm) * rock_density *
molar_masses_[i_subst];
136 if(scale_sorbed == 0.0)
137 xprintf(
UsrErr,
"Parameter scale_sorbed (phi * (1 - por_m - por_imm) * rock_density * molar_masses[i_subst]) is equal to zero.");
138 bool limited_solubility_on;
141 limited_solubility_on =
false;
145 limited_solubility_on =
true;
149 solvent_density_, scale_aqua, scale_sorbed, table_limit, mult_coef, second_coef);
153 END_TIMER(
"SorptionMob::isotherm_reinit");
164 :
SorptionDual(init_mesh, in_rec,
"conc_immobile_solid",
"SorptionImmobile_Output")
186 double phi = por_m/(por_m + por_imm);
193 for(
unsigned int i_subst = 0; i_subst <
n_substances_; i_subst++)
195 double mult_coef = mult_coef_vec[i_subst];
196 double second_coef = second_coef_vec[i_subst];
197 Isotherm & isotherm = isotherms_vec[i_subst];
200 double scale_aqua, scale_sorbed;
201 scale_aqua = por_imm;
202 scale_sorbed = (1 - phi) * (1 - por_m - por_imm) * rock_density *
molar_masses_[i_subst];
203 if(scale_sorbed == 0.0)
204 xprintf(
UsrErr,
"Parameter scale_sorbed ((1 - phi) * (1 - por_m - por_imm) * rock_density * molar_masses[i_subst]) is equal to zero.");
205 bool limited_solubility_on;
208 limited_solubility_on =
false;
212 limited_solubility_on =
true;
216 solvent_density_, scale_aqua, scale_sorbed, table_limit, mult_coef, second_coef);
220 END_TIMER(
"SorptionImmob::isotherm_reinit");
static Input::Type::Record input_type
~SorptionDual(void)
Destructor.
Field< 3, FieldValue< 3 >::EnumVector > sorption_type
Discrete need Selection for initialization.
FieldCommon & flags_add(FieldFlag::Flags::Mask mask)
Field< 3, FieldValue< 3 >::Vector > isotherm_other
Langmuir sorption coeficients alpha (in fraction c_s = omega * (alpha*c_a)/(1- alpha*c_a)).
Input::Type::Selection output_selection
~SorptionMob(void)
Destructor.
Abstract class of sorption model in case dual porosity is considered.
static Input::Type::Record input_type
Field< 3, FieldValue< 3 >::Scalar > rock_density
Rock matrix density.
void isotherm_reinit(std::vector< Isotherm > &isotherms_vec, const ElementAccessor< 3 > &elem) override
Reinitializes the isotherm.
std::vector< double > molar_masses_
std::vector< double > table_limit_
Field< 3, FieldValue< 3 >::Vector > isotherm_mult
Multiplication coefficients (k, omega) for all types of isotherms.
void reinit(enum SorptionType sorption_type, bool limited_solubility_on, double aqua_density, double scale_aqua, double scale_sorbed, double c_aqua_limit, double mult_coef, double second_coef)
Field< 3, FieldValue< 3 >::Scalar > porosity
Porosity field copied from transport.
Field< 3, FieldValue< 3 >::Scalar > immob_porosity_
static constexpr Mask input_copy
A field that is input of its equation and cna not read from input, thus muzt be set by copy...
std::vector< double > solubility_vec_
#define START_TIMER(tag)
Starts a timer with specified tag.
virtual Value::return_type const & value(const Point &p, const ElementAccessor< spacedim > &elm) const
static Input::Type::Record record_factory(SorptionRecord::Type)
Creates the input record for different cases of sorption model (simple or in dual porosity)...
static Input::Type::Selection make_output_selection(const string &output_field_name, const string &selection_name)
SorptionType
Type of adsorption isotherm.
SorptionImmob(Mesh &init_mesh, Input::Record in_rec)
Constructor.
static Input::Type::Record input_type
void isotherm_reinit(std::vector< Isotherm > &isotherms, const ElementAccessor< 3 > &elm) override
Reinitializes the isotherm.
SorptionSimple(Mesh &init_mesh, Input::Record in_rec)
Constructor.
~SorptionSimple(void)
Destructor.
FieldCommon & name(const string &name)
#define END_TIMER(tag)
Ends a timer with specified tag.
arma::vec::fixed< spacedim > centre() const
unsigned int n_substances_
SorptionDual(Mesh &init_mesh, Input::Record in_rec, const string &output_conc_name, const string &output_selection_name)
Constructor.
EqData * data_
Pointer to equation data. The object is constructed in descendants.
void isotherm_reinit(std::vector< Isotherm > &isotherms_vec, const ElementAccessor< 3 > &elem) override
Reinitializes the isotherm.
SorptionMob(Mesh &init_mesh, Input::Record in_rec)
Constructor.
~SorptionImmob(void)
Destructor.