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, NumLib::ShapeMatrixCache const &shape_matrix_cache)
 
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_M_data, std::vector< double > &local_K_data, 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_M_data, std::vector< double > &local_K_data, 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, NumLib::LocalToGlobalIndexMap const &dof_table, 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< NodalRowVectorType, GlobalDimNodalMatrixType >, Eigen::aligned_allocator< IntegrationPointData< NodalRowVectorType, GlobalDimNodalMatrixType > > > _ip_data
 
const LiquidFlowData_process_data
 
NumLib::ShapeMatrixCache const & _shape_matrix_cache
 

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,
NumLib::ShapeMatrixCache const & shape_matrix_cache )
inline

Definition at line 84 of file LiquidFlowLocalAssembler.h.

91 : _element(element),
92 _integration_method(integration_method),
93 _process_data(process_data),
94 _shape_matrix_cache(shape_matrix_cache)
95 {
96 unsigned const n_integration_points =
98 _ip_data.reserve(n_integration_points);
99
100 auto const& shape_matrices =
102 GlobalDim>(element, is_axially_symmetric,
104
107
108 double const aperture_size =
109 (_element.getDimension() == 3u)
110 ? 1.0
111 : _process_data.aperture_size(0.0, pos)[0];
112
113 for (unsigned ip = 0; ip < n_integration_points; ip++)
114 {
115 _ip_data.emplace_back(
116 shape_matrices[ip].dNdx,
118 shape_matrices[ip].integralMeasure *
119 shape_matrices[ip].detJ * aperture_size);
120 }
121 }
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)
NumLib::GenericIntegrationMethod const & _integration_method
std::vector< IntegrationPointData< NodalRowVectorType, GlobalDimNodalMatrixType >, Eigen::aligned_allocator< IntegrationPointData< NodalRowVectorType, GlobalDimNodalMatrixType > > > _ip_data
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();
42 MaterialPropertyLib::formEigenTensor<GlobalDim>(
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.
52 assembleMatrixAndVector<IsotropicCalculator>(
53 t, dt, local_x, local_M_data, local_K_data, local_b_data);
54 }
55 else
56 {
57 assembleMatrixAndVector<AnisotropicCalculator>(
58 t, dt, local_x, local_M_data, local_K_data, local_b_data);
59 }
60}
typename ShapeMatricesType::GlobalDimMatrixType GlobalDimMatrixType
MaterialPropertyLib::MaterialSpatialDistributionMap media_map

References 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
120 auto local_M = MathLib::createZeroedMatrix<NodalMatrixType>(
121 local_M_data, local_matrix_size, local_matrix_size);
122 auto local_K = MathLib::createZeroedMatrix<NodalMatrixType>(
123 local_K_data, local_matrix_size, local_matrix_size);
124 auto local_b = MathLib::createZeroedVector<NodalVectorType>(
125 local_b_data, local_matrix_size);
126
127 unsigned const n_integration_points =
129
132
133 auto const& medium = *_process_data.media_map.getMedium(_element.getID());
134 auto const& liquid_phase = medium.phase("AqueousLiquid");
135
137 vars.temperature =
139 .template value<double>(vars, pos, t, dt);
140
141 GlobalDimVectorType const projected_body_force_vector =
145
146 auto const& N = _shape_matrix_cache
147 .NsHigherOrder<typename ShapeFunction::MeshElement>();
148
149 for (unsigned ip = 0; ip < n_integration_points; ip++)
150 {
151 auto const& ip_data = _ip_data[ip];
152
153 double p = 0.;
154 NumLib::shapeFunctionInterpolate(local_x, N[ip], p);
156
157 // Compute density:
158 auto const fluid_density =
160 .template value<double>(vars, pos, t, dt);
161 assert(fluid_density > 0.);
162 vars.density = fluid_density;
163
164 auto const ddensity_dpressure =
166 .template dValue<double>(
168 pos, t, dt);
169
170 auto const porosity =
172 .template value<double>(vars, pos, t, dt);
174 .template value<double>(vars, pos, t, dt);
175
176 // Assemble mass matrix, M
177 local_M.noalias() +=
178 (porosity * ddensity_dpressure / fluid_density + storage) *
179 N[ip].transpose() * N[ip] * ip_data.integration_weight;
180
181 // Compute viscosity:
182 auto const viscosity =
184 .template value<double>(vars, pos, t, dt);
185
186 pos.setIntegrationPoint(ip);
188 MaterialPropertyLib::formEigenTensor<GlobalDim>(
190 vars, pos, t, dt));
191
192 // Assemble Laplacian, K, and RHS by the gravitational term
193 LaplacianGravityVelocityCalculator::calculateLaplacianAndGravityTerm(
194 local_K, local_b, ip_data, permeability, viscosity, fluid_density,
195 projected_body_force_vector, _process_data.has_gravity);
196 }
197}
Phase const & phase(std::size_t index) const
Definition Medium.cpp:33
auto const & NsHigherOrder() const
void setIntegrationPoint(unsigned integration_point)
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
void shapeFunctionInterpolate(const NodalValues &, const ShapeMatrix &)
double fluid_density(const double p, const double T, const double x)
std::vector< Eigen::MatrixXd > const element_rotation_matrices
A vector of the rotation matrices for all elements.
Eigen::VectorXd const specific_body_force

References MaterialPropertyLib::density, MaterialPropertyLib::VariableArray::density, MaterialPropertyLib::liquid_phase_pressure, MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::permeability, MaterialPropertyLib::porosity, MaterialPropertyLib::reference_temperature, ParameterLib::SpatialPosition::setElementID(), ParameterLib::SpatialPosition::setIntegrationPoint(), NumLib::detail::shapeFunctionInterpolate(), MaterialPropertyLib::storage, MaterialPropertyLib::VariableArray::temperature, and MaterialPropertyLib::viscosity.

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

206{
207 if (is_scalar_permeability)
208 { // isotropic or 1D problem.
209 computeProjectedDarcyVelocity<IsotropicCalculator>(
210 t, dt, local_x, pos, darcy_velocity_at_ips);
211 }
212 else
213 {
214 computeProjectedDarcyVelocity<AnisotropicCalculator>(
215 t, dt, local_x, pos, darcy_velocity_at_ips);
216 }
217}

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

275{
276 auto const local_matrix_size = local_x.size();
277 assert(local_matrix_size == ShapeFunction::NPOINTS);
278
279 const auto local_p_vec =
280 MathLib::toVector<NodalVectorType>(local_x, local_matrix_size);
281
282 unsigned const n_integration_points =
284
285 auto const& medium = *_process_data.media_map.getMedium(_element.getID());
286 auto const& liquid_phase = medium.phase("AqueousLiquid");
287
289 vars.temperature =
291 .template value<double>(vars, pos, t, dt);
292
293 GlobalDimVectorType const projected_body_force_vector =
297
298 auto const& N = _shape_matrix_cache
299 .NsHigherOrder<typename ShapeFunction::MeshElement>();
300
301 for (unsigned ip = 0; ip < n_integration_points; ip++)
302 {
303 auto const& ip_data = _ip_data[ip];
304 double p = 0.;
305 NumLib::shapeFunctionInterpolate(local_x, N[ip], p);
307
308 // Compute density:
309 auto const fluid_density =
311 .template value<double>(vars, pos, t, dt);
312 vars.density = fluid_density;
313
314 // Compute viscosity:
315 auto const viscosity =
317 .template value<double>(vars, pos, t, dt);
318
320 MaterialPropertyLib::formEigenTensor<GlobalDim>(
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::density, MaterialPropertyLib::VariableArray::density, MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::permeability, MaterialPropertyLib::reference_temperature, NumLib::detail::shapeFunctionInterpolate(), MaterialPropertyLib::VariableArray::temperature, and MaterialPropertyLib::viscosity.

◆ 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& liquid_phase = medium.phase("AqueousLiquid");
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 =
93 MaterialPropertyLib::formEigenTensor<GlobalDim>(
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}
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::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 221 of file LiquidFlowLocalAssembler-impl.h.

226{
227 // TODO (tf) Temporary value not used by current material models. Need
228 // extension of secondary variable interface.
229 double const dt = std::numeric_limits<double>::quiet_NaN();
230
231 constexpr int process_id = 0;
232 auto const indices =
233 NumLib::getIndices(_element.getID(), *dof_tables[process_id]);
234 auto const local_x = x[process_id]->get(indices);
235 auto const n_integration_points = _integration_method.getNumberOfPoints();
236 velocity_cache.clear();
237
240
241 auto const& medium = *_process_data.media_map.getMedium(_element.getID());
243 vars.temperature =
245 .template value<double>(vars, pos, t, dt);
246 vars.liquid_phase_pressure = std::numeric_limits<double>::quiet_NaN();
247
249 MaterialPropertyLib::formEigenTensor<GlobalDim>(
251 vars, pos, t, dt));
252
253 assert(permeability.rows() == GlobalDim || permeability.rows() == 1);
254
255 bool const is_scalar_permeability = (permeability.size() == 1);
256
257 auto velocity_cache_vectors = MathLib::createZeroedMatrix<
258 Eigen::Matrix<double, GlobalDim, Eigen::Dynamic, Eigen::RowMajor>>(
259 velocity_cache, GlobalDim, n_integration_points);
260
261 computeDarcyVelocity(is_scalar_permeability, t, dt, local_x, pos,
262 velocity_cache_vectors);
263
264 return velocity_cache;
265}
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
Eigen::Map< Matrix > createZeroedMatrix(std::vector< double > &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)

References MathLib::createZeroedMatrix(), 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 136 of file LiquidFlowLocalAssembler.h.

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

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

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

◆ _process_data

template<typename ShapeFunction , int GlobalDim>
const LiquidFlowData& ProcessLib::LiquidFlow::LiquidFlowLocalAssembler< ShapeFunction, GlobalDim >::_process_data
private

◆ _shape_matrix_cache

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

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