36 return IT::Record(
"Sorption",
"Sorption model in the reaction term of transport.")
41 .
declare_key(
"output", make_output_type(
"Sorption",
"conc_solid",
"Concentration solution in the solid phase."),
43 "Setting of the fields output.")
51 data_ =
new EqData(
"conc_solid",
"Concentration solution in the solid phase.");
59 Input::register_class< SorptionSimple, Mesh &, Input::Record >(
"Sorption") +
72 for(
unsigned int i_subst = 0; i_subst <
n_substances_; i_subst++)
76 Isotherm & isotherm = isotherms_vec[i_subst];
79 double scale_aqua = por_m,
80 scale_sorbed = (1 - por_m) * rock_density;
82 bool limited_solubility_on =
false;
85 limited_solubility_on =
false;
88 limited_solubility_on =
true;
98 if ( scale_sorbed <= 0.0)
99 xprintf(
UsrErr,
"Scaling parameter in sorption is not positive. Check the input for rock density and molar mass of %d. substance.",i_subst);
102 solvent_density_, scale_aqua, scale_sorbed, table_limit, mult_coef, second_coef);
106 END_TIMER(
"SorptionSimple::isotherm_reinit");
115 const string &output_conc_name,
116 const string &output_selection_name,
117 const string &output_conc_desc)
120 data_ =
new EqData(output_conc_name, output_conc_desc);
123 .
name(
"porosity_immobile")
137 return IT::Record(
"SorptionMobile",
"Sorption model in the mobile zone, following the dual porosity model.")
144 "Setting of the fields output.")
151 Input::register_class< SorptionMob, Mesh &, Input::Record >(
"SorptionMobile") +
156 :
SorptionDual(init_mesh, in_rec,
"conc_solid",
"SorptionMobile_Output",
"Concentration solution in the solid mobile phase.")
179 double phi = por_m/(por_m + por_imm);
181 for(
unsigned int i_subst = 0; i_subst <
n_substances_; i_subst++)
185 Isotherm & isotherm = isotherms_vec[i_subst];
188 double scale_aqua = por_m,
189 scale_sorbed = phi * (1 - por_m - por_imm) * rock_density;
191 bool limited_solubility_on;
194 limited_solubility_on =
false;
198 limited_solubility_on =
true;
208 if ( scale_sorbed <= 0.0)
209 xprintf(
UsrErr,
"Scaling parameter in sorption is not positive. Check the input for rock density and molar mass of %d. substance.",i_subst);
212 solvent_density_, scale_aqua, scale_sorbed, table_limit, mult_coef, second_coef);
216 END_TIMER(
"SorptionMob::isotherm_reinit");
225 return IT::Record(
"SorptionImmobile",
"Sorption model in the immobile zone, following the dual porosity model.")
230 .
declare_key(
"output",
make_output_type(
"SorptionImmobile",
"conc_immobile_solid",
"Concentration solution in the solid immobile phase."),
231 IT::Default(
"{ \"fields\": [ \"conc_immobile_solid\" ] }"),
232 "Setting of the fields output.")
238 Input::register_class< SorptionImmob, Mesh &, Input::Record >(
"SorptionImmobile") +
242 :
SorptionDual(init_mesh, in_rec,
"conc_immobile_solid",
"SorptionImmobile_Output",
"Concentration solution in the solid immobile phase.")
264 double phi = por_m/(por_m + por_imm);
266 for(
unsigned int i_subst = 0; i_subst <
n_substances_; i_subst++)
270 Isotherm & isotherm = isotherms_vec[i_subst];
273 double scale_aqua = por_imm,
274 scale_sorbed = (1 - phi) * (1 - por_m - por_imm) * rock_density;
276 bool limited_solubility_on;
279 limited_solubility_on =
false;
283 limited_solubility_on =
true;
293 if ( scale_sorbed <= 0.0)
294 xprintf(
UsrErr,
"Scaling parameter in sorption is not positive. Check the input for rock density and molar mass of %d. substance.",i_subst);
297 solvent_density_, scale_aqua, scale_sorbed, table_limit, mult_coef, second_coef);
301 END_TIMER(
"SorptionImmob::isotherm_reinit");
~SorptionDual(void)
Destructor.
FieldCommon & flags_add(FieldFlag::Flags::Mask mask)
static Input::Type::Instance make_output_type(const string &equation_name, const string &output_field_name, const string &output_field_desc)
SorptionDual(Mesh &init_mesh, Input::Record in_rec, const string &output_conc_name, const string &output_selection_name, const string &output_conc_desc)
Constructor.
~SorptionMob(void)
Destructor.
Abstract class of sorption model in case dual porosity is considered.
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.
static const Input::Type::Record & get_input_type()
static Input::Type::Abstract & it_abstract_mobile_term()
std::vector< double > table_limit_
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)
MultiField< 3, FieldValue< 3 >::Scalar > isotherm_other
Langmuir sorption coeficients alpha (in fraction c_s = omega * (alpha*c_a)/(1- alpha*c_a)).
Field< 3, FieldValue< 3 >::Scalar > porosity
Porosity field copied from transport.
Field< 3, FieldValue< 3 >::Scalar > immob_porosity_
static constexpr Mask input_copy
std::vector< double > solubility_vec_
#define START_TIMER(tag)
Starts a timer with specified tag.
static const Input::Type::Record & get_input_type()
static Input::Type::Abstract & it_abstract_immobile_term()
virtual Value::return_type const & value(const Point &p, const ElementAccessor< spacedim > &elm) const
MultiField< 3, FieldValue< 3 >::Enum > sorption_type
Discrete need Selection for initialization.
SorptionType
Type of adsorption isotherm.
static Input::Type::Abstract & it_abstract_term()
SorptionImmob(Mesh &init_mesh, Input::Record in_rec)
Constructor.
static const int registrar
Registrar of class to factory.
void isotherm_reinit(std::vector< Isotherm > &isotherms, const ElementAccessor< 3 > &elm) override
Reinitializes the isotherm.
SorptionSimple(Mesh &init_mesh, Input::Record in_rec)
Constructor.
static const int registrar
Registrar of class to factory.
~SorptionSimple(void)
Destructor.
FieldCommon & name(const string &name)
static const int registrar
Registrar of class to factory.
#define END_TIMER(tag)
Ends a timer with specified tag.
arma::vec::fixed< spacedim > centre() const
Simple sorption model without dual porosity.
static const Input::Type::Record & get_input_type()
FieldCommon & set_limits(double min, double max=std::numeric_limits< double >::max())
MultiField< 3, FieldValue< 3 >::Scalar > distribution_coefficient
Multiplication coefficients (k, omega) for all types of isotherms.
unsigned int n_substances_
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.
Other possible transformation of coordinates:
static const Input::Type::Record & get_input_type()
This file contains classes representing sorption model. Sorption model can be computed both in case t...
#define FLOW123D_FORCE_LINK_IN_CHILD(x)
SorptionMob(Mesh &init_mesh, Input::Record in_rec)
Constructor.
~SorptionImmob(void)
Destructor.