70 (this->m_sim->getFieldValue(
"HeatConductivity", this->m_nodal_values[0])
71 + this->m_sim->getFieldValue(
"HeatConductivity", this->m_nodal_values[1]))
73 heat_capacity = (this->m_sim->getFieldValue(
"HeatCapacity", this->m_nodal_values[0])
74 + this->m_sim->getFieldValue(
"HeatCapacity", this->m_nodal_values[1]))
76 density = (this->m_sim->getFieldValue(
"Density", this->m_nodal_values[0])
77 + this->m_sim->getFieldValue(
"Density", this->m_nodal_values[1]))
79 source_terms = (this->m_sim->getFieldValue(
"HeatSource", this->m_nodal_values[0])
80 + this->m_sim->getFieldValue(
"HeatSource", this->m_nodal_values[1]))
83 catch (
const std::exception&
e)
85 std::cerr <<
"[OneDimLinearElement]: One or more of the necessary base modules (Density, "
86 "HeatCapacity, HeatConductivity, HeatSource) "
88 "accessable!\n [OneDimLinearElement]:"
90 throw BadInput(
static_cast<std::string
>(
91 "[OneDimLinearElement]: One or more of the necessary base modules "
92 "(Density, HeatCapacity, HeatConductivity, HeatSource) "
94 "accessable!\n [OneDimLinearElement]:")
95 +
static_cast<std::string
>(
e.what()));
100 this->m_capacitance_matrix_elements[0] +=
102 this->m_capacitance_matrix_elements[1] +=
104 this->m_capacitance_matrix_elements[2] +=
106 this->m_capacitance_matrix_elements[3] +=
110 this->m_stiffness_matrix_elements[0] +=
heat_conductivity * m_area / m_element_length;
111 this->m_stiffness_matrix_elements[1] -=
heat_conductivity * m_area / m_element_length;
112 this->m_stiffness_matrix_elements[2] -=
heat_conductivity * m_area / m_element_length;
113 this->m_stiffness_matrix_elements[3] +=
heat_conductivity * m_area / m_element_length;
116 this->m_forcing_vector_elements[0] += m_area *
source_terms * m_element_length / 2;
117 this->m_forcing_vector_elements[1] += m_area *
source_terms * m_element_length / 2;
void writeMatrixVectorBlock() override
The implementation of the FEM scheme on this element type. Calculates all the values that you get sol...
Definition OneDimLinearElement.h:64
void writeBoundaryCondition() override
The implementation of a boundary cell in the FEM scheme on this element type. If this cell is a bound...
Definition OneDimLinearElement.h:125
OneDimLinearElement(bool is_boundary_point, std::map< std::string_view, std::vector< int > > all_boundary_points, std::vector< int > nodal_values, SimulationClassBase< T > *sim, int cell_nr, ElementProperties< T > props)
Constructor for a OneDimLinearElement object.
Definition OneDimLinearElement.h:47