41 for(
unsigned int i_subst = 0; i_subst <
n_substances_; i_subst++)
43 double mult_coef = mult_coef_vec[i_subst];
44 double second_coef = second_coef_vec[i_subst];
45 Isotherm & isotherm = isotherms_vec[i_subst];
48 double scale_aqua = por_m,
49 scale_sorbed = (1 - por_m) * rock_density *
molar_masses_[i_subst];
52 if ( scale_sorbed == 0.0)
53 xprintf(
UsrErr,
"Parameter scale_sorbed ((1 - por_m) * rock_density * molar_masses[i_subst]) is equal to zero.");
54 bool limited_solubility_on =
false;
57 limited_solubility_on =
false;
60 limited_solubility_on =
true;
64 solvent_density_, scale_aqua, scale_sorbed, table_limit, mult_coef, second_coef);
68 END_TIMER(
"SorptionSimple::isotherm_reinit");
77 const string &output_conc_name,
78 const string &output_selection_name)
84 .
name(
"porosity_immobile");
147 :
SorptionDual(init_mesh, in_rec,
"conc_solid",
"SorptionMobile_Output")
170 double phi = por_m/(por_m + por_imm);
177 for(
unsigned int i_subst = 0; i_subst <
n_substances_; i_subst++)
179 double mult_coef = mult_coef_vec[i_subst];
180 double second_coef = second_coef_vec[i_subst];
181 Isotherm & isotherm = isotherms_vec[i_subst];
184 double scale_aqua, scale_sorbed;
186 scale_sorbed = phi * (1 - por_m - por_imm) * rock_density *
molar_masses_[i_subst];
187 if(scale_sorbed == 0.0)
188 xprintf(
UsrErr,
"Parameter scale_sorbed (phi * (1 - por_m - por_imm) * rock_density * molar_masses[i_subst]) is equal to zero.");
189 bool limited_solubility_on;
192 limited_solubility_on =
false;
196 limited_solubility_on =
true;
200 solvent_density_, scale_aqua, scale_sorbed, table_limit, mult_coef, second_coef);
204 END_TIMER(
"SorptionMob::isotherm_reinit");
215 :
SorptionDual(init_mesh, in_rec,
"conc_immobile_solid",
"SorptionImmobile_Output")
238 double phi = por_m/(por_m + por_imm);
245 for(
unsigned int i_subst = 0; i_subst <
n_substances_; i_subst++)
247 double mult_coef = mult_coef_vec[i_subst];
248 double second_coef = second_coef_vec[i_subst];
249 Isotherm & isotherm = isotherms_vec[i_subst];
252 double scale_aqua, scale_sorbed;
253 scale_aqua = por_imm;
254 scale_sorbed = (1 - phi) * (1 - por_m - por_imm) * rock_density *
molar_masses_[i_subst];
255 if(scale_sorbed == 0.0)
256 xprintf(
UsrErr,
"Parameter scale_sorbed ((1 - phi) * (1 - por_m - por_imm) * rock_density * molar_masses[i_subst]) is equal to zero.");
257 bool limited_solubility_on;
260 limited_solubility_on =
false;
264 limited_solubility_on =
true;
268 solvent_density_, scale_aqua, scale_sorbed, table_limit, mult_coef, second_coef);
272 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.