OGS
ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim > Class Template Reference

Detailed Description

template<typename ShapeFunction, int GlobalDim>
class ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >

Definition at line 68 of file LiquidFlowLocalAssembler.h.

#include <LiquidFlowLocalAssembler.h>

Inheritance diagram for ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >:
[legend]
Collaboration diagram for ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >:
[legend]

Classes

struct  AnisotropicCalculator
 
struct  IsotropicCalculator
 

Public Member Functions

 LiquidFlowLocalAssembler (MeshLib::Element const &element, std::size_t const, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, LiquidFlowData const &process_data)
 
void assemble (double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data) override
 
Eigen::Vector3d getFlux (MathLib::Point3d const &p_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.
 
std::vector< double > const & getIntPtDarcyVelocity (const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &velocity_cache) const override
 
- Public Member Functions inherited from ProcessLib::LocalAssemblerInterface
virtual ~LocalAssemblerInterface ()=default
 
virtual void setInitialConditions (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, double const t, int const process_id)
 
virtual void initialize (std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
 
virtual void preAssemble (double const, double const, std::vector< double > const &)
 
virtual void assembleForStaggeredScheme (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, int const process_id, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data)
 
virtual void assembleWithJacobian (double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
 
virtual void assembleWithJacobianForStaggeredScheme (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, int const process_id, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
 
virtual void computeSecondaryVariable (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, double const t, double const dt, std::vector< GlobalVector * > const &x, GlobalVector const &x_prev, int const process_id)
 
virtual void preTimestep (std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table, GlobalVector const &x, double const t, double const delta_t)
 
virtual void postTimestep (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, int const process_id)
 
void postNonLinearSolver (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, int const process_id)
 
virtual Eigen::Vector3d getFlux (MathLib::Point3d const &, double const, std::vector< std::vector< double > > const &) const
 Fits to staggered scheme.
 
- Public Member Functions inherited from NumLib::ExtrapolatableElement
virtual ~ExtrapolatableElement ()=default
 

Private Types

using ShapeMatricesType = ShapeMatrixPolicyType<ShapeFunction, GlobalDim>
 
using ShapeMatrices = typename ShapeMatricesType::ShapeMatrices
 
using LocalAssemblerTraits
 
using NodalMatrixType = typename LocalAssemblerTraits::LocalMatrix
 
using NodalVectorType = typename LocalAssemblerTraits::LocalVector
 
using NodalRowVectorType = typename ShapeMatricesType::NodalRowVectorType
 
using GlobalDimVectorType = typename ShapeMatricesType::GlobalDimVectorType
 
using GlobalDimMatrixType = typename ShapeMatricesType::GlobalDimMatrixType
 
using GlobalDimNodalMatrixType
 

Private Member Functions

template<typename LaplacianGravityVelocityCalculator >
void assembleMatrixAndVector (double const t, double const dt, std::vector< double > const &local_x, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data)
 
template<typename LaplacianGravityVelocityCalculator , typename VelocityCacheType >
void computeProjectedDarcyVelocity (const double t, const double dt, std::vector< double > const &local_x, ParameterLib::SpatialPosition const &pos, VelocityCacheType &darcy_velocity_at_ips) const
 
template<typename VelocityCacheType >
void computeDarcyVelocity (bool const is_scalar_permeability, const double t, const double dt, std::vector< double > const &local_x, ParameterLib::SpatialPosition const &pos, VelocityCacheType &darcy_velocity_at_ips) const
 

Private Attributes

MeshLib::Element const & _element
 
NumLib::GenericIntegrationMethod const & _integration_method
 
std::vector< IntegrationPointData< GlobalDimNodalMatrixType > > _ip_data
 
const LiquidFlowData_process_data
 

Member Typedef Documentation

◆ GlobalDimMatrixType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::GlobalDimMatrixType = typename ShapeMatricesType::GlobalDimMatrixType
private

Definition at line 80 of file LiquidFlowLocalAssembler.h.

◆ GlobalDimNodalMatrixType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::GlobalDimNodalMatrixType
private
Initial value:
MatrixType< GlobalDim, ShapeFunction::NPOINTS > GlobalDimNodalMatrixType

Definition at line 81 of file LiquidFlowLocalAssembler.h.

◆ GlobalDimVectorType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::GlobalDimVectorType = typename ShapeMatricesType::GlobalDimVectorType
private

Definition at line 79 of file LiquidFlowLocalAssembler.h.

◆ LocalAssemblerTraits

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::LocalAssemblerTraits
private
Initial value:

Definition at line 73 of file LiquidFlowLocalAssembler.h.

◆ NodalMatrixType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::NodalMatrixType = typename LocalAssemblerTraits::LocalMatrix
private

Definition at line 76 of file LiquidFlowLocalAssembler.h.

◆ NodalRowVectorType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::NodalRowVectorType = typename ShapeMatricesType::NodalRowVectorType
private

Definition at line 78 of file LiquidFlowLocalAssembler.h.

◆ NodalVectorType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::NodalVectorType = typename LocalAssemblerTraits::LocalVector
private

Definition at line 77 of file LiquidFlowLocalAssembler.h.

◆ ShapeMatrices

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::ShapeMatrices = typename ShapeMatricesType::ShapeMatrices
private

Definition at line 71 of file LiquidFlowLocalAssembler.h.

◆ ShapeMatricesType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::ShapeMatricesType = ShapeMatrixPolicyType<ShapeFunction, GlobalDim>
private

Definition at line 70 of file LiquidFlowLocalAssembler.h.

Constructor & Destructor Documentation

◆ LiquidFlowLocalAssembler()

template<typename ShapeFunction , int GlobalDim>
ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::LiquidFlowLocalAssembler ( MeshLib::Element const & element,
std::size_t const ,
NumLib::GenericIntegrationMethod const & integration_method,
bool const is_axially_symmetric,
LiquidFlowData const & process_data )
inline

Definition at line 85 of file LiquidFlowLocalAssembler.h.

91 : _element(element),
92 _integration_method(integration_method),
93 _process_data(process_data)
94 {
95 unsigned const n_integration_points =
97 _ip_data.reserve(n_integration_points);
98
99 auto const& shape_matrices =
101 GlobalDim>(element, is_axially_symmetric,
103
106
107 double const aperture_size =
108 (_element.getDimension() == 3u)
109 ? 1.0
110 : _process_data.aperture_size(0.0, pos)[0];
111
112 for (unsigned ip = 0; ip < n_integration_points; ip++)
113 {
114 _ip_data.emplace_back(
115 shape_matrices[ip].dNdx,
117 shape_matrices[ip].integralMeasure *
118 shape_matrices[ip].detJ * aperture_size);
119 }
120 }
double getWeight() const
virtual constexpr unsigned getDimension() const =0
Get dimension of the mesh element.
std::size_t getID() const
Returns the ID of the element.
Definition Element.h:89
MathLib::WeightedPoint const & getWeightedPoint(unsigned const igp) const
void setElementID(std::size_t element_id)
std::vector< IntegrationPointData< GlobalDimNodalMatrixType > > _ip_data
NumLib::GenericIntegrationMethod const & _integration_method
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)

References ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::_element, ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::_process_data, ProcessLib::LiquidFlow::LiquidFlowData::aperture_size, MeshLib::Element::getDimension(), MeshLib::Element::getID(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), MathLib::WeightedPoint::getWeight(), NumLib::GenericIntegrationMethod::getWeightedPoint(), NumLib::initShapeMatrices(), and ParameterLib::SpatialPosition::setElementID().

Member Function Documentation

◆ assemble()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::assemble ( double const t,
double const dt,
std::vector< double > const & local_x,
std::vector< double > const & ,
std::vector< double > & local_M_data,
std::vector< double > & local_K_data,
std::vector< double > & local_b_data )
overridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 26 of file LiquidFlowLocalAssembler-impl.h.

31{
34
35 auto const& medium = *_process_data.media_map.getMedium(_element.getID());
37 vars.temperature =
39 .template value<double>(vars, pos, t, dt);
40 vars.liquid_phase_pressure = std::numeric_limits<double>::quiet_NaN();
44 vars, pos, t, dt));
45 // Note: For Inclined 1D in 2D/3D or 2D element in 3D, the first item in
46 // the assert must be changed to permeability.rows() ==
47 // _element->getDimension()
48 assert(permeability.rows() == GlobalDim || permeability.rows() == 1);
49
50 if (permeability.size() == 1)
51 { // isotropic or 1D problem.
53 t, dt, local_x, local_M_data, local_K_data, local_b_data);
54 }
55 else
56 {
58 t, dt, local_x, local_M_data, local_K_data, local_b_data);
59 }
60}
void assembleMatrixAndVector(double const t, double const dt, std::vector< double > const &local_x, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data)
typename ShapeMatricesType::GlobalDimMatrixType GlobalDimMatrixType
Eigen::Matrix< double, GlobalDim, GlobalDim > formEigenTensor(MaterialPropertyLib::PropertyDataType const &values)
MaterialPropertyLib::MaterialSpatialDistributionMap media_map

References MaterialPropertyLib::formEigenTensor(), MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::permeability, MaterialPropertyLib::reference_temperature, ParameterLib::SpatialPosition::setElementID(), and MaterialPropertyLib::VariableArray::temperature.

◆ assembleMatrixAndVector()

template<typename ShapeFunction , int GlobalDim>
template<typename LaplacianGravityVelocityCalculator >
void ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::assembleMatrixAndVector ( double const t,
double const dt,
std::vector< double > const & local_x,
std::vector< double > & local_M_data,
std::vector< double > & local_K_data,
std::vector< double > & local_b_data )
private

Definition at line 110 of file LiquidFlowLocalAssembler-impl.h.

116{
117 auto const local_matrix_size = local_x.size();
118 assert(local_matrix_size == ShapeFunction::NPOINTS);
119
121 local_M_data, local_matrix_size, local_matrix_size);
123 local_K_data, local_matrix_size, local_matrix_size);
125 local_b_data, local_matrix_size);
126 const auto local_p_vec =
127 MathLib::toVector<NodalVectorType>(local_x, local_matrix_size);
128
129 unsigned const n_integration_points =
131
134
135 auto const& medium = *_process_data.media_map.getMedium(_element.getID());
136 auto const& fluid_phase = fluidPhase(medium);
137
139 auto& phase_pressure = medium.hasPhase("Gas") ? vars.gas_phase_pressure
141
142 vars.temperature =
144 .template value<double>(vars, pos, t, dt);
145
146 GlobalDimVectorType const projected_body_force_vector =
150
151 auto const& Ns = _process_data.shape_matrix_cache
152 .NsHigherOrder<typename ShapeFunction::MeshElement>();
153
154 for (unsigned ip = 0; ip < n_integration_points; ip++)
155 {
156 auto const& ip_data = _ip_data[ip];
157 auto const& N = Ns[ip];
158
159 phase_pressure = N.dot(local_p_vec);
160
161 auto const [fluid_density, viscosity] =
162 getFluidDensityAndViscosity(t, dt, pos, fluid_phase, vars);
163
164 auto const porosity =
166 .template value<double>(vars, pos, t, dt);
167 auto const specific_storage =
169 .template value<double>(vars, pos, t, dt);
170
171 auto const get_drho_dp = [&]()
172 {
174 .template dValue<double>(vars, _process_data.phase_variable,
175 pos, t, dt);
176 };
177 auto const storage =
179 ? specific_storage
180 : specific_storage + porosity * get_drho_dp() / fluid_density;
181
182 double const scaling_factor =
184 ? 1.0
186 // Assemble mass matrix, M
187 local_M.noalias() += scaling_factor * storage * N.transpose() * N *
188 ip_data.integration_weight;
189
190 pos.setIntegrationPoint(ip);
194 vars, pos, t, dt));
195
196 // Assemble Laplacian, K, and RHS by the gravitational term
197 LaplacianGravityVelocityCalculator::calculateLaplacianAndGravityTerm(
198 local_K, local_b, ip_data, scaling_factor * permeability, viscosity,
199 fluid_density, projected_body_force_vector,
201 }
202}
auto const & NsHigherOrder() const
void setIntegrationPoint(unsigned integration_point)
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
Phase const & fluidPhase(Medium const &medium)
Returns a gas or aqueous liquid phase of the given medium.
Definition Medium.cpp:100
Eigen::Map< Vector > createZeroedVector(std::vector< double > &data, Eigen::VectorXd::Index size)
Eigen::Map< const Vector > toVector(std::vector< double > const &data, Eigen::VectorXd::Index size)
Creates an Eigen mapped vector from the given data vector.
Eigen::Map< Matrix > createZeroedMatrix(std::vector< double > &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)
std::tuple< double, double > getFluidDensityAndViscosity(double const t, double const dt, ParameterLib::SpatialPosition const &pos, MaterialPropertyLib::Phase const &fluid_phase, MaterialPropertyLib::VariableArray &vars)
double fluid_density(const double p, const double T, const double x)
MaterialPropertyLib::Variable const phase_variable
NumLib::ShapeMatrixCache shape_matrix_cache
caches for each mesh element type the shape matrix
std::vector< Eigen::MatrixXd > const element_rotation_matrices
A vector of the rotation matrices for all elements.
Eigen::VectorXd const specific_body_force
EquationBalanceType const equation_balance_type

References MathLib::createZeroedMatrix(), MathLib::createZeroedVector(), MaterialPropertyLib::density, MaterialPropertyLib::formEigenTensor(), MaterialPropertyLib::VariableArray::gas_phase_pressure, ProcessLib::LiquidFlow::getFluidDensityAndViscosity(), MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::permeability, MaterialPropertyLib::porosity, MaterialPropertyLib::reference_temperature, ParameterLib::SpatialPosition::setElementID(), ParameterLib::SpatialPosition::setIntegrationPoint(), MaterialPropertyLib::storage, MaterialPropertyLib::VariableArray::temperature, MathLib::toVector(), and ProcessLib::LiquidFlow::volume.

◆ computeDarcyVelocity()

template<typename ShapeFunction , int GlobalDim>
template<typename VelocityCacheType >
void ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::computeDarcyVelocity ( bool const is_scalar_permeability,
const double t,
const double dt,
std::vector< double > const & local_x,
ParameterLib::SpatialPosition const & pos,
VelocityCacheType & darcy_velocity_at_ips ) const
private

Definition at line 206 of file LiquidFlowLocalAssembler-impl.h.

211{
212 if (is_scalar_permeability)
213 { // isotropic or 1D problem.
215 t, dt, local_x, pos, darcy_velocity_at_ips);
216 }
217 else
218 {
220 t, dt, local_x, pos, darcy_velocity_at_ips);
221 }
222}
void computeProjectedDarcyVelocity(const double t, const double dt, std::vector< double > const &local_x, ParameterLib::SpatialPosition const &pos, VelocityCacheType &darcy_velocity_at_ips) const

◆ computeProjectedDarcyVelocity()

template<typename ShapeFunction , int GlobalDim>
template<typename LaplacianGravityVelocityCalculator , typename VelocityCacheType >
void ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::computeProjectedDarcyVelocity ( const double t,
const double dt,
std::vector< double > const & local_x,
ParameterLib::SpatialPosition const & pos,
VelocityCacheType & darcy_velocity_at_ips ) const
private

Definition at line 275 of file LiquidFlowLocalAssembler-impl.h.

280{
281 auto const local_matrix_size = local_x.size();
282 assert(local_matrix_size == ShapeFunction::NPOINTS);
283
284 const auto local_p_vec =
285 MathLib::toVector<NodalVectorType>(local_x, local_matrix_size);
286
287 unsigned const n_integration_points =
289
290 auto const& medium = *_process_data.media_map.getMedium(_element.getID());
291 auto const& fluid_phase = fluidPhase(medium);
292
294 auto& phase_pressure = medium.hasPhase("Gas") ? vars.gas_phase_pressure
296
297 vars.temperature =
299 .template value<double>(vars, pos, t, dt);
300
301 GlobalDimVectorType const projected_body_force_vector =
305
306 auto const& Ns = _process_data.shape_matrix_cache
307 .NsHigherOrder<typename ShapeFunction::MeshElement>();
308
309 for (unsigned ip = 0; ip < n_integration_points; ip++)
310 {
311 auto const& ip_data = _ip_data[ip];
312 auto const& N = Ns[ip];
313
314 phase_pressure = N.dot(local_p_vec);
315
316 auto const [fluid_density, viscosity] =
317 getFluidDensityAndViscosity(t, dt, pos, fluid_phase, vars);
318
322 vars, pos, t, dt));
323
324 darcy_velocity_at_ips.col(ip) =
325 LaplacianGravityVelocityCalculator::calculateVelocity(
326 local_p_vec, ip_data, permeability, viscosity, fluid_density,
327 projected_body_force_vector, _process_data.has_gravity);
328 }
329}

References MaterialPropertyLib::formEigenTensor(), MaterialPropertyLib::VariableArray::gas_phase_pressure, ProcessLib::LiquidFlow::getFluidDensityAndViscosity(), MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::permeability, MaterialPropertyLib::reference_temperature, MaterialPropertyLib::VariableArray::temperature, and MathLib::toVector().

◆ getFlux()

template<typename ShapeFunction , int GlobalDim>
Eigen::Vector3d ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::getFlux ( MathLib::Point3d const & p_local_coords,
double const t,
std::vector< double > const & local_x ) const
overridevirtual

Computes the flux in the point p_local_coords that is given in local coordinates using the values from local_x.

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 63 of file LiquidFlowLocalAssembler-impl.h.

66{
67 // TODO (tf) Temporary value not used by current material models. Need
68 // extension of getFlux interface
69 double const dt = std::numeric_limits<double>::quiet_NaN();
70
71 // Note: Axial symmetry is set to false here, because we only need dNdx
72 // here, which is not affected by axial symmetry.
73 auto const shape_matrices =
75 GlobalDim>(_element,
76 false /*is_axially_symmetric*/,
77 std::array{p_local_coords})[0];
78
79 // create pos object to access the correct media property
82
83 auto const& medium = *_process_data.media_map.getMedium(_element.getID());
84 auto const& fluid_phase = fluidPhase(medium);
85
87
88 double pressure = 0.0;
89 NumLib::shapeFunctionInterpolate(local_x, shape_matrices.N, pressure);
90 vars.liquid_phase_pressure = pressure;
91
92 GlobalDimMatrixType const intrinsic_permeability =
95 vars, pos, t, dt));
96 auto const viscosity =
98 .template value<double>(vars, pos, t, dt);
99
100 Eigen::Vector3d flux(0.0, 0.0, 0.0);
101 flux.head<GlobalDim>() =
102 -intrinsic_permeability / viscosity * shape_matrices.dNdx *
103 Eigen::Map<const NodalVectorType>(local_x.data(), local_x.size());
104
105 return flux;
106}
void shapeFunctionInterpolate(const NodalValues &, const ShapeMatrix &)
std::vector< typename ShapeMatricesType::ShapeMatrices, Eigen::aligned_allocator< typename ShapeMatricesType::ShapeMatrices > > computeShapeMatrices(MeshLib::Element const &e, bool const is_axially_symmetric, PointContainer const &points)

References NumLib::computeShapeMatrices(), MaterialPropertyLib::formEigenTensor(), MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::permeability, ParameterLib::SpatialPosition::setElementID(), NumLib::detail::shapeFunctionInterpolate(), and MaterialPropertyLib::viscosity.

◆ getIntPtDarcyVelocity()

template<typename ShapeFunction , int GlobalDim>
std::vector< double > const & ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::getIntPtDarcyVelocity ( const double t,
std::vector< GlobalVector * > const & x,
std::vector< NumLib::LocalToGlobalIndexMap const * > const & dof_table,
std::vector< double > & velocity_cache ) const
overridevirtual

Implements ProcessLib::LiquidFlow::LiquidFlowLocalAssemblerInterface.

Definition at line 226 of file LiquidFlowLocalAssembler-impl.h.

231{
232 // TODO (tf) Temporary value not used by current material models. Need
233 // extension of secondary variable interface.
234 double const dt = std::numeric_limits<double>::quiet_NaN();
235
236 constexpr int process_id = 0;
237 auto const indices =
238 NumLib::getIndices(_element.getID(), *dof_tables[process_id]);
239 auto const local_x = x[process_id]->get(indices);
240 auto const n_integration_points = _integration_method.getNumberOfPoints();
241 velocity_cache.clear();
242
245
246 auto const& medium = *_process_data.media_map.getMedium(_element.getID());
248 vars.temperature =
250 .template value<double>(vars, pos, t, dt);
251 vars.liquid_phase_pressure = std::numeric_limits<double>::quiet_NaN();
252
256 vars, pos, t, dt));
257
258 assert(permeability.rows() == GlobalDim || permeability.rows() == 1);
259
260 bool const is_scalar_permeability = (permeability.size() == 1);
261
262 auto velocity_cache_vectors = MathLib::createZeroedMatrix<
263 Eigen::Matrix<double, GlobalDim, Eigen::Dynamic, Eigen::RowMajor>>(
264 velocity_cache, GlobalDim, n_integration_points);
265
266 computeDarcyVelocity(is_scalar_permeability, t, dt, local_x, pos,
267 velocity_cache_vectors);
268
269 return velocity_cache;
270}
void computeDarcyVelocity(bool const is_scalar_permeability, const double t, const double dt, std::vector< double > const &local_x, ParameterLib::SpatialPosition const &pos, VelocityCacheType &darcy_velocity_at_ips) const
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)

References MathLib::createZeroedMatrix(), MaterialPropertyLib::formEigenTensor(), NumLib::getIndices(), MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::permeability, MaterialPropertyLib::reference_temperature, ParameterLib::SpatialPosition::setElementID(), and MaterialPropertyLib::VariableArray::temperature.

◆ getShapeMatrix()

template<typename ShapeFunction , int GlobalDim>
Eigen::Map< const Eigen::RowVectorXd > ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::getShapeMatrix ( const unsigned integration_point) const
inlineoverridevirtual

Provides the shape matrix at the given integration point.

Implements NumLib::ExtrapolatableElement.

Definition at line 135 of file LiquidFlowLocalAssembler.h.

137 {
138 auto const& N =
140 .NsHigherOrder<typename ShapeFunction::MeshElement>();
141
142 // assumes N is stored contiguously in memory
143 return Eigen::Map<const Eigen::RowVectorXd>(
144 N[integration_point].data(), N[integration_point].size());
145 }
constexpr int size(int const displacement_dim)
Vectorized tensor size for given displacement dimension.

References ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::_process_data, NumLib::ShapeMatrixCache::NsHigherOrder(), and ProcessLib::LiquidFlow::LiquidFlowData::shape_matrix_cache.

Member Data Documentation

◆ _element

template<typename ShapeFunction , int GlobalDim>
MeshLib::Element const& ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::_element
private

◆ _integration_method

template<typename ShapeFunction , int GlobalDim>
NumLib::GenericIntegrationMethod const& ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::_integration_method
private

◆ _ip_data

template<typename ShapeFunction , int GlobalDim>
std::vector<IntegrationPointData<GlobalDimNodalMatrixType> > ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::_ip_data
private

◆ _process_data


The documentation for this class was generated from the following files: