8 #ifndef SRC_FLOW_ASSEMBLY_LMH_HH_ 9 #define SRC_FLOW_ASSEMBLY_LMH_HH_ 83 double water_content = 0;
87 fadbad::B<double> x_phead(phead);
88 fadbad::B<double> evaluated(
soil_model->water_content_diff(x_phead) );
90 water_content = evaluated.val();
91 capacity = x_phead.d(0);
94 ad_->water_content_previous_it[ele.
side_local_idx(i)] = water_content + storativity * phead;
104 double conductivity, head;
111 double phead =
ad_->phead_edge_[local_edge];
112 conductivity +=
soil_model->conductivity(phead);
113 head +=
ad_->phead_edge_[local_edge];
136 double source_diagonal = diagonal_coef * (
147 if (this->dirichlet_edge[i] == 0) {
149 double capacity = this->
ad_->capacity[local_side];
150 double water_content_diff = -
ad_->water_content_previous_it[local_side] +
ad_->water_content_previous_time[local_side];
151 double mass_diagonal = diagonal_coef * capacity;
165 double mass_rhs = mass_diagonal *
ad_->phead_edge_[local_edge] / this->
ad_->time_step_
166 + diagonal_coef * water_content_diff / this->
ad_->time_step_;
172 this->loc_system_.add_value(this->loc_edge_dofs[i], this->loc_edge_dofs[i],
173 -mass_diagonal/this->
ad_->time_step_,
174 -source_diagonal - mass_rhs);
177 if (
ad_->balance !=
nullptr) {
179 diagonal_coef*
ad_->water_content_previous_it[local_side]);
const arma::vec3 centre() const
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
AssemblyLMH(AssemblyDataPtr data)
ElementAccessor< 3 > element_accessor()
uint edge_local_idx(uint i)
void reset_soil_model(LocalElementAccessorBase< 3 > ele)
uint side_local_idx(uint i)
void assemble_source_term(LocalElementAccessorBase< 3 > ele) override
std::shared_ptr< SoilModelBase > soil_model
unsigned int n_sides() const
void assemble_sides_scale(LocalElementAccessorBase< 3 > ele_ac, double scale)
std::shared_ptr< RichardsLMH::EqData > AssemblyDataPtr
void assemble_sides(LocalElementAccessorBase< 3 > ele) override
unsigned int bulk_idx() const
Returns index of the region in the bulk set.
void update_water_content(LocalElementAccessorBase< 3 > ele) override