Loading [MathJax]/extensions/MathMenu.js
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 67 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::LiquidFlow::LiquidFlowLocalAssemblerInterface
- 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.
 
virtual std::optional< VectorSegmentgetVectorDeformationSegment () const
 
- 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 79 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 80 of file LiquidFlowLocalAssembler.h.

◆ GlobalDimVectorType

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

Definition at line 78 of file LiquidFlowLocalAssembler.h.

◆ LocalAssemblerTraits

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

Definition at line 72 of file LiquidFlowLocalAssembler.h.

◆ NodalMatrixType

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

Definition at line 75 of file LiquidFlowLocalAssembler.h.

◆ NodalRowVectorType

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

Definition at line 77 of file LiquidFlowLocalAssembler.h.

◆ NodalVectorType

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

Definition at line 76 of file LiquidFlowLocalAssembler.h.

◆ ShapeMatrices

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

Definition at line 70 of file LiquidFlowLocalAssembler.h.

◆ ShapeMatricesType

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

Definition at line 69 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 84 of file LiquidFlowLocalAssembler.h.

90 : _element(element),
91 _integration_method(integration_method),
92 _process_data(process_data)
93 {
94 unsigned const n_integration_points =
96 _ip_data.reserve(n_integration_points);
97
98 auto const& shape_matrices =
100 GlobalDim>(element, is_axially_symmetric,
102
105
106 double const aperture_size =
107 (_element.getDimension() == 3u)
108 ? 1.0
109 : _process_data.aperture_size(0.0, pos)[0];
110
111 for (unsigned ip = 0; ip < n_integration_points; ip++)
112 {
113 _ip_data.emplace_back(
114 shape_matrices[ip].dNdx,
116 shape_matrices[ip].integralMeasure *
117 shape_matrices[ip].detJ * aperture_size);
118 }
119 }
constexpr 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)
ParameterLib::Parameter< double > const & aperture_size

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 27 of file LiquidFlowLocalAssembler-impl.h.

32{
35
36 auto const& medium = *_process_data.media_map.getMedium(_element.getID());
38 vars.temperature =
40 .template value<double>(vars, pos, t, dt);
41 vars.liquid_phase_pressure = std::numeric_limits<double>::quiet_NaN();
45 vars, pos, t, dt));
46 // Note: For Inclined 1D in 2D/3D or 2D element in 3D, the first item in
47 // the assert must be changed to permeability.rows() ==
48 // _element->getDimension()
49 assert(permeability.rows() == GlobalDim || permeability.rows() == 1);
50
51 if (permeability.size() == 1)
52 { // isotropic or 1D problem.
54 t, dt, local_x, local_M_data, local_K_data, local_b_data);
55 }
56 else
57 {
59 t, dt, local_x, local_M_data, local_K_data, local_b_data);
60 }
61}
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 111 of file LiquidFlowLocalAssembler-impl.h.

117{
118 auto const local_matrix_size = local_x.size();
119 assert(local_matrix_size == ShapeFunction::NPOINTS);
120
122 local_M_data, local_matrix_size, local_matrix_size);
124 local_K_data, local_matrix_size, local_matrix_size);
126 local_b_data, local_matrix_size);
127 const auto local_p_vec =
128 MathLib::toVector<NodalVectorType>(local_x, local_matrix_size);
129
130 unsigned const n_integration_points =
132
135
136 auto const& medium = *_process_data.media_map.getMedium(_element.getID());
137 auto const& fluid_phase = fluidPhase(medium);
138
140 auto& phase_pressure = medium.hasPhase("Gas") ? vars.gas_phase_pressure
142
143 vars.temperature =
145 .template value<double>(vars, pos, t, dt);
146
147 GlobalDimVectorType const projected_body_force_vector =
151
152 auto const& Ns = _process_data.shape_matrix_cache
153 .NsHigherOrder<typename ShapeFunction::MeshElement>();
154
155 for (unsigned ip = 0; ip < n_integration_points; ip++)
156 {
157 auto const& ip_data = _ip_data[ip];
158 auto const& N = Ns[ip];
159
160 phase_pressure = N.dot(local_p_vec);
161
162 auto const [fluid_density, viscosity] =
164 fluid_phase, vars);
165
166 auto const porosity =
168 .template value<double>(vars, pos, t, dt);
169 auto const specific_storage =
171 .template value<double>(vars, pos, t, dt);
172
173 auto const get_drho_dp = [&]()
174 {
176 .template dValue<double>(vars, _process_data.phase_variable,
177 pos, t, dt);
178 };
179 auto const storage =
181 ? specific_storage
182 : specific_storage + porosity * get_drho_dp() / fluid_density;
183
184 double const scaling_factor =
186 ? 1.0
188 // Assemble mass matrix, M
189 local_M.noalias() += scaling_factor * storage * N.transpose() * N *
190 ip_data.integration_weight;
191
195 vars, pos, t, dt));
196
197 // Assemble Laplacian, K, and RHS by the gravitational term
198 LaplacianGravityVelocityCalculator::calculateLaplacianAndGravityTerm(
199 local_K, local_b, ip_data, scaling_factor * permeability, viscosity,
200 fluid_density, projected_body_force_vector,
202 }
203}
auto const & NsHigherOrder() const
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
std::tuple< double, double > getFluidDensityAndViscosity(double const t, double const dt, ParameterLib::SpatialPosition const &pos, MaterialPropertyLib::Phase const &fluid_phase, MaterialPropertyLib::VariableArray &vars)
It computes fluid density and viscosity for single phase flow model.
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)
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, MaterialPropertyLib::getFluidDensityAndViscosity(), MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::permeability, MaterialPropertyLib::porosity, MaterialPropertyLib::reference_temperature, ParameterLib::SpatialPosition::setElementID(), 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 207 of file LiquidFlowLocalAssembler-impl.h.

212{
213 if (is_scalar_permeability)
214 { // isotropic or 1D problem.
216 t, dt, local_x, pos, darcy_velocity_at_ips);
217 }
218 else
219 {
221 t, dt, local_x, pos, darcy_velocity_at_ips);
222 }
223}
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 276 of file LiquidFlowLocalAssembler-impl.h.

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

References MaterialPropertyLib::formEigenTensor(), MaterialPropertyLib::VariableArray::gas_phase_pressure, MaterialPropertyLib::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 64 of file LiquidFlowLocalAssembler-impl.h.

67{
68 // TODO (tf) Temporary value not used by current material models. Need
69 // extension of getFlux interface
70 double const dt = std::numeric_limits<double>::quiet_NaN();
71
72 // Note: Axial symmetry is set to false here, because we only need dNdx
73 // here, which is not affected by axial symmetry.
74 auto const shape_matrices =
76 GlobalDim>(_element,
77 false /*is_axially_symmetric*/,
78 std::array{p_local_coords})[0];
79
80 // create pos object to access the correct media property
83
84 auto const& medium = *_process_data.media_map.getMedium(_element.getID());
85 auto const& fluid_phase = fluidPhase(medium);
86
88
89 double pressure = 0.0;
90 NumLib::shapeFunctionInterpolate(local_x, shape_matrices.N, pressure);
91 vars.liquid_phase_pressure = pressure;
92
93 GlobalDimMatrixType const intrinsic_permeability =
96 vars, pos, t, dt));
97 auto const viscosity =
99 .template value<double>(vars, pos, t, dt);
100
101 Eigen::Vector3d flux(0.0, 0.0, 0.0);
102 flux.head<GlobalDim>() =
103 -intrinsic_permeability / viscosity * shape_matrices.dNdx *
104 Eigen::Map<const NodalVectorType>(local_x.data(), local_x.size());
105
106 return flux;
107}
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 227 of file LiquidFlowLocalAssembler-impl.h.

232{
233 // TODO (tf) Temporary value not used by current material models. Need
234 // extension of secondary variable interface.
235 double const dt = std::numeric_limits<double>::quiet_NaN();
236
237 constexpr int process_id = 0;
238 auto const indices =
239 NumLib::getIndices(_element.getID(), *dof_tables[process_id]);
240 auto const local_x = x[process_id]->get(indices);
241 auto const n_integration_points = _integration_method.getNumberOfPoints();
242 velocity_cache.clear();
243
246
247 auto const& medium = *_process_data.media_map.getMedium(_element.getID());
249 vars.temperature =
251 .template value<double>(vars, pos, t, dt);
252 vars.liquid_phase_pressure = std::numeric_limits<double>::quiet_NaN();
253
257 vars, pos, t, dt));
258
259 assert(permeability.rows() == GlobalDim || permeability.rows() == 1);
260
261 bool const is_scalar_permeability = (permeability.size() == 1);
262
263 auto velocity_cache_vectors = MathLib::createZeroedMatrix<
264 Eigen::Matrix<double, GlobalDim, Eigen::Dynamic, Eigen::RowMajor>>(
265 velocity_cache, GlobalDim, n_integration_points);
266
267 computeDarcyVelocity(is_scalar_permeability, t, dt, local_x, pos,
268 velocity_cache_vectors);
269
270 return velocity_cache;
271}
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 134 of file LiquidFlowLocalAssembler.h.

136 {
137 auto const& N =
139 .NsHigherOrder<typename ShapeFunction::MeshElement>();
140
141 // assumes N is stored contiguously in memory
142 return Eigen::Map<const Eigen::RowVectorXd>(
143 N[integration_point].data(), N[integration_point].size());
144 }
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: