64 double const t,
double const dt, ParameterLib::SpatialPosition
const& pos,
65 MaterialPropertyLib::VariableArray
const& vars,
66 MaterialPropertyLib::Medium
const& medium,
67 MaterialPropertyLib::Phase
const& liquid_phase,
68 MaterialPropertyLib::Phase
const& solid_phase,
69 bool const has_solid_thermal_expansivity,
double const specific_storage);
88 ParameterLib::SpatialPosition
const& pos,
89 MaterialPropertyLib::VariableArray
const& vars,
90 MaterialPropertyLib::Medium
const& medium,
91 MaterialPropertyLib::Phase
const& solid_phase);
93template <
typename ShapeFunction,
int GlobalDim>
109 std::size_t
const local_matrix_size,
111 bool const is_axially_symmetric,
113 const unsigned dof_per_node)
121 assert(local_matrix_size == ShapeFunction::NPOINTS * dof_per_node);
122 (void)local_matrix_size;
125 unsigned const n_integration_points =
127 _ip_data.reserve(n_integration_points);
132 double const aperture_size =
_process_data.aperture_size(0.0, pos)[0];
134 auto const shape_matrices =
136 GlobalDim>(element, is_axially_symmetric,
139 for (
unsigned ip = 0; ip < n_integration_points; ip++)
142 shape_matrices[ip].dNdx,
144 shape_matrices[ip].integralMeasure *
145 shape_matrices[ip].detJ * aperture_size);
153 auto const& solid_phase =
158 if (!solid_phase.hasProperty(
169 .template NsHigherOrder<typename ShapeFunction::MeshElement>();
171 unsigned const n_integration_points =
173 for (
unsigned ip = 0; ip < n_integration_points; ip++)
183 medium, solid_phase);
188 const unsigned integration_point)
const override
190 auto const& N =
_process_data.shape_matrix_cache.NsHigherOrder<
191 typename ShapeFunction::MeshElement>()[integration_point];
194 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
201 std::vector<double>
const& local_x)
const override
206 auto const shape_matrices =
210 std::array{pnt_local_coords})[0];
218 double T_int_pt = 0.0;
219 double p_int_pt = 0.0;
228 auto const& liquid_phase =
233 double const dt = std::numeric_limits<double>::quiet_NaN();
237 .value(vars, pos, t, dt));
241 .template value<double>(vars, pos, t, dt);
244 auto const p_nodal_values = Eigen::Map<const NodalVectorType>(
245 &local_x[local_x.size() / 2], ShapeFunction::NPOINTS);
247 -K_over_mu * shape_matrices.dNdx * p_nodal_values;
254 .template value<double>(vars, pos, t, dt);
257 [this->_element.getID()];
258 q += K_over_mu * rho_w * b;
261 Eigen::Vector3d flux;
262 flux.head<GlobalDim>() = q;
271 std::vector<IntegrationPointData<GlobalDimNodalMatrixType>>
_ip_data;
275 const double fluid_density,
const double specific_heat_capacity_fluid,
281 auto const& solid_phase =
284 auto const specific_heat_capacity_solid =
288 .template value<double>(vars, pos, t, dt);
290 auto const solid_density =
292 .template value<double>(vars, pos, t, dt);
294 return solid_density * specific_heat_capacity_solid * (1 - porosity) +
295 fluid_density * specific_heat_capacity_fluid * porosity;
300 const double fluid_density,
const double specific_heat_capacity_fluid,
308 auto thermal_conductivity =
313 .value(vars, pos, t, dt));
315 auto const thermal_dispersivity_transversal =
318 thermal_transversal_dispersivity)
319 .template value<double>();
321 auto const thermal_dispersivity_longitudinal =
324 thermal_longitudinal_dispersivity)
325 .template value<double>();
330 return thermal_conductivity +
331 fluid_density * specific_heat_capacity_fluid *
334 GlobalDimMatrixType::Zero(GlobalDim, GlobalDim),
335 velocity, 0 , thermal_dispersivity_transversal,
336 thermal_dispersivity_longitudinal);
340 const double t, std::vector<double>
const& local_x,
341 std::vector<double>& cache)
const
343 std::vector<double> local_p{
346 std::vector<double> local_T{
350 auto const n_integration_points =
355 Eigen::Matrix<double, GlobalDim, Eigen::Dynamic, Eigen::RowMajor>>(
356 cache, GlobalDim, n_integration_points);
363 auto const p_nodal_values = Eigen::Map<const NodalVectorType>(
364 &local_p[0], ShapeFunction::NPOINTS);
368 auto const& liquid_phase =
373 .NsHigherOrder<
typename ShapeFunction::MeshElement>();
375 for (
unsigned ip = 0; ip < n_integration_points; ++ip)
378 auto const& dNdx = ip_data.dNdx;
379 auto const& N = Ns[ip];
381 double T_int_pt = 0.0;
382 double p_int_pt = 0.0;
391 double const dt = std::numeric_limits<double>::quiet_NaN();
394 .value(vars, pos, t, dt));
399 .template value<double>(vars, pos, t, dt);
402 cache_mat.col(ip).noalias() = -K_over_mu * dNdx * p_nodal_values;
409 .template value<double>(vars, pos, t, dt);
414 cache_mat.col(ip).noalias() += K_over_mu * rho_w * b;
EigenFixedShapeMatrixPolicy< ShapeFunction, GlobalDim > ShapeMatrixPolicyType
double liquid_phase_pressure
std::size_t getID() const
Returns the ID of the element.
void setElementID(std::size_t element_id)
typename ShapeMatricesType::GlobalDimMatrixType GlobalDimMatrixType
std::vector< double > const & getIntPtDarcyVelocityLocal(const double t, std::vector< double > const &local_x, std::vector< double > &cache) const
typename ShapeMatricesType::ShapeMatrices ShapeMatrices
NumLib::GenericIntegrationMethod const & _integration_method
typename ShapeMatricesType::GlobalDimNodalMatrixType GlobalDimNodalMatrixType
static const int temperature_index
typename ShapeMatricesType::NodalVectorType NodalVectorType
static const int temperature_size
double getHeatEnergyCoefficient(MaterialPropertyLib::VariableArray const &vars, const double porosity, const double fluid_density, const double specific_heat_capacity_fluid, ParameterLib::SpatialPosition const &pos, double const t, double const dt)
void initializeConcrete() override
HTFEM(MeshLib::Element const &element, std::size_t const local_matrix_size, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, HTProcessData const &process_data, const unsigned dof_per_node)
static const int pressure_size
ShapeMatrixPolicyType< ShapeFunction, GlobalDim > ShapeMatricesType
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
GlobalDimMatrixType getThermalConductivityDispersivity(MaterialPropertyLib::VariableArray const &vars, const double fluid_density, const double specific_heat_capacity_fluid, const GlobalDimVectorType &velocity, ParameterLib::SpatialPosition const &pos, double const t, double const dt)
Eigen::Vector3d getFlux(MathLib::Point3d const &pnt_local_coords, double const t, std::vector< double > const &local_x) const override
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix(const unsigned integration_point) const override
Provides the shape matrix at the given integration point.
MeshLib::Element const & _element
HTProcessData const & _process_data
std::vector< IntegrationPointData< GlobalDimNodalMatrixType > > _ip_data
static const int pressure_index
typename ShapeMatricesType::NodalRowVectorType NodalRowVectorType
HTLocalAssemblerInterface()=default
constexpr Eigen::Matrix< double, GlobalDim, GlobalDim > formEigenTensor(MaterialPropertyLib::PropertyDataType const &values)
Eigen::Map< Matrix > createZeroedMatrix(std::vector< double > &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)
void shapeFunctionInterpolate(const NodalValues &, const ShapeMatrix &)
std::vector< typename ShapeMatricesType::ShapeMatrices, Eigen::aligned_allocator< typename ShapeMatricesType::ShapeMatrices > > initShapeMatrices(MeshLib::Element const &e, bool const is_axially_symmetric, IntegrationMethod const &integration_method)
std::vector< typename ShapeMatricesType::ShapeMatrices, Eigen::aligned_allocator< typename ShapeMatricesType::ShapeMatrices > > computeShapeMatrices(MeshLib::Element const &e, bool const is_axially_symmetric, PointContainer const &points)
Eigen::MatrixXd computeHydrodynamicDispersion(NumericalStabilization const &stabilizer, std::size_t const element_id, Eigen::MatrixXd const &pore_diffusion_coefficient, Eigen::VectorXd const &velocity, double const porosity, double const solute_dispersivity_transverse, double const solute_dispersivity_longitudinal)
std::array< double, 3 > interpolateCoordinates(MeshLib::Element const &e, typename ShapeMatricesType::ShapeMatrices::ShapeType const &N)
void checkBiotStorageRelation(double const t, double const dt, ParameterLib::SpatialPosition const &pos, MaterialPropertyLib::VariableArray const &vars, MaterialPropertyLib::Medium const &medium, MaterialPropertyLib::Phase const &solid_phase)
double evalEffectiveThermalExpansivity(double const t, double const dt, ParameterLib::SpatialPosition const &pos, MaterialPropertyLib::VariableArray const &vars, MaterialPropertyLib::Medium const &medium, MaterialPropertyLib::Phase const &liquid_phase, MaterialPropertyLib::Phase const &solid_phase, bool const has_solid_thermal_expansivity, double const specific_storage)
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
MatrixType< GlobalDim, ShapeFunction::NPOINTS > GlobalDimNodalMatrixType
MatrixType< GlobalDim, GlobalDim > GlobalDimMatrixType
VectorType< GlobalDim > GlobalDimVectorType
VectorType< ShapeFunction::NPOINTS > NodalVectorType
RowVectorType< ShapeFunction::NPOINTS > NodalRowVectorType