18 #ifndef ASSEMBLY_REACTION_HH_
19 #define ASSEMBLY_REACTION_HH_
33 template <
unsigned int dim>
40 static constexpr
const char *
name() {
return "InitConditionAssemblyDp"; }
62 ASSERT_EQ(cell.
dim(), dim).error(
"Dimension of element mismatch!");
65 auto p = *( this->
bulk_points(element_patch_idx).begin() );
85 template <
template<
IntDim...>
class DimAssembly>
89 template <
unsigned int dim>
96 static constexpr
const char *
name() {
return "InitConditionAssemblyDp"; }
120 ASSERT_EQ(cell.
dim(), dim).error(
"Dimension of element mismatch!");
122 auto p = *( this->
bulk_points(element_patch_idx).begin() );
197 template <
template<
IntDim...>
class DimAssembly>
201 template <
unsigned int dim>
208 static constexpr
const char *
name() {
return "InitConditionAssemblySorp"; }
230 ASSERT_EQ(cell.
dim(), dim).error(
"Dimension of element mismatch!");
233 auto p = *( this->
bulk_points(element_patch_idx).begin() );
253 template <
template<
IntDim...>
class DimAssembly>
257 template <
unsigned int dim>
264 static constexpr
const char *
name() {
return "ReactionAssemblySorp"; }
291 ASSERT_EQ(cell.
dim(), dim).error(
"Dimension of element mismatch!");
293 unsigned int i_subst, subst_id;
294 auto p = *( this->
bulk_points(element_patch_idx).begin() );
312 if( no_sorbing_surface_cond <= std::numeric_limits<double>::epsilon())
315 scale_aqua, scale_sorbed,
318 if ( scale_sorbed <= 0.0)
319 THROW( SorptionBase::ExcNotPositiveScaling() << SorptionBase::EI_Subst(i_subst) );
323 scale_aqua, scale_sorbed,
331 isotherm.
compute(c_aqua, c_sorbed);
355 template <
template<
IntDim...>
class DimAssembly>
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
Range< BulkPoint > bulk_points(unsigned int element_patch_idx) const
Return BulkPoint range of appropriate dimension.
int active_integrals_
Holds mask of active integrals.
ElementCacheMap * element_cache_map_
ElementCacheMap shared with GenericAssembly object.
Cell accessor allow iterate over DOF handler cells.
LocDofVec get_loc_dof_indices() const
Returns the local indices of dofs associated to the cell on the local process.
unsigned int dim() const
Return dimension of element appropriate to cell.
ElementAccessor< 3 > elm() const
Return ElementAccessor to element of loc_ele_idx_.
TimeGovernor * time_
TimeGovernor object shared with assembly classes.
double scheme_tolerance_
Dual porosity computational scheme tolerance.
FieldFEScalarVec conc_immobile_fe
Underlaying FieldFE for each substance of conc_immobile.
MultiField< 3, FieldValue< 3 >::Scalar > init_conc_immobile
Initial concentrations in the immobile zone.
MultiField< 3, FieldValue< 3 >::Scalar > diffusion_rate_immobile
Mass transfer coefficients between mobile and immobile pores.
Field< 3, FieldValue< 3 >::Scalar > porosity_immobile
Immobile porosity field.
Field< 3, FieldValue< 3 >::Scalar > porosity
Porosity field.
Directing class of FieldValueCache.
Container for various descendants of FieldCommonBase.
Generic class of assemblation.
FieldSet used_fields_
Sub field set contains fields used in calculation.
static constexpr const char * name()
void initialize(ElementCacheMap *element_cache_map)
Initialize auxiliary vectors and other data members.
InitConditionAssemblyDp(EqFields *eq_fields, EqData *eq_data)
Constructor.
DualPorosity::EqFields EqFields
IntIdx dof_p0_
Index of local DOF.
void cell_integral(DHCellAccessor cell, unsigned int element_patch_idx)
Assemble integral over element.
DualPorosity::EqData EqData
~InitConditionAssemblyDp()
Destructor.
EqFields * eq_fields_
Data objects shared with Elasticity.
SorptionBase::EqData EqData
IntIdx dof_p0_
Index of local DOF.
static constexpr const char * name()
EqFields * eq_fields_
Data objects shared with Elasticity.
InitConditionAssemblySorp(EqFields *eq_fields, EqData *eq_data)
Constructor.
FieldSet used_fields_
Sub field set contains fields used in calculation.
void initialize(ElementCacheMap *element_cache_map)
Initialize auxiliary vectors and other data members.
~InitConditionAssemblySorp()
Destructor.
SorptionBase::EqFields EqFields
void cell_integral(DHCellAccessor cell, unsigned int element_patch_idx)
Assemble integral over element.
void compute(double &c_aqua, double &c_sorbed)
SorptionType
Type of adsorption isotherm.
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)
double conc_max_
difference between concentration and average concentration
double conc_immob_
new mobile and immobile concentration
DualPorosity::EqData EqData
double por_immob_
mobile and immobile porosity
unsigned int sbi_
Index of substance.
ReactionAssemblyDp(EqFields *eq_fields, EqData *eq_data)
Constructor.
DualPorosity::EqFields EqFields
EqFields * eq_fields_
Data objects shared with Elasticity.
static constexpr const char * name()
double previous_conc_immob_
mobile and immobile concentration in previous time step
void cell_integral(DHCellAccessor cell, unsigned int element_patch_idx)
Assemble integral over element.
double temp_
Precomputed values.
double previous_conc_mob_
IntIdx dof_p0_
Index of local DOF.
double conc_average_
weighted (by porosity) average of concentration
FieldSet used_fields_
Sub field set contains fields used in calculation.
~ReactionAssemblyDp()
Destructor.
void initialize(ElementCacheMap *element_cache_map)
Initialize auxiliary vectors and other data members.
int reg_idx_
Bulk region idx.
EqFields * eq_fields_
Data objects shared with Elasticity.
SorptionBase::EqData EqData
void cell_integral(DHCellAccessor cell, unsigned int element_patch_idx)
Assemble integral over element.
IntIdx dof_p0_
Index of local DOF.
FieldSet used_fields_
Sub field set contains fields used in calculation.
~ReactionAssemblySorp()
Destructor.
ReactionAssemblySorp(EqFields *eq_fields, EqData *eq_data)
Constructor.
void initialize(ElementCacheMap *element_cache_map)
Initialize auxiliary vectors and other data members.
static constexpr const char * name()
SorptionBase::EqFields EqFields
SubstanceList substances_
FieldFEScalarVec conc_mobile_fe
FieldFEs representing P0 interpolation of mobile concentration (passed from transport).
unsigned int bulk_idx() const
Returns index of the region in the bulk set.
std::vector< unsigned int > substance_global_idx_
Mapping from local indexing of substances to global.
std::vector< double > table_limit_
unsigned int n_substances_
number of substances that take part in the sorption mode
std::vector< std::vector< double > > max_conc
std::vector< std::vector< Isotherm > > isotherms
std::vector< double > solubility_vec_
MultiField< 3, FieldValue< 3 >::Scalar > init_conc_solid
Initial sorbed concentrations.
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 > scale_sorbed
FieldFEScalarVec conc_solid_fe
Underlaying FieldFE for each substance of conc_solid.
MultiField< 3, FieldValue< 3 >::Enum > sorption_type
Discrete need Selection for initialization.
Field< 3, FieldValue< 3 >::Scalar > scale_aqua
Instances of FieldModel used in assembly methods.
Field< 3, FieldValue< 3 >::Scalar > no_sorbing_surface_cond
MultiField< 3, FieldValue< 3 >::Scalar > distribution_coefficient
Multiplication coefficients (k, omega) for all types of isotherms.
unsigned int size() const
Class Dual_por_exchange implements the model of dual porosity.
Definitions of basic Lagrangean finite elements with polynomial shape functions.
Class FEValues calculates finite element data on the actual cells such as shape function values,...
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
unsigned int IntDim
A dimension index type.
Definitions of particular quadrature rules on simplices.