include/meltpooldg/compressible_flow/multiphase_operator.hpp Source File

Developer Documentation: include/meltpooldg/compressible_flow/multiphase_operator.hpp Source File
Developer Documentation
multiphase_operator.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <deal.II/fe/fe_system.h>
4
13
15{
24 template <int dim, typename number, bool is_viscous_gas = true, bool is_viscous_liquid = true>
26 {
27 public:
28 using VectorType = dealii::LinearAlgebra::distributed::Vector<number>;
31
35
38
39 using ConvectiveKernel = CompressibleFlow::
40 ConvectiveFlux<dim, number, ConservedVariablesType, ConservedVariablesGradType>;
41 using DiffusiveKernel = CompressibleFlow::
42 DiffusiveFlux<dim, number, ConservedVariablesType, ConservedVariablesGradType, FlowFluxType>;
43
46
48
68 const MappingInfoType &mapping_info_interface_in,
69 const MappingInfoVectorType &mapping_info_cells_in,
70 const MappingInfoVectorType &mapping_info_faces_in);
71
80 void
81 local_apply_cell_rhs(const dealii::MatrixFree<dim, number> &matrix_free,
82 VectorType &dst,
83 const VectorType &src,
84 const std::pair<unsigned int, unsigned int> &cell_range) const;
85
94 void
95 local_apply_face_rhs(const dealii::MatrixFree<dim, number> &matrix_free,
96 VectorType &dst,
97 const VectorType &src,
98 const std::pair<unsigned int, unsigned int> &face_range) const;
99
108 void
109 local_apply_boundary_face_rhs(const dealii::MatrixFree<dim, number> &matrix_free,
110 VectorType &dst,
111 const VectorType &src,
112 const std::pair<unsigned int, unsigned int> &face_range) const;
113
122 void
123 local_apply_cell_lhs(const dealii::MatrixFree<dim, number> &matrix_free,
124 VectorType &dst,
125 const VectorType &src,
126 const std::pair<unsigned int, unsigned int> &cell_range) const;
127
136 void
137 local_apply_face_lhs(const dealii::MatrixFree<dim, number> &matrix_free,
138 VectorType &dst,
139 const VectorType &src,
140 const std::pair<unsigned int, unsigned int> &face_range) const;
141
151 void
152 local_apply_boundary_face_lhs(const dealii::MatrixFree<dim, number> &matrix_free,
153 VectorType &dst,
154 const VectorType &src,
155 const std::pair<unsigned int, unsigned int> &face_range) const;
156
165 void
166 create_rhs(const number &time,
167 const number &time_step_in,
168 VectorType &dst,
169 const VectorType &src) const;
170
177 void
178 vmult(VectorType &dst, const VectorType &src) const;
179
185 void
186 set_current_time(const number &current_time_in)
187 {
188 current_time = current_time_in;
189 };
190
196 void
198 std::shared_ptr<CompressibleFlow::ExternalFlowForce<dim, number>> external_force);
199
200 private:
203
206
209
212
214 dealii::FESystem<dim> fe_point_temp;
215
217 const unsigned int n_dofs_per_cell;
218
222
225 std::vector<std::shared_ptr<CompressibleFlow::ExternalFlowForce<dim, number>>> external_forces;
226
228 mutable number time_step = 0.;
229
231 mutable number inv_time_step = 0.;
232
234 mutable number current_time = 0.;
235
238
240 std::unique_ptr<Evaporation::EvaporationModelKnight<number>> evaporation_model_knight;
241
252 const unsigned int offset = 0) const
253 {
255 multiphase_scratch_data.scratch_data.get_matrix_free(),
258 offset,
259 category);
260 }
261
275 create_face_integrator(const bool is_inner_face,
276 const CutUtil::CellCategory category,
277 const unsigned int offset = 0) const
278 {
280 multiphase_scratch_data.scratch_data.get_matrix_free(),
281 is_inner_face,
284 offset,
285 category);
286 };
287
301 std::pair<FEFaceIntegrator<dim, dim + 2, number>, FEFaceIntegrator<dim, dim + 2, number>>
303 const unsigned int offset = 0) const
304 {
305 return {create_face_integrator(true, category, offset),
306 create_face_integrator(false, category, offset)};
307 };
308 };
309} // namespace MeltPoolDG::Multiphase
Operator for the matrix-free of a compressible multiphase flow cutDG formulation.
Definition multiphase_operator.hpp:26
FECellIntegrator< dim, dim+2, number > create_cell_integrator(const CutUtil::CellCategory category, const unsigned int offset=0) const
Wrapper for the generation of a FECellIntegrator object.
Definition multiphase_operator.hpp:251
void local_apply_cell_lhs(const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &cell_range) const
Local applier for the cell integrals in the left-hand side matrix-vector product evaluation.
Definition multiphase_operator.cpp:1082
CompressibleFlow::SourceType< dim, number > FlowSourceType
Definition multiphase_operator.hpp:37
CutUtil::MappingInfoType< dim, number > MappingInfoType
Definition multiphase_operator.hpp:29
void vmult(VectorType &dst, const VectorType &src) const
Function for the matrix-free matrix-vector product evaluation.
Definition multiphase_operator.cpp:67
std::pair< FEFaceIntegrator< dim, dim+2, number >, FEFaceIntegrator< dim, dim+2, number > > create_face_integrators(const CutUtil::CellCategory category, const unsigned int offset=0) const
Wrapper for the generation of a pair of FEFaceIntegrator objects for the "interior" face and the "ext...
Definition multiphase_operator.hpp:302
void local_apply_face_rhs(const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &face_range) const
Local applier for the face integrals in the right-hand side evaluation.
Definition multiphase_operator.cpp:603
dealii::FESystem< dim > fe_point_temp
FESystem object, required by FEPointEvaluation.
Definition multiphase_operator.hpp:214
void local_apply_boundary_face_rhs(const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &face_range) const
Local applier for the boundary face integral in the right-hand side evaluation.
Definition multiphase_operator.cpp:873
number visc_ave_weight_phase_gas
Definition multiphase_operator.hpp:221
CompressibleFlow::ConservedVariablesType< dim, number > ConservedVariablesType
Definition multiphase_operator.hpp:32
void local_apply_face_lhs(const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &face_range) const
Local applier for the face integrals in the left-hand side matrix-vector product evaluation.
Definition multiphase_operator.cpp:1180
std::vector< std::shared_ptr< CompressibleFlow::ExternalFlowForce< dim, number > > > external_forces
Definition multiphase_operator.hpp:225
CompressibleFlow::ConvectiveFlux< dim, number, ConservedVariablesType, ConservedVariablesGradType > ConvectiveKernel
Definition multiphase_operator.hpp:40
CompressibleFlow::ConservedVariablesGradientType< dim, number > ConservedVariablesGradType
Definition multiphase_operator.hpp:34
CutUtil::MappingInfoVectorType< dim, number > MappingInfoVectorType
Definition multiphase_operator.hpp:30
void local_apply_boundary_face_lhs(const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &face_range) const
Local applier for the boundary face integrals in the left-hand side matrix-vector product evaluation.
Definition multiphase_operator.cpp:1312
void add_external_force(std::shared_ptr< CompressibleFlow::ExternalFlowForce< dim, number > > external_force)
Add external fluid forces (e.g. gravity, ...).
Definition multiphase_operator.cpp:94
const MappingInfoVectorType & mapping_info_cells
Mapping information for integration over cut cells.
Definition multiphase_operator.hpp:208
const MappingInfoType & mapping_info_interface
Mapping information for integration over the phase interface.
Definition multiphase_operator.hpp:205
const MappingInfoVectorType & mapping_info_faces
Mapping information for integration over cut faces.
Definition multiphase_operator.hpp:211
number current_time
Current time.
Definition multiphase_operator.hpp:234
LevelSetAdvection< dim, number > level_set_advection_operator
Object for the analytical advection of the level set field for 1D simulations.
Definition multiphase_operator.hpp:237
number visc_ave_weight_phase_liquid
Weighting factors for Nitsche-type viscous interface flux.
Definition multiphase_operator.hpp:220
dealii::LinearAlgebra::distributed::Vector< number > VectorType
Definition multiphase_operator.hpp:28
void create_rhs(const number &time, const number &time_step_in, VectorType &dst, const VectorType &src) const
Function for the matrix-free right-hand side vector evaluation.
Definition multiphase_operator.cpp:103
CompressibleFlow::DiffusiveFlux< dim, number, ConservedVariablesType, ConservedVariablesGradType, FlowFluxType > DiffusiveKernel
Definition multiphase_operator.hpp:42
number time_step
Current time step size.
Definition multiphase_operator.hpp:228
void set_current_time(const number &current_time_in)
Set the current time.
Definition multiphase_operator.hpp:186
CompressibleFlow::FluxType< dim, number > FlowFluxType
Definition multiphase_operator.hpp:36
FEFaceIntegrator< dim, dim+2, number > create_face_integrator(const bool is_inner_face, const CutUtil::CellCategory category, const unsigned int offset=0) const
Wrapper for the generation of a FEFaceIntegrator object.
Definition multiphase_operator.hpp:275
const unsigned int n_dofs_per_cell
Number of DoFs per cell.
Definition multiphase_operator.hpp:217
std::unique_ptr< Evaporation::EvaporationModelKnight< number > > evaporation_model_knight
Pointer to the object for the evaluation of the Knight evaporation model.
Definition multiphase_operator.hpp:240
CompressibleFlow::MultiphaseOperationScratchData< dim, number > & multiphase_scratch_data
Scratch data for multiphase case.
Definition multiphase_operator.hpp:202
number inv_time_step
Inverse time step size.
Definition multiphase_operator.hpp:231
void local_apply_cell_rhs(const dealii::MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &cell_range) const
Local applier for the cell integrals in the right-hand side evaluation.
Definition multiphase_operator.cpp:139
Class for the analytical advection of a 1D test case.
Definition multiphase_level_set_advection.hpp:78
dealii::Tensor< 1, n_conserved_variables< dim, n_species >, dealii::VectorizedArray< number > > SourceType
Definition data_types.hpp:70
dealii::Tensor< 1, n_conserved_variables< dim, n_species >, dealii::Tensor< 1, dim, dealii::VectorizedArray< number > > > FluxType
Definition data_types.hpp:51
dealii::Tensor< 1, n_conserved_variables< dim, n_species >, dealii::Tensor< 1, dim, VectorizedArrayType > > ConservedVariablesGradientType
Definition data_types.hpp:44
dealii::Tensor< 1, n_conserved_variables< dim, n_species >, VectorizedArrayType > ConservedVariablesType
Definition data_types.hpp:35
CellCategory
Definition of the cell category numbering (active FE index).
Definition util.hpp:62
std::vector< std::shared_ptr< MappingInfoType< dim, number > > > MappingInfoVectorType
Definition util.hpp:56
dealii::NonMatching::MappingInfo< dim, dim, dealii::VectorizedArray< number > > MappingInfoType
Definition util.hpp:53
A collection of functions for the computation of the interface terms for compressible two-phase flows...
Definition multiphase_interface_kernels.hpp:31
dealii::FEFaceEvaluation< dim, -1, 0, n_components, number, VectorizedArrayType > FEFaceIntegrator
Definition fe_integrator.hpp:22
dealii::FEEvaluation< dim, -1, 0, n_components, number, VectorizedArrayType > FECellIntegrator
Definition fe_integrator.hpp:14
An abstract interface for defining external forces acting on the fluid that must be evaluated and inc...
Definition utils.hpp:117
Scratch data structure for compressible multiphase flow solvers.
Definition operation_scratch_data.hpp:153
Definition dg_generic_convection_diffusion_worker.hpp:232
Definition dg_generic_convection_diffusion_worker.hpp:67