37 return Selection(
"Solute_AdvectionDiffusion_BC_Type",
"Types of boundary conditions for advection-diffusion solute transport model.")
39 "Default transport boundary condition.\n" 40 "On water inflow (($(q_w \\le 0)$)), total flux is given by the reference concentration 'bc_conc'. " 41 "On water outflow we prescribe zero diffusive flux, " 42 "i.e. the mass flows out only due to advection.")
44 "Dirichlet boundary condition (($ c = c_D $)).\n" 45 "The prescribed concentration (($c_D$)) is specified by the field 'bc_conc'.")
47 "Total mass flux boundary condition.\n" 48 "The prescribed total incoming flux can have the general form (($\\delta(f_N+\\sigma_R(c_R-c) )$)), " 49 "where the absolute flux (($f_N$)) is specified by the field 'bc_flux', " 50 "the transition parameter (($\\sigma_R$)) by 'bc_robin_sigma', " 51 "and the reference concentration (($c_R$)) by 'bc_conc'.")
52 .
add_value(bc_diffusive_flux,
"diffusive_flux",
53 "Diffusive flux boundary condition.\n" 54 "The prescribed incoming mass flux due to diffusion can have the general form (($\\delta(f_N+\\sigma_R(c_R-c) )$)), " 55 "where the absolute flux (($f_N$)) is specified by the field 'bc_flux', " 56 "the transition parameter (($\\sigma_R$)) by 'bc_robin_sigma', " 57 "and the reference concentration (($c_R$)) by 'bc_conc'.")
72 "Type of boundary condition.")
80 .
description(
"Dirichlet boundary condition (for each substance).")
86 .description(
"Flux in Neumann boundary condition.")
87 .units(
UnitSI().kg().m().s(-1).md() )
92 .
name(
"bc_robin_sigma")
93 .description(
"Conductivity coefficient in Robin boundary condition.")
94 .units(
UnitSI().m(4).s(-1).md() )
104 .
description(
"Longitudal dispersivity (for each substance).")
110 .
description(
"Transversal dispersivity (for each substance).")
116 .
description(
"Molecular diffusivity (for each substance).")
121 .
name(
"rock_density")
127 .
name(
"sorption_mult")
145 description +
" for solute transport.")
148 "Density of the solvent [ (($kg.m^(-3)$)) ].");
157 "Selection of output fields for Diffusive Solute Transport DG model.");
179 vector<double> elem_csec(point_list.size()), wc(point_list.size());
185 for (
unsigned int i=0; i<point_list.size(); i++)
186 mm_coef[i] = elem_csec[i]*wc[i];
195 por_m(point_list.size()),
196 rho_l(point_list.size()),
197 rho_s(point_list.size());
208 for (
unsigned int i=0; i<point_list.size(); i++)
217 double Dm,
double alphaL,
double alphaT,
double water_content,
double porosity,
double cross_cut,
arma::mat33 &K)
219 double vnorm = arma::norm(velocity, 2);
224 double tortuosity = pow(water_content, 7.0 / 3.0)/ (porosity * porosity);
230 if (fabs(vnorm) > 0) {
236 K = ((alphaL - alphaT) / vnorm) * arma::kron(velocity.t(), velocity);
246 K += (alphaT * vnorm + Dm*tortuosity*cross_cut*water_content)*arma::eye(3,3);
259 const unsigned int qsize = point_list.size();
260 const unsigned int n_subst = dif_coef.size();
261 std::vector<arma::vec> Dm(qsize, arma::vec(n_subst) ), alphaL(qsize, arma::vec(n_subst) ), alphaT(qsize, arma::vec(n_subst) );
271 for (
unsigned int i=0; i<qsize; i++) {
272 for (
unsigned int sbi=0; sbi<n_subst; sbi++) {
273 ad_coef[sbi][i] = velocity[i];
275 Dm[i][sbi], alphaL[i][sbi], alphaT[i][sbi], wc[i], por_m[i], csection[i],
290 arma::uvec &bc_types)
310 for (
auto f : bc_flux) f = -f;
328 const unsigned int qsize = point_list.size();
335 for (
unsigned int k=0; k<qsize; k++)
337 sources_density[k] *= csection[k];
338 sources_sigma[k] *= csection[k];
347 const unsigned int qsize = point_list.size();
352 for (
unsigned int k=0; k<qsize; k++)
353 sources_sigma[k] *= csection[k];
void get_bc_type(const ElementAccessor< 3 > &ele_acc, arma::uvec &bc_types) override
void compute_retardation_coefficient(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &ret_coef) override
SubstanceList substances_
Transported substances.
static const Input::Type::Selection & get_bc_type_selection()
void set_balance_object(std::shared_ptr< Balance > balance) override
ConcentrationTransportModel(Mesh &mesh, const Input::Record &in_rec)
MultiField< 3, FieldValue< 3 >::Scalar > output_field
FieldCommon & input_selection(Input::Type::Selection element_selection)
auto disable_where(const MultiField< spacedim, typename FieldValue< spacedim >::Enum > &control_field, const vector< FieldEnum > &value_list) -> MultiField &
static constexpr Mask in_main_matrix
A field is part of main "stiffness matrix" of the equation.
MultiField< 3, FieldValue< 3 >::Scalar > init_conc
Initial concentrations.
const std::vector< std::string > & names()
void init_from_input(const Input::Record &in_rec) override
Read necessary data from input record.
FieldCommon & flags_add(FieldFlag::Flags::Mask mask)
MultiField< 3, FieldValue< 3 >::Scalar > diff_m
Molecular diffusivity (for each substance).
void get_flux_bc_data(unsigned int index, const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< double > &bc_flux, std::vector< double > &bc_sigma, std::vector< double > &bc_ref_value) override
Return data for diffusive or total flux b.c.
MultiField< 3, FieldValue< 3 >::Scalar > sources_density
Concentration sources - density of substance source, only positive part is used.
MultiField< 3, FieldValue< 3 >::Scalar > sources_conc
bool flux_changed
Indicator of change in advection vector field.
static constexpr const char * name()
void compute_mass_matrix_coefficient(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< double > &mm_coef) override
static Input::Type::Abstract & get_input_type()
Common specification of the input record for secondary equations.
Discontinuous Galerkin method for equation of transport with dispersion.
MultiField< 3, FieldValue< 3 >::Scalar > sorption_mult
Coefficient of linear sorption.
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).
Field< 3, FieldValue< 3 >::Scalar > rock_density
Rock matrix density.
MultiField< 3, FieldValue< 3 >::Scalar > disp_t
Transversal dispersivity (for each substance).
BCMultiField< 3, FieldValue< 3 >::Enum > bc_type
Type of boundary condition (see also BC_Type)
BCMultiField< 3, FieldValue< 3 >::Scalar > bc_dirichlet_value
Prescribed concentration for Dirichlet/reference concentration for flux b.c.
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 constexpr Mask in_time_term
A field is part of time term of the equation.
FieldCommon & input_default(const string &input_default)
MultiField< 3, FieldValue< 3 >::Scalar > sources_sigma
Concentration sources - Robin type, in_flux = sources_sigma * (sources_conc - mobile_conc) ...
Field< 3, FieldValue< 3 >::Scalar > porosity
Mobile porosity - usually saturated water content in the case of unsaturated flow model...
std::shared_ptr< Balance > balance_
object for calculation and writing the mass balance to file.
static IT::Selection get_output_selection()
void calculate_dispersivity_tensor(const arma::vec3 &velocity, double Dm, double alphaL, double alphaT, double water_content, double porosity, double cross_cut, arma::mat33 &K)
static constexpr Mask in_rhs
A field is part of the right hand side of the equation.
BCMultiField< 3, FieldValue< 3 >::Scalar > bc_robin_sigma
Transition coefficient in total/diffusive flux b.c.
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
Field< 3, FieldValue< 3 >::Scalar > water_content
Water content - result of unsaturated water flow model or porosity.
const MH_DofHandler * mh_dh
FieldCommon & description(const string &description)
MultiField< 3, FieldValue< 3 >::Scalar > disp_l
Longitudal dispersivity (for each substance).
void get_flux_bc_sigma(unsigned int index, const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< double > &bc_sigma) override
Return transition coefficient for flux b.c.
virtual MultiFieldValue::return_type value(const Point &p, const ElementAccessor< spacedim > &elm) const
BCMultiField< 3, FieldValue< 3 >::Scalar > bc_flux
Flux value in total/diffusive flux b.c.
FieldCommon & name(const string &name)
vector< unsigned int > subst_idx
List of indices used to call balance methods for a set of quantities.
arma::vec::fixed< spacedim > centre() const
FieldCommon & flags(FieldFlag::Flags::Mask mask)
Field< 3, FieldValue< 3 >::Scalar > cross_section
Pointer to DarcyFlow field cross_section.
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 UnitSI & dimensionless()
Returns dimensionless unit.
virtual ModelEqData & data()=0
Derived class should implement getter for ModelEqData instance.
virtual void value_list(const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename MultiFieldValue::return_type > &value_list) const
~ConcentrationTransportModel() override