38 using namespace Input::Type;
41 =
AbstractRecord(
"Transport",
"Secondary equation for transport of substances.")
43 "Time governor setting for the secondary equation.")
45 "Settings for computing balance.")
47 "Parameters of output stream.");
51 =
Record(
"TransportOutput",
"Output setting for transport equations.")
53 "Parameters of output stream.");
57 =
Record(
"TransportOperatorSplitting",
58 "Explicit FVM transport (no diffusion)\n"
59 "coupled with reaction and adsorption model (ODE per element)\n"
60 " via operator splitting.")
63 "Specification of transported substances.")
66 "Reaction model involved in transport.")
74 "List of fields to write to output file.");
85 ADD_FIELD(porosity,
"Mobile porosity",
"1");
91 ADD_FIELD(sources_density,
"Density of concentration sources.",
"0");
92 sources_density.units(
UnitSI().kg().m(-3).s(-1) )
95 ADD_FIELD(sources_sigma,
"Concentration flux.",
"0");
96 sources_sigma.units(
UnitSI().s(-1) )
97 .flags_add(in_main_matrix & in_rhs);
99 ADD_FIELD(sources_conc,
"Concentration sources threshold.",
"0");
100 sources_conc.units(
UnitSI().kg().m(-3) )
127 Semchem_reactions(NULL)
146 if ( reactions_it ) {
166 THROW( ReactionTerm::ExcWrongDescendantModel()
167 << ReactionTerm::EI_Model((*reactions_it).type().type_name())
168 << EI_Message(
"This model is not currently supported!")
169 << (*reactions_it).ei_address());
174 << EI_Message(
"Descending model type selection failed (SHOULD NEVER HAPPEN).")
175 << (*reactions_it).ei_address());
202 if (it->val<
bool>(
"balance_on"))
206 balance_ = boost::make_shared<Balance>(
"mass",
mesh_, el_distribution, el_4_loc, *it);
210 balance_->allocate(el_distribution->lsize(), 1);
294 source[sbi] -= region_mass[ri];
314 source[sbi] += region_mass[ri];
317 balance_->add_cumulative_source(sbi, source[sbi]);
virtual void zero_time_step()
Abstract base class for equation clasess.
void update_solution() override
static Input::Type::AbstractRecord input_type
Common specification of the input record for secondary equations.
virtual void output_data(void)
Output method.
void zero_time_step() override
static Input::Type::Record input_type
The specification of output stream.
bool lt(double other_time) const
Field< 3, FieldValue< 3 >::Scalar > cross_section
Pointer to DarcyFlow field cross_section.
unsigned int bulk_size() const
virtual void initialize()
Initialize fields.
void set_balance_object(boost::shared_ptr< Balance > balance)
MultiField< 3, FieldValue< 3 >::Scalar > conc_mobile
Calculated concentrations in the mobile zone.
virtual void set_velocity_field(const MH_DofHandler &dh) override
static Input::Type::Record input_type
Main balance input record type.
void next_time()
Proceed to the next time according to current estimated time step.
Vec * get_concentration_vector()
TimeMark::Type type_output()
void initialize(const Input::Array &in_array)
Read from input array.
void update_solution(void)
const MH_DofHandler * mh_dh
bool is_current(const TimeMark::Type &mask) const
Field< 3, FieldValue< 3 >::Scalar > porosity
Mobile porosity.
const RegionDB & region_db() const
static Input::Type::Record input_type
Input record for class FirstOrderReaction.
void calculate_instant_balance()
const TimeStep & step(int index=-1) const
virtual void set_velocity_field(const MH_DofHandler &dh) override
void get_par_info(int *&el_4_loc, Distribution *&el_ds)
#define ADD_FIELD(name,...)
I/O functions with filename storing, able to track current line in opened file. All standard stdio fu...
Basic time management functionality for unsteady (and steady) solvers (class Equation).
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
void zero_time_step() override
unsigned int size() const
static TimeMarks & marks()
Basic time management class.
Specification of transport model interface.
double estimate_dt() const
Estimate choice of next time step according to actual setting of constraints.
OutputTime * output_stream_
void view(const char *name="") const
static Input::Type::AbstractRecord input_type
static Input::Type::Record input_type
static constexpr Mask input_copy
A field that is input of its equation and can not read from input, thus must be set by copy...
Class implements the radioactive decay chain.
#define START_TIMER(tag)
Starts a timer with specified tag.
void set_field(const std::string &dest_field_name, FieldCommon &source)
boost::shared_ptr< Balance > balance_
(new) object for calculation and writing the mass balance to file.
ConvectionTransport * convection
static Input::Type::Record input_type
unsigned int n_subst_
Number of transported substances.
static Input::Type::Record input_type
static Input::Type::Record input_type_output_record
Class representing dual porosity model in transport.
virtual void set_time_governor(TimeGovernor &time)
void update_solution() override
Support classes for parallel programing.
void output_data() override
Write computed fields.
virtual void update_solution()
static Input::Type::Record input_type
static Input::Type::Selection output_selection
SubstanceList substances_
Transported substances.
Semchem_interface * Semchem_reactions
TimeGovernor const & time()
Vector classes to support both Iterator, index and Id access and creating co-located vectors...
virtual void output_data() override
Write computed fields.
void set_target_time(double target_time)
void calculate_cumulative_balance()
OutputTime * output_stream()
#define END_TIMER(tag)
Ends a timer with specified tag.
TimeMark::Type mark_type()
static Input::Type::Record input_type
Input record for class RadioactiveDecay.
const vector< unsigned int > & get_subst_idx()
TransportBase(Mesh &mesh, const Input::Record in_rec)
unsigned int n_substances() override
Returns number of trnasported substances.
Simple sorption model without dual porosity.
Class implements the linear reactions.
static Input::Type::Record input_type
Declare input record type for the equation TransportOperatorSplittiong.
double ** get_concentration_matrix()
Class for representation SI units of Fields.
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.
static UnitSI & dimensionless()
Returns dimensionless unit.
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
ReactionTerm & concentration_matrix(double **concentration, Distribution *conc_distr, int *el_4_loc, int *row_4_el)
ReactionTerm & substances(SubstanceList &substances)
Sets the names of substances considered in transport.
TransportOperatorSplitting(Mesh &init_mesh, const Input::Record &in_rec)
Constructor.
virtual ~TransportOperatorSplitting()
Destructor.