Flow123d  jenkins-Flow123d-windows32-release-multijob-51
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
TransportOperatorSplitting Class Reference

Coupling of a transport model with a reaction model by operator splitting. More...

#include <transport_operator_splitting.hh>

Inheritance diagram for TransportOperatorSplitting:
Inheritance graph
[legend]
Collaboration diagram for TransportOperatorSplitting:
Collaboration graph
[legend]

Public Member Functions

 TransportOperatorSplitting (Mesh &init_mesh, const Input::Record &in_rec)
 Constructor. More...
 
virtual ~TransportOperatorSplitting ()
 Destructor. More...
 
virtual void set_velocity_field (const MH_DofHandler &dh) override
 
void zero_time_step () override
 
void update_solution () override
 
void compute_until_save_time ()
 
void compute_internal_step ()
 
void output_data () override
 Write computed fields. More...
 
TimeIntegrationScheme time_scheme () override
 Returns the time integration scheme of the equation. More...
 
- Public Member Functions inherited from TransportBase
 TransportBase (Mesh &mesh, const Input::Record in_rec)
 
virtual ~TransportBase ()
 
MassBalancemass_balance ()
 
unsigned int n_substances () override
 Returns number of trnasported substances. More...
 
vector< string > & substance_names () override
 Returns reference to the vector of substnace names. More...
 
virtual void set_concentration_vector (Vec &vec)
 
- Public Member Functions inherited from AdvectionProcessBase
 AdvectionProcessBase (Mesh &mesh, const Input::Record in_rec)
 
- Public Member Functions inherited from EquationBase
 EquationBase ()
 
 EquationBase (Mesh &mesh, const Input::Record in_rec)
 
virtual ~EquationBase ()
 
virtual void initialize ()
 Initialize fields. More...
 
virtual void choose_next_time ()
 
virtual void set_time_upper_constraint (double dt)
 
virtual void set_time_lower_constraint (double dt)
 
TimeGovernor const & time ()
 
virtual void set_time_governor (TimeGovernor &time)
 
double planned_time ()
 
double solved_time ()
 
Meshmesh ()
 
TimeMark::Type mark_type ()
 
FieldSetdata ()
 
virtual void get_solution_vector (double *&vector, unsigned int &size)
 
virtual void get_parallel_solution_vector (Vec &vector)
 
- Public Member Functions inherited from EquationForMassBalance
virtual ~EquationForMassBalance ()
 

Static Public Attributes

static Input::Type::Record input_type
 Declare input record type for the equation TransportOperatorSplittiong. More...
 
- Static Public Attributes inherited from TransportBase
static Input::Type::Record input_type_output_record
 
- Static Public Attributes inherited from AdvectionProcessBase
static Input::Type::AbstractRecord input_type
 Common specification of the input record for secondary equations. More...
 

Private Member Functions

void calc_fluxes (vector< vector< double > > &bcd_balance, vector< vector< double > > &bcd_plus_balance, vector< vector< double > > &bcd_minus_balance) override
 
void calc_elem_sources (vector< vector< double > > &mass, vector< vector< double > > &src_balance) override
 

Private Attributes

ConvectionTransportconvection
 
ReactionTermreaction
 
Semchem_interfaceSemchem_reactions
 

Additional Inherited Members

- Public Types inherited from EquationForMassBalance
enum  TimeIntegrationScheme { none, explicit_euler, implicit_euler, crank_nicholson }
 
- Protected Member Functions inherited from TransportBase
const RegionDBregion_db ()
 Returns the region database. More...
 
- Protected Attributes inherited from TransportBase
unsigned int n_subst_
 Number of transported substances. More...
 
std::vector< string > subst_names_
 Names of transported substances. More...
 
const MH_DofHandlermh_dh
 
MassBalancemass_balance_
 object for calculation and writing the mass balance to file. More...
 
- Protected Attributes inherited from EquationBase
bool equation_empty_
 flag is true if only default constructor was called More...
 
Meshmesh_
 
TimeGovernortime_
 
Input::Record input_record_
 
FieldSeteq_data_
 

Detailed Description

Coupling of a transport model with a reaction model by operator splitting.

Outline: Transport model is any descendant of TransportBase (even TransportOperatorSplitting itself). This should perform the transport possibly with diffusion and usually without coupling between substances and phases.

Reaction is any descendant of the ReactionBase class. This represents reactions in general way of any coupling that happens between substances and phases on one element or more generally on one DoF.

Definition at line 176 of file transport_operator_splitting.hh.

Constructor & Destructor Documentation

TransportOperatorSplitting::TransportOperatorSplitting ( Mesh init_mesh,
const Input::Record in_rec 
)

Constructor.

Definition at line 115 of file transport_operator_splitting.cc.

TransportOperatorSplitting::~TransportOperatorSplitting ( )
virtual

Destructor.

Definition at line 182 of file transport_operator_splitting.cc.

Member Function Documentation

void TransportOperatorSplitting::calc_elem_sources ( vector< vector< double > > &  mass,
vector< vector< double > > &  src_balance 
)
overrideprivatevirtual

Implements the virtual method EquationForMassBalance::calc_elem_sources().

Implements EquationForMassBalance.

Definition at line 262 of file transport_operator_splitting.cc.

void TransportOperatorSplitting::calc_fluxes ( vector< vector< double > > &  bcd_balance,
vector< vector< double > > &  bcd_plus_balance,
vector< vector< double > > &  bcd_minus_balance 
)
overrideprivatevirtual

Implements the virtual method EquationForMassBalance::calc_fluxes().

Implements EquationForMassBalance.

Definition at line 259 of file transport_operator_splitting.cc.

void TransportOperatorSplitting::compute_internal_step ( )
void TransportOperatorSplitting::compute_until_save_time ( )
void TransportOperatorSplitting::output_data ( void  )
overridevirtual

Write computed fields.

Reimplemented from EquationBase.

Definition at line 194 of file transport_operator_splitting.cc.

Here is the caller graph for this function:

void TransportOperatorSplitting::set_velocity_field ( const MH_DofHandler dh)
overridevirtual

This method takes sequential PETSc vector of side velocities and update transport matrix. The ordering is same as ordering of sides in the mesh. We just keep the pointer, but do not destroy the object.

TODO: We should pass whole velocity field object (description of base functions and dof numbering) and vector.

Reimplemented from TransportBase.

Definition at line 252 of file transport_operator_splitting.cc.

TimeIntegrationScheme TransportOperatorSplitting::time_scheme ( )
inlineoverridevirtual

Returns the time integration scheme of the equation.

Implements EquationForMassBalance.

Definition at line 203 of file transport_operator_splitting.hh.

void TransportOperatorSplitting::update_solution ( void  )
overridevirtual

Calculation of the next time step and its output.

Reimplemented from EquationBase.

Definition at line 218 of file transport_operator_splitting.cc.

void TransportOperatorSplitting::zero_time_step ( )
overridevirtual

Initialization of the solution in the zero time. There is lot of things that can not be done in the constructor since we have not fully initialized fields yet. Fields coming from coupling has to be set after the constructor and before zero_time_step.

Reimplemented from EquationBase.

Definition at line 207 of file transport_operator_splitting.cc.

Member Data Documentation

ConvectionTransport* TransportOperatorSplitting::convection
private

Definition at line 216 of file transport_operator_splitting.hh.

Record TransportOperatorSplitting::input_type
static
Initial value:
= Record("TransportOperatorSplitting",
"Explicit FVM transport (no diffusion)\n"
"coupled with reaction and adsorption model (ODE per element)\n"
" via operator splitting.")
.declare_key("substances", Array(String()), Default::obligatory(),
"Names of transported substances.")
.declare_key("reaction_term", ReactionTerm::input_type, Default::optional(),
"Reaction model involved in transport.")
.declare_key("input_fields", Array(
ConvectionTransport::EqData().make_field_descriptor_type("TransportOperatorSplitting")
.declare_key(OldBcdInput::transport_old_bcd_file_key(), IT::FileName::input(), "File with mesh dependent boundary conditions (obsolete).")
.declare_key("output_fields", Array(ConvectionTransport::EqData::output_selection),
Default("conc"),
"List of fields to write to output file.")

Declare input record type for the equation TransportOperatorSplittiong.

TODO: The question is if this should be a general coupling class (e.g. allow coupling TranportDG with reactions even if it is not good idea for numerical reasons.) To make this a coupling class we should modify all main input files for transport problems.

Definition at line 186 of file transport_operator_splitting.hh.

ReactionTerm* TransportOperatorSplitting::reaction
private

Definition at line 217 of file transport_operator_splitting.hh.

Semchem_interface* TransportOperatorSplitting::Semchem_reactions
private

Definition at line 219 of file transport_operator_splitting.hh.


The documentation for this class was generated from the following files: