Flow123d  JS_before_hm-919-g5f1bbbf
Classes | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
HeatTransferModel Class Referenceabstract

#include <heat_model.hh>

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

Classes

class  ModelEqData
 

Public Types

typedef AdvectionProcessBase FactoryBaseType
 
- Public Types inherited from AdvectionDiffusionModel
enum  Abstract_bc_types { abc_inflow, abc_dirichlet, abc_total_flux, abc_diffusive_flux }
 

Public Member Functions

 HeatTransferModel (Mesh &mesh, const Input::Record in_rec)
 
void init_from_input (const Input::Record &) override
 Read necessary data from input record. More...
 
void compute_mass_matrix_coefficient (const Armor::array &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< double > &mm_coef) override
 
void compute_retardation_coefficient (const Armor::array &, const ElementAccessor< 3 > &, std::vector< std::vector< double > > &) override
 
void compute_advection_diffusion_coefficients (const Armor::array &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
 
void compute_init_cond (const Armor::array &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &init_values) override
 
void get_bc_type (const ElementAccessor< 3 > &ele_acc, arma::uvec &bc_types) override
 
void get_flux_bc_data (unsigned int index, const Armor::array &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. More...
 
void get_flux_bc_sigma (unsigned int index, const Armor::array &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< double > &bc_sigma) override
 Return transition coefficient for flux b.c. More...
 
void compute_source_coefficients (const Armor::array &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
 
void compute_sources_sigma (const Armor::array &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &sources_sigma) override
 
 ~HeatTransferModel () override
 
void set_velocity_field (std::shared_ptr< FieldFE< 3, FieldValue< 3 >::VectorFixed >> flux_field) override
 Updates the velocity field which determines some coefficients of the transport equation. More...
 
unsigned int n_substances ()
 Returns number of transported substances. More...
 
SubstanceListsubstances ()
 Returns reference to the vector of substance names. More...
 
const vector< unsigned int > & get_subst_idx ()
 
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::VectorFixed > > velocity_field_ptr () const
 
- Public Member Functions inherited from AdvectionDiffusionModel
virtual ~AdvectionDiffusionModel ()
 Destructor. More...
 
- 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 void initialize ()
 
virtual void zero_time_step ()
 
virtual ~EquationBase ()
 
virtual void update_solution ()
 
virtual void choose_next_time ()
 
virtual void set_time_upper_constraint (double dt, std::string message)
 
virtual void set_time_lower_constraint (double dt, std::string message)
 
TimeGovernortime ()
 
virtual void set_time_governor (TimeGovernor &time)
 
double planned_time ()
 
double solved_time ()
 
Meshmesh ()
 
std::shared_ptr< Balancebalance () const
 
TimeMark::Type mark_type ()
 
FieldSetdata ()
 

Protected Member Functions

virtual ModelEqDatadata ()=0
 Derived class should implement getter for ModelEqData instance. More...
 
void output_data () override
 Write computed fields. More...
 
std::shared_ptr< OutputTime > & output_stream ()
 
virtual void calculate_cumulative_balance ()=0
 

Static Protected Member Functions

static IT::Record get_input_type (const string &implementation, const string &description)
 

Protected Attributes

bool flux_changed
 Indicator of change in advection vector field. More...
 
SubstanceList substances_
 Transported substances. More...
 
vector< unsigned int > subst_idx
 List of indices used to call balance methods for a set of quantities. More...
 
std::shared_ptr< OutputTimeoutput_stream_
 
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::VectorFixed > > velocity_field_ptr_
 Pointer to velocity field given from Flow equation. 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_
 
std::shared_ptr< Balancebalance_
 object for calculation and writing the mass balance to file. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from AdvectionProcessBase
static Input::Type::Abstractget_input_type ()
 Common specification of the input record for secondary equations. More...
 
- Static Public Member Functions inherited from EquationBase
static Input::Type::Recordrecord_template ()
 Template Record with common keys for derived equations. More...
 

Detailed Description

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.

Definition at line 96 of file heat_model.hh.

Member Typedef Documentation

Definition at line 171 of file heat_model.hh.

Constructor & Destructor Documentation

HeatTransferModel::HeatTransferModel ( Mesh mesh,
const Input::Record  in_rec 
)

Definition at line 250 of file heat_model.cc.

HeatTransferModel::~HeatTransferModel ( )
override

Definition at line 440 of file heat_model.cc.

Member Function Documentation

virtual void HeatTransferModel::calculate_cumulative_balance ( )
protectedpure virtual
void HeatTransferModel::compute_advection_diffusion_coefficients ( const Armor::array 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 
)
overridevirtual

Compute coefficients of stiffness matrix.

Parameters
point_listPoints at which to evaluate.
velocityVelocity field (input). Temporary solution before we can pass data from other equations.
ele_accElement accessor.
ad_coefCoefficients of advection (output).
dif_coefCoefficients of diffusion (output).

Implements AdvectionDiffusionModel.

Definition at line 298 of file heat_model.cc.

void HeatTransferModel::compute_init_cond ( const Armor::array point_list,
const ElementAccessor< 3 > &  ele_acc,
std::vector< std::vector< double > > &  init_values 
)
overridevirtual

Compute initial conditions.

Parameters
point_listPoints at which to evaluate.
ele_accElement accessor.
init_valuesVector of intial values (output).

Implements AdvectionDiffusionModel.

Definition at line 338 of file heat_model.cc.

void HeatTransferModel::compute_mass_matrix_coefficient ( const Armor::array point_list,
const ElementAccessor< 3 > &  ele_acc,
std::vector< double > &  mm_coef 
)
overridevirtual

Compute coefficients of mass matrix.

Parameters
point_listPoints at which to evaluate.
ele_accElement accessor.
mm_coefCoefficient vector (output).

Implements AdvectionDiffusionModel.

Definition at line 275 of file heat_model.cc.

void HeatTransferModel::compute_retardation_coefficient ( const Armor::array point_list,
const ElementAccessor< 3 > &  ele_acc,
std::vector< std::vector< double > > &  ret_coef 
)
inlineoverridevirtual

Compute retardation coefficients due to sorption.

Parameters
point_listPoints at which to evaluate.
ele_accElement accessor.
ret_coefCoefficient vector (output).

Implements AdvectionDiffusionModel.

Definition at line 182 of file heat_model.hh.

void HeatTransferModel::compute_source_coefficients ( const Armor::array 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 
)
overridevirtual

Compute coefficients of volume sources.

Parameters
point_listPoints at which to evaluate.
ele_accElement accessor.
sources_concSource concentrations (output).
sources_densitySource densities (output).
sources_sigmaSource sigmas (output).

Implements AdvectionDiffusionModel.

Definition at line 379 of file heat_model.cc.

void HeatTransferModel::compute_sources_sigma ( const Armor::array point_list,
const ElementAccessor< 3 > &  ele_acc,
std::vector< std::vector< double > > &  sources_sigma 
)
overridevirtual

Compute coefficients of volume sources.

Parameters
point_listPoints at which to evaluate.
ele_accElement accessor.
sources_sigmaSource sigmas (output).

Implements AdvectionDiffusionModel.

Definition at line 417 of file heat_model.cc.

virtual ModelEqData& HeatTransferModel::data ( )
protectedpure virtual

Derived class should implement getter for ModelEqData instance.

Here is the caller graph for this function:

void HeatTransferModel::get_bc_type ( const ElementAccessor< 3 > &  ele_acc,
arma::uvec &  bc_types 
)
overridevirtual

Return types of boundary conditions for each solution component.

Parameters
ele_accElement accessor.
bc_typesVector of bc. types (output, see BC_Type)

Implements AdvectionDiffusionModel.

Definition at line 346 of file heat_model.cc.

void HeatTransferModel::get_flux_bc_data ( unsigned int  index,
const Armor::array point_list,
const ElementAccessor< 3 > &  ele_acc,
std::vector< double > &  bc_flux,
std::vector< double > &  bc_sigma,
std::vector< double > &  bc_ref_value 
)
overridevirtual

Return data for diffusive or total flux b.c.

The flux can in general take the form

cross_section*(flux + sigma*(solution - ref_value))

Parameters
indexComponent index.
point_listPoints at which to evaluate.
ele_accElement accessor.
bc_fluxNeumann flux (output).
bc_sigmaTransition parameter (output).
bc_ref_valueReference value (output).

Implements AdvectionDiffusionModel.

Definition at line 355 of file heat_model.cc.

void HeatTransferModel::get_flux_bc_sigma ( unsigned int  index,
const Armor::array point_list,
const ElementAccessor< 3 > &  ele_acc,
std::vector< double > &  bc_sigma 
)
overridevirtual

Return transition coefficient for flux b.c.

In assembly of system matrix one does not teed all data for total/diffusive flux b.c. This method therefore returns only the sigma coefficient.

Parameters
indexComponent index.
point_listPoints at which to evaluate.
ele_accElement accessor.
bc_sigmaTransition parameter (output).

Implements AdvectionDiffusionModel.

Definition at line 370 of file heat_model.cc.

IT::Record HeatTransferModel::get_input_type ( const string &  implementation,
const string &  description 
)
staticprotected

Create input type that can be passed to the derived class.

Parameters
implementationString characterizing the numerical method, e.g. DG, FEM, FVM.
descriptionComment used to describe the record key.
Returns

Definition at line 226 of file heat_model.cc.

const vector<unsigned int>& HeatTransferModel::get_subst_idx ( )
inline

Definition at line 244 of file heat_model.hh.

void HeatTransferModel::init_from_input ( const Input::Record in_rec)
inlineoverridevirtual

Read necessary data from input record.

Implements AdvectionDiffusionModel.

Definition at line 176 of file heat_model.hh.

unsigned int HeatTransferModel::n_substances ( )
inline

Returns number of transported substances.

Definition at line 237 of file heat_model.hh.

void HeatTransferModel::output_data ( void  )
overrideprotectedvirtual

Write computed fields.

Reimplemented from EquationBase.

Definition at line 269 of file heat_model.cc.

std::shared_ptr<OutputTime>& HeatTransferModel::output_stream ( )
inlineprotected

Definition at line 267 of file heat_model.hh.

void HeatTransferModel::set_velocity_field ( std::shared_ptr< FieldFE< 3, FieldValue< 3 >::VectorFixed >>  flux_field)
inlineoverridevirtual

Updates the velocity field which determines some coefficients of the transport equation.

Parameters
dhmixed hybrid dof handler

(So far it does not work since the flow module returns a vector of zeros.)

Implements AdvectionProcessBase.

Definition at line 230 of file heat_model.hh.

SubstanceList& HeatTransferModel::substances ( )
inline

Returns reference to the vector of substance names.

Definition at line 241 of file heat_model.hh.

std::shared_ptr<FieldFE<3, FieldValue<3>::VectorFixed> > HeatTransferModel::velocity_field_ptr ( ) const
inline

Definition at line 247 of file heat_model.hh.

Member Data Documentation

bool HeatTransferModel::flux_changed
protected

Indicator of change in advection vector field.

Definition at line 273 of file heat_model.hh.

std::shared_ptr<OutputTime> HeatTransferModel::output_stream_
protected

Definition at line 281 of file heat_model.hh.

vector<unsigned int> HeatTransferModel::subst_idx
protected

List of indices used to call balance methods for a set of quantities.

Definition at line 279 of file heat_model.hh.

SubstanceList HeatTransferModel::substances_
protected

Transported substances.

Definition at line 276 of file heat_model.hh.

std::shared_ptr<FieldFE<3, FieldValue<3>::VectorFixed> > HeatTransferModel::velocity_field_ptr_
protected

Pointer to velocity field given from Flow equation.

Definition at line 284 of file heat_model.hh.


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