64 "Transport of soluted substances.")
70 return Record(
"Coupling_OperatorSplitting",
71 "Transport by convection and/or diffusion\n" 72 "coupled with reaction and adsorption model (ODE per element)\n" 73 " via operator splitting.")
76 "Time governor setting for the secondary equation.")
78 "Settings for computing balance.")
80 "Parameters of output stream.")
82 "Specification of transported substances.")
85 "Type of numerical method for solute transport.")
87 "Reaction model involved in transport.")
97 Input::register_class< TransportOperatorSplitting, Mesh &, const Input::Record>(
"Coupling_OperatorSplitting") +
109 ADD_FIELD(porosity,
"Mobile porosity",
"1.0");
112 .flags_add(in_main_matrix & in_rhs);
114 add_field(&water_content,
"water_content",
"INTERNAL - water content passed from unsaturated Darcy",
"")
116 .flags_add(input_copy & in_time_term & in_main_matrix & in_rhs);
121 ADD_FIELD(sources_density,
"Density of concentration sources.",
"0");
122 sources_density.units(
UnitSI().kg().m(-3).s(-1) )
125 ADD_FIELD(sources_sigma,
"Concentration flux.",
"0");
126 sources_sigma.units(
UnitSI().s(-1) )
127 .flags_add(in_main_matrix & in_rhs);
129 ADD_FIELD(sources_conc,
"Concentration sources threshold.",
"0");
130 sources_conc.units(
UnitSI().kg().m(-3) )
147 cfl_convection(numeric_limits<double>::max()),
148 cfl_reaction(numeric_limits<double>::max())
159 convection->set_time_governor(
time());
162 convection->substances().initialize(in_rec.
val<
Input::Array>(
"substances"));
176 convection->set_balance_object(
balance_);
179 convection->initialize();
186 this->
eq_data_ = &(convection->data());
188 convection->get_par_info(el_4_loc, el_distribution);
190 if ( reactions_it ) {
195 reaction->substances(convection->substances())
196 .concentration_matrix(convection->get_concentration_matrix(),
197 el_distribution, el_4_loc, convection->get_row_4_el())
198 .output_stream(convection->output_stream())
240 convection->output_stream()->write_time_frame();
259 convection->output_stream()->write_time_frame();
285 bool cfl_changed = cfl_convection_changed || cfl_reaction_changed;
287 if (steps == 1 || cfl_changed)
289 convection->time().set_upper_constraint(
cfl_convection,
"Time step constrained by transport CFL condition (including both flow and sources).");
290 convection->time().set_upper_constraint(
cfl_reaction,
"Time step constrained by reaction CFL condition.");
306 for (
unsigned int sbi=0; sbi<
convection->n_substances(); sbi++)
311 source[sbi] -= region_mass[ri];
333 for (
unsigned int sbi=0; sbi<
convection->n_substances(); sbi++)
338 source[sbi] += region_mass[ri];
341 balance_->add_cumulative_source(sbi, source[sbi]);
348 LogOut().fmt(
"CONVECTION: steps: {}\n", steps);
static const Input::Type::Record & get_input_type()
Main balance input record type.
Abstract base class for equation clasess.
#define ADD_FIELD(name,...)
void zero_time_step() override
unsigned int bulk_size() const
static const Input::Type::Record & get_input_type()
Declare input record type for the equation TransportOperatorSplittiong.
static const Input::Type::Record & get_input_type()
The specification of output stream.
static Input::Type::Abstract & get_input_type()
virtual void set_velocity_field(const MH_DofHandler &dh) override
void next_time()
Proceed to the next time according to current estimated time step.
const RegionDB & region_db() const
static const Input::Type::Record & get_input_type()
Input type for a substance.
const TimeStep & step(int index=-1) const
TransportOperatorSplitting(Mesh &init_mesh, const Input::Record in_rec)
Constructor.
static Input::Type::Abstract & get_input_type()
Common specification of the input record for secondary equations.
void initialize() override
Basic time management functionality for unsteady (and steady) solvers (class Equation).
#define LogOut()
Macro defining 'log' record of log.
Basic time management class.
void view(const char *name="") const
Class ReactionTerm is an abstract class representing reaction term in transport.
Class Dual_por_exchange implements the model of dual porosity.
static Input::Type::Abstract & get_input_type()
Common specification of the input record for secondary equations.
std::shared_ptr< ReactionTerm > reaction
static constexpr Mask input_copy
#define START_TIMER(tag)
Starts a timer with specified tag.
double cfl_convection
Time restriction due to transport.
std::shared_ptr< Balance > balance_
object for calculation and writing the mass balance to file.
FLOW123D_FORCE_LINK_IN_CHILD(transportOperatorSplitting)
Class representing dual porosity model in transport.
virtual void set_time_governor(TimeGovernor &time)
void update_solution() override
Support classes for parallel programing.
static std::shared_ptr< OutputTime > create_output_stream(const std::string &equation_name, Mesh &mesh, const Input::Record &in_rec)
This method delete all object instances of class OutputTime stored in output_streams vector...
void output_data() override
Write computed fields.
std::shared_ptr< ConcentrationTransportBase > convection
FLOW123D_FORCE_LINK_IN_PARENT(firstOrderReaction)
Vector classes to support both Iterator, index and Id access and creating co-located vectors...
static const Input::Type::Record & get_input_type()
#define END_TIMER(tag)
Ends a timer with specified tag.
double cfl_reaction
Time restriction due to reactions.
Simple sorption model without dual porosity.
Class for representation SI units of Fields.
static UnitSI & dimensionless()
Returns dimensionless unit.
This file contains classes representing sorption model. Sorption model can be computed both in case t...
virtual ~TransportOperatorSplitting()
Destructor.
static const int registrar
Registrar of class to factory.