41 using namespace Input::Type;
57 .
description(
"Dirichlet boundary condition (for each substance).")
67 .
description(
"Longitudal dispersivity (for each substance).")
73 .
description(
"Transversal dispersivity (for each substance).")
79 .
description(
"Molecular diffusivity (for each substance).")
90 .
name(
"sorption_mult")
116 description +
" for solute transport.")
119 "Names of transported substances.")
121 "Density of the solvent [kg.m^(-3)].");
130 "Output record for " + description +
" for solute transport.");
155 vector<double> elem_csec(point_list.size()), por_m(point_list.size());
160 for (
unsigned int i=0; i<point_list.size(); i++)
161 mm_coef[i] = elem_csec[i]*por_m[i];
170 por_m(point_list.size()),
171 rho_l(point_list.size()),
172 rho_s(point_list.size());
182 for (
unsigned int i=0; i<point_list.size(); i++)
191 double Dm,
double alphaL,
double alphaT,
double porosity,
double cross_cut,
arma::mat33 &K)
193 double vnorm = arma::norm(velocity, 2);
196 for (
int i=0; i<3; i++)
197 for (
int j=0; j<3; j++)
198 K(i,j) = (velocity[i]/vnorm)*(velocity[j]/vnorm)*(alphaL-alphaT) + alphaT*(i==j?1:0);
204 K = (vnorm*K + (Dm*pow(porosity, 1./3)*porosity*cross_cut)*arma::eye(3,3));
216 const unsigned int qsize = point_list.size();
217 const unsigned int n_subst = dif_coef.size();
218 std::vector<arma::vec> Dm(qsize, arma::vec(n_subst) ), alphaL(qsize, arma::vec(n_subst) ), alphaT(qsize, arma::vec(n_subst) );
227 for (
unsigned int i=0; i<qsize; i++) {
228 for (
unsigned int sbi=0; sbi<n_subst; sbi++) {
229 ad_coef[sbi][i] = velocity[i];
231 Dm[i][sbi], alphaL[i][sbi], alphaT[i][sbi], por_m[i], csection[i],
260 const unsigned int qsize = point_list.size();
267 for (
unsigned int k=0; k<qsize; k++)
269 sources_density[k] *= csection[k];
270 sources_sigma[k] *= csection[k];
279 const unsigned int qsize = point_list.size();
284 for (
unsigned int k=0; k<qsize; k++)
285 sources_sigma[k] *= csection[k];
void compute_retardation_coefficient(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &ret_coef) override
Field< 3, FieldValue< 3 >::Vector > disp_l
Longitudal dispersivity (for each substance).
MultiField< 3, FieldValue< 3 >::Scalar > output_field
static Input::Type::AbstractRecord input_type
Common specification of the input record for secondary equations.
Field< 3, FieldValue< 3 >::Vector > disp_t
Transversal dispersivity (for each substance).
static constexpr Mask in_main_matrix
A field is part of main "stiffness matrix" of the equation.
Field< 3, FieldValue< 3 >::Scalar > cross_section
Pointer to DarcyFlow field cross_section.
Field< 3, FieldValue< 3 >::Vector > diff_m
Molecular diffusivity (for each substance).
static IT::Record & get_input_type(const string &implementation, const string &description)
FieldCommon & flags_add(FieldFlag::Flags::Mask mask)
void compute_dirichlet_bc(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &bc_values) override
void initialize(const Input::Array &in_array)
Read from input array.
Field< 3, FieldValue< 3 >::Vector > sources_conc
Field< 3, FieldValue< 3 >::Scalar > porosity
Mobile porosity.
bool flux_changed
Indicator of change in advection vector field.
static constexpr const char * name()
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
Discontinuous Galerkin method for equation of transport with dispersion.
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
virtual void value_list(const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list) const
unsigned int size() const
double solvent_density_
Density of liquid (a global constant).
Specification of transport model interface.
Field< 3, FieldValue< 3 >::Scalar > rock_density
Rock matrix density.
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 constexpr Mask equation_result
Match result fields. These are never given by input or copy of input.
static IT::Selection & get_output_selection_input_type(const string &implementation, const string &description)
static constexpr Mask in_time_term
A field is part of time term of the equation.
FieldCommon & input_default(const string &input_default)
void calculate_dispersivity_tensor(const arma::vec3 &velocity, double Dm, double alphaL, double alphaT, double porosity, double cross_cut, arma::mat33 &K)
Field< 3, FieldValue< 3 >::Vector > sorption_mult
Coefficient of linear sorption.
void init_from_input(const Input::Record &in_rec, SubstanceList &substances) override
Read necessary data from input record.
BCField< 3, FieldValue< 3 >::Vector > bc_conc
Boundary conditions (Dirichlet) for concentrations.
static constexpr Mask in_rhs
A field is part of the right hand side of the equation.
ConcentrationTransportModel()
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
SubstanceList * substances_
Pointer to list of substances (needed e.g. for access to molar masses).
Field< 3, FieldValue< 3 >::Vector > sources_sigma
Concentration sources - Robin type, in_flux = sources_sigma * (sources_conc - mobile_conc) ...
FieldCommon & description(const string &description)
Field< 3, FieldValue< 3 >::Vector > sources_density
Concentration sources - density of substance source, only positive part is used.
FieldCommon & name(const string &name)
mixed-hybrid model of linear Darcy flow, possibly unsteady.
FieldCommon & flags(FieldFlag::Flags::Mask mask)
Class for representation SI units of Fields.
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
static Input::Type::Record input_type
Input type for a substance.
UnitSI & md(int exp=-1)
Method sets value of exponent for m^{-d}, where d is dimension of region.
virtual ModelEqData & data()=0
Derived class should implement getter for ModelEqData instance.
~ConcentrationTransportModel() override