8 #ifndef SRC_FLOW_ASSEMBLY_LMH_HH_ 9 #define SRC_FLOW_ASSEMBLY_LMH_HH_ 82 double water_content = 0;
86 fadbad::B<double> x_phead(phead);
87 fadbad::B<double> evaluated(
soil_model->water_content_diff(x_phead) );
89 water_content = evaluated.val();
90 capacity = x_phead.d(0);
93 ad_->water_content_previous_it[ele.
side_local_idx(i)] = water_content + storativity * phead;
103 double conductivity, head;
110 double phead =
ad_->phead_edge_[local_edge];
111 conductivity +=
soil_model->conductivity(phead);
112 head +=
ad_->phead_edge_[local_edge];
144 if (this->dirichlet_edge[i] == 0) {
146 double capacity = this->
ad_->capacity[local_side];
147 double water_content_diff = -
ad_->water_content_previous_it[local_side] +
ad_->water_content_previous_time[local_side];
148 double mass_diagonal = diagonal_coef * capacity;
162 double mass_rhs = mass_diagonal *
ad_->phead_edge_[local_edge] / this->
ad_->time_step_
163 + diagonal_coef * water_content_diff / this->
ad_->time_step_;
169 this->loc_system_.add_value(this->loc_edge_dofs[i], this->loc_edge_dofs[i],
170 -mass_diagonal/this->
ad_->time_step_,
171 -source_diagonal - mass_rhs);
174 if (
ad_->balance !=
nullptr) {
176 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