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 206 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 > &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, int const component_id) const override
 
void postTimestepConcrete (Eigen::VectorXd const &, Eigen::VectorXd const &, double const, double const, int const) override
 
- Public Member Functions inherited from ProcessLib::ComponentTransport::ComponentTransportLocalAssemblerInterface
 ComponentTransportLocalAssemblerInterface ()=default
 
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)
 
- Public Member Functions inherited from ProcessLib::LocalAssemblerInterface
virtual ~LocalAssemblerInterface ()=default
 
virtual void setInitialConditions (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, double const t, int const process_id)
 
virtual void initialize (std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table)
 
virtual void preAssemble (double const, double const, std::vector< double > const &)
 
virtual void assembleWithJacobian (double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, std::vector< double > &local_b_data, std::vector< double > &local_Jac_data)
 
virtual void computeSecondaryVariable (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, double const t, double const dt, std::vector< GlobalVector * > const &x, GlobalVector const &x_prev, int const process_id)
 
virtual void preTimestep (std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const &dof_table, GlobalVector const &x, double const t, double const delta_t)
 
virtual void postTimestep (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, int const process_id)
 
void postNonLinearSolver (std::size_t const mesh_item_id, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_tables, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, int const process_id)
 
virtual Eigen::Vector3d getFlux (MathLib::Point3d const &, double const, std::vector< std::vector< double > > const &) const
 Fits to staggered scheme.
 
- Public Member Functions inherited from NumLib::ExtrapolatableElement
virtual ~ExtrapolatableElement ()=default
 

Private Types

using ShapeMatricesType = ShapeMatrixPolicyType<ShapeFunction, GlobalDim>
 
using ShapeMatrices = typename ShapeMatricesType::ShapeMatrices
 
using LocalBlockMatrixType
 
using LocalSegmentVectorType
 
using LocalMatrixType
 
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
 
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< 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 238 of file ComponentTransportFEM.h.

◆ GlobalDimNodalMatrixType

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

Definition at line 236 of file ComponentTransportFEM.h.

◆ GlobalDimVectorType

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

Definition at line 235 of file ComponentTransportFEM.h.

◆ LocalBlockMatrixType

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

Definition at line 222 of file ComponentTransportFEM.h.

◆ LocalMatrixType

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

Definition at line 228 of file ComponentTransportFEM.h.

◆ LocalSegmentVectorType

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

Definition at line 225 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 230 of file ComponentTransportFEM.h.

◆ NodalRowVectorType

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

Definition at line 233 of file ComponentTransportFEM.h.

◆ NodalVectorType

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

Definition at line 232 of file ComponentTransportFEM.h.

◆ ShapeMatrices

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

Definition at line 220 of file ComponentTransportFEM.h.

◆ ShapeMatricesType

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

Definition at line 219 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 241 of file ComponentTransportFEM.h.

249 : temperature_index(process_data.isothermal ? -1
250 : ShapeFunction::NPOINTS),
251 first_concentration_index(process_data.isothermal
252 ? ShapeFunction::NPOINTS
253 : 2 * ShapeFunction::NPOINTS),
254 _element(element),
255 _process_data(process_data),
256 _integration_method(integration_method),
257 _transport_process_variables(transport_process_variables)
258 {
259 (void)local_matrix_size;
260
261 unsigned const n_integration_points =
263 _ip_data.reserve(n_integration_points);
264
267
268 double const aperture_size = _process_data.aperture_size(0.0, pos)[0];
269
270 auto const shape_matrices =
272 GlobalDim>(element, is_axially_symmetric,
274 auto const& medium =
276 for (unsigned ip = 0; ip < n_integration_points; ip++)
277 {
278 _ip_data.emplace_back(
279 shape_matrices[ip].dNdx,
281 shape_matrices[ip].integralMeasure *
282 shape_matrices[ip].detJ * aperture_size);
283
284 pos.setIntegrationPoint(ip);
285
286 _ip_data[ip].porosity =
288 .template initialValue<double>(
289 pos, std::numeric_limits<double>::quiet_NaN() /*t*/);
290
291 _ip_data[ip].pushBackState();
292 }
293 }
double getWeight() const
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
std::vector< IntegrationPointData< GlobalDimNodalMatrixType > > _ip_data
ComponentTransportProcessData const & _process_data
ShapeMatrixPolicyType< ShapeFunction, GlobalDim > ShapeMatricesType
std::vector< std::reference_wrapper< ProcessVariable > > const _transport_process_variables
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 453 of file ComponentTransportFEM.h.

459 {
460 auto const local_matrix_size = local_x.size();
461 // Nodal DOFs include pressure
462 int const num_nodal_dof = 1 + _transport_process_variables.size();
463 // This assertion is valid only if all nodal d.o.f. use the same shape
464 // matrices.
465 assert(local_matrix_size == ShapeFunction::NPOINTS * num_nodal_dof);
466
468 local_M_data, local_matrix_size, local_matrix_size);
470 local_K_data, local_matrix_size, local_matrix_size);
472 local_b_data, local_matrix_size);
473
474 // Get block matrices
475 auto Kpp = local_K.template block<pressure_size, pressure_size>(
477 auto Mpp = local_M.template block<pressure_size, pressure_size>(
479 auto Bp = local_b.template segment<pressure_size>(pressure_index);
480
481 auto local_p = Eigen::Map<const NodalVectorType>(
482 &local_x[pressure_index], pressure_size);
483
484 auto const& b =
487
488 auto const number_of_components = num_nodal_dof - 1;
489 for (int component_id = 0; component_id < number_of_components;
490 ++component_id)
491 {
492 /* Partitioned assembler matrix
493 * | pp | pc1 | pc2 | pc3 |
494 * |-----|-----|-----|-----|
495 * | c1p | c1c1| 0 | 0 |
496 * |-----|-----|-----|-----|
497 * | c2p | 0 | c2c2| 0 |
498 * |-----|-----|-----|-----|
499 * | c3p | 0 | 0 | c3c3|
500 */
501 auto concentration_index =
502 pressure_size + component_id * concentration_size;
503
504 auto KCC =
505 local_K.template block<concentration_size, concentration_size>(
506 concentration_index, concentration_index);
507 auto MCC =
508 local_M.template block<concentration_size, concentration_size>(
509 concentration_index, concentration_index);
510 auto MCp =
511 local_M.template block<concentration_size, pressure_size>(
512 concentration_index, pressure_index);
513 auto MpC =
514 local_M.template block<pressure_size, concentration_size>(
515 pressure_index, concentration_index);
516
517 auto local_C = Eigen::Map<const NodalVectorType>(
518 &local_x[concentration_index], concentration_size);
519
520 assembleBlockMatrices(b, component_id, t, dt, local_C, local_p, KCC,
521 MCC, MCp, MpC, Kpp, Mpp, Bp);
522
524 {
525 auto const stoichiometric_matrix =
528
529 assert(stoichiometric_matrix);
530
531 for (Eigen::SparseMatrix<double>::InnerIterator it(
532 *stoichiometric_matrix, component_id);
533 it;
534 ++it)
535 {
536 auto const stoichiometric_coefficient = it.value();
537 auto const coupled_component_id = it.row();
538 auto const kinetic_prefactor =
540 ->getKineticPrefactor(coupled_component_id);
541
542 auto const concentration_index =
543 pressure_size + component_id * concentration_size;
544 auto const coupled_concentration_index =
546 coupled_component_id * concentration_size;
547 auto KCmCn = local_K.template block<concentration_size,
549 concentration_index, coupled_concentration_index);
550
551 // account for the coupling between components
552 assembleKCmCn(component_id, t, dt, KCmCn,
553 stoichiometric_coefficient,
554 kinetic_prefactor);
555 }
556 }
557 }
558 }
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)
Eigen::Map< Vector > createZeroedVector(std::vector< double > &data, Eigen::VectorXd::Index size)
Eigen::Map< Matrix > createZeroedMatrix(std::vector< double > &data, Eigen::MatrixXd::Index rows, Eigen::MatrixXd::Index cols)
std::vector< Eigen::VectorXd > const projected_specific_body_force_vectors
Projected specific body force vector: R * R^T * b.

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, MathLib::createZeroedMatrix(), MathLib::createZeroedVector(), 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 560 of file ComponentTransportFEM.h.

572 {
573 unsigned const n_integration_points =
575
578
580
581 // Get material properties
582 auto const& medium =
584 // Select the only valid for component transport liquid phase.
585 auto const& phase = medium.phase("AqueousLiquid");
586
587 // Assume that the component name is the same as the process variable
588 // name. Components are shifted by one because the first one is always
589 // pressure.
590 auto const& component = phase.component(
591 _transport_process_variables[component_id].get().getName());
592
593 LocalBlockMatrixType KCC_Laplacian =
594 LocalBlockMatrixType::Zero(concentration_size, concentration_size);
595
596 std::vector<GlobalDimVectorType> ip_flux_vector;
597 double average_velocity_norm = 0.0;
599 {
600 ip_flux_vector.reserve(n_integration_points);
601 }
602
603 auto const& Ns =
605 .NsHigherOrder<typename ShapeFunction::MeshElement>();
606
607 for (unsigned ip(0); ip < n_integration_points; ++ip)
608 {
609 pos.setIntegrationPoint(ip);
610
611 auto& ip_data = _ip_data[ip];
612 auto const& dNdx = ip_data.dNdx;
613 auto const& N = Ns[ip];
614 auto const& w = ip_data.integration_weight;
615 auto& porosity = ip_data.porosity;
616
617 double C_int_pt = 0.0;
618 double p_int_pt = 0.0;
619
620 NumLib::shapeFunctionInterpolate(C_nodal_values, N, C_int_pt);
621 NumLib::shapeFunctionInterpolate(p_nodal_values, N, p_int_pt);
622
623 vars.concentration = C_int_pt;
624 vars.liquid_phase_pressure = p_int_pt;
625
626 // update according to a particular porosity model
628 .template value<double>(vars, pos, t, dt);
629 vars.porosity = porosity;
630
631 auto const& retardation_factor =
633 .template value<double>(vars, pos, t, dt);
634
635 auto const& solute_dispersivity_transverse = medium.template value<
636 double>(
638
639 auto const& solute_dispersivity_longitudinal =
640 medium.template value<double>(
643
644 // Use the fluid density model to compute the density
645 // TODO (renchao): concentration of which component as the argument
646 // for calculation of fluid density
647 auto const density =
649 .template value<double>(vars, pos, t, dt);
650
651 auto const decay_rate =
653 .template value<double>(vars, pos, t, dt);
654
655 auto const& pore_diffusion_coefficient =
658 .value(vars, pos, t, dt));
659
662 vars, pos, t, dt));
663
664 // Use the viscosity model to compute the viscosity
666 .template value<double>(vars, pos, t, dt);
667
668 GlobalDimMatrixType const K_over_mu = K / mu;
669 GlobalDimVectorType const velocity =
671 ? GlobalDimVectorType(-K_over_mu *
672 (dNdx * p_nodal_values - density * b))
673 : GlobalDimVectorType(-K_over_mu * dNdx * p_nodal_values);
674
675 const double drho_dp =
677 .template dValue<double>(
678 vars,
680 pos, t, dt);
681
682 const double drho_dC =
684 .template dValue<double>(
686 t, dt);
687
688 GlobalDimMatrixType const hydrodynamic_dispersion =
691 pore_diffusion_coefficient, velocity, porosity,
692 solute_dispersivity_transverse,
693 solute_dispersivity_longitudinal);
694
695 const double R_times_phi(retardation_factor * porosity);
696 GlobalDimVectorType const mass_density_flow = velocity * density;
697 auto const N_t_N = (N.transpose() * N).eval();
698
700 {
701 MCp.noalias() += N_t_N * (C_int_pt * R_times_phi * drho_dp * w);
702 MCC.noalias() += N_t_N * (C_int_pt * R_times_phi * drho_dC * w);
703 KCC.noalias() -= dNdx.transpose() * mass_density_flow * N * w;
704 }
705 else
706 {
707 ip_flux_vector.emplace_back(mass_density_flow);
708 average_velocity_norm += velocity.norm();
709 }
710 MCC.noalias() += N_t_N * (R_times_phi * density * w);
711 KCC.noalias() += N_t_N * (decay_rate * R_times_phi * density * w);
712 KCC_Laplacian.noalias() +=
713 dNdx.transpose() * hydrodynamic_dispersion * dNdx * density * w;
714
715 MpC.noalias() += N_t_N * (porosity * drho_dC * w);
716
717 // Calculate Mpp, Kpp, and bp in the first loop over components
718 if (component_id == 0)
719 {
720 Mpp.noalias() += N_t_N * (porosity * drho_dp * w);
721 Kpp.noalias() +=
722 dNdx.transpose() * K_over_mu * dNdx * (density * w);
723
725 {
726 Bp.noalias() += dNdx.transpose() * K_over_mu * b *
727 (density * density * w);
728 }
729 }
730 }
731
733 {
735 typename ShapeFunction::MeshElement>(
737 _ip_data,
739 ip_flux_vector,
740 average_velocity_norm /
741 static_cast<double>(n_integration_points),
742 KCC_Laplacian);
743 }
744
745 KCC.noalias() += KCC_Laplacian;
746 }
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
auto const & NsHigherOrder() const
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
typename ShapeMatricesType::template MatrixType< pressure_size, pressure_size > LocalBlockMatrixType
typename ShapeMatricesType::GlobalDimMatrixType GlobalDimMatrixType
Eigen::Matrix< double, GlobalDim, GlobalDim > formEigenTensor(MaterialPropertyLib::PropertyDataType const &values)
@ longitudinal_dispersivity
used to compute the hydrodynamic dispersion tensor.
@ transversal_dispersivity
used to compute the hydrodynamic dispersion tensor.
@ retardation_factor
specify retardation factor used in component transport process.
void shapeFunctionInterpolate(const NodalValues &, const ShapeMatrix &)
void assembleAdvectionMatrix(IPData const &ip_data_vector, NumLib::ShapeMatrixCache const &shape_matrix_cache, std::vector< FluxVectorType > const &ip_flux_vector, Eigen::MatrixBase< Derived > &laplacian_matrix)
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:59
auto eval(Function &f, Tuples &... ts) -> typename detail::GetFunctionReturnType< decltype(&Function::eval)>::type
Definition Apply.h:274
NumLib::ShapeMatrixCache shape_matrix_cache
caches for each mesh element type the shape matrix

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, MaterialPropertyLib::formEigenTensor(), 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, NumLib::ShapeMatrixCache::NsHigherOrder(), MaterialPropertyLib::permeability, MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::pore_diffusion, MaterialPropertyLib::porosity, MaterialPropertyLib::VariableArray::porosity, MaterialPropertyLib::retardation_factor, ParameterLib::SpatialPosition::setElementID(), ParameterLib::SpatialPosition::setIntegrationPoint(), ProcessLib::ComponentTransport::ComponentTransportProcessData::shape_matrix_cache, 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 1079 of file ComponentTransportFEM.h.

1084 {
1085 assert(static_cast<int>(local_x.size()) ==
1088 static_cast<int>(_transport_process_variables.size()) +
1090
1091 auto const local_p =
1092 local_x.template segment<pressure_size>(pressure_index);
1093
1094 NodalVectorType local_T = getLocalTemperature(t, local_x);
1095
1096 auto const local_C = local_x.template segment<concentration_size>(
1098 (transport_process_id - (_process_data.isothermal ? 1 : 2)) *
1100 auto const local_p_prev =
1101 local_x_prev.segment<pressure_size>(pressure_index);
1102
1104 local_M_data, concentration_size, concentration_size);
1106 local_K_data, concentration_size, concentration_size);
1107
1108 LocalBlockMatrixType KCC_Laplacian =
1109 LocalBlockMatrixType::Zero(concentration_size, concentration_size);
1110
1111 unsigned const n_integration_points =
1113
1114 std::vector<GlobalDimVectorType> ip_flux_vector;
1115 double average_velocity_norm = 0.0;
1117 {
1118 ip_flux_vector.reserve(n_integration_points);
1119 }
1120
1123
1124 auto const& b =
1127
1130
1131 auto const& medium =
1133 auto const& phase = medium.phase("AqueousLiquid");
1134 auto const component_id =
1135 transport_process_id - (_process_data.isothermal ? 1 : 2);
1136 auto const& component = phase.component(
1137 _transport_process_variables[component_id].get().getName());
1138
1139 auto const& Ns =
1141 .NsHigherOrder<typename ShapeFunction::MeshElement>();
1142
1143 for (unsigned ip(0); ip < n_integration_points; ++ip)
1144 {
1145 pos.setIntegrationPoint(ip);
1146
1147 auto& ip_data = _ip_data[ip];
1148 auto const& dNdx = ip_data.dNdx;
1149 auto const& w = ip_data.integration_weight;
1150 auto const& N = Ns[ip];
1151 auto& porosity = ip_data.porosity;
1152 auto const& porosity_prev = ip_data.porosity_prev;
1153
1154 double const C_int_pt = N.dot(local_C);
1155 double const p_int_pt = N.dot(local_p);
1156 double const T_int_pt = N.dot(local_T);
1157
1158 vars.concentration = C_int_pt;
1159 vars.liquid_phase_pressure = p_int_pt;
1160 vars.temperature = T_int_pt;
1161
1163 {
1164 vars.temperature = N.dot(local_T);
1165 }
1166
1167 // porosity
1168 {
1169 vars_prev.porosity = porosity_prev;
1170
1171 porosity =
1173 ? porosity_prev
1175 .template value<double>(vars, vars_prev, pos, t,
1176 dt);
1177
1178 vars.porosity = porosity;
1179 }
1180
1181 auto const& retardation_factor =
1183 .template value<double>(vars, pos, t, dt);
1184
1185 auto const& solute_dispersivity_transverse = medium.template value<
1186 double>(
1188 auto const& solute_dispersivity_longitudinal =
1189 medium.template value<double>(
1192
1193 // Use the fluid density model to compute the density
1194 auto const density =
1196 .template value<double>(vars, pos, t, dt);
1197 auto const decay_rate =
1199 .template value<double>(vars, pos, t, dt);
1200
1201 auto const& pore_diffusion_coefficient =
1204 .value(vars, pos, t, dt));
1205
1208 vars, pos, t, dt));
1209 // Use the viscosity model to compute the viscosity
1211 .template value<double>(vars, pos, t, dt);
1212
1213 GlobalDimMatrixType const K_over_mu = K / mu;
1214 GlobalDimVectorType const velocity =
1216 ? GlobalDimVectorType(-K_over_mu *
1217 (dNdx * local_p - density * b))
1218 : GlobalDimVectorType(-K_over_mu * dNdx * local_p);
1219
1220 GlobalDimMatrixType const hydrodynamic_dispersion =
1223 pore_diffusion_coefficient, velocity, porosity,
1224 solute_dispersivity_transverse,
1225 solute_dispersivity_longitudinal);
1226
1227 double const R_times_phi = retardation_factor * porosity;
1228 auto const N_t_N = (N.transpose() * N).eval();
1229
1231 {
1232 const double drho_dC =
1234 .template dValue<double>(
1236 pos, t, dt);
1237 local_M.noalias() +=
1238 N_t_N * (R_times_phi * C_int_pt * drho_dC * w);
1239 }
1240
1241 local_M.noalias() += N_t_N * (R_times_phi * density * w);
1242
1243 // coupling term
1245 {
1246 double const p_dot = (p_int_pt - N.dot(local_p_prev)) / dt;
1247
1248 const double drho_dp =
1250 .template dValue<double>(vars,
1253 pos, t, dt);
1254
1255 local_K.noalias() +=
1256 N_t_N * ((R_times_phi * drho_dp * p_dot) * w) -
1257 dNdx.transpose() * velocity * N * (density * w);
1258 }
1259 else
1260 {
1261 ip_flux_vector.emplace_back(velocity * density);
1262 average_velocity_norm += velocity.norm();
1263 }
1264 local_K.noalias() +=
1265 N_t_N * (decay_rate * R_times_phi * density * w);
1266
1267 KCC_Laplacian.noalias() += dNdx.transpose() *
1268 hydrodynamic_dispersion * dNdx *
1269 (density * w);
1270 }
1271
1273 {
1275 typename ShapeFunction::MeshElement>(
1277 _process_data.shape_matrix_cache, ip_flux_vector,
1278 average_velocity_norm /
1279 static_cast<double>(n_integration_points),
1280 KCC_Laplacian);
1281 }
1282 local_K.noalias() += KCC_Laplacian;
1283 }
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, MathLib::createZeroedMatrix(), MaterialPropertyLib::decay_rate, MaterialPropertyLib::density, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MaterialPropertyLib::formEigenTensor(), 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, NumLib::ShapeMatrixCache::NsHigherOrder(), 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::shape_matrix_cache, 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 795 of file ComponentTransportFEM.h.

802 {
803 if (process_id == _process_data.hydraulic_process_id)
804 {
805 assembleHydraulicEquation(t, dt, local_x, local_x_prev,
806 local_M_data, local_K_data, local_b_data);
807 }
808 else if (process_id == _process_data.thermal_process_id)
809 {
810 assembleHeatTransportEquation(t, dt, local_x, local_x_prev,
811 local_M_data, local_K_data,
812 local_b_data);
813 }
814 else
815 {
816 // Go for assembling in an order of transport process id.
817 assembleComponentTransportEquation(t, dt, local_x, local_x_prev,
818 local_M_data, local_K_data,
819 local_b_data, process_id);
820 }
821 }
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 951 of file ComponentTransportFEM.h.

957 {
958 assert(local_x.size() ==
960
961 auto const local_p =
962 local_x.template segment<pressure_size>(pressure_index);
963 auto const local_T =
964 local_x.template segment<temperature_size>(temperature_index);
965
967 local_M_data, temperature_size, temperature_size);
969 local_K_data, temperature_size, temperature_size);
970
972 pos.setElementID(this->_element.getID());
973
974 auto const& process_data = this->_process_data;
975 auto const& medium =
976 *process_data.media_map.getMedium(this->_element.getID());
977 auto const& liquid_phase = medium.phase("AqueousLiquid");
978
979 auto const& b =
982
984
985 unsigned const n_integration_points =
987
988 std::vector<GlobalDimVectorType> ip_flux_vector;
989 double average_velocity_norm = 0.0;
990 ip_flux_vector.reserve(n_integration_points);
991
992 auto const& Ns =
994 .NsHigherOrder<typename ShapeFunction::MeshElement>();
995
996 for (unsigned ip(0); ip < n_integration_points; ip++)
997 {
998 pos.setIntegrationPoint(ip);
999
1000 auto const& ip_data = this->_ip_data[ip];
1001 auto const& dNdx = ip_data.dNdx;
1002 auto const& w = ip_data.integration_weight;
1003 auto const& N = Ns[ip];
1004
1005 double p_at_xi = 0.;
1006 NumLib::shapeFunctionInterpolate(local_p, N, p_at_xi);
1007 double T_at_xi = 0.;
1008 NumLib::shapeFunctionInterpolate(local_T, N, T_at_xi);
1009
1010 vars.temperature = T_at_xi;
1011 vars.liquid_phase_pressure = p_at_xi;
1012
1013 vars.liquid_saturation = 1.0;
1014
1015 auto const porosity =
1017 .template value<double>(vars, pos, t, dt);
1018 vars.porosity = porosity;
1019
1020 // Use the fluid density model to compute the density
1021 auto const fluid_density =
1022 liquid_phase
1024 .template value<double>(vars, pos, t, dt);
1025 vars.density = fluid_density;
1026 auto const specific_heat_capacity_fluid =
1027 liquid_phase
1029 .template value<double>(vars, pos, t, dt);
1030
1031 // Assemble mass matrix
1032 local_M.noalias() += w *
1034 vars, porosity, fluid_density,
1035 specific_heat_capacity_fluid, pos, t, dt) *
1036 N.transpose() * N;
1037
1038 // Assemble Laplace matrix
1039 auto const viscosity =
1040 liquid_phase
1042 .template value<double>(vars, pos, t, dt);
1043
1044 auto const intrinsic_permeability =
1046 medium
1047 .property(
1049 .value(vars, pos, t, dt));
1050
1051 GlobalDimMatrixType const K_over_mu =
1052 intrinsic_permeability / viscosity;
1053 GlobalDimVectorType const velocity =
1054 process_data.has_gravity
1055 ? GlobalDimVectorType(-K_over_mu *
1056 (dNdx * local_p - fluid_density * b))
1057 : GlobalDimVectorType(-K_over_mu * dNdx * local_p);
1058
1059 GlobalDimMatrixType const thermal_conductivity_dispersivity =
1061 vars, fluid_density, specific_heat_capacity_fluid, velocity,
1062 pos, t, dt);
1063
1064 local_K.noalias() +=
1065 w * dNdx.transpose() * thermal_conductivity_dispersivity * dNdx;
1066
1067 ip_flux_vector.emplace_back(velocity * fluid_density *
1068 specific_heat_capacity_fluid);
1069 average_velocity_norm += velocity.norm();
1070 }
1071
1073 process_data.stabilizer, this->_ip_data,
1074 _process_data.shape_matrix_cache, ip_flux_vector,
1075 average_velocity_norm / static_cast<double>(n_integration_points),
1076 local_K);
1077 }
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, MathLib::createZeroedMatrix(), MaterialPropertyLib::density, MaterialPropertyLib::VariableArray::density, MaterialPropertyLib::formEigenTensor(), 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, NumLib::ShapeMatrixCache::NsHigherOrder(), 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(), ProcessLib::ComponentTransport::ComponentTransportProcessData::shape_matrix_cache, 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 823 of file ComponentTransportFEM.h.

830 {
831 auto const local_p =
832 local_x.template segment<pressure_size>(pressure_index);
833 auto const local_C = local_x.template segment<concentration_size>(
835 auto const local_C_prev =
836 local_x_prev.segment<concentration_size>(first_concentration_index);
837
838 NodalVectorType local_T = getLocalTemperature(t, local_x);
839
841 local_M_data, pressure_size, pressure_size);
843 local_K_data, pressure_size, pressure_size);
845 local_b_data, pressure_size);
846
847 unsigned const n_integration_points =
849
852
853 auto const& b =
856
857 auto const& medium =
859 auto const& phase = medium.phase("AqueousLiquid");
860
863
864 auto const& Ns =
866 .NsHigherOrder<typename ShapeFunction::MeshElement>();
867
868 for (unsigned ip(0); ip < n_integration_points; ++ip)
869 {
870 pos.setIntegrationPoint(ip);
871
872 auto& ip_data = _ip_data[ip];
873 auto const& dNdx = ip_data.dNdx;
874 auto const& w = ip_data.integration_weight;
875 auto const& N = Ns[ip];
876 auto& porosity = ip_data.porosity;
877 auto const& porosity_prev = ip_data.porosity_prev;
878
879 double const C_int_pt = N.dot(local_C);
880 double const p_int_pt = N.dot(local_p);
881 double const T_int_pt = N.dot(local_T);
882
883 vars.concentration = C_int_pt;
884 vars.liquid_phase_pressure = p_int_pt;
885 vars.temperature = T_int_pt;
886
887 // porosity
888 {
889 vars_prev.porosity = porosity_prev;
890
891 porosity =
893 ? porosity_prev
895 .template value<double>(vars, vars_prev, pos, t,
896 dt);
897
898 vars.porosity = porosity;
899 }
900
901 // Use the fluid density model to compute the density
902 // TODO: Concentration of which component as one of arguments for
903 // calculation of fluid density
904 auto const density =
906 .template value<double>(vars, pos, t, dt);
907
910 vars, pos, t, dt));
911
912 // Use the viscosity model to compute the viscosity
914 .template value<double>(vars, pos, t, dt);
915
916 GlobalDimMatrixType const K_over_mu = K / mu;
917
918 const double drho_dp =
920 .template dValue<double>(
921 vars,
923 pos, t, dt);
924 const double drho_dC =
926 .template dValue<double>(
928 t, dt);
929
930 // matrix assembly
931 local_M.noalias() += w * N.transpose() * porosity * drho_dp * N;
932 local_K.noalias() +=
933 w * dNdx.transpose() * density * K_over_mu * dNdx;
934
936 {
937 local_b.noalias() +=
938 w * density * density * dNdx.transpose() * K_over_mu * b;
939 }
940
941 // coupling term
942 {
943 double const C_dot = (C_int_pt - N.dot(local_C_prev)) / dt;
944
945 local_b.noalias() -=
946 w * N.transpose() * porosity * drho_dC * C_dot;
947 }
948 }
949 }

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, MathLib::createZeroedMatrix(), MathLib::createZeroedVector(), MaterialPropertyLib::density, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MaterialPropertyLib::formEigenTensor(), 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, NumLib::ShapeMatrixCache::NsHigherOrder(), 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(), ProcessLib::ComponentTransport::ComponentTransportProcessData::shape_matrix_cache, 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 748 of file ComponentTransportFEM.h.

752 {
753 unsigned const n_integration_points =
755
758
760
761 auto const& medium =
763 auto const& phase = medium.phase("AqueousLiquid");
764 auto const& component = phase.component(
765 _transport_process_variables[component_id].get().getName());
766
767 auto const& Ns =
769 .NsHigherOrder<typename ShapeFunction::MeshElement>();
770
771 for (unsigned ip(0); ip < n_integration_points; ++ip)
772 {
773 auto& ip_data = _ip_data[ip];
774 auto const& w = ip_data.integration_weight;
775 auto const& N = Ns[ip];
776 auto& porosity = ip_data.porosity;
777
778 auto const retardation_factor =
780 .template value<double>(vars, pos, t, dt);
781
783 .template value<double>(vars, pos, t, dt);
784
785 auto const density =
787 .template value<double>(vars, pos, t, dt);
788
789 KCmCn.noalias() -= w * N.transpose() * stoichiometric_coefficient *
790 kinetic_prefactor * retardation_factor *
791 porosity * density * N;
792 }
793 }

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, NumLib::ShapeMatrixCache::NsHigherOrder(), MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::porosity, MaterialPropertyLib::retardation_factor, ParameterLib::SpatialPosition::setElementID(), and ProcessLib::ComponentTransport::ComponentTransportProcessData::shape_matrix_cache.

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 1564 of file ComponentTransportFEM.h.

1569 {
1570 auto const local_C = local_x.template segment<concentration_size>(
1572 (transport_process_id - 1) * concentration_size);
1573
1575 local_M_data, concentration_size, concentration_size);
1577 local_K_data, concentration_size, concentration_size);
1579 local_b_data, concentration_size);
1580
1581 unsigned const n_integration_points =
1583
1586
1589
1590 auto const& medium =
1592 auto const component_id = transport_process_id - 1;
1593
1594 auto const& Ns =
1596 .NsHigherOrder<typename ShapeFunction::MeshElement>();
1597
1598 for (unsigned ip(0); ip < n_integration_points; ++ip)
1599 {
1600 pos.setIntegrationPoint(ip);
1601
1602 auto& ip_data = _ip_data[ip];
1603 auto const w = ip_data.integration_weight;
1604 auto const& N = Ns[ip];
1605 auto& porosity = ip_data.porosity;
1606 auto const& porosity_prev = ip_data.porosity_prev;
1607 auto const chemical_system_id = ip_data.chemical_system_id;
1608
1609 double C_int_pt = 0.0;
1610 NumLib::shapeFunctionInterpolate(local_C, N, C_int_pt);
1611
1612 vars.concentration = C_int_pt;
1613
1614 auto const porosity_dot = (porosity - porosity_prev) / dt;
1615
1616 // porosity
1617 {
1618 vars_prev.porosity = porosity_prev;
1619
1620 porosity =
1622 ? porosity_prev
1624 .template value<double>(vars, vars_prev, pos, t,
1625 dt);
1626 }
1627
1628 local_M.noalias() += w * N.transpose() * porosity * N;
1629
1630 local_K.noalias() += w * N.transpose() * porosity_dot * N;
1631
1632 if (chemical_system_id == -1)
1633 {
1634 continue;
1635 }
1636
1637 auto const C_post_int_pt =
1639 component_id, chemical_system_id);
1640
1641 local_b.noalias() +=
1642 w * N.transpose() * porosity * (C_post_int_pt - C_int_pt) / dt;
1643 }
1644 }
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, MathLib::createZeroedMatrix(), MathLib::createZeroedVector(), 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, NumLib::ShapeMatrixCache::NsHigherOrder(), MaterialPropertyLib::porosity, MaterialPropertyLib::VariableArray::porosity, ParameterLib::SpatialPosition::setElementID(), ParameterLib::SpatialPosition::setIntegrationPoint(), ProcessLib::ComponentTransport::ComponentTransportProcessData::shape_matrix_cache, 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 1414 of file ComponentTransportFEM.h.

1418 {
1419 auto const concentration_index =
1421
1422 auto const p = local_x.template segment<pressure_size>(pressure_index);
1423 auto const c =
1424 local_x.template segment<concentration_size>(concentration_index);
1425 auto const c_prev =
1426 local_x_prev.segment<concentration_size>(concentration_index);
1427
1430 {
1432 }
1433
1435 local_Jac_data, concentration_size, concentration_size);
1437 local_b_data, concentration_size);
1438
1439 LocalBlockMatrixType KCC_Laplacian =
1440 LocalBlockMatrixType::Zero(concentration_size, concentration_size);
1441
1442 unsigned const n_integration_points =
1444
1445 std::vector<GlobalDimVectorType> ip_flux_vector;
1446 double average_velocity_norm = 0.0;
1447 ip_flux_vector.reserve(n_integration_points);
1448
1451
1452 auto const& b =
1455
1458
1459 auto const& medium =
1461 auto const& phase = medium.phase("AqueousLiquid");
1462 auto const& component = phase.component(
1463 _transport_process_variables[component_id].get().getName());
1464
1465 auto const& Ns =
1467 .NsHigherOrder<typename ShapeFunction::MeshElement>();
1468
1469 for (unsigned ip(0); ip < n_integration_points; ++ip)
1470 {
1471 pos.setIntegrationPoint(ip);
1472
1473 auto& ip_data = _ip_data[ip];
1474 auto const& dNdx = ip_data.dNdx;
1475 auto const& w = ip_data.integration_weight;
1476 auto const& N = Ns[ip];
1477 auto& phi = ip_data.porosity;
1478 auto const& phi_prev = ip_data.porosity_prev;
1479
1480 double const p_ip = N.dot(p);
1481 double const c_ip = N.dot(c);
1482
1483 vars.liquid_phase_pressure = p_ip;
1484 vars.concentration = c_ip;
1485
1487 {
1488 vars.temperature = N.dot(T);
1489 }
1490
1491 // porosity
1492 {
1493 vars_prev.porosity = phi_prev;
1494
1496 ? phi_prev
1498 .template value<double>(vars, vars_prev, pos, t,
1499 dt);
1500
1501 vars.porosity = phi;
1502 }
1503
1504 auto const R =
1506 .template value<double>(vars, pos, t, dt);
1507
1508 auto const alpha_T = medium.template value<double>(
1510 auto const alpha_L = medium.template value<double>(
1512
1514 .template value<double>(vars, pos, t, dt);
1515 // first-order decay constant
1516 auto const alpha =
1518 .template value<double>(vars, pos, t, dt);
1519
1522 .value(vars, pos, t, dt));
1523
1526 vars, pos, t, dt));
1528 .template value<double>(vars, pos, t, dt);
1529 // Darcy flux
1530 GlobalDimVectorType const q =
1532 ? GlobalDimVectorType(-k / mu * (dNdx * p - rho * b))
1533 : GlobalDimVectorType(-k / mu * dNdx * p);
1534
1536 _process_data.stabilizer, _element.getID(), Dp, q, phi, alpha_T,
1537 alpha_L);
1538
1539 // matrix assembly
1540 local_Jac.noalias() +=
1541 w * rho * N.transpose() * phi * R * (alpha + 1 / dt) * N;
1542
1543 KCC_Laplacian.noalias() += w * rho * dNdx.transpose() * D * dNdx;
1544
1545 auto const cdot = (c - c_prev) / dt;
1546 local_rhs.noalias() -=
1547 w * rho * N.transpose() * phi * R * N * (cdot + alpha * c);
1548
1549 ip_flux_vector.emplace_back(q * rho);
1550 average_velocity_norm += q.norm();
1551 }
1552
1555 _process_data.shape_matrix_cache, ip_flux_vector,
1556 average_velocity_norm / static_cast<double>(n_integration_points),
1557 KCC_Laplacian);
1558
1559 local_rhs.noalias() -= KCC_Laplacian * c;
1560
1561 local_Jac.noalias() += KCC_Laplacian;
1562 }
@ rho
density. For some models, rho substitutes p
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, MathLib::createZeroedMatrix(), MathLib::createZeroedVector(), MaterialPropertyLib::decay_rate, MaterialPropertyLib::density, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MaterialPropertyLib::formEigenTensor(), 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, NumLib::ShapeMatrixCache::NsHigherOrder(), 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::shape_matrix_cache, 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 > & local_b_data,
std::vector< double > & local_Jac_data )
inlineoverridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 1285 of file ComponentTransportFEM.h.

1290 {
1291 if (process_id == _process_data.hydraulic_process_id)
1292 {
1293 assembleWithJacobianHydraulicEquation(t, dt, local_x, local_x_prev,
1294 local_b_data, local_Jac_data);
1295 }
1296 else
1297 {
1298 int const component_id = process_id - 1;
1300 t, dt, local_x, local_x_prev, local_b_data, local_Jac_data,
1301 component_id);
1302 }
1303 }
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 1305 of file ComponentTransportFEM.h.

1309 {
1310 auto const p = local_x.template segment<pressure_size>(pressure_index);
1311 auto const c = local_x.template segment<concentration_size>(
1313
1314 auto const p_prev = local_x_prev.segment<pressure_size>(pressure_index);
1315 auto const c_prev =
1316 local_x_prev.segment<concentration_size>(first_concentration_index);
1317
1319 local_Jac_data, pressure_size, pressure_size);
1321 local_b_data, pressure_size);
1322
1323 unsigned const n_integration_points =
1325
1328 auto const& b =
1331
1332 auto const& medium =
1334 auto const& phase = medium.phase("AqueousLiquid");
1335
1338
1339 auto const& Ns =
1341 .NsHigherOrder<typename ShapeFunction::MeshElement>();
1342
1343 for (unsigned ip(0); ip < n_integration_points; ++ip)
1344 {
1345 pos.setIntegrationPoint(ip);
1346
1347 auto& ip_data = _ip_data[ip];
1348 auto const& dNdx = ip_data.dNdx;
1349 auto const& w = ip_data.integration_weight;
1350 auto const& N = Ns[ip];
1351 auto& phi = ip_data.porosity;
1352 auto const& phi_prev = ip_data.porosity_prev;
1353
1354 double const p_ip = N.dot(p);
1355 double const c_ip = N.dot(c);
1356
1357 double const cdot_ip = (c_ip - N.dot(c_prev)) / dt;
1358
1359 vars.liquid_phase_pressure = p_ip;
1360 vars.concentration = c_ip;
1361
1362 // porosity
1363 {
1364 vars_prev.porosity = phi_prev;
1365
1367 ? phi_prev
1369 .template value<double>(vars, vars_prev, pos, t,
1370 dt);
1371
1372 vars.porosity = phi;
1373 }
1374
1376 .template value<double>(vars, pos, t, dt);
1377
1380 vars, pos, t, dt));
1381
1383 .template value<double>(vars, pos, t, dt);
1384
1385 auto const drho_dp =
1387 .template dValue<double>(
1388 vars,
1390 pos, t, dt);
1391 auto const drho_dc =
1393 .template dValue<double>(
1395 t, dt);
1396
1397 // matrix assembly
1398 local_Jac.noalias() += w * N.transpose() * phi * drho_dp / dt * N +
1399 w * dNdx.transpose() * rho * k / mu * dNdx;
1400
1401 local_rhs.noalias() -=
1402 w * N.transpose() * phi *
1403 (drho_dp * N * p_prev + drho_dc * cdot_ip) +
1404 w * rho * dNdx.transpose() * k / mu * dNdx * p;
1405
1407 {
1408 local_rhs.noalias() +=
1409 w * rho * dNdx.transpose() * k / mu * rho * b;
1410 }
1411 }
1412 }

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, MathLib::createZeroedMatrix(), MathLib::createZeroedVector(), MaterialPropertyLib::density, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MaterialPropertyLib::formEigenTensor(), 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, NumLib::ShapeMatrixCache::NsHigherOrder(), 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(), ProcessLib::ComponentTransport::ComponentTransportProcessData::shape_matrix_cache, 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 1688 of file ComponentTransportFEM.h.

1693 {
1694 auto const n_integration_points =
1696
1697 cache.clear();
1698 auto cache_mat = MathLib::createZeroedMatrix<
1699 Eigen::Matrix<double, GlobalDim, Eigen::Dynamic, Eigen::RowMajor>>(
1700 cache, GlobalDim, n_integration_points);
1701
1704
1705 auto const& b =
1708
1710
1711 auto const& medium =
1713 auto const& phase = medium.phase("AqueousLiquid");
1714
1715 auto const& Ns =
1717 .NsHigherOrder<typename ShapeFunction::MeshElement>();
1718
1719 for (unsigned ip = 0; ip < n_integration_points; ++ip)
1720 {
1721 auto const& ip_data = _ip_data[ip];
1722 auto const& dNdx = ip_data.dNdx;
1723 auto const& N = Ns[ip];
1724 auto const& porosity = ip_data.porosity;
1725
1726 pos.setIntegrationPoint(ip);
1727
1728 double C_int_pt = 0.0;
1729 double p_int_pt = 0.0;
1730
1731 NumLib::shapeFunctionInterpolate(C_nodal_values, N, C_int_pt);
1732 NumLib::shapeFunctionInterpolate(p_nodal_values, N, p_int_pt);
1733
1734 vars.concentration = C_int_pt;
1735 vars.liquid_phase_pressure = p_int_pt;
1736 vars.porosity = porosity;
1737
1738 // TODO (naumov) Temporary value not used by current material
1739 // models. Need extension of secondary variables interface.
1740 double const dt = std::numeric_limits<double>::quiet_NaN();
1743 vars, pos, t, dt));
1745 .template value<double>(vars, pos, t, dt);
1746 GlobalDimMatrixType const K_over_mu = K / mu;
1747
1748 cache_mat.col(ip).noalias() = -K_over_mu * dNdx * p_nodal_values;
1750 {
1751 auto const rho_w =
1753 .template value<double>(vars, pos, t, dt);
1754 // here it is assumed that the vector b is directed 'downwards'
1755 cache_mat.col(ip).noalias() += K_over_mu * rho_w * b;
1756 }
1757 }
1758
1759 return cache;
1760 }

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, MaterialPropertyLib::formEigenTensor(), MeshLib::Element::getID(), MaterialPropertyLib::MaterialSpatialDistributionMap::getMedium(), NumLib::GenericIntegrationMethod::getNumberOfPoints(), ProcessLib::ComponentTransport::ComponentTransportProcessData::has_gravity, MaterialPropertyLib::VariableArray::liquid_phase_pressure, ProcessLib::ComponentTransport::ComponentTransportProcessData::media_map, NumLib::ShapeMatrixCache::NsHigherOrder(), MaterialPropertyLib::permeability, MaterialPropertyLib::Medium::phase(), MaterialPropertyLib::VariableArray::porosity, ProcessLib::ComponentTransport::ComponentTransportProcessData::projected_specific_body_force_vectors, ParameterLib::SpatialPosition::setElementID(), ProcessLib::ComponentTransport::ComponentTransportProcessData::shape_matrix_cache, 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 1860 of file ComponentTransportFEM.h.

1862 {
1863 auto const n_integration_points =
1865
1867 {
1868 auto const& medium = *_process_data.media_map.getMedium(ele_id);
1869
1870 for (auto& ip_data : _ip_data)
1871 {
1872 ip_data.porosity = ip_data.porosity_prev;
1873
1875 ->updatePorosityPostReaction(ip_data.chemical_system_id,
1876 medium, ip_data.porosity);
1877 }
1878
1880 std::accumulate(_ip_data.begin(), _ip_data.end(), 0.,
1881 [](double const s, auto const& ip)
1882 { return s + ip.porosity; }) /
1883 n_integration_points;
1884 }
1885
1886 std::vector<GlobalIndexType> chemical_system_indices;
1887 chemical_system_indices.reserve(n_integration_points);
1888 std::transform(_ip_data.begin(), _ip_data.end(),
1889 std::back_inserter(chemical_system_indices),
1890 [](auto const& ip_data)
1891 { return ip_data.chemical_system_id; });
1892
1894 ele_id, chemical_system_indices);
1895 }
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 1834 of file ComponentTransportFEM.h.

1839 {
1840 auto const local_p =
1841 local_x.template segment<pressure_size>(pressure_index);
1842 auto const local_C = local_x.template segment<concentration_size>(
1844
1845 std::vector<double> ele_velocity;
1846 calculateIntPtDarcyVelocity(t, local_p, local_C, ele_velocity);
1847
1848 auto const n_integration_points =
1850 auto const ele_velocity_mat =
1851 MathLib::toMatrix(ele_velocity, GlobalDim, n_integration_points);
1852
1853 auto const ele_id = _element.getID();
1854 Eigen::Map<LocalVectorType>(
1855 &(*_process_data.mesh_prop_velocity)[ele_id * GlobalDim],
1856 GlobalDim) =
1857 ele_velocity_mat.rowwise().sum() / n_integration_points;
1858 }
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)

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 1772 of file ComponentTransportFEM.h.

1775 {
1776 auto const local_p = Eigen::Map<const NodalVectorType>(
1777 &local_x[pressure_index], pressure_size);
1778 auto const local_C = Eigen::Map<const NodalVectorType>(
1780
1781 // Eval shape matrices at given point
1782 // Note: Axial symmetry is set to false here, because we only need dNdx
1783 // here, which is not affected by axial symmetry.
1784 auto const shape_matrices =
1786 GlobalDim>(
1787 _element, false /*is_axially_symmetric*/,
1788 std::array{pnt_local_coords})[0];
1789
1792 auto const& b =
1795
1797
1798 auto const& medium =
1800 auto const& phase = medium.phase("AqueousLiquid");
1801
1802 // local_x contains the local concentration and pressure values
1803 double c_int_pt;
1804 NumLib::shapeFunctionInterpolate(local_C, shape_matrices.N, c_int_pt);
1805 vars.concentration = c_int_pt;
1806
1807 double p_int_pt;
1808 NumLib::shapeFunctionInterpolate(local_p, shape_matrices.N, p_int_pt);
1809 vars.liquid_phase_pressure = p_int_pt;
1810
1811 // TODO (naumov) Temporary value not used by current material models.
1812 // Need extension of secondary variables interface.
1813 double const dt = std::numeric_limits<double>::quiet_NaN();
1816 vars, pos, t, dt));
1817
1819 .template value<double>(vars, pos, t, dt);
1820 GlobalDimMatrixType const K_over_mu = K / mu;
1821
1822 GlobalDimVectorType q = -K_over_mu * shape_matrices.dNdx * local_p;
1823 auto const rho_w = phase[MaterialPropertyLib::PropertyType::density]
1824 .template value<double>(vars, pos, t, dt);
1826 {
1827 q += K_over_mu * rho_w * b;
1828 }
1829 Eigen::Vector3d flux(0.0, 0.0, 0.0);
1830 flux.head<GlobalDim>() = rho_w * q;
1831 return flux;
1832 }
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, MaterialPropertyLib::formEigenTensor(), 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 2024 of file ComponentTransportFEM.h.

2029 {
2030 auto const& medium =
2032 auto const& solid_phase = medium.phase("Solid");
2033
2034 auto const specific_heat_capacity_solid =
2035 solid_phase
2036 .property(
2038 .template value<double>(vars, pos, t, dt);
2039
2040 auto const solid_density =
2041 solid_phase.property(MaterialPropertyLib::PropertyType::density)
2042 .template value<double>(vars, pos, t, dt);
2043
2044 return solid_density * specific_heat_capacity_solid * (1 - porosity) +
2045 fluid_density * specific_heat_capacity_fluid * porosity;
2046 }
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 1646 of file ComponentTransportFEM.h.

1651 {
1652 assert(x.size() == dof_table.size());
1653
1654 auto const n_processes = x.size();
1655 std::vector<std::vector<double>> local_x;
1656 local_x.reserve(n_processes);
1657
1658 for (std::size_t process_id = 0; process_id < n_processes; ++process_id)
1659 {
1660 auto const indices =
1661 NumLib::getIndices(_element.getID(), *dof_table[process_id]);
1662 assert(!indices.empty());
1663 local_x.push_back(x[process_id]->get(indices));
1664 }
1665
1666 // only one process, must be monolithic.
1667 if (n_processes == 1)
1668 {
1669 auto const local_p = Eigen::Map<const NodalVectorType>(
1670 &local_x[0][pressure_index], pressure_size);
1671 auto const local_C = Eigen::Map<const NodalVectorType>(
1673 return calculateIntPtDarcyVelocity(t, local_p, local_C, cache);
1674 }
1675
1676 // multiple processes, must be staggered.
1677 {
1678 constexpr int pressure_process_id = 0;
1679 constexpr int concentration_process_id = 1;
1680 auto const local_p = Eigen::Map<const NodalVectorType>(
1681 &local_x[pressure_process_id][0], pressure_size);
1682 auto const local_C = Eigen::Map<const NodalVectorType>(
1683 &local_x[concentration_process_id][0], concentration_size);
1684 return calculateIntPtDarcyVelocity(t, local_p, local_C, cache);
1685 }
1686 }
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,
int const component_id ) const
inlineoverridevirtual

Implements ProcessLib::ComponentTransport::ComponentTransportLocalAssemblerInterface.

Definition at line 1897 of file ComponentTransportFEM.h.

1901 {
1902 std::vector<double> local_x_vec;
1903
1904 auto const n_processes = x.size();
1905 for (std::size_t process_id = 0; process_id < n_processes; ++process_id)
1906 {
1907 auto const indices =
1908 NumLib::getIndices(_element.getID(), *dof_tables[process_id]);
1909 assert(!indices.empty());
1910 auto const local_solution = x[process_id]->get(indices);
1911 local_x_vec.insert(std::end(local_x_vec),
1912 std::begin(local_solution),
1913 std::end(local_solution));
1914 }
1915 auto const local_x = MathLib::toVector(local_x_vec);
1916
1917 auto const p = local_x.template segment<pressure_size>(pressure_index);
1918 auto const c = local_x.template segment<concentration_size>(
1920
1921 auto const n_integration_points =
1923
1924 cache.clear();
1925 auto cache_mat = MathLib::createZeroedMatrix<
1926 Eigen::Matrix<double, GlobalDim, Eigen::Dynamic, Eigen::RowMajor>>(
1927 cache, GlobalDim, n_integration_points);
1928
1931
1932 auto const& b =
1935
1937
1938 auto const& medium =
1940 auto const& phase = medium.phase("AqueousLiquid");
1941
1942 auto const& component = phase.component(
1943 _transport_process_variables[component_id].get().getName());
1944
1945 auto const& Ns =
1947 .NsHigherOrder<typename ShapeFunction::MeshElement>();
1948
1949 for (unsigned ip = 0; ip < n_integration_points; ++ip)
1950 {
1951 auto const& ip_data = _ip_data[ip];
1952 auto const& dNdx = ip_data.dNdx;
1953 auto const& N = Ns[ip];
1954 auto const& phi = ip_data.porosity;
1955
1956 pos.setIntegrationPoint(ip);
1957
1958 double const p_ip = N.dot(p);
1959 double const c_ip = N.dot(c);
1960
1961 vars.concentration = c_ip;
1962 vars.liquid_phase_pressure = p_ip;
1963 vars.porosity = phi;
1964
1965 double const dt = std::numeric_limits<double>::quiet_NaN();
1966
1969 vars, pos, t, dt));
1971 .template value<double>(vars, pos, t, dt);
1973 .template value<double>(vars, pos, t, dt);
1974
1975 // Darcy flux
1976 GlobalDimVectorType const q =
1978 ? GlobalDimVectorType(-k / mu * (dNdx * p - rho * b))
1979 : GlobalDimVectorType(-k / mu * dNdx * p);
1980
1981 auto const alpha_T = medium.template value<double>(
1983 auto const alpha_L = medium.template value<double>(
1987 .value(vars, pos, t, dt));
1988
1989 // Hydrodynamic dispersion
1991 _process_data.stabilizer, _element.getID(), Dp, q, phi, alpha_T,
1992 alpha_L);
1993
1994 cache_mat.col(ip).noalias() = q * c_ip - D * dNdx * c;
1995 }
1996
1997 return cache;
1998 }
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, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::concentration_size, MathLib::createZeroedMatrix(), MaterialPropertyLib::density, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::first_concentration_index, MaterialPropertyLib::formEigenTensor(), 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, NumLib::ShapeMatrixCache::NsHigherOrder(), 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::shape_matrix_cache, 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 1762 of file ComponentTransportFEM.h.

1764 {
1766 typename ShapeFunction::MeshElement>()[integration_point];
1767
1768 // assumes N is stored contiguously in memory
1769 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
1770 }

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, NumLib::ShapeMatrixCache::NsHigherOrder(), and ProcessLib::ComponentTransport::ComponentTransportProcessData::shape_matrix_cache.

◆ 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 2048 of file ComponentTransportFEM.h.

2054 {
2055 auto const& medium =
2057
2060 medium
2061 .property(
2063 .value(vars, pos, t, dt));
2064
2065 auto const thermal_dispersivity_transversal =
2066 medium
2069 .template value<double>();
2070
2071 auto const thermal_dispersivity_longitudinal =
2072 medium
2075 .template value<double>();
2076
2077 // Thermal conductivity is moved outside and zero matrix is passed
2078 // instead due to multiplication with fluid's density times specific
2079 // heat capacity.
2080 return thermal_conductivity +
2081 fluid_density * specific_heat_capacity_fluid *
2084 GlobalDimMatrixType::Zero(GlobalDim, GlobalDim),
2085 velocity, 0 /* phi */, thermal_dispersivity_transversal,
2086 thermal_dispersivity_longitudinal);
2087 }

References ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_element, ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_process_data, NumLib::computeHydrodynamicDispersion(), MaterialPropertyLib::formEigenTensor(), 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 315 of file ComponentTransportFEM.h.

317 {
319
320 auto const& medium =
322
325
326 auto const& Ns =
328 .NsHigherOrder<typename ShapeFunction::MeshElement>();
329
330 unsigned const n_integration_points =
332
333 for (unsigned ip = 0; ip < n_integration_points; ip++)
334 {
335 auto& ip_data = _ip_data[ip];
336 auto const& N = Ns[ip];
337 auto const& chemical_system_id = ip_data.chemical_system_id;
338
339 auto const n_component = _transport_process_variables.size();
340 std::vector<double> C_int_pt(n_component);
341 for (unsigned component_id = 0; component_id < n_component;
342 ++component_id)
343 {
344 auto const concentration_index =
346 component_id * concentration_size;
347 auto const local_C =
348 local_x.template segment<concentration_size>(
349 concentration_index);
350
352 C_int_pt[component_id]);
353 }
354
356 ->initializeChemicalSystemConcrete(C_int_pt, chemical_system_id,
357 medium, pos, t);
358 }
359 }
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, NumLib::ShapeMatrixCache::NsHigherOrder(), ParameterLib::SpatialPosition::setElementID(), ProcessLib::ComponentTransport::ComponentTransportProcessData::shape_matrix_cache, 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 426 of file ComponentTransportFEM.h.

428 {
430 {
431 return;
432 }
433
434 auto const& medium = *_process_data.media_map.getMedium(ele_id);
435
437 pos.setElementID(ele_id);
438
439 for (auto& ip_data : _ip_data)
440 {
441 ip_data.porosity = ip_data.porosity_prev;
442
444 ->updateVolumeFractionPostReaction(ip_data.chemical_system_id,
445 medium, pos,
446 ip_data.porosity, t, dt);
447
449 ip_data.chemical_system_id, medium, ip_data.porosity);
450 }
451 }
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 ,
int const  )
inlineoverridevirtual

Reimplemented from ProcessLib::LocalAssemblerInterface.

Definition at line 2000 of file ComponentTransportFEM.h.

2004 {
2005 unsigned const n_integration_points =
2007
2008 for (unsigned ip = 0; ip < n_integration_points; ip++)
2009 {
2010 _ip_data[ip].pushBackState();
2011 }
2012 }

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 361 of file ComponentTransportFEM.h.

363 {
365
366 auto const& medium =
368
371
374
375 auto const& Ns =
377 .NsHigherOrder<typename ShapeFunction::MeshElement>();
378
379 unsigned const n_integration_points =
381
382 for (unsigned ip = 0; ip < n_integration_points; ip++)
383 {
384 auto& ip_data = _ip_data[ip];
385 auto const& N = Ns[ip];
386 auto& porosity = ip_data.porosity;
387 auto const& porosity_prev = ip_data.porosity_prev;
388 auto const& chemical_system_id = ip_data.chemical_system_id;
389
390 auto const n_component = _transport_process_variables.size();
391 std::vector<double> C_int_pt(n_component);
392 for (unsigned component_id = 0; component_id < n_component;
393 ++component_id)
394 {
395 auto const concentration_index =
397 component_id * concentration_size;
398 auto const local_C =
399 local_x.template segment<concentration_size>(
400 concentration_index);
401
403 C_int_pt[component_id]);
404 }
405
406 {
407 vars_prev.porosity = porosity_prev;
408
409 porosity =
411 ? porosity_prev
412 : medium
413 ->property(
415 .template value<double>(vars, vars_prev, pos, t,
416 dt);
417
418 vars.porosity = porosity;
419 }
420
422 C_int_pt, chemical_system_id, medium, vars, pos, t, dt);
423 }
424 }
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, NumLib::ShapeMatrixCache::NsHigherOrder(), MaterialPropertyLib::porosity, MaterialPropertyLib::VariableArray::porosity, ChemistryLib::ChemicalSolverInterface::setChemicalSystemConcrete(), ParameterLib::SpatialPosition::setElementID(), ProcessLib::ComponentTransport::ComponentTransportProcessData::shape_matrix_cache, 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 295 of file ComponentTransportFEM.h.

296 {
298 // chemical system index map
299 auto& chemical_system_index_map =
301
302 unsigned const n_integration_points =
304 for (unsigned ip = 0; ip < n_integration_points; ip++)
305 {
306 _ip_data[ip].chemical_system_id =
307 chemical_system_index_map.empty()
308 ? 0
309 : chemical_system_index_map.back() + 1;
310 chemical_system_index_map.push_back(
311 _ip_data[ip].chemical_system_id);
312 }
313 }
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 2015 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 2018 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<GlobalDimNodalMatrixType> > ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::_ip_data
private

Definition at line 2022 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 >::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 2016 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 >::getShapeMatrix(), 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
Initial value:
=
ShapeFunction::NPOINTS

Definition at line 216 of file ComponentTransportFEM.h.

Referenced by 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 >::assembleReactionEquationConcrete(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianComponentTransportEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::assembleWithJacobianHydraulicEquation(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getFlux(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtDarcyVelocity(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::getIntPtMolarFlux(), ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::initializeChemicalSystemConcrete(), and ProcessLib::ComponentTransport::LocalAssemblerData< ShapeFunction, GlobalDim >::setChemicalSystemConcrete().

◆ first_concentration_index

◆ pressure_index

◆ pressure_size

◆ temperature_index

◆ temperature_size


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