62 std::vector<double>
const& local_x,
63 std::vector<double>
const& ,
64 std::vector<double>& local_M_data,
65 std::vector<double>& local_K_data,
66 std::vector<double>& local_b_data)
override
68 auto const local_matrix_size = local_x.size();
71 assert(local_matrix_size == ShapeFunction::NPOINTS *
NUM_NODAL_DOF);
74 local_M_data, local_matrix_size, local_matrix_size);
76 local_K_data, local_matrix_size, local_matrix_size);
78 local_b_data, local_matrix_size);
80 auto KTT = local_K.template block<temperature_size, temperature_size>(
82 auto MTT = local_M.template block<temperature_size, temperature_size>(
84 auto Kpp = local_K.template block<pressure_size, pressure_size>(
86 auto Mpp = local_M.template block<pressure_size, pressure_size>(
88 auto Bp = local_b.template block<pressure_size, 1>(
pressure_index, 0);
92 auto p_nodal_values = Eigen::Map<const NodalVectorType>(
96 *process_data.media_map.getMedium(this->
_element.getID());
97 auto const& liquid_phase = medium.phase(
"AqueousLiquid");
98 auto const& solid_phase = medium.phase(
"Solid");
102 .projected_specific_body_force_vectors[this->
_element.getID()];
106 unsigned const n_integration_points =
109 std::vector<GlobalDimVectorType> ip_flux_vector;
110 double average_velocity_norm = 0.0;
111 ip_flux_vector.reserve(n_integration_points);
114 process_data.shape_matrix_cache
115 .template NsHigherOrder<typename ShapeFunction::MeshElement>();
117 for (
unsigned ip(0); ip < n_integration_points; ip++)
119 auto const& ip_data = this->
_ip_data[ip];
120 auto const& dNdx = ip_data.dNdx;
121 auto const& N = Ns[ip];
122 auto const& w = ip_data.integration_weight;
125 std::nullopt, this->
_element.getID(),
131 double T_int_pt = 0.0;
132 double p_int_pt = 0.0;
142 auto const specific_storage =
144 .template value<double>(vars, pos, t, dt);
146 auto const porosity =
148 .template value<double>(vars, pos, t, dt);
151 auto const intrinsic_permeability =
156 .value(vars, pos, t, dt));
158 auto const specific_heat_capacity_fluid =
161 .template value<double>(vars, pos, t, dt);
164 auto const fluid_density =
167 .template value<double>(vars, pos, t, dt);
171 auto const viscosity =
174 .template value<double>(vars, pos, t, dt);
178 process_data.has_gravity
186 vars, fluid_density, specific_heat_capacity_fluid, velocity,
190 dNdx.transpose() * thermal_conductivity_dispersivity * dNdx * w;
192 ip_flux_vector.emplace_back(velocity * fluid_density *
193 specific_heat_capacity_fluid);
194 average_velocity_norm += velocity.norm();
196 Kpp.noalias() += w * dNdx.transpose() * K_over_mu * dNdx;
199 vars, porosity, fluid_density,
200 specific_heat_capacity_fluid, pos, t, dt) *
202 Mpp.noalias() += w * N.transpose() * specific_storage * N;
203 if (process_data.has_gravity)
205 Bp += w * fluid_density * dNdx.transpose() * K_over_mu * b;
212 process_data.stabilizer, this->_ip_data,
213 process_data.shape_matrix_cache, ip_flux_vector,
214 average_velocity_norm /
static_cast<double>(n_integration_points),