29template <
typename ShapeFunction,
int GlobalDim>
39 typename ShapeMatricesType::template VectorType<
NUM_NODAL_DOF *
40 ShapeFunction::NPOINTS>;
55 bool const is_axially_symmetric,
63 auto const& p0 = element.
getNode(0)->asEigenVector3d();
64 auto const& p1 = element.
getNode(1)->asEigenVector3d();
68 unsigned const n_integration_points =
70 _ip_data.reserve(n_integration_points);
72 auto const shape_matrices =
74 GlobalDim>(element, is_axially_symmetric,
81 auto const& liquid_phase =
84 for (
unsigned ip = 0; ip < n_integration_points; ip++)
87 shape_matrices[ip].N, shape_matrices[ip].dNdx,
89 shape_matrices[ip].integralMeasure *
90 shape_matrices[ip].detJ);
108 .template value<double>(vars, pos, 0, 0);
113 .template value<double>(vars, pos, 0, 0);
115 _ip_data[ip].vapor_volume_fraction = 0;
116 _ip_data[ip].vapor_mass_flow_rate = 0;
117 _ip_data[ip].liquid_mass_flow_rate = 0;
122 void assemble(
double const t,
double const dt,
123 std::vector<double>
const& local_x,
124 std::vector<double>
const& local_x_prev,
125 std::vector<double>& local_M_data,
126 std::vector<double>& local_K_data,
127 std::vector<double>& local_b_data)
override;
130 const unsigned integration_point)
const override
132 auto const& N =
_ip_data[integration_point].N;
135 return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size());
141 Eigen::VectorXd
const& ,
142 Eigen::VectorXd
const& )
override
144 auto const n_integration_points =
146 auto const ele_id =
_element.getID();
150 [](
double const s,
auto const& ip)
151 { return s + ip.mix_density; }) /
152 n_integration_points;
156 Eigen::VectorXd
const& ,
157 double const ,
double const ,
160 unsigned const n_integration_points =
163 for (
unsigned ip = 0; ip < n_integration_points; ip++)
172 std::vector<GlobalVector*>
const& ,
173 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
174 std::vector<double>& cache)
const override
182 std::vector<GlobalVector*>
const& ,
183 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
184 std::vector<double>& cache)
const override
192 std::vector<GlobalVector*>
const& ,
193 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
194 std::vector<double>& cache)
const override
202 std::vector<GlobalVector*>
const& ,
203 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
204 std::vector<double>& cache)
const override
212 std::vector<GlobalVector*>
const& ,
213 std::vector<NumLib::LocalToGlobalIndexMap const*>
const& ,
214 std::vector<double>& cache)
const override
229 std::vector<IpData, Eigen::aligned_allocator<IpData>>
_ip_data;
EigenFixedShapeMatrixPolicy< ShapeFunction, GlobalDim > ShapeMatrixPolicyType
double liquid_phase_pressure
virtual const Node * getNode(unsigned idx) const =0
void setElementID(std::size_t element_id)
virtual std::vector< double > const & getIntPtVaporVolumeFraction(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
MeshLib::Element const & _element
WellboreSimulatorProcessData const & _process_data
virtual std::vector< double > const & getIntPtTemperature(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
typename ShapeMatricesType::NodalVectorType NodalVectorType
WellboreSimulatorFEM(MeshLib::Element const &element, std::size_t const, NumLib::GenericIntegrationMethod const &integration_method, bool const is_axially_symmetric, WellboreSimulatorProcessData const &process_data)
typename ShapeMatricesType::template MatrixType< NUM_NODAL_DOF *ShapeFunction::NPOINTS, NUM_NODAL_DOF *ShapeFunction::NPOINTS > LocalMatrixType
static const int velocity_index
typename ShapeMatricesType::GlobalDimMatrixType GlobalDimMatrixType
static const int velocity_size
typename ShapeMatricesType::GlobalDimNodalMatrixType GlobalDimNodalMatrixType
static const int pressure_index
bool const _is_axially_symmetric
NumLib::GenericIntegrationMethod const & _integration_method
static const int enthalpy_index
Eigen::Vector3d _element_direction
typename ShapeMatricesType::ShapeMatrices ShapeMatrices
static const int enthalpy_size
Eigen::Map< const Eigen::RowVectorXd > getShapeMatrix(const unsigned integration_point) const override
Provides the shape matrix at the given integration point.
ShapeMatrixPolicyType< ShapeFunction, GlobalDim > ShapeMatricesType
typename ShapeMatricesType::NodalRowVectorType NodalRowVectorType
typename ShapeMatricesType::GlobalDimVectorType GlobalDimVectorType
virtual std::vector< double > const & getIntPtLiquidMassFlowRate(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
typename ShapeMatricesType::template VectorType< NUM_NODAL_DOF * ShapeFunction::NPOINTS > LocalVectorType
void assemble(double const t, double const dt, std::vector< double > const &local_x, std::vector< double > const &local_x_prev, std::vector< double > &local_M_data, std::vector< double > &local_K_data, std::vector< double > &local_b_data) override
void postTimestepConcrete(Eigen::VectorXd const &, Eigen::VectorXd const &, double const, double const, int const) override
void computeSecondaryVariableConcrete(double const, double const, Eigen::VectorXd const &, Eigen::VectorXd const &) override
static const int pressure_size
virtual std::vector< double > const & getIntPtDryness(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
virtual std::vector< double > const & getIntPtVaporMassFlowRate(const double, std::vector< GlobalVector * > const &, std::vector< NumLib::LocalToGlobalIndexMap const * > const &, std::vector< double > &cache) const override
std::vector< IpData, Eigen::aligned_allocator< IpData > > _ip_data
IntegrationPointData< NodalRowVectorType, GlobalDimNodalMatrixType > IpData
WellboreSimulatorLocalAssemblerInterface()=default
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)
const unsigned NUM_NODAL_DOF
std::vector< double > const & getIntegrationPointScalarData(IntegrationPointDataVector const &ip_data_vector, MemberType IpData::*const member, std::vector< double > &cache)
NumLib::ShapeMatrices< NodalRowVectorType, DimNodalMatrixType, DimMatrixType, GlobalDimNodalMatrixType > ShapeMatrices
MatrixType< GlobalDim, ShapeFunction::NPOINTS > GlobalDimNodalMatrixType
MatrixType< GlobalDim, GlobalDim > GlobalDimMatrixType
VectorType< GlobalDim > GlobalDimVectorType
VectorType< ShapeFunction::NPOINTS > NodalVectorType
RowVectorType< ShapeFunction::NPOINTS > NodalRowVectorType
double liquid_mass_flow_rate
double vapor_volume_fraction
double vapor_mass_flow_rate