OGS
ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim > Class Template Reference

Detailed Description

template<typename ShapeFunction, int GlobalDim>
class ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >

Definition at line 208 of file ComponentTransportFEM.h.

#include <ComponentTransportFEM.h>

Inheritance diagram for ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >:
[legend]
Collaboration diagram for ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >:
[legend]

Public Member Functions

 LocalAssemblerData (MeshLib::Element const &element, std::size_t const local_matrix_size, NumLib::GenericIntegrationMethod const &integration_method, bool is_axially_symmetric, ComponentTransportProcessData const &process_data, std::vector< std::reference_wrapper< ProcessVariable > > const &transport_process_variables)
 
void setChemicalSystemID (std::size_t const) override
 
void initializeChemicalSystemConcrete (Eigen::VectorXd const &local_x, double const t) override
 
void setChemicalSystemConcrete (Eigen::VectorXd const &local_x, double const t, double dt) override
 
void postSpeciationCalculation (std::size_t const ele_id, double const t, double const dt) override
 
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
 
void assembleBlockMatrices (GlobalDimVectorType const &b, int const component_id, double const t, double const dt, Eigen::Ref< const NodalVectorType > const &C_nodal_values, Eigen::Ref< const NodalVectorType > const &p_nodal_values, Eigen::Ref< LocalBlockMatrixType > KCC, Eigen::Ref< LocalBlockMatrixType > MCC, Eigen::Ref< LocalBlockMatrixType > MCp, Eigen::Ref< LocalBlockMatrixType > MpC, Eigen::Ref< LocalBlockMatrixType > Kpp, Eigen::Ref< LocalBlockMatrixType > Mpp, Eigen::Ref< LocalSegmentVectorType > Bp)
 
void assembleKCmCn (int const component_id, double const t, double const dt, Eigen::Ref< LocalBlockMatrixType > KCmCn, double const stoichiometric_coefficient, double const kinetic_prefactor)
 
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) override
 
void assembleHydraulicEquation (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data)
 
void assembleHeatTransportEquation (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &)
 
void assembleComponentTransportEquation (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &, int const transport_process_id)
 
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 > &, std::vector< double > &, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data) override
 
void assembleWithJacobianHydraulicEquation (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
 
void assembleWithJacobianComponentTransportEquation (double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data, int const component_id)
 
void assembleReactionEquationConcrete (double const t, double const dt, Eigen::VectorXd const &local_x, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data, int const transport_process_id) override
 
std::vector< double > const & getIntPtDarcyVelocity (const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &cache) const override
 
std::vector< double > const & calculateIntPtDarcyVelocity (const double t, Eigen::Ref< const NodalVectorType > const &p_nodal_values, Eigen::Ref< const NodalVectorType > const &C_nodal_values, std::vector< double > &cache) const
 
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix (const unsigned integration_point) const override
 Provides the shape matrix at the given integration point.
 
Eigen::Vector3d getFlux (MathLib::Point3d const &pnt_local_coords, double const t, std::vector< double > const &local_x) const override
 
void computeSecondaryVariableConcrete (double const t, double const, Eigen::VectorXd const &local_x, Eigen::VectorXd const &) override
 
void computeReactionRelatedSecondaryVariable (std::size_t const ele_id) override
 
std::vector< double > const & getIntPtMolarFlux (const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< double > &cache) const override
 
void postTimestepConcrete (Eigen::VectorXd const &, Eigen::VectorXd const &, double const, double const, bool const, int const) override
 
- Public Member Functions inherited from ProcessLib::ComponentTransport::ComponentTransportLocalAssemblerInterface
 ComponentTransportLocalAssemblerInterface ()=default
 
virtual void setChemicalSystemID (std::size_t const)=0
 
void initializeChemicalSystem (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, double const t)
 
void setChemicalSystem (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, double const t, double const dt)
 
void assembleReactionEquation (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, double const t, double const dt, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b, int const process_id)
 
virtual void postSpeciationCalculation (std::size_t const ele_id, double const t, double const dt)=0
 
virtual void computeReactionRelatedSecondaryVariable (std::size_t const ele_id)=0
 
virtual std::vector< double > const & getIntPtDarcyVelocity (const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &cache) const =0
 
virtual std::vector< double > const & getIntPtMolarFlux (const double t, std::vector< GlobalVector * > const &x, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< double > &cache) const =0
 
- Public Member Functions inherited from ProcessLib::LocalAssemblerInterface
virtual ~LocalAssemblerInterface ()=default
 
void setInitialConditions (std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table, GlobalVector const &x, double const t, bool const use_monolithic_scheme, 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 assemble (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)
 
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, bool const use_monolithic_scheme, 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, bool const use_monolithic_scheme, int const process_id)
 
virtual Eigen::Vector3d getFlux (MathLib::Point3d const &, double const, std::vector< double > const &) const
 
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 Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix (const unsigned integration_point) const =0
 Provides the shape matrix at the given integration point.
 
virtual ~ExtrapolatableElement ()=default
 

Private Types

using ShapeMatricesType = ShapeMatrixPolicyType< ShapeFunction, GlobalDim >
 
using ShapeMatrices = typename ShapeMatricesType::ShapeMatrices
 
using LocalBlockMatrixType = typename ShapeMatricesType::template MatrixType< pressure_size, pressure_size >
 
using LocalSegmentVectorType = typename ShapeMatricesType::template VectorType< pressure_size >
 
using LocalMatrixType = Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >
 
using LocalVectorType = Eigen::Matrix< double, Eigen::Dynamic, 1 >
 
using NodalVectorType = typename ShapeMatricesType::NodalVectorType
 
using NodalRowVectorType = typename ShapeMatricesType::NodalRowVectorType
 
using GlobalDimVectorType = typename ShapeMatricesType::GlobalDimVectorType
 
using GlobalDimNodalMatrixType = typename ShapeMatricesType::GlobalDimNodalMatrixType
 
using GlobalDimMatrixType = typename ShapeMatricesType::GlobalDimMatrixType
 

Private Member Functions

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)
 
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)
 
NodalVectorType getLocalTemperature (double const t, Eigen::VectorXd const &local_x)
 

Private Attributes

const int temperature_index = -1
 
const int first_concentration_index = -1
 
MeshLib::Element const & _element
 
ComponentTransportProcessData const & _process_data
 
NumLib::GenericIntegrationMethod const & _integration_method
 
std::vector< std::reference_wrapper< ProcessVariable > > const _transport_process_variables
 
std::vector< IntegrationPointData< NodalRowVectorType, GlobalDimNodalMatrixType >, Eigen::aligned_allocator< IntegrationPointData< NodalRowVectorType, GlobalDimNodalMatrixType > > > _ip_data
 

Static Private Attributes

static const int pressure_index = 0
 
static const int pressure_size = ShapeFunction::NPOINTS
 
static const int temperature_size = ShapeFunction::NPOINTS
 
static const int concentration_size
 

Member Typedef Documentation

◆ GlobalDimMatrixType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::GlobalDimMatrixType = typename ShapeMatricesType::GlobalDimMatrixType
private

Definition at line 240 of file ComponentTransportFEM.h.

◆ GlobalDimNodalMatrixType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::GlobalDimNodalMatrixType = typename ShapeMatricesType::GlobalDimNodalMatrixType
private

Definition at line 238 of file ComponentTransportFEM.h.

◆ GlobalDimVectorType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::GlobalDimVectorType = typename ShapeMatricesType::GlobalDimVectorType
private

Definition at line 237 of file ComponentTransportFEM.h.

◆ LocalBlockMatrixType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::LocalBlockMatrixType = typename ShapeMatricesType::template MatrixType<pressure_size, pressure_size>
private

Definition at line 224 of file ComponentTransportFEM.h.

◆ LocalMatrixType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::LocalMatrixType = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>
private

Definition at line 230 of file ComponentTransportFEM.h.

◆ LocalSegmentVectorType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::LocalSegmentVectorType = typename ShapeMatricesType::template VectorType<pressure_size>
private

Definition at line 227 of file ComponentTransportFEM.h.

◆ LocalVectorType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::LocalVectorType = Eigen::Matrix<double, Eigen::Dynamic, 1>
private

Definition at line 232 of file ComponentTransportFEM.h.

◆ NodalRowVectorType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::NodalRowVectorType = typename ShapeMatricesType::NodalRowVectorType
private

Definition at line 235 of file ComponentTransportFEM.h.

◆ NodalVectorType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::NodalVectorType = typename ShapeMatricesType::NodalVectorType
private

Definition at line 234 of file ComponentTransportFEM.h.

◆ ShapeMatrices

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::ShapeMatrices = typename ShapeMatricesType::ShapeMatrices
private

Definition at line 222 of file ComponentTransportFEM.h.

◆ ShapeMatricesType

template<typename ShapeFunction , int GlobalDim>
using ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::ShapeMatricesType = ShapeMatrixPolicyType<ShapeFunction, GlobalDim>
private

Definition at line 221 of file ComponentTransportFEM.h.

Constructor & Destructor Documentation

◆ LocalAssemblerData()

template<typename ShapeFunction , int GlobalDim>
ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::LocalAssemblerData ( MeshLib::Element const &  element,
std::size_t const  local_matrix_size,
NumLib::GenericIntegrationMethod const &  integration_method,
bool  is_axially_symmetric,
ComponentTransportProcessData const &  process_data,
std::vector< std::reference_wrapper< ProcessVariable > > const &  transport_process_variables 
)
inline

Definition at line 243 of file ComponentTransportFEM.h.

251 : temperature_index(process_data.isothermal ? -1
252 : ShapeFunction::NPOINTS),
253 first_concentration_index(process_data.isothermal
254 ? ShapeFunction::NPOINTS
255 : 2 * ShapeFunction::NPOINTS),
256 _element(element),
257 _process_data(process_data),
258 _integration_method(integration_method),
259 _transport_process_variables(transport_process_variables)
260 {
261 (void)local_matrix_size;
262
263 unsigned const n_integration_points =
265 _ip_data.reserve(n_integration_points);
266
269
270 double const aperture_size = _process_data.aperture_size(0.0, pos)[0];
271
272 auto const shape_matrices =
274 GlobalDim>(element, is_axially_symmetric,
276 auto const& medium =
278 for (unsigned ip = 0; ip < n_integration_points; ip++)
279 {
280 _ip_data.emplace_back(
281 shape_matrices[ip].N, shape_matrices[ip].dNdx,
283 shape_matrices[ip].integralMeasure *
284 shape_matrices[ip].detJ * aperture_size);
285
286 pos.setIntegrationPoint(ip);
287
288 _ip_data[ip].porosity =
290 .template initialValue<double>(
291 pos, std::numeric_limits<double>::quiet_NaN() /*t*/);
292
293 _ip_data[ip].pushBackState();
294 }
295 }
double getWeight() const
Definition: WeightedPoint.h:80
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)
void setIntegrationPoint(unsigned integration_point)
NumLib::GenericIntegrationMethod const & _integration_method
ComponentTransportProcessData const & _process_data
ShapeMatrixPolicyType< ShapeFunction, GlobalDim > ShapeMatricesType
std::vector< std::reference_wrapper< ProcessVariable > > const _transport_process_variables
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)
MaterialPropertyLib::MaterialSpatialDistributionMap media_map

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::ComponentTransportProcessData::aperture_size, MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), MathLib::WeightedPoint::getWeight(), NumLib::GenericIntegrationMethod::getWeightedPoint(), NumLib::initShapeMatrices(), ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, MaterialPropertyLib::porosity, ParameterLib::SpatialPosition::setElementID(), and ParameterLib::SpatialPosition::setIntegrationPoint().

Member Function Documentation

◆ assemble()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< 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 
)
inlineoverridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 445 of file ComponentTransportFEM.h.

451 {
452 auto const local_matrix_size = local_x.size();
453 // Nodal DOFs include pressure
454 int const num_nodal_dof = 1 + _transport_process_variables.size();
455 // This assertion is valid only if all nodal d.o.f. use the same shape
456 // matrices.
457 assert(local_matrix_size == ShapeFunction::NPOINTS * num_nodal_dof);
458
459 auto local_M = MathLib::createZeroedMatrix<LocalMatrixType>(
460 local_M_data, local_matrix_size, local_matrix_size);
461 auto local_K = MathLib::createZeroedMatrix<LocalMatrixType>(
462 local_K_data, local_matrix_size, local_matrix_size);
463 auto local_b = MathLib::createZeroedVector<LocalVectorType>(
464 local_b_data, local_matrix_size);
465
466 // Get block matrices
467 auto Kpp = local_K.template block<pressure_size, pressure_size>(
469 auto Mpp = local_M.template block<pressure_size, pressure_size>(
471 auto Bp = local_b.template segment<pressure_size>(pressure_index);
472
473 auto local_p = Eigen::Map<const NodalVectorType>(
474 &local_x[pressure_index], pressure_size);
475
476 auto const& b =
479
480 auto const number_of_components = num_nodal_dof - 1;
481 for (int component_id = 0; component_id < number_of_components;
482 ++component_id)
483 {
484 /* Partitioned assembler matrix
485 * | pp | pc1 | pc2 | pc3 |
486 * |-----|-----|-----|-----|
487 * | c1p | c1c1| 0 | 0 |
488 * |-----|-----|-----|-----|
489 * | c2p | 0 | c2c2| 0 |
490 * |-----|-----|-----|-----|
491 * | c3p | 0 | 0 | c3c3|
492 */
493 auto concentration_index =
494 pressure_size + component_id * concentration_size;
495
496 auto KCC =
497 local_K.template block<concentration_size, concentration_size>(
498 concentration_index, concentration_index);
499 auto MCC =
500 local_M.template block<concentration_size, concentration_size>(
501 concentration_index, concentration_index);
502 auto MCp =
503 local_M.template block<concentration_size, pressure_size>(
504 concentration_index, pressure_index);
505 auto MpC =
506 local_M.template block<pressure_size, concentration_size>(
507 pressure_index, concentration_index);
508
509 auto local_C = Eigen::Map<const NodalVectorType>(
510 &local_x[concentration_index], concentration_size);
511
512 assembleBlockMatrices(b, component_id, t, dt, local_C, local_p, KCC,
513 MCC, MCp, MpC, Kpp, Mpp, Bp);
514
516 {
517 auto const stoichiometric_matrix =
520
521 assert(stoichiometric_matrix);
522
523 for (Eigen::SparseMatrix<double>::InnerIterator it(
524 *stoichiometric_matrix, component_id);
525 it;
526 ++it)
527 {
528 auto const stoichiometric_coefficient = it.value();
529 auto const coupled_component_id = it.row();
530 auto const kinetic_prefactor =
532 ->getKineticPrefactor(coupled_component_id);
533
534 auto const concentration_index =
535 pressure_size + component_id * concentration_size;
536 auto const coupled_concentration_index =
538 coupled_component_id * concentration_size;
539 auto KCmCn = local_K.template block<concentration_size,
541 concentration_index, coupled_concentration_index);
542
543 // account for the coupling between components
544 assembleKCmCn(component_id, t, dt, KCmCn,
545 stoichiometric_coefficient,
546 kinetic_prefactor);
547 }
548 }
549 }
550 }
virtual double getKineticPrefactor(std::size_t reaction_id) const
virtual Eigen::SparseMatrix< double > const * getStoichiometricMatrix() const
void assembleBlockMatrices(GlobalDimVectorType const &b, int const component_id, double const t, double const dt, Eigen::Ref< const NodalVectorType > const &C_nodal_values, Eigen::Ref< const NodalVectorType > const &p_nodal_values, Eigen::Ref< LocalBlockMatrixType > KCC, Eigen::Ref< LocalBlockMatrixType > MCC, Eigen::Ref< LocalBlockMatrixType > MCp, Eigen::Ref< LocalBlockMatrixType > MpC, Eigen::Ref< LocalBlockMatrixType > Kpp, Eigen::Ref< LocalBlockMatrixType > Mpp, Eigen::Ref< LocalSegmentVectorType > Bp)
void assembleKCmCn(int const component_id, double const t, double const dt, Eigen::Ref< LocalBlockMatrixType > KCmCn, double const stoichiometric_coefficient, double const kinetic_prefactor)
std::vector< Eigen::VectorXd > const projected_specific_body_force_vectors
Projected specific body force vector: R * R^T * b.
ChemistryLib::ChemicalSolverInterface *const chemical_solver_interface

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_transport_process_variables, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleBlockMatrices(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleKCmCn(), ProcessLib::ComponentTransport::ComponentTransportProcessData::chemical_solver_interface, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, MeshLib::Element::getID(), ChemistryLib::ChemicalSolverInterface::getKineticPrefactor(), ChemistryLib::ChemicalSolverInterface::getStoichiometricMatrix(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_index, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_size, and ProcessLib::ComponentTransport::ComponentTransportProcessData::projected_specific_body_force_vectors.

◆ assembleBlockMatrices()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleBlockMatrices ( GlobalDimVectorType const &  b,
int const  component_id,
double const  t,
double const  dt,
Eigen::Ref< const NodalVectorType > const &  C_nodal_values,
Eigen::Ref< const NodalVectorType > const &  p_nodal_values,
Eigen::Ref< LocalBlockMatrixType KCC,
Eigen::Ref< LocalBlockMatrixType MCC,
Eigen::Ref< LocalBlockMatrixType MCp,
Eigen::Ref< LocalBlockMatrixType MpC,
Eigen::Ref< LocalBlockMatrixType Kpp,
Eigen::Ref< LocalBlockMatrixType Mpp,
Eigen::Ref< LocalSegmentVectorType Bp 
)
inline

Definition at line 552 of file ComponentTransportFEM.h.

564 {
565 unsigned const n_integration_points =
567
570
572
573 // Get material properties
574 auto const& medium =
576 // Select the only valid for component transport liquid phase.
577 auto const& phase = medium.phase("AqueousLiquid");
578
579 // Assume that the component name is the same as the process variable
580 // name. Components are shifted by one because the first one is always
581 // pressure.
582 auto const& component = phase.component(
583 _transport_process_variables[component_id].get().getName());
584
585 LocalBlockMatrixType KCC_Laplacian =
586 LocalBlockMatrixType::Zero(concentration_size, concentration_size);
587
588 std::vector<GlobalDimVectorType> ip_flux_vector;
589 double average_velocity_norm = 0.0;
591 {
592 ip_flux_vector.reserve(n_integration_points);
593 }
594
595 for (unsigned ip(0); ip < n_integration_points; ++ip)
596 {
597 pos.setIntegrationPoint(ip);
598
599 auto& ip_data = _ip_data[ip];
600 auto const& N = ip_data.N;
601 auto const& dNdx = ip_data.dNdx;
602 auto const& w = ip_data.integration_weight;
603 auto& porosity = ip_data.porosity;
604
605 double C_int_pt = 0.0;
606 double p_int_pt = 0.0;
607
608 NumLib::shapeFunctionInterpolate(C_nodal_values, N, C_int_pt);
609 NumLib::shapeFunctionInterpolate(p_nodal_values, N, p_int_pt);
610
611 vars.concentration = C_int_pt;
612 vars.liquid_phase_pressure = p_int_pt;
613
614 // update according to a particular porosity model
616 .template value<double>(vars, pos, t, dt);
617 vars.porosity = porosity;
618
619 auto const& retardation_factor =
621 .template value<double>(vars, pos, t, dt);
622
623 auto const& solute_dispersivity_transverse = medium.template value<
624 double>(
626
627 auto const& solute_dispersivity_longitudinal =
628 medium.template value<double>(
630 longitudinal_dispersivity);
631
632 // Use the fluid density model to compute the density
633 // TODO (renchao): concentration of which component as the argument
634 // for calculation of fluid density
635 auto const density =
637 .template value<double>(vars, pos, t, dt);
638
639 auto const decay_rate =
641 .template value<double>(vars, pos, t, dt);
642
643 auto const& pore_diffusion_coefficient =
644 MaterialPropertyLib::formEigenTensor<GlobalDim>(
646 .value(vars, pos, t, dt));
647
648 auto const& K = MaterialPropertyLib::formEigenTensor<GlobalDim>(
650 vars, pos, t, dt));
651
652 // Use the viscosity model to compute the viscosity
654 .template value<double>(vars, pos, t, dt);
655
656 GlobalDimMatrixType const K_over_mu = K / mu;
657 GlobalDimVectorType const velocity =
659 ? GlobalDimVectorType(-K_over_mu *
660 (dNdx * p_nodal_values - density * b))
661 : GlobalDimVectorType(-K_over_mu * dNdx * p_nodal_values);
662
663 const double drho_dp =
665 .template dValue<double>(
666 vars,
668 pos, t, dt);
669
670 const double drho_dC =
672 .template dValue<double>(
674 t, dt);
675
676 GlobalDimMatrixType const hydrodynamic_dispersion =
679 pore_diffusion_coefficient, velocity, porosity,
680 solute_dispersivity_transverse,
681 solute_dispersivity_longitudinal);
682
683 const double R_times_phi(retardation_factor * porosity);
684 GlobalDimVectorType const mass_density_flow = velocity * density;
685 auto const N_t_N = (N.transpose() * N).eval();
686
688 {
689 MCp.noalias() += N_t_N * (C_int_pt * R_times_phi * drho_dp * w);
690 MCC.noalias() += N_t_N * (C_int_pt * R_times_phi * drho_dC * w);
691 KCC.noalias() -= dNdx.transpose() * mass_density_flow * N * w;
692 }
693 else
694 {
695 ip_flux_vector.emplace_back(mass_density_flow);
696 average_velocity_norm += velocity.norm();
697 }
698 MCC.noalias() += N_t_N * (R_times_phi * density * w);
699 KCC.noalias() += N_t_N * (decay_rate * R_times_phi * density * w);
700 KCC_Laplacian.noalias() +=
701 dNdx.transpose() * hydrodynamic_dispersion * dNdx * density * w;
702
703 MpC.noalias() += N_t_N * (porosity * drho_dC * w);
704
705 // Calculate Mpp, Kpp, and bp in the first loop over components
706 if (component_id == 0)
707 {
708 Mpp.noalias() += N_t_N * (porosity * drho_dp * w);
709 Kpp.noalias() +=
710 dNdx.transpose() * K_over_mu * dNdx * (density * w);
711
713 {
714 Bp.noalias() += dNdx.transpose() * K_over_mu * b *
715 (density * density * w);
716 }
717 }
718 }
719
721 {
724 _ip_data,
725 ip_flux_vector,
726 average_velocity_norm /
727 static_cast<double>(n_integration_points),
728 KCC_Laplacian);
729 }
730
731 KCC.noalias() += KCC_Laplacian;
732 }
std::string getName(std::string const &line)
Returns the name/title from the "Zone"-description.
Phase const & phase(std::size_t index) const
Definition: Medium.cpp:33
Component const & component(std::size_t const &index) const
Definition: Phase.cpp:33
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
typename ShapeMatricesType::GlobalDimMatrixType GlobalDimMatrixType
typename ShapeMatricesType::template MatrixType< pressure_size, pressure_size > LocalBlockMatrixType
@ transversal_dispersivity
used to compute the hydrodynamic dispersion tensor.
Definition: PropertyType.h:110
@ retardation_factor
specify retardation factor used in component transport process.
Definition: PropertyType.h:83
void assembleAdvectionMatrix(IPData const &ip_data_vector, std::vector< FluxVectorType > const &ip_flux_vector, Eigen::MatrixBase< Derived > &laplacian_matrix)
void shapeFunctionInterpolate(const NodalValues &, const ShapeMatrix &)
Definition: Interpolation.h:27
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)
auto & get(Tuples &... ts)
Definition: Get.h:57
auto eval(Function &f, Tuples &... ts) -> typename detail::GetFunctionReturnType< decltype(&Function::eval)>::type
Definition: Apply.h:267

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_transport_process_variables, NumLib::detail::assembleAdvectionMatrix(), MaterialPropertyLib::Phase::component(), NumLib::computeHydrodynamicDispersion(), MaterialPropertyLib::concentration, MaterialPropertyLib::VariableArray::concentration, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, MaterialPropertyLib::decay_rate, MaterialPropertyLib::density, MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), getName(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::has_gravity, MaterialPropertyLib::liquid_phase_pressure, MaterialPropertyLib::VariableArray::liquid_phase_pressure, ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, ProcessLib::ComponentTransport::ComponentTransportProcessData::non_advective_form, MaterialPropertyLib::permeability, MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::pore_diffusion, MaterialPropertyLib::porosity, MaterialPropertyLib::VariableArray::porosity, MaterialPropertyLib::retardation_factor, ParameterLib::SpatialPosition::setElementID(), ParameterLib::SpatialPosition::setIntegrationPoint(), NumLib::detail::shapeFunctionInterpolate(), ProcessLib::ComponentTransport::ComponentTransportProcessData::stabilizer, MaterialPropertyLib::transversal_dispersivity, and MaterialPropertyLib::viscosity.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assemble().

◆ assembleComponentTransportEquation()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleComponentTransportEquation ( double const  t,
double const  dt,
Eigen::VectorXd const &  local_x,
Eigen::VectorXd const &  local_x_prev,
std::vector< double > &  local_M_data,
std::vector< double > &  local_K_data,
std::vector< double > &  ,
int const  transport_process_id 
)
inline

Definition at line 1052 of file ComponentTransportFEM.h.

1057 {
1058 assert(static_cast<int>(local_x.size()) ==
1061 static_cast<int>(_transport_process_variables.size()) +
1063
1064 auto const local_p =
1065 local_x.template segment<pressure_size>(pressure_index);
1066
1067 NodalVectorType local_T = getLocalTemperature(t, local_x);
1068
1069 auto const local_C = local_x.template segment<concentration_size>(
1071 (transport_process_id - (_process_data.isothermal ? 1 : 2)) *
1073 auto const local_p_prev =
1074 local_x_prev.segment<pressure_size>(pressure_index);
1075
1076 auto local_M = MathLib::createZeroedMatrix<LocalBlockMatrixType>(
1077 local_M_data, concentration_size, concentration_size);
1078 auto local_K = MathLib::createZeroedMatrix<LocalBlockMatrixType>(
1079 local_K_data, concentration_size, concentration_size);
1080
1081 LocalBlockMatrixType KCC_Laplacian =
1082 LocalBlockMatrixType::Zero(concentration_size, concentration_size);
1083
1084 unsigned const n_integration_points =
1086
1087 std::vector<GlobalDimVectorType> ip_flux_vector;
1088 double average_velocity_norm = 0.0;
1090 {
1091 ip_flux_vector.reserve(n_integration_points);
1092 }
1093
1096
1097 auto const& b =
1100
1103
1104 auto const& medium =
1106 auto const& phase = medium.phase("AqueousLiquid");
1107 auto const component_id =
1108 transport_process_id - (_process_data.isothermal ? 1 : 2);
1109 auto const& component = phase.component(
1110 _transport_process_variables[component_id].get().getName());
1111
1112 for (unsigned ip(0); ip < n_integration_points; ++ip)
1113 {
1114 pos.setIntegrationPoint(ip);
1115
1116 auto& ip_data = _ip_data[ip];
1117 auto const& N = ip_data.N;
1118 auto const& dNdx = ip_data.dNdx;
1119 auto const& w = ip_data.integration_weight;
1120 auto& porosity = ip_data.porosity;
1121 auto const& porosity_prev = ip_data.porosity_prev;
1122
1123 double const C_int_pt = N.dot(local_C);
1124 double const p_int_pt = N.dot(local_p);
1125 double const T_int_pt = N.dot(local_T);
1126
1127 vars.concentration = C_int_pt;
1128 vars.liquid_phase_pressure = p_int_pt;
1129 vars.temperature = T_int_pt;
1130
1132 {
1133 vars.temperature = N.dot(local_T);
1134 }
1135
1136 // porosity
1137 {
1138 vars_prev.porosity = porosity_prev;
1139
1140 porosity =
1142 ? porosity_prev
1144 .template value<double>(vars, vars_prev, pos, t,
1145 dt);
1146
1147 vars.porosity = porosity;
1148 }
1149
1150 auto const& retardation_factor =
1152 .template value<double>(vars, pos, t, dt);
1153
1154 auto const& solute_dispersivity_transverse = medium.template value<
1155 double>(
1157 auto const& solute_dispersivity_longitudinal =
1158 medium.template value<double>(
1160 longitudinal_dispersivity);
1161
1162 // Use the fluid density model to compute the density
1163 auto const density =
1165 .template value<double>(vars, pos, t, dt);
1166 auto const decay_rate =
1168 .template value<double>(vars, pos, t, dt);
1169
1170 auto const& pore_diffusion_coefficient =
1171 MaterialPropertyLib::formEigenTensor<GlobalDim>(
1173 .value(vars, pos, t, dt));
1174
1175 auto const& K = MaterialPropertyLib::formEigenTensor<GlobalDim>(
1177 vars, pos, t, dt));
1178 // Use the viscosity model to compute the viscosity
1180 .template value<double>(vars, pos, t, dt);
1181
1182 GlobalDimMatrixType const K_over_mu = K / mu;
1183 GlobalDimVectorType const velocity =
1185 ? GlobalDimVectorType(-K_over_mu *
1186 (dNdx * local_p - density * b))
1187 : GlobalDimVectorType(-K_over_mu * dNdx * local_p);
1188
1189 GlobalDimMatrixType const hydrodynamic_dispersion =
1192 pore_diffusion_coefficient, velocity, porosity,
1193 solute_dispersivity_transverse,
1194 solute_dispersivity_longitudinal);
1195
1196 double const R_times_phi = retardation_factor * porosity;
1197 auto const N_t_N = (N.transpose() * N).eval();
1198
1200 {
1201 const double drho_dC =
1203 .template dValue<double>(
1205 pos, t, dt);
1206 local_M.noalias() +=
1207 N_t_N * (R_times_phi * C_int_pt * drho_dC * w);
1208 }
1209
1210 local_M.noalias() += N_t_N * (R_times_phi * density * w);
1211
1212 // coupling term
1214 {
1215 double const p_dot = (p_int_pt - N.dot(local_p_prev)) / dt;
1216
1217 const double drho_dp =
1219 .template dValue<double>(vars,
1221 liquid_phase_pressure,
1222 pos, t, dt);
1223
1224 local_K.noalias() +=
1225 N_t_N * ((R_times_phi * drho_dp * p_dot) * w) -
1226 dNdx.transpose() * velocity * N * (density * w);
1227 }
1228 else
1229 {
1230 ip_flux_vector.emplace_back(velocity * density);
1231 average_velocity_norm += velocity.norm();
1232 }
1233 local_K.noalias() +=
1234 N_t_N * (decay_rate * R_times_phi * density * w);
1235
1236 KCC_Laplacian.noalias() += dNdx.transpose() *
1237 hydrodynamic_dispersion * dNdx *
1238 (density * w);
1239 }
1240
1242 {
1245 _ip_data,
1246 ip_flux_vector,
1247 average_velocity_norm /
1248 static_cast<double>(n_integration_points),
1249 KCC_Laplacian);
1250 }
1251 local_K.noalias() += KCC_Laplacian;
1252 }
NodalVectorType getLocalTemperature(double const t, Eigen::VectorXd const &local_x)
typename ShapeMatricesType::NodalVectorType NodalVectorType

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_transport_process_variables, NumLib::detail::assembleAdvectionMatrix(), ProcessLib::ComponentTransport::ComponentTransportProcessData::chemically_induced_porosity_change, MaterialPropertyLib::Phase::component(), NumLib::computeHydrodynamicDispersion(), MaterialPropertyLib::concentration, MaterialPropertyLib::VariableArray::concentration, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, MaterialPropertyLib::decay_rate, MaterialPropertyLib::density, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MeshLib::Element::getID(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getLocalTemperature(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::has_gravity, ProcessLib::ComponentTransport::ComponentTransportProcessData::isothermal, MaterialPropertyLib::VariableArray::liquid_phase_pressure, ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, ProcessLib::ComponentTransport::ComponentTransportProcessData::non_advective_form, MaterialPropertyLib::permeability, MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::pore_diffusion, MaterialPropertyLib::porosity, MaterialPropertyLib::VariableArray::porosity, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_index, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_size, ProcessLib::ComponentTransport::ComponentTransportProcessData::projected_specific_body_force_vectors, MaterialPropertyLib::retardation_factor, ParameterLib::SpatialPosition::setElementID(), ParameterLib::SpatialPosition::setIntegrationPoint(), ProcessLib::ComponentTransport::ComponentTransportProcessData::stabilizer, MaterialPropertyLib::VariableArray::temperature, ProcessLib::ComponentTransport::ComponentTransportProcessData::temperature, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::temperature_size, MaterialPropertyLib::transversal_dispersivity, and MaterialPropertyLib::viscosity.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleForStaggeredScheme().

◆ assembleForStaggeredScheme()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::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 
)
inlineoverridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 777 of file ComponentTransportFEM.h.

784 {
785 if (process_id == _process_data.hydraulic_process_id)
786 {
787 assembleHydraulicEquation(t, dt, local_x, local_x_prev,
788 local_M_data, local_K_data, local_b_data);
789 }
790 else if (process_id == _process_data.thermal_process_id)
791 {
792 assembleHeatTransportEquation(t, dt, local_x, local_x_prev,
793 local_M_data, local_K_data,
794 local_b_data);
795 }
796 else
797 {
798 // Go for assembling in an order of transport process id.
799 assembleComponentTransportEquation(t, dt, local_x, local_x_prev,
800 local_M_data, local_K_data,
801 local_b_data, process_id);
802 }
803 }
void assembleHeatTransportEquation(double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &)
void assembleHydraulicEquation(double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data)
void assembleComponentTransportEquation(double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &, int const transport_process_id)

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleComponentTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHeatTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHydraulicEquation(), ProcessLib::ComponentTransport::ComponentTransportProcessData::hydraulic_process_id, and ProcessLib::ComponentTransport::ComponentTransportProcessData::thermal_process_id.

◆ assembleHeatTransportEquation()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHeatTransportEquation ( double const  t,
double const  dt,
Eigen::VectorXd const &  local_x,
Eigen::VectorXd const &  ,
std::vector< double > &  local_M_data,
std::vector< double > &  local_K_data,
std::vector< double > &   
)
inline

Definition at line 929 of file ComponentTransportFEM.h.

935 {
936 assert(local_x.size() ==
938
939 auto const local_p =
940 local_x.template segment<pressure_size>(pressure_index);
941 auto const local_T =
942 local_x.template segment<temperature_size>(temperature_index);
943
944 auto local_M = MathLib::createZeroedMatrix<LocalBlockMatrixType>(
945 local_M_data, temperature_size, temperature_size);
946 auto local_K = MathLib::createZeroedMatrix<LocalBlockMatrixType>(
947 local_K_data, temperature_size, temperature_size);
948
950 pos.setElementID(this->_element.getID());
951
952 auto const& process_data = this->_process_data;
953 auto const& medium =
954 *process_data.media_map.getMedium(this->_element.getID());
955 auto const& liquid_phase = medium.phase("AqueousLiquid");
956
957 auto const& b =
960
962
963 unsigned const n_integration_points =
965
966 std::vector<GlobalDimVectorType> ip_flux_vector;
967 double average_velocity_norm = 0.0;
968 ip_flux_vector.reserve(n_integration_points);
969
970 for (unsigned ip(0); ip < n_integration_points; ip++)
971 {
972 pos.setIntegrationPoint(ip);
973
974 auto const& ip_data = this->_ip_data[ip];
975 auto const& N = ip_data.N;
976 auto const& dNdx = ip_data.dNdx;
977 auto const& w = ip_data.integration_weight;
978
979 double p_at_xi = 0.;
980 NumLib::shapeFunctionInterpolate(local_p, N, p_at_xi);
981 double T_at_xi = 0.;
982 NumLib::shapeFunctionInterpolate(local_T, N, T_at_xi);
983
984 vars.temperature = T_at_xi;
985 vars.liquid_phase_pressure = p_at_xi;
986
987 vars.liquid_saturation = 1.0;
988
989 auto const porosity =
991 .template value<double>(vars, pos, t, dt);
992 vars.porosity = porosity;
993
994 // Use the fluid density model to compute the density
995 auto const fluid_density =
996 liquid_phase
998 .template value<double>(vars, pos, t, dt);
999 vars.density = fluid_density;
1000 auto const specific_heat_capacity_fluid =
1001 liquid_phase
1003 .template value<double>(vars, pos, t, dt);
1004
1005 // Assemble mass matrix
1006 local_M.noalias() += w *
1008 vars, porosity, fluid_density,
1009 specific_heat_capacity_fluid, pos, t, dt) *
1010 N.transpose() * N;
1011
1012 // Assemble Laplace matrix
1013 auto const viscosity =
1014 liquid_phase
1016 .template value<double>(vars, pos, t, dt);
1017
1018 auto const intrinsic_permeability =
1019 MaterialPropertyLib::formEigenTensor<GlobalDim>(
1020 medium
1021 .property(
1023 .value(vars, pos, t, dt));
1024
1025 GlobalDimMatrixType const K_over_mu =
1026 intrinsic_permeability / viscosity;
1027 GlobalDimVectorType const velocity =
1028 process_data.has_gravity
1029 ? GlobalDimVectorType(-K_over_mu *
1030 (dNdx * local_p - fluid_density * b))
1031 : GlobalDimVectorType(-K_over_mu * dNdx * local_p);
1032
1033 GlobalDimMatrixType const thermal_conductivity_dispersivity =
1035 vars, fluid_density, specific_heat_capacity_fluid, velocity,
1036 pos, t, dt);
1037
1038 local_K.noalias() +=
1039 w * dNdx.transpose() * thermal_conductivity_dispersivity * dNdx;
1040
1041 ip_flux_vector.emplace_back(velocity * fluid_density *
1042 specific_heat_capacity_fluid);
1043 average_velocity_norm += velocity.norm();
1044 }
1045
1047 process_data.stabilizer, this->_ip_data, ip_flux_vector,
1048 average_velocity_norm / static_cast<double>(n_integration_points),
1049 local_K);
1050 }
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)
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)
double fluid_density(const double p, const double T, const double x)

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, NumLib::detail::assembleAdvectionMatrix(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, MaterialPropertyLib::density, MaterialPropertyLib::VariableArray::density, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getHeatEnergyCoefficient(), MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getThermalConductivityDispersivity(), MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::VariableArray::liquid_saturation, ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, MaterialPropertyLib::permeability, MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::porosity, MaterialPropertyLib::VariableArray::porosity, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_index, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_size, ProcessLib::ComponentTransport::ComponentTransportProcessData::projected_specific_body_force_vectors, ParameterLib::SpatialPosition::setElementID(), ParameterLib::SpatialPosition::setIntegrationPoint(), NumLib::detail::shapeFunctionInterpolate(), MaterialPropertyLib::specific_heat_capacity, MaterialPropertyLib::VariableArray::temperature, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::temperature_index, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::temperature_size, and MaterialPropertyLib::viscosity.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleForStaggeredScheme().

◆ assembleHydraulicEquation()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHydraulicEquation ( double const  t,
double const  dt,
Eigen::VectorXd const &  local_x,
Eigen::VectorXd const &  local_x_prev,
std::vector< double > &  local_M_data,
std::vector< double > &  local_K_data,
std::vector< double > &  local_b_data 
)
inline

Definition at line 805 of file ComponentTransportFEM.h.

812 {
813 auto const local_p =
814 local_x.template segment<pressure_size>(pressure_index);
815 auto const local_C = local_x.template segment<concentration_size>(
817 auto const local_C_prev =
818 local_x_prev.segment<concentration_size>(first_concentration_index);
819
820 NodalVectorType local_T = getLocalTemperature(t, local_x);
821
822 auto local_M = MathLib::createZeroedMatrix<LocalBlockMatrixType>(
823 local_M_data, pressure_size, pressure_size);
824 auto local_K = MathLib::createZeroedMatrix<LocalBlockMatrixType>(
825 local_K_data, pressure_size, pressure_size);
826 auto local_b = MathLib::createZeroedVector<LocalSegmentVectorType>(
827 local_b_data, pressure_size);
828
829 unsigned const n_integration_points =
831
834
835 auto const& b =
838
839 auto const& medium =
841 auto const& phase = medium.phase("AqueousLiquid");
842
845
846 for (unsigned ip(0); ip < n_integration_points; ++ip)
847 {
848 pos.setIntegrationPoint(ip);
849
850 auto& ip_data = _ip_data[ip];
851 auto const& N = ip_data.N;
852 auto const& dNdx = ip_data.dNdx;
853 auto const& w = ip_data.integration_weight;
854 auto& porosity = ip_data.porosity;
855 auto const& porosity_prev = ip_data.porosity_prev;
856
857 double const C_int_pt = N.dot(local_C);
858 double const p_int_pt = N.dot(local_p);
859 double const T_int_pt = N.dot(local_T);
860
861 vars.concentration = C_int_pt;
862 vars.liquid_phase_pressure = p_int_pt;
863 vars.temperature = T_int_pt;
864
865 // porosity
866 {
867 vars_prev.porosity = porosity_prev;
868
869 porosity =
871 ? porosity_prev
873 .template value<double>(vars, vars_prev, pos, t,
874 dt);
875
876 vars.porosity = porosity;
877 }
878
879 // Use the fluid density model to compute the density
880 // TODO: Concentration of which component as one of arguments for
881 // calculation of fluid density
882 auto const density =
884 .template value<double>(vars, pos, t, dt);
885
886 auto const& K = MaterialPropertyLib::formEigenTensor<GlobalDim>(
888 vars, pos, t, dt));
889
890 // Use the viscosity model to compute the viscosity
892 .template value<double>(vars, pos, t, dt);
893
894 GlobalDimMatrixType const K_over_mu = K / mu;
895
896 const double drho_dp =
898 .template dValue<double>(
899 vars,
901 pos, t, dt);
902 const double drho_dC =
904 .template dValue<double>(
906 t, dt);
907
908 // matrix assembly
909 local_M.noalias() += w * N.transpose() * porosity * drho_dp * N;
910 local_K.noalias() +=
911 w * dNdx.transpose() * density * K_over_mu * dNdx;
912
914 {
915 local_b.noalias() +=
916 w * density * density * dNdx.transpose() * K_over_mu * b;
917 }
918
919 // coupling term
920 {
921 double const C_dot = (C_int_pt - N.dot(local_C_prev)) / dt;
922
923 local_b.noalias() -=
924 w * N.transpose() * porosity * drho_dC * C_dot;
925 }
926 }
927 }

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::ComponentTransportProcessData::chemically_induced_porosity_change, MaterialPropertyLib::concentration, MaterialPropertyLib::VariableArray::concentration, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, MaterialPropertyLib::density, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MeshLib::Element::getID(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getLocalTemperature(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::has_gravity, MaterialPropertyLib::liquid_phase_pressure, MaterialPropertyLib::VariableArray::liquid_phase_pressure, ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, MaterialPropertyLib::permeability, MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::porosity, MaterialPropertyLib::VariableArray::porosity, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_index, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_size, ProcessLib::ComponentTransport::ComponentTransportProcessData::projected_specific_body_force_vectors, ParameterLib::SpatialPosition::setElementID(), ParameterLib::SpatialPosition::setIntegrationPoint(), MaterialPropertyLib::VariableArray::temperature, and MaterialPropertyLib::viscosity.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleForStaggeredScheme().

◆ assembleKCmCn()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleKCmCn ( int const  component_id,
double const  t,
double const  dt,
Eigen::Ref< LocalBlockMatrixType KCmCn,
double const  stoichiometric_coefficient,
double const  kinetic_prefactor 
)
inline

Definition at line 734 of file ComponentTransportFEM.h.

738 {
739 unsigned const n_integration_points =
741
744
746
747 auto const& medium =
749 auto const& phase = medium.phase("AqueousLiquid");
750 auto const& component = phase.component(
751 _transport_process_variables[component_id].get().getName());
752
753 for (unsigned ip(0); ip < n_integration_points; ++ip)
754 {
755 auto& ip_data = _ip_data[ip];
756 auto const& N = ip_data.N;
757 auto const& w = ip_data.integration_weight;
758 auto& porosity = ip_data.porosity;
759
760 auto const retardation_factor =
762 .template value<double>(vars, pos, t, dt);
763
765 .template value<double>(vars, pos, t, dt);
766
767 auto const density =
769 .template value<double>(vars, pos, t, dt);
770
771 KCmCn.noalias() -= w * N.transpose() * stoichiometric_coefficient *
772 kinetic_prefactor * retardation_factor *
773 porosity * density * N;
774 }
775 }

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_transport_process_variables, MaterialPropertyLib::Phase::component(), MaterialPropertyLib::density, MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), getName(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::porosity, MaterialPropertyLib::retardation_factor, and ParameterLib::SpatialPosition::setElementID().

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assemble().

◆ assembleReactionEquationConcrete()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleReactionEquationConcrete ( double const  t,
double const  dt,
Eigen::VectorXd const &  local_x,
std::vector< double > &  local_M_data,
std::vector< double > &  local_K_data,
std::vector< double > &  local_b_data,
int const  transport_process_id 
)
inlineoverridevirtual

Implements ProcessLib::ComponentTransport::ComponentTransportLocalAssemblerInterface.

Definition at line 1526 of file ComponentTransportFEM.h.

1531 {
1532 auto const local_C = local_x.template segment<concentration_size>(
1534 (transport_process_id - 1) * concentration_size);
1535
1536 auto local_M = MathLib::createZeroedMatrix<LocalBlockMatrixType>(
1537 local_M_data, concentration_size, concentration_size);
1538 auto local_K = MathLib::createZeroedMatrix<LocalBlockMatrixType>(
1539 local_K_data, concentration_size, concentration_size);
1540 auto local_b = MathLib::createZeroedVector<LocalVectorType>(
1541 local_b_data, concentration_size);
1542
1543 unsigned const n_integration_points =
1545
1548
1551
1552 auto const& medium =
1554 auto const component_id = transport_process_id - 1;
1555 for (unsigned ip(0); ip < n_integration_points; ++ip)
1556 {
1557 pos.setIntegrationPoint(ip);
1558
1559 auto& ip_data = _ip_data[ip];
1560 auto const& N = ip_data.N;
1561 auto const w = ip_data.integration_weight;
1562 auto& porosity = ip_data.porosity;
1563 auto const& porosity_prev = ip_data.porosity_prev;
1564 auto const chemical_system_id = ip_data.chemical_system_id;
1565
1566 double C_int_pt = 0.0;
1567 NumLib::shapeFunctionInterpolate(local_C, N, C_int_pt);
1568
1569 vars.concentration = C_int_pt;
1570
1571 auto const porosity_dot = (porosity - porosity_prev) / dt;
1572
1573 // porosity
1574 {
1575 vars_prev.porosity = porosity_prev;
1576
1577 porosity =
1579 ? porosity_prev
1581 .template value<double>(vars, vars_prev, pos, t,
1582 dt);
1583 }
1584
1585 local_M.noalias() += w * N.transpose() * porosity * N;
1586
1587 local_K.noalias() += w * N.transpose() * porosity_dot * N;
1588
1589 if (chemical_system_id == -1)
1590 {
1591 continue;
1592 }
1593
1594 auto const C_post_int_pt =
1596 component_id, chemical_system_id);
1597
1598 local_b.noalias() +=
1599 w * N.transpose() * porosity * (C_post_int_pt - C_int_pt) / dt;
1600 }
1601 }
virtual double getConcentration(int const, GlobalIndexType const) const

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::ComponentTransportProcessData::chemical_solver_interface, ProcessLib::ComponentTransport::ComponentTransportProcessData::chemically_induced_porosity_change, MaterialPropertyLib::VariableArray::concentration, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, ChemistryLib::ChemicalSolverInterface::getConcentration(), MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, MaterialPropertyLib::porosity, MaterialPropertyLib::VariableArray::porosity, ParameterLib::SpatialPosition::setElementID(), ParameterLib::SpatialPosition::setIntegrationPoint(), and NumLib::detail::shapeFunctionInterpolate().

◆ assembleWithJacobianComponentTransportEquation()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianComponentTransportEquation ( double const  t,
double const  dt,
Eigen::VectorXd const &  local_x,
Eigen::VectorXd const &  local_x_prev,
std::vector< double > &  local_b_data,
std::vector< double > &  local_Jac_data,
int const  component_id 
)
inline

Definition at line 1381 of file ComponentTransportFEM.h.

1385 {
1386 auto const concentration_index =
1388
1389 auto const p = local_x.template segment<pressure_size>(pressure_index);
1390 auto const c =
1391 local_x.template segment<concentration_size>(concentration_index);
1392 auto const c_prev =
1393 local_x_prev.segment<concentration_size>(concentration_index);
1394
1397 {
1399 }
1400
1401 auto local_Jac = MathLib::createZeroedMatrix<LocalBlockMatrixType>(
1402 local_Jac_data, concentration_size, concentration_size);
1403 auto local_rhs = MathLib::createZeroedVector<LocalSegmentVectorType>(
1404 local_b_data, concentration_size);
1405
1406 LocalBlockMatrixType KCC_Laplacian =
1407 LocalBlockMatrixType::Zero(concentration_size, concentration_size);
1408
1409 unsigned const n_integration_points =
1411
1412 std::vector<GlobalDimVectorType> ip_flux_vector;
1413 double average_velocity_norm = 0.0;
1414 ip_flux_vector.reserve(n_integration_points);
1415
1418
1419 auto const& b =
1422
1425
1426 auto const& medium =
1428 auto const& phase = medium.phase("AqueousLiquid");
1429 auto const& component = phase.component(
1430 _transport_process_variables[component_id].get().getName());
1431
1432 for (unsigned ip(0); ip < n_integration_points; ++ip)
1433 {
1434 pos.setIntegrationPoint(ip);
1435
1436 auto& ip_data = _ip_data[ip];
1437 auto const& N = ip_data.N;
1438 auto const& dNdx = ip_data.dNdx;
1439 auto const& w = ip_data.integration_weight;
1440 auto& phi = ip_data.porosity;
1441 auto const& phi_prev = ip_data.porosity_prev;
1442
1443 double const p_ip = N.dot(p);
1444 double const c_ip = N.dot(c);
1445
1446 vars.liquid_phase_pressure = p_ip;
1447 vars.concentration = c_ip;
1448
1450 {
1451 vars.temperature = N.dot(T);
1452 }
1453
1454 // porosity
1455 {
1456 vars_prev.porosity = phi_prev;
1457
1459 ? phi_prev
1461 .template value<double>(vars, vars_prev, pos, t,
1462 dt);
1463
1464 vars.porosity = phi;
1465 }
1466
1467 auto const R =
1469 .template value<double>(vars, pos, t, dt);
1470
1471 auto const alpha_T = medium.template value<double>(
1473 auto const alpha_L = medium.template value<double>(
1475
1477 .template value<double>(vars, pos, t, dt);
1478 // first-order decay constant
1479 auto const alpha =
1481 .template value<double>(vars, pos, t, dt);
1482
1483 auto const Dp = MaterialPropertyLib::formEigenTensor<GlobalDim>(
1485 .value(vars, pos, t, dt));
1486
1487 auto const k = MaterialPropertyLib::formEigenTensor<GlobalDim>(
1489 vars, pos, t, dt));
1491 .template value<double>(vars, pos, t, dt);
1492 // Darcy flux
1493 GlobalDimVectorType const q =
1495 ? GlobalDimVectorType(-k / mu * (dNdx * p - rho * b))
1496 : GlobalDimVectorType(-k / mu * dNdx * p);
1497
1499 _process_data.stabilizer, _element.getID(), Dp, q, phi, alpha_T,
1500 alpha_L);
1501
1502 // matrix assembly
1503 local_Jac.noalias() +=
1504 w * rho * N.transpose() * phi * R * (alpha + 1 / dt) * N;
1505
1506 KCC_Laplacian.noalias() += w * rho * dNdx.transpose() * D * dNdx;
1507
1508 auto const cdot = (c - c_prev) / dt;
1509 local_rhs.noalias() -=
1510 w * rho * N.transpose() * phi * R * N * (cdot + alpha * c);
1511
1512 ip_flux_vector.emplace_back(q * rho);
1513 average_velocity_norm += q.norm();
1514 }
1515
1517 _process_data.stabilizer, _ip_data, ip_flux_vector,
1518 average_velocity_norm / static_cast<double>(n_integration_points),
1519 KCC_Laplacian);
1520
1521 local_rhs.noalias() -= KCC_Laplacian * c;
1522
1523 local_Jac.noalias() += KCC_Laplacian;
1524 }
@ rho
density. For some models, rho substitutes p
@ longitudinal_dispersivity
used to compute the hydrodynamic dispersion tensor.
Definition: PropertyType.h:59
virtual Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > getNodalValuesOnElement(MeshLib::Element const &element, double const t) const
Returns a matrix of values for all nodes of the given element.
Definition: Parameter.h:164

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_transport_process_variables, NumLib::detail::assembleAdvectionMatrix(), ProcessLib::ComponentTransport::ComponentTransportProcessData::chemically_induced_porosity_change, MaterialPropertyLib::Phase::component(), NumLib::computeHydrodynamicDispersion(), MaterialPropertyLib::VariableArray::concentration, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, MaterialPropertyLib::decay_rate, MaterialPropertyLib::density, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), getName(), ParameterLib::Parameter< T >::getNodalValuesOnElement(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::has_gravity, MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::longitudinal_dispersivity, ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, MaterialPropertyLib::permeability, MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::pore_diffusion, MaterialPropertyLib::porosity, MaterialPropertyLib::VariableArray::porosity, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_index, ProcessLib::ComponentTransport::ComponentTransportProcessData::projected_specific_body_force_vectors, MaterialPropertyLib::retardation_factor, ParameterLib::SpatialPosition::setElementID(), ParameterLib::SpatialPosition::setIntegrationPoint(), ProcessLib::ComponentTransport::ComponentTransportProcessData::stabilizer, MaterialPropertyLib::VariableArray::temperature, ProcessLib::ComponentTransport::ComponentTransportProcessData::temperature, MaterialPropertyLib::transversal_dispersivity, and MaterialPropertyLib::viscosity.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianForStaggeredScheme().

◆ assembleWithJacobianForStaggeredScheme()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::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 > &  ,
std::vector< double > &  ,
std::vector< double > &  local_b_data,
std::vector< double > &  local_Jac_data 
)
inlineoverridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 1254 of file ComponentTransportFEM.h.

1261 {
1262 if (process_id == _process_data.hydraulic_process_id)
1263 {
1264 assembleWithJacobianHydraulicEquation(t, dt, local_x, local_x_prev,
1265 local_b_data, local_Jac_data);
1266 }
1267 else
1268 {
1269 int const component_id = process_id - 1;
1271 t, dt, local_x, local_x_prev, local_b_data, local_Jac_data,
1272 component_id);
1273 }
1274 }
void assembleWithJacobianHydraulicEquation(double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
void assembleWithJacobianComponentTransportEquation(double const t, double const dt, Eigen::VectorXd const &local_x, Eigen::VectorXd const &local_x_prev, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data, int const component_id)

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianComponentTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianHydraulicEquation(), and ProcessLib::ComponentTransport::ComponentTransportProcessData::hydraulic_process_id.

◆ assembleWithJacobianHydraulicEquation()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianHydraulicEquation ( double const  t,
double const  dt,
Eigen::VectorXd const &  local_x,
Eigen::VectorXd const &  local_x_prev,
std::vector< double > &  local_b_data,
std::vector< double > &  local_Jac_data 
)
inline

Definition at line 1276 of file ComponentTransportFEM.h.

1280 {
1281 auto const p = local_x.template segment<pressure_size>(pressure_index);
1282 auto const c = local_x.template segment<concentration_size>(
1284
1285 auto const p_prev = local_x_prev.segment<pressure_size>(pressure_index);
1286 auto const c_prev =
1287 local_x_prev.segment<concentration_size>(first_concentration_index);
1288
1289 auto local_Jac = MathLib::createZeroedMatrix<LocalBlockMatrixType>(
1290 local_Jac_data, pressure_size, pressure_size);
1291 auto local_rhs = MathLib::createZeroedVector<LocalSegmentVectorType>(
1292 local_b_data, pressure_size);
1293
1294 unsigned const n_integration_points =
1296
1299 auto const& b =
1302
1303 auto const& medium =
1305 auto const& phase = medium.phase("AqueousLiquid");
1306
1309
1310 for (unsigned ip(0); ip < n_integration_points; ++ip)
1311 {
1312 pos.setIntegrationPoint(ip);
1313
1314 auto& ip_data = _ip_data[ip];
1315 auto const& N = ip_data.N;
1316 auto const& dNdx = ip_data.dNdx;
1317 auto const& w = ip_data.integration_weight;
1318 auto& phi = ip_data.porosity;
1319 auto const& phi_prev = ip_data.porosity_prev;
1320
1321 double const p_ip = N.dot(p);
1322 double const c_ip = N.dot(c);
1323
1324 double const cdot_ip = (c_ip - N.dot(c_prev)) / dt;
1325
1326 vars.liquid_phase_pressure = p_ip;
1327 vars.concentration = c_ip;
1328
1329 // porosity
1330 {
1331 vars_prev.porosity = phi_prev;
1332
1334 ? phi_prev
1336 .template value<double>(vars, vars_prev, pos, t,
1337 dt);
1338
1339 vars.porosity = phi;
1340 }
1341
1343 .template value<double>(vars, pos, t, dt);
1344
1345 auto const k = MaterialPropertyLib::formEigenTensor<GlobalDim>(
1347 vars, pos, t, dt));
1348
1350 .template value<double>(vars, pos, t, dt);
1351
1352 auto const drho_dp =
1354 .template dValue<double>(
1355 vars,
1357 pos, t, dt);
1358 auto const drho_dc =
1360 .template dValue<double>(
1362 t, dt);
1363
1364 // matrix assembly
1365 local_Jac.noalias() += w * N.transpose() * phi * drho_dp / dt * N +
1366 w * dNdx.transpose() * rho * k / mu * dNdx;
1367
1368 local_rhs.noalias() -=
1369 w * N.transpose() * phi *
1370 (drho_dp * N * p_prev + drho_dc * cdot_ip) +
1371 w * rho * dNdx.transpose() * k / mu * dNdx * p;
1372
1374 {
1375 local_rhs.noalias() +=
1376 w * rho * dNdx.transpose() * k / mu * rho * b;
1377 }
1378 }
1379 }

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::ComponentTransportProcessData::chemically_induced_porosity_change, MaterialPropertyLib::concentration, MaterialPropertyLib::VariableArray::concentration, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, MaterialPropertyLib::density, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::has_gravity, MaterialPropertyLib::liquid_phase_pressure, MaterialPropertyLib::VariableArray::liquid_phase_pressure, ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, MaterialPropertyLib::permeability, MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::porosity, MaterialPropertyLib::VariableArray::porosity, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_index, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_size, ProcessLib::ComponentTransport::ComponentTransportProcessData::projected_specific_body_force_vectors, ParameterLib::SpatialPosition::setElementID(), ParameterLib::SpatialPosition::setIntegrationPoint(), and MaterialPropertyLib::viscosity.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianForStaggeredScheme().

◆ calculateIntPtDarcyVelocity()

template<typename ShapeFunction , int GlobalDim>
std::vector< double > const & ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::calculateIntPtDarcyVelocity ( const double  t,
Eigen::Ref< const NodalVectorType > const &  p_nodal_values,
Eigen::Ref< const NodalVectorType > const &  C_nodal_values,
std::vector< double > &  cache 
) const
inline

Definition at line 1645 of file ComponentTransportFEM.h.

1650 {
1651 auto const n_integration_points =
1653
1654 cache.clear();
1655 auto cache_mat = MathLib::createZeroedMatrix<
1656 Eigen::Matrix<double, GlobalDim, Eigen::Dynamic, Eigen::RowMajor>>(
1657 cache, GlobalDim, n_integration_points);
1658
1661
1662 auto const& b =
1665
1667
1668 auto const& medium =
1670 auto const& phase = medium.phase("AqueousLiquid");
1671
1672 for (unsigned ip = 0; ip < n_integration_points; ++ip)
1673 {
1674 auto const& ip_data = _ip_data[ip];
1675 auto const& N = ip_data.N;
1676 auto const& dNdx = ip_data.dNdx;
1677 auto const& porosity = ip_data.porosity;
1678
1679 pos.setIntegrationPoint(ip);
1680
1681 double C_int_pt = 0.0;
1682 double p_int_pt = 0.0;
1683
1684 NumLib::shapeFunctionInterpolate(C_nodal_values, N, C_int_pt);
1685 NumLib::shapeFunctionInterpolate(p_nodal_values, N, p_int_pt);
1686
1687 vars.concentration = C_int_pt;
1688 vars.liquid_phase_pressure = p_int_pt;
1689 vars.porosity = porosity;
1690
1691 // TODO (naumov) Temporary value not used by current material
1692 // models. Need extension of secondary variables interface.
1693 double const dt = std::numeric_limits<double>::quiet_NaN();
1694 auto const& K = MaterialPropertyLib::formEigenTensor<GlobalDim>(
1696 vars, pos, t, dt));
1698 .template value<double>(vars, pos, t, dt);
1699 GlobalDimMatrixType const K_over_mu = K / mu;
1700
1701 cache_mat.col(ip).noalias() = -K_over_mu * dNdx * p_nodal_values;
1703 {
1704 auto const rho_w =
1706 .template value<double>(vars, pos, t, dt);
1707 // here it is assumed that the vector b is directed 'downwards'
1708 cache_mat.col(ip).noalias() += K_over_mu * rho_w * b;
1709 }
1710 }
1711
1712 return cache;
1713 }
Eigen::Map< Matrix > createZeroedMatrix(std::vector< double > &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)
Definition: EigenMapTools.h:32

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, MaterialPropertyLib::VariableArray::concentration, MathLib::createZeroedMatrix(), MaterialPropertyLib::density, MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::has_gravity, MaterialPropertyLib::VariableArray::liquid_phase_pressure, ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, MaterialPropertyLib::permeability, MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::VariableArray::porosity, ProcessLib::ComponentTransport::ComponentTransportProcessData::projected_specific_body_force_vectors, ParameterLib::SpatialPosition::setElementID(), NumLib::detail::shapeFunctionInterpolate(), and MaterialPropertyLib::viscosity.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::computeSecondaryVariableConcrete(), and ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtDarcyVelocity().

◆ computeReactionRelatedSecondaryVariable()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::computeReactionRelatedSecondaryVariable ( std::size_t const  ele_id)
inlineoverridevirtual

Implements ProcessLib::ComponentTransport::ComponentTransportLocalAssemblerInterface.

Definition at line 1812 of file ComponentTransportFEM.h.

1814 {
1815 auto const n_integration_points =
1817
1819 {
1820 auto const& medium = *_process_data.media_map.getMedium(ele_id);
1821
1822 for (auto& ip_data : _ip_data)
1823 {
1824 ip_data.porosity = ip_data.porosity_prev;
1825
1827 ->updatePorosityPostReaction(ip_data.chemical_system_id,
1828 medium, ip_data.porosity);
1829 }
1830
1832 std::accumulate(_ip_data.begin(), _ip_data.end(), 0.,
1833 [](double const s, auto const& ip)
1834 { return s + ip.porosity; }) /
1835 n_integration_points;
1836 }
1837
1838 std::vector<GlobalIndexType> chemical_system_indices;
1839 chemical_system_indices.reserve(n_integration_points);
1840 std::transform(_ip_data.begin(), _ip_data.end(),
1841 std::back_inserter(chemical_system_indices),
1842 [](auto const& ip_data)
1843 { return ip_data.chemical_system_id; });
1844
1846 ele_id, chemical_system_indices);
1847 }
virtual void updatePorosityPostReaction(GlobalIndexType const &, MaterialPropertyLib::Medium const &, double &)
virtual void computeSecondaryVariable(std::size_t const, std::vector< GlobalIndexType > const &)

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::ComponentTransportProcessData::chemical_solver_interface, ProcessLib::ComponentTransport::ComponentTransportProcessData::chemically_induced_porosity_change, ChemistryLib::ChemicalSolverInterface::computeSecondaryVariable(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, ProcessLib::ComponentTransport::ComponentTransportProcessData::mesh_prop_porosity, and ChemistryLib::ChemicalSolverInterface::updatePorosityPostReaction().

◆ computeSecondaryVariableConcrete()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::computeSecondaryVariableConcrete ( double const  t,
double const  ,
Eigen::VectorXd const &  local_x,
Eigen::VectorXd const &   
)
inlineoverridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 1786 of file ComponentTransportFEM.h.

1791 {
1792 auto const local_p =
1793 local_x.template segment<pressure_size>(pressure_index);
1794 auto const local_C = local_x.template segment<concentration_size>(
1796
1797 std::vector<double> ele_velocity;
1798 calculateIntPtDarcyVelocity(t, local_p, local_C, ele_velocity);
1799
1800 auto const n_integration_points =
1802 auto const ele_velocity_mat =
1803 MathLib::toMatrix(ele_velocity, GlobalDim, n_integration_points);
1804
1805 auto const ele_id = _element.getID();
1806 Eigen::Map<LocalVectorType>(
1807 &(*_process_data.mesh_prop_velocity)[ele_id * GlobalDim],
1808 GlobalDim) =
1809 ele_velocity_mat.rowwise().sum() / n_integration_points;
1810 }
std::vector< double > const & calculateIntPtDarcyVelocity(const double t, Eigen::Ref< const NodalVectorType > const &p_nodal_values, Eigen::Ref< const NodalVectorType > const &C_nodal_values, std::vector< double > &cache) const
Eigen::Map< const Matrix > toMatrix(std::vector< double > const &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)
Definition: EigenMapTools.h:72

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::calculateIntPtDarcyVelocity(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MeshLib::Element::getID(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::mesh_prop_velocity, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_index, and MathLib::toMatrix().

◆ getFlux()

template<typename ShapeFunction , int GlobalDim>
Eigen::Vector3d ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getFlux ( MathLib::Point3d const &  ,
double const  ,
std::vector< double > const &   
) const
inlineoverridevirtual

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

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 1724 of file ComponentTransportFEM.h.

1727 {
1728 auto const local_p = Eigen::Map<const NodalVectorType>(
1729 &local_x[pressure_index], pressure_size);
1730 auto const local_C = Eigen::Map<const NodalVectorType>(
1732
1733 // Eval shape matrices at given point
1734 // Note: Axial symmetry is set to false here, because we only need dNdx
1735 // here, which is not affected by axial symmetry.
1736 auto const shape_matrices =
1738 GlobalDim>(
1739 _element, false /*is_axially_symmetric*/,
1740 std::array{pnt_local_coords})[0];
1741
1744 auto const& b =
1747
1749
1750 auto const& medium =
1752 auto const& phase = medium.phase("AqueousLiquid");
1753
1754 // local_x contains the local concentration and pressure values
1755 double c_int_pt;
1756 NumLib::shapeFunctionInterpolate(local_C, shape_matrices.N, c_int_pt);
1757 vars.concentration = c_int_pt;
1758
1759 double p_int_pt;
1760 NumLib::shapeFunctionInterpolate(local_p, shape_matrices.N, p_int_pt);
1761 vars.liquid_phase_pressure = p_int_pt;
1762
1763 // TODO (naumov) Temporary value not used by current material models.
1764 // Need extension of secondary variables interface.
1765 double const dt = std::numeric_limits<double>::quiet_NaN();
1766 auto const K = MaterialPropertyLib::formEigenTensor<GlobalDim>(
1768 vars, pos, t, dt));
1769
1771 .template value<double>(vars, pos, t, dt);
1772 GlobalDimMatrixType const K_over_mu = K / mu;
1773
1774 GlobalDimVectorType q = -K_over_mu * shape_matrices.dNdx * local_p;
1775 auto const rho_w = phase[MaterialPropertyLib::PropertyType::density]
1776 .template value<double>(vars, pos, t, dt);
1778 {
1779 q += K_over_mu * rho_w * b;
1780 }
1781 Eigen::Vector3d flux(0.0, 0.0, 0.0);
1782 flux.head<GlobalDim>() = rho_w * q;
1783 return flux;
1784 }
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 ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, NumLib::computeShapeMatrices(), MaterialPropertyLib::VariableArray::concentration, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, MaterialPropertyLib::density, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), ProcessLib::ComponentTransport::ComponentTransportProcessData::has_gravity, MaterialPropertyLib::VariableArray::liquid_phase_pressure, ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, MaterialPropertyLib::permeability, MaterialPropertyLib::Medium::phase(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_index, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_size, ProcessLib::ComponentTransport::ComponentTransportProcessData::projected_specific_body_force_vectors, ParameterLib::SpatialPosition::setElementID(), NumLib::detail::shapeFunctionInterpolate(), and MaterialPropertyLib::viscosity.

◆ getHeatEnergyCoefficient()

template<typename ShapeFunction , int GlobalDim>
double ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::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 
)
inlineprivate

Definition at line 1979 of file ComponentTransportFEM.h.

1984 {
1985 auto const& medium =
1987 auto const& solid_phase = medium.phase("Solid");
1988
1989 auto const specific_heat_capacity_solid =
1990 solid_phase
1991 .property(
1993 .template value<double>(vars, pos, t, dt);
1994
1995 auto const solid_density =
1996 solid_phase.property(MaterialPropertyLib::PropertyType::density)
1997 .template value<double>(vars, pos, t, dt);
1998
1999 return solid_density * specific_heat_capacity_solid * (1 - porosity) +
2000 fluid_density * specific_heat_capacity_fluid * porosity;
2001 }
Property const & property(PropertyType const &p) const
Definition: Phase.cpp:53

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, MaterialPropertyLib::density, MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::Phase::property(), and MaterialPropertyLib::specific_heat_capacity.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHeatTransportEquation().

◆ getIntPtDarcyVelocity()

template<typename ShapeFunction , int GlobalDim>
std::vector< double > const & ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtDarcyVelocity ( const double  t,
std::vector< GlobalVector * > const &  x,
std::vector< NumLib::LocalToGlobalIndexMap const * > const &  dof_table,
std::vector< double > &  cache 
) const
inlineoverridevirtual

Implements ProcessLib::ComponentTransport::ComponentTransportLocalAssemblerInterface.

Definition at line 1603 of file ComponentTransportFEM.h.

1608 {
1609 assert(x.size() == dof_table.size());
1610
1611 auto const n_processes = x.size();
1612 std::vector<std::vector<double>> local_x;
1613 local_x.reserve(n_processes);
1614
1615 for (std::size_t process_id = 0; process_id < n_processes; ++process_id)
1616 {
1617 auto const indices =
1618 NumLib::getIndices(_element.getID(), *dof_table[process_id]);
1619 assert(!indices.empty());
1620 local_x.push_back(x[process_id]->get(indices));
1621 }
1622
1623 // only one process, must be monolithic.
1624 if (n_processes == 1)
1625 {
1626 auto const local_p = Eigen::Map<const NodalVectorType>(
1627 &local_x[0][pressure_index], pressure_size);
1628 auto const local_C = Eigen::Map<const NodalVectorType>(
1630 return calculateIntPtDarcyVelocity(t, local_p, local_C, cache);
1631 }
1632
1633 // multiple processes, must be staggered.
1634 {
1635 constexpr int pressure_process_id = 0;
1636 constexpr int concentration_process_id = 1;
1637 auto const local_p = Eigen::Map<const NodalVectorType>(
1638 &local_x[pressure_process_id][0], pressure_size);
1639 auto const local_C = Eigen::Map<const NodalVectorType>(
1640 &local_x[concentration_process_id][0], concentration_size);
1641 return calculateIntPtDarcyVelocity(t, local_p, local_C, cache);
1642 }
1643 }
std::vector< GlobalIndexType > getIndices(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::calculateIntPtDarcyVelocity(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MeshLib::Element::getID(), NumLib::getIndices(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_index, and ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_size.

◆ getIntPtMolarFlux()

template<typename ShapeFunction , int GlobalDim>
std::vector< double > const & ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtMolarFlux ( const double  t,
std::vector< GlobalVector * > const &  x,
std::vector< NumLib::LocalToGlobalIndexMap const * > const &  dof_tables,
std::vector< double > &  cache 
) const
inlineoverridevirtual

Implements ProcessLib::ComponentTransport::ComponentTransportLocalAssemblerInterface.

Definition at line 1849 of file ComponentTransportFEM.h.

1854 {
1855 std::vector<double> local_x_vec;
1856
1857 auto const n_processes = x.size();
1858 for (std::size_t process_id = 0; process_id < n_processes; ++process_id)
1859 {
1860 auto const indices =
1861 NumLib::getIndices(_element.getID(), *dof_tables[process_id]);
1862 assert(!indices.empty());
1863 auto const local_solution = x[process_id]->get(indices);
1864 local_x_vec.insert(std::end(local_x_vec),
1865 std::begin(local_solution),
1866 std::end(local_solution));
1867 }
1868 auto const local_x = MathLib::toVector(local_x_vec);
1869
1870 auto const p = local_x.template segment<pressure_size>(pressure_index);
1871 auto const c = local_x.template segment<concentration_size>(
1873
1874 auto const n_integration_points =
1876
1877 cache.clear();
1878 auto cache_mat = MathLib::createZeroedMatrix<
1879 Eigen::Matrix<double, GlobalDim, Eigen::Dynamic, Eigen::RowMajor>>(
1880 cache, GlobalDim, n_integration_points);
1881
1884
1885 auto const& b =
1888
1890
1891 auto const& medium =
1893 auto const& phase = medium.phase("AqueousLiquid");
1894
1895 int const component_id = 0;
1896 auto const& component = phase.component(
1897 _transport_process_variables[component_id].get().getName());
1898
1899 for (unsigned ip = 0; ip < n_integration_points; ++ip)
1900 {
1901 auto const& ip_data = _ip_data[ip];
1902 auto const& N = ip_data.N;
1903 auto const& dNdx = ip_data.dNdx;
1904 auto const& phi = ip_data.porosity;
1905
1906 pos.setIntegrationPoint(ip);
1907
1908 double const p_ip = N.dot(p);
1909 double const c_ip = N.dot(c);
1910
1911 vars.concentration = c_ip;
1912 vars.liquid_phase_pressure = p_ip;
1913 vars.porosity = phi;
1914
1915 double const dt = std::numeric_limits<double>::quiet_NaN();
1916
1917 auto const& k = MaterialPropertyLib::formEigenTensor<GlobalDim>(
1919 vars, pos, t, dt));
1921 .template value<double>(vars, pos, t, dt);
1923 .template value<double>(vars, pos, t, dt);
1924
1925 // Darcy flux
1926 GlobalDimVectorType const q =
1928 ? GlobalDimVectorType(-k / mu * (dNdx * p - rho * b))
1929 : GlobalDimVectorType(-k / mu * dNdx * p);
1930
1931 auto const alpha_T = medium.template value<double>(
1933 auto const alpha_L = medium.template value<double>(
1935 auto const Dp = MaterialPropertyLib::formEigenTensor<GlobalDim>(
1937 .value(vars, pos, t, dt));
1938
1939 // Hydrodynamic dispersion
1941 _process_data.stabilizer, _element.getID(), Dp, q, phi, alpha_T,
1942 alpha_L);
1943
1944 cache_mat.col(ip).noalias() = q * c_ip - phi * D * dNdx * c;
1945 }
1946
1947 return cache;
1948 }
Eigen::Map< const Vector > toVector(std::vector< double > const &data, Eigen::VectorXd::Index size)
Creates an Eigen mapped vector from the given data vector.

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_transport_process_variables, MaterialPropertyLib::Phase::component(), NumLib::computeHydrodynamicDispersion(), MaterialPropertyLib::VariableArray::concentration, MathLib::createZeroedMatrix(), MaterialPropertyLib::density, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MeshLib::Element::getID(), NumLib::getIndices(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::has_gravity, MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::longitudinal_dispersivity, ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, MaterialPropertyLib::permeability, MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::pore_diffusion, MaterialPropertyLib::VariableArray::porosity, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::pressure_index, ProcessLib::ComponentTransport::ComponentTransportProcessData::projected_specific_body_force_vectors, ParameterLib::SpatialPosition::setElementID(), ProcessLib::ComponentTransport::ComponentTransportProcessData::stabilizer, MathLib::toVector(), MaterialPropertyLib::transversal_dispersivity, and MaterialPropertyLib::viscosity.

◆ getLocalTemperature()

template<typename ShapeFunction , int GlobalDim>
NodalVectorType ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getLocalTemperature ( double const  t,
Eigen::VectorXd const &  local_x 
)
inlineprivate

◆ getShapeMatrix()

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

Provides the shape matrix at the given integration point.

Implements NumLib::ExtrapolatableElement.

Definition at line 1715 of file ComponentTransportFEM.h.

1717 {
1718 auto const& N = _ip_data[integration_point].N;
1719
1720 // assumes N is stored contiguously in memory
1721 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
1722 }

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data.

◆ getThermalConductivityDispersivity()

template<typename ShapeFunction , int GlobalDim>
GlobalDimMatrixType ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::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 
)
inlineprivate

Definition at line 2003 of file ComponentTransportFEM.h.

2009 {
2010 auto const& medium =
2012
2014 MaterialPropertyLib::formEigenTensor<GlobalDim>(
2015 medium
2016 .property(
2018 .value(vars, pos, t, dt));
2019
2020 auto const thermal_dispersivity_transversal =
2021 medium
2023 thermal_transversal_dispersivity)
2024 .template value<double>();
2025
2026 auto const thermal_dispersivity_longitudinal =
2027 medium
2029 thermal_longitudinal_dispersivity)
2030 .template value<double>();
2031
2032 // Thermal conductivity is moved outside and zero matrix is passed
2033 // instead due to multiplication with fluid's density times specific
2034 // heat capacity.
2035 return thermal_conductivity +
2036 fluid_density * specific_heat_capacity_fluid *
2039 GlobalDimMatrixType::Zero(GlobalDim, GlobalDim),
2040 velocity, 0 /* phi */, thermal_dispersivity_transversal,
2041 thermal_dispersivity_longitudinal);
2042 }

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, NumLib::computeHydrodynamicDispersion(), MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, ProcessLib::ComponentTransport::ComponentTransportProcessData::stabilizer, and MaterialPropertyLib::thermal_conductivity.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHeatTransportEquation().

◆ initializeChemicalSystemConcrete()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::initializeChemicalSystemConcrete ( Eigen::VectorXd const &  local_x,
double const  t 
)
inlineoverridevirtual

Implements ProcessLib::ComponentTransport::ComponentTransportLocalAssemblerInterface.

Definition at line 317 of file ComponentTransportFEM.h.

319 {
321
322 auto const& medium =
324
327
328 unsigned const n_integration_points =
330 for (unsigned ip = 0; ip < n_integration_points; ip++)
331 {
332 auto& ip_data = _ip_data[ip];
333 auto const& N = ip_data.N;
334 auto const& chemical_system_id = ip_data.chemical_system_id;
335
336 auto const n_component = _transport_process_variables.size();
337 std::vector<double> C_int_pt(n_component);
338 for (unsigned component_id = 0; component_id < n_component;
339 ++component_id)
340 {
341 auto const concentration_index =
343 component_id * concentration_size;
344 auto const local_C =
345 local_x.template segment<concentration_size>(
346 concentration_index);
347
349 C_int_pt[component_id]);
350 }
351
353 ->initializeChemicalSystemConcrete(C_int_pt, chemical_system_id,
354 medium, pos, t);
355 }
356 }
virtual void initializeChemicalSystemConcrete(std::vector< double > const &, GlobalIndexType const &, MaterialPropertyLib::Medium const &, ParameterLib::SpatialPosition const &, double const)

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_transport_process_variables, ProcessLib::ComponentTransport::ComponentTransportProcessData::chemical_solver_interface, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ChemistryLib::ChemicalSolverInterface::initializeChemicalSystemConcrete(), ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, ParameterLib::SpatialPosition::setElementID(), and NumLib::detail::shapeFunctionInterpolate().

◆ postSpeciationCalculation()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::postSpeciationCalculation ( std::size_t const  ele_id,
double const  t,
double const  dt 
)
inlineoverridevirtual

Implements ProcessLib::ComponentTransport::ComponentTransportLocalAssemblerInterface.

Definition at line 418 of file ComponentTransportFEM.h.

420 {
422 {
423 return;
424 }
425
426 auto const& medium = *_process_data.media_map.getMedium(ele_id);
427
429 pos.setElementID(ele_id);
430
431 for (auto& ip_data : _ip_data)
432 {
433 ip_data.porosity = ip_data.porosity_prev;
434
436 ->updateVolumeFractionPostReaction(ip_data.chemical_system_id,
437 medium, pos,
438 ip_data.porosity, t, dt);
439
441 ip_data.chemical_system_id, medium, ip_data.porosity);
442 }
443 }
virtual void updateVolumeFractionPostReaction(GlobalIndexType const &, MaterialPropertyLib::Medium const &, ParameterLib::SpatialPosition const &, double const, double const, double const)

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::ComponentTransportProcessData::chemical_solver_interface, ProcessLib::ComponentTransport::ComponentTransportProcessData::chemically_induced_porosity_change, MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, ParameterLib::SpatialPosition::setElementID(), ChemistryLib::ChemicalSolverInterface::updatePorosityPostReaction(), and ChemistryLib::ChemicalSolverInterface::updateVolumeFractionPostReaction().

◆ postTimestepConcrete()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::postTimestepConcrete ( Eigen::VectorXd const &  ,
Eigen::VectorXd const &  ,
double const  ,
double const  ,
bool const  ,
int const   
)
inlineoverridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 1950 of file ComponentTransportFEM.h.

1955 {
1956 unsigned const n_integration_points =
1958
1959 for (unsigned ip = 0; ip < n_integration_points; ip++)
1960 {
1961 _ip_data[ip].pushBackState();
1962 }
1963 }

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, and NumLib::GenericIntegrationMethod::getNumberOfPoints().

◆ setChemicalSystemConcrete()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::setChemicalSystemConcrete ( Eigen::VectorXd const &  local_x,
double const  t,
double  dt 
)
inlineoverridevirtual

Implements ProcessLib::ComponentTransport::ComponentTransportLocalAssemblerInterface.

Definition at line 358 of file ComponentTransportFEM.h.

360 {
362
363 auto const& medium =
365
368
371
372 unsigned const n_integration_points =
374 for (unsigned ip = 0; ip < n_integration_points; ip++)
375 {
376 auto& ip_data = _ip_data[ip];
377 auto const& N = ip_data.N;
378 auto& porosity = ip_data.porosity;
379 auto const& porosity_prev = ip_data.porosity_prev;
380 auto const& chemical_system_id = ip_data.chemical_system_id;
381
382 auto const n_component = _transport_process_variables.size();
383 std::vector<double> C_int_pt(n_component);
384 for (unsigned component_id = 0; component_id < n_component;
385 ++component_id)
386 {
387 auto const concentration_index =
389 component_id * concentration_size;
390 auto const local_C =
391 local_x.template segment<concentration_size>(
392 concentration_index);
393
395 C_int_pt[component_id]);
396 }
397
398 {
399 vars_prev.porosity = porosity_prev;
400
401 porosity =
403 ? porosity_prev
404 : medium
405 ->property(
407 .template value<double>(vars, vars_prev, pos, t,
408 dt);
409
410 vars.porosity = porosity;
411 }
412
414 C_int_pt, chemical_system_id, medium, vars, pos, t, dt);
415 }
416 }
virtual void setChemicalSystemConcrete(std::vector< double > const &, GlobalIndexType const &, MaterialPropertyLib::Medium const *, MaterialPropertyLib::VariableArray const &, ParameterLib::SpatialPosition const &, double const, double const)

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_transport_process_variables, ProcessLib::ComponentTransport::ComponentTransportProcessData::chemical_solver_interface, ProcessLib::ComponentTransport::ComponentTransportProcessData::chemically_induced_porosity_change, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, MaterialPropertyLib::porosity, MaterialPropertyLib::VariableArray::porosity, ChemistryLib::ChemicalSolverInterface::setChemicalSystemConcrete(), ParameterLib::SpatialPosition::setElementID(), and NumLib::detail::shapeFunctionInterpolate().

◆ setChemicalSystemID()

template<typename ShapeFunction , int GlobalDim>
void ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::setChemicalSystemID ( std::size_t const  )
inlineoverridevirtual

Implements ProcessLib::ComponentTransport::ComponentTransportLocalAssemblerInterface.

Definition at line 297 of file ComponentTransportFEM.h.

298 {
300 // chemical system index map
301 auto& chemical_system_index_map =
303
304 unsigned const n_integration_points =
306 for (unsigned ip = 0; ip < n_integration_points; ip++)
307 {
308 _ip_data[ip].chemical_system_id =
309 chemical_system_index_map.empty()
310 ? 0
311 : chemical_system_index_map.back() + 1;
312 chemical_system_index_map.push_back(
313 _ip_data[ip].chemical_system_id);
314 }
315 }
std::vector< GlobalIndexType > chemical_system_index_map

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_integration_method, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, ProcessLib::ComponentTransport::ComponentTransportProcessData::chemical_solver_interface, ChemistryLib::ChemicalSolverInterface::chemical_system_index_map, and NumLib::GenericIntegrationMethod::getNumberOfPoints().

Member Data Documentation

◆ _element

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

Definition at line 1966 of file ComponentTransportFEM.h.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::LocalAssemblerData(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assemble(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleBlockMatrices(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleComponentTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHeatTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHydraulicEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleKCmCn(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleReactionEquationConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianComponentTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianHydraulicEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::calculateIntPtDarcyVelocity(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::computeSecondaryVariableConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getFlux(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtDarcyVelocity(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtMolarFlux(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getLocalTemperature(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getThermalConductivityDispersivity(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::initializeChemicalSystemConcrete(), and ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::setChemicalSystemConcrete().

◆ _integration_method

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

Definition at line 1969 of file ComponentTransportFEM.h.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::LocalAssemblerData(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleBlockMatrices(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleComponentTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHeatTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHydraulicEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleKCmCn(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleReactionEquationConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianComponentTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianHydraulicEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::calculateIntPtDarcyVelocity(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::computeReactionRelatedSecondaryVariable(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::computeSecondaryVariableConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtMolarFlux(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::initializeChemicalSystemConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::postTimestepConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::setChemicalSystemConcrete(), and ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::setChemicalSystemID().

◆ _ip_data

template<typename ShapeFunction , int GlobalDim>
std::vector< IntegrationPointData<NodalRowVectorType, GlobalDimNodalMatrixType>, Eigen::aligned_allocator< IntegrationPointData<NodalRowVectorType, GlobalDimNodalMatrixType> > > ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data
private

Definition at line 1977 of file ComponentTransportFEM.h.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::LocalAssemblerData(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleBlockMatrices(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleComponentTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHeatTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHydraulicEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleKCmCn(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleReactionEquationConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianComponentTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianHydraulicEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::calculateIntPtDarcyVelocity(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::computeReactionRelatedSecondaryVariable(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtMolarFlux(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getShapeMatrix(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::initializeChemicalSystemConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::postSpeciationCalculation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::postTimestepConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::setChemicalSystemConcrete(), and ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::setChemicalSystemID().

◆ _process_data

template<typename ShapeFunction , int GlobalDim>
ComponentTransportProcessData const& ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data
private

Definition at line 1967 of file ComponentTransportFEM.h.

Referenced by ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::LocalAssemblerData(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assemble(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleBlockMatrices(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleComponentTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleForStaggeredScheme(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHeatTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleHydraulicEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleKCmCn(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleReactionEquationConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianComponentTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianForStaggeredScheme(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianHydraulicEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::calculateIntPtDarcyVelocity(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::computeReactionRelatedSecondaryVariable(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::computeSecondaryVariableConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getFlux(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getHeatEnergyCoefficient(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtMolarFlux(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getLocalTemperature(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getThermalConductivityDispersivity(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::initializeChemicalSystemConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::postSpeciationCalculation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::setChemicalSystemConcrete(), and ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::setChemicalSystemID().

◆ _transport_process_variables

◆ concentration_size

template<typename ShapeFunction , int GlobalDim>
const int ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size
staticprivate

◆ first_concentration_index

◆ pressure_index

◆ pressure_size

◆ temperature_index

◆ temperature_size


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