OGS
HeatTransportBHEProcess.h
Go to the documentation of this file.
1
11#pragma once
12
17#include "ProcessLib/Process.h"
18
19namespace ProcessLib
20{
21namespace HeatTransportBHE
22{
23struct BHEMeshData;
24
25class HeatTransportBHEProcess final : public Process
26{
27public:
29 std::string name,
30 MeshLib::Mesh& mesh,
31 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&&
32 jacobian_assembler,
33 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
34 parameters,
35 unsigned const integration_order,
36 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
37 process_variables,
38 HeatTransportBHEProcessData&& process_data,
39 SecondaryVariableCollection&& secondary_variables,
40 BHEMeshData&& bhe_mesh_data);
41
44 bool isLinear() const override
45 {
46 // Linear Solver is called only once - valid only with
47 // _use_algebraic_bc and _is_linear
50 }
51
52 bool requiresNormalization() const override
53 {
54 // In the current setup, when using algebraic bc,
55 // then normalization is always required
57 }
59
60 void computeSecondaryVariableConcrete(double const t, double const dt,
61 std::vector<GlobalVector*> const& x,
62 GlobalVector const& x_prev,
63 int const process_id) override;
64
65private:
66 void constructDofTable() override;
67
69 NumLib::LocalToGlobalIndexMap const& dof_table,
70 MeshLib::Mesh const& mesh,
71 unsigned const integration_order) override;
72
73 void assembleConcreteProcess(const double t, double const dt,
74 std::vector<GlobalVector*> const& x,
75 std::vector<GlobalVector*> const& x_prev,
76 int const process_id, GlobalMatrix& M,
77 GlobalMatrix& K, GlobalVector& b) override;
78
80 const double t, double const dt, std::vector<GlobalVector*> const& x,
81 std::vector<GlobalVector*> const& x_prev, int const process_id,
82 GlobalVector& b, GlobalMatrix& Jac) override;
83
85 std::vector<std::vector<MeshLib::Node*>> const& all_bhe_nodes);
86 void preTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
87 const double t, const double dt,
88 int const process_id) override;
89
90 void postTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
91 std::vector<GlobalVector*> const& x_prev,
92 const double t, const double dt,
93 int const process_id) override;
94
95 void algebraicBcConcreteProcess(const double t, double const dt,
96 std::vector<GlobalVector*> const& x,
97 std::vector<GlobalVector*> const& xdot,
98 int const process_id, GlobalMatrix& M,
100
102 GlobalVector const& x) override;
103
105
106 std::vector<std::unique_ptr<HeatTransportBHELocalAssemblerInterface>>
108
109 std::vector<std::unique_ptr<MeshLib::MeshSubset const>>
111
112 std::vector<std::unique_ptr<MeshLib::MeshSubset const>>
114 // a vector of tuple structure containing the indices of BHE top nodes,
115 // used only for algebraic boundary conditions
116 // first object is the index of BHE
117 // second and third object is the global indices of a pair of unknowns,
118 // pointing to the inflow and outflow temperature
119 std::vector<std::tuple<std::size_t, GlobalIndexType, GlobalIndexType>>
121 // a vector of tuple structure containing the indices of BHE bottom nodes,
122 // used only for algebraic boundary conditions
123 // same structure as the top node vector
124 std::vector<std::tuple<std::size_t, GlobalIndexType, GlobalIndexType>>
126
127 std::unique_ptr<MeshLib::MeshSubset const> _mesh_subset_soil_nodes;
128
130
132
133 std::vector<std::size_t> _bhes_element_ids;
134
135 std::vector<std::size_t> _soil_element_ids;
136};
137} // namespace HeatTransportBHE
138} // namespace ProcessLib
Global vector based on Eigen vector.
Definition EigenVector.h:25
std::unique_ptr< MeshLib::MeshSubset const > _mesh_subset_soil_nodes
void assembleConcreteProcess(const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b) override
std::vector< std::unique_ptr< MeshLib::MeshSubset const > > _mesh_subset_BHE_nodes
std::vector< std::tuple< std::size_t, GlobalIndexType, GlobalIndexType > > _vec_bottom_BHE_node_indices
void computeSecondaryVariableConcrete(double const t, double const dt, std::vector< GlobalVector * > const &x, GlobalVector const &x_prev, int const process_id) override
std::vector< std::unique_ptr< HeatTransportBHELocalAssemblerInterface > > _local_assemblers
HeatTransportBHEProcess(std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< std::unique_ptr< ParameterLib::ParameterBase > > const &parameters, unsigned const integration_order, std::vector< std::vector< std::reference_wrapper< ProcessVariable > > > &&process_variables, HeatTransportBHEProcessData &&process_data, SecondaryVariableCollection &&secondary_variables, BHEMeshData &&bhe_mesh_data)
NumLib::IterationResult postIterationConcreteProcess(GlobalVector const &x) override
std::vector< std::unique_ptr< MeshLib::MeshSubset const > > _mesh_subset_BHE_soil_nodes
void preTimestepConcreteProcess(std::vector< GlobalVector * > const &x, const double t, const double dt, int const process_id) override
std::vector< std::tuple< std::size_t, GlobalIndexType, GlobalIndexType > > _vec_top_BHE_node_indices
void initializeConcreteProcess(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, unsigned const integration_order) override
Process specific initialization called by initialize().
void algebraicBcConcreteProcess(const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &xdot, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b)
void assembleWithJacobianConcreteProcess(const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalVector &b, GlobalMatrix &Jac) override
void postTimestepConcreteProcess(std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, const double t, const double dt, int const process_id) override
void createBHEBoundaryConditionTopBottom(std::vector< std::vector< MeshLib::Node * > > const &all_bhe_nodes)
std::string const name
Definition Process.h:362
Handles configuration of several secondary variables from the project file.
IterationResult
Status flags telling the NonlinearSolver if an iteration succeeded.