Flow123d
release_3.0.0-968-gc87a28e79
|
Go to the documentation of this file.
38 return Selection(
"Solute_AdvectionDiffusion_BC_Type",
"Types of boundary conditions for advection-diffusion solute transport model.")
40 "Default transport boundary condition.\n"
41 "On water inflow (($(q_w \\le 0)$)), total flux is given by the reference concentration 'bc_conc'. "
42 "On water outflow we prescribe zero diffusive flux, "
43 "i.e. the mass flows out only due to advection.")
45 "Dirichlet boundary condition (($ c = c_D $)).\n"
46 "The prescribed concentration (($c_D$)) is specified by the field 'bc_conc'.")
48 "Total mass flux boundary condition.\n"
49 "The prescribed total incoming flux can have the general form (($\\delta(f_N+\\sigma_R(c_R-c) )$)), "
50 "where the absolute flux (($f_N$)) is specified by the field 'bc_flux', "
51 "the transition parameter (($\\sigma_R$)) by 'bc_robin_sigma', "
52 "and the reference concentration (($c_R$)) by 'bc_conc'.")
53 .
add_value(bc_diffusive_flux,
"diffusive_flux",
54 "Diffusive flux boundary condition.\n"
55 "The prescribed incoming mass flux due to diffusion can have the general form (($\\delta(f_N+\\sigma_R(c_R-c) )$)), "
56 "where the absolute flux (($f_N$)) is specified by the field 'bc_flux', "
57 "the transition parameter (($\\sigma_R$)) by 'bc_robin_sigma', "
58 "and the reference concentration (($c_R$)) by 'bc_conc'.")
73 "Type of boundary condition.")
81 .
description(
"Dirichlet boundary condition (for each substance).")
87 .description(
"Flux in Neumann boundary condition.")
88 .units(
UnitSI().kg().m().s(-1).md() )
93 .
name(
"bc_robin_sigma")
94 .description(
"Conductivity coefficient in Robin boundary condition.")
95 .units(
UnitSI().m(4).s(-1).md() )
101 .
description(
"Initial values for concentration of substances.")
105 .
description(
"Longitudinal dispersivity in the liquid (for each substance).")
111 .
description(
"Transverse dispersivity in the liquid (for each substance).")
117 .
description(
"Molecular diffusivity in the liquid (for each substance).")
122 .
name(
"rock_density")
128 .
name(
"sorption_coefficient")
147 description +
" for solute transport.")
150 "Density of the solvent [ (($kg.m^{-3}$)) ].");
159 "Selection of output fields for Diffusive Solute Transport DG model.");
181 vector<double> elem_csec(point_list.size()), wc(point_list.size());
187 for (
unsigned int i=0; i<point_list.size(); i++)
188 mm_coef[i] = elem_csec[i]*wc[i];
197 por_m(point_list.size()),
198 rho_l(point_list.size()),
199 rho_s(point_list.size()),
200 sorp_mult(point_list.size());
210 for (
unsigned int i=0; i<point_list.size(); i++)
212 ret_coef[sbi][i] = (1.-por_m[i])*rho_s[i]*sorp_mult[i]*elem_csec[i];
219 const arma::mat33 &Dm,
double alphaL,
double alphaT,
double water_content,
double porosity,
double cross_cut,
arma::mat33 &K)
221 double vnorm = arma::norm(velocity, 2);
226 double tortuosity = pow(water_content, 7.0 / 3.0)/ (porosity * porosity);
232 if (fabs(vnorm) > 0) {
238 K = ((alphaL - alphaT) / vnorm) * arma::kron(velocity.t(), velocity);
248 K += alphaT*vnorm*arma::eye(3,3) + Dm*(tortuosity*cross_cut*water_content);
261 const unsigned int qsize = point_list.size();
262 const unsigned int n_subst = dif_coef.size();
264 std::vector<double> alphaL(qsize), alphaT(qsize), por_m(qsize), csection(qsize), wc(qsize);
270 for (
unsigned int sbi=0; sbi<n_subst; sbi++)
272 data().
diff_m[sbi].value_list(point_list, ele_acc, Dm);
273 data().
disp_l[sbi].value_list(point_list, ele_acc, alphaL);
274 data().
disp_t[sbi].value_list(point_list, ele_acc, alphaT);
275 for (
unsigned int i=0; i<qsize; i++)
277 ad_coef[sbi][i] = velocity[i];
279 Dm[i], alphaL[i], alphaT[i], wc[i], por_m[i], csection[i],
291 data().
init_conc[sbi].value_list(point_list, ele_acc, init_values[sbi]);
295 arma::uvec &bc_types)
312 data().
bc_flux[index].value_list(point_list, ele_acc, bc_flux);
317 for (
auto f : bc_flux) f = -f;
335 const unsigned int qsize = point_list.size();
340 data().
sources_conc[sbi].value_list(point_list, ele_acc, sources_value[sbi]);
344 for (
unsigned int k=0; k<qsize; k++)
346 sources_density[sbi][k] *= csection[k];
347 sources_sigma[sbi][k] *= csection[k];
357 const unsigned int qsize = point_list.size();
364 for (
unsigned int k=0; k<qsize; k++)
365 sources_sigma[sbi][k] *= csection[k];
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
BCMultiField< 3, FieldValue< 3 >::Enum > bc_type
Type of boundary condition (see also BC_Type)
MultiField< 3, FieldValue< 3 >::Scalar > sources_sigma
Concentration sources - Robin type, in_flux = sources_sigma * (sources_conc - mobile_conc)
static IT::Selection get_output_selection()
static constexpr Mask in_rhs
A field is part of the right hand side of the equation.
unsigned int n_substances() override
Returns number of transported substances.
void calculate_dispersivity_tensor(const arma::vec3 &velocity, const arma::mat33 &Dm, double alphaL, double alphaT, double water_content, double porosity, double cross_cut, arma::mat33 &K)
static UnitSI & dimensionless()
Returns dimensionless unit.
void set_balance_object(std::shared_ptr< Balance > balance) override
MultiField< 3, FieldValue< 3 >::Scalar > sources_density
Concentration sources - density of substance source, only positive part is used.
void compute_init_cond(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &init_values) override
auto disable_where(const MultiField< spacedim, typename FieldValue< spacedim >::Enum > &control_field, const vector< FieldEnum > &value_list) -> MultiField &
unsigned int size() const
MultiField< 3, FieldValue< 3 >::Scalar > sources_conc
BCMultiField< 3, FieldValue< 3 >::Scalar > bc_robin_sigma
Transition coefficient in total/diffusive flux b.c.
virtual void value_list(const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list) const
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
MultiField< 3, FieldValue< 3 >::TensorFixed > diff_m
Molecular diffusivity (for each substance).
void init_from_input(const Input::Record &in_rec) override
Read necessary data from input record.
void compute_sources_sigma(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &sources_sigma) override
void compute_source_coefficients(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &sources_conc, std::vector< std::vector< double > > &sources_density, std::vector< std::vector< double > > &sources_sigma) override
Field< 3, FieldValue< 3 >::Scalar > rock_density
Rock matrix density.
SubstanceList substances_
Transported substances.
FieldCommon & flags(FieldFlag::Flags::Mask mask)
const MH_DofHandler * mh_dh
void compute_retardation_coefficient(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &ret_coef) override
MultiField< 3, FieldValue< 3 >::Scalar > disp_t
Transversal dispersivity (for each substance).
Field< 3, FieldValue< 3 >::Scalar > porosity
Mobile porosity - usually saturated water content in the case of unsaturated flow model.
BCMultiField< 3, FieldValue< 3 >::Scalar > bc_dirichlet_value
Prescribed concentration for Dirichlet/reference concentration for flux b.c.
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.
FieldCommon & flags_add(FieldFlag::Flags::Mask mask)
const std::vector< std::string > & names()
std::shared_ptr< Balance > balance_
object for calculation and writing the mass balance to file.
~ConcentrationTransportModel() override
static constexpr Mask equation_result
Match result fields. These are never given by input or copy of input.
MultiField< 3, FieldValue< 3 >::Scalar > output_field
static const Input::Type::Selection & get_bc_type_selection()
Class for representation SI units of Fields.
Field< 3, FieldValue< 3 >::Scalar > cross_section
Pointer to DarcyFlow field cross_section.
virtual ModelEqData & data()=0
Derived class should implement getter for ModelEqData instance.
MultiField< 3, FieldValue< 3 >::Scalar > sorption_coefficient
Coefficient of linear sorption.
bool flux_changed
Indicator of change in advection vector field.
static constexpr Mask in_main_matrix
A field is part of main "stiffness matrix" of the equation.
BCMultiField< 3, FieldValue< 3 >::Scalar > bc_flux
Flux value in total/diffusive flux b.c.
FieldCommon & input_default(const string &input_default)
double solvent_density_
Density of liquid (a global constant).
Field< 3, FieldValue< 3 >::Scalar > water_content
Water content - result of unsaturated water flow model or porosity.
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.
ConcentrationTransportModel(Mesh &mesh, const Input::Record &in_rec)
void compute_mass_matrix_coefficient(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< double > &mm_coef) override
static constexpr const char * name()
Discontinuous Galerkin method for equation of transport with dispersion.
static Input::Type::Abstract & get_input_type()
Common specification of the input record for secondary equations.
void get_bc_type(const ElementAccessor< 3 > &ele_acc, arma::uvec &bc_types) override
MultiField< 3, FieldValue< 3 >::Scalar > disp_l
Longitudal dispersivity (for each substance).
FieldCommon & input_selection(Input::Type::Selection element_selection)
FieldCommon & description(const string &description)
static constexpr Mask in_time_term
A field is part of time term of the equation.
vector< unsigned int > subst_idx
List of indices used to call balance methods for a set of quantities.
FieldCommon & name(const string &name)
arma::vec::fixed< spacedim > centre() const
Computes the barycenter.
MultiField< 3, FieldValue< 3 >::Scalar > init_conc
Initial concentrations.