26template <
typename ShapeFunction,
int GlobalDim>
42 std::size_t
const local_matrix_size,
44 bool const is_axially_symmetric,
46 const unsigned dof_per_node)
54 assert(local_matrix_size == ShapeFunction::NPOINTS * dof_per_node);
55 (void)local_matrix_size;
58 unsigned const n_integration_points =
60 _ip_data.reserve(n_integration_points);
65 double const aperture_size =
_process_data.aperture_size(0.0, pos)[0];
67 auto const shape_matrices =
69 GlobalDim>(element, is_axially_symmetric,
72 for (
unsigned ip = 0; ip < n_integration_points; ip++)
75 shape_matrices[ip].dNdx,
77 shape_matrices[ip].integralMeasure *
78 shape_matrices[ip].detJ * aperture_size);
83 const unsigned integration_point)
const override
85 auto const& N =
_process_data.shape_matrix_cache.NsHigherOrder<
86 typename ShapeFunction::MeshElement>()[integration_point];
89 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
96 std::vector<double>
const& local_x)
const override
101 auto const shape_matrices =
105 std::array{pnt_local_coords})[0];
113 double T_int_pt = 0.0;
114 double p_int_pt = 0.0;
123 auto const& liquid_phase = medium.phase(
"AqueousLiquid");
127 double const dt = std::numeric_limits<double>::quiet_NaN();
131 .value(vars, pos, t, dt));
135 .template value<double>(vars, pos, t, dt);
138 auto const p_nodal_values = Eigen::Map<const NodalVectorType>(
139 &local_x[local_x.size() / 2], ShapeFunction::NPOINTS);
141 -K_over_mu * shape_matrices.dNdx * p_nodal_values;
148 .template value<double>(vars, pos, t, dt);
151 [this->_element.getID()];
152 q += K_over_mu * rho_w * b;
155 Eigen::Vector3d flux;
156 flux.head<GlobalDim>() = q;
165 std::vector<IntegrationPointData<GlobalDimNodalMatrixType>>
_ip_data;
169 const double fluid_density,
const double specific_heat_capacity_fluid,
175 auto const& solid_phase = medium.phase(
"Solid");
177 auto const specific_heat_capacity_solid =
181 .template value<double>(vars, pos, t, dt);
183 auto const solid_density =
185 .template value<double>(vars, pos, t, dt);
187 return solid_density * specific_heat_capacity_solid * (1 - porosity) +
188 fluid_density * specific_heat_capacity_fluid * porosity;
193 const double fluid_density,
const double specific_heat_capacity_fluid,
201 auto thermal_conductivity =
206 .value(vars, pos, t, dt));
208 auto const thermal_dispersivity_transversal =
211 thermal_transversal_dispersivity)
212 .template value<double>();
214 auto const thermal_dispersivity_longitudinal =
217 thermal_longitudinal_dispersivity)
218 .template value<double>();
223 return thermal_conductivity +
224 fluid_density * specific_heat_capacity_fluid *
227 GlobalDimMatrixType::Zero(GlobalDim, GlobalDim),
228 velocity, 0 , thermal_dispersivity_transversal,
229 thermal_dispersivity_longitudinal);
233 const double t, std::vector<double>
const& local_x,
234 std::vector<double>& cache)
const
236 std::vector<double> local_p{
239 std::vector<double> local_T{
243 auto const n_integration_points =
248 Eigen::Matrix<double, GlobalDim, Eigen::Dynamic, Eigen::RowMajor>>(
249 cache, GlobalDim, n_integration_points);
256 auto const p_nodal_values = Eigen::Map<const NodalVectorType>(
257 &local_p[0], ShapeFunction::NPOINTS);
261 auto const& liquid_phase = medium.phase(
"AqueousLiquid");
265 .NsHigherOrder<
typename ShapeFunction::MeshElement>();
267 for (
unsigned ip = 0; ip < n_integration_points; ++ip)
270 auto const& dNdx = ip_data.dNdx;
271 auto const& N = Ns[ip];
273 double T_int_pt = 0.0;
274 double p_int_pt = 0.0;
283 double const dt = std::numeric_limits<double>::quiet_NaN();
286 .value(vars, pos, t, dt));
291 .template value<double>(vars, pos, t, dt);
294 cache_mat.col(ip).noalias() = -K_over_mu * dNdx * p_nodal_values;
301 .template value<double>(vars, pos, t, dt);
306 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)
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)
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