include/meltpooldg/flow/surface_tension_operation.hpp Source File

Developer Documentation: include/meltpooldg/flow/surface_tension_operation.hpp Source File
Developer Documentation
surface_tension_operation.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <deal.II/lac/full_matrix.h>
4#include <deal.II/lac/la_parallel_block_vector.h>
5#include <deal.II/lac/la_parallel_vector.h>
6
10
11#include <memory>
12
13namespace MeltPoolDG::Flow
14{
45 template <int dim, typename number>
47 {
48 public:
49 using VectorType = dealii::LinearAlgebra::distributed::Vector<number>;
50 using BlockVectorType = dealii::LinearAlgebra::distributed::BlockVector<number>;
51
65 explicit SurfaceTensionOperation(const SurfaceTensionData<number> &data_in,
69 const unsigned int ls_dof_idx,
70 const unsigned int curv_dof_idx,
71 const unsigned int flow_vel_hanging_nodes_dof_idx,
72 const unsigned int flow_pressure_hanging_nodes_dof_idx,
73 const unsigned int flow_quad_idx);
74
85 void
87 const unsigned int normal_dof_idx,
97 void
98 register_solid_fraction(const unsigned int solid_dof_idx, const VectorType *solid);
99
106 void
107 compute_surface_tension(VectorType &force_rhs, const bool zero_out = true);
108
133 number
134 compute_time_step_limit(const number density_1, const number density_2);
135
136 private:
138 const SurfaceTensionData<number> &data;
139
142
145
148
150 const unsigned int ls_dof_idx;
151
153 const unsigned int curv_dof_idx;
154
156 const unsigned int flow_vel_dof_idx;
157
160
162 const unsigned int flow_vel_quad_idx;
163
165 const VectorType *temperature = nullptr;
166
169
171 const VectorType *solid = nullptr;
172
174 unsigned int temp_dof_idx;
175
177 unsigned int normal_dof_idx;
178
180 unsigned int solid_dof_idx;
181
184
187
189 std::unique_ptr<const LevelSet::DeltaApproximationBase<number>> delta_phase_weighted;
190
192 const number alpha_residual;
193
207 template <typename number_surface_tension_coeff>
208 number_surface_tension_coeff
210 const number_surface_tension_coeff &T);
211 };
212} // namespace MeltPoolDG::Flow
This class enables to compute the contribution to interfacial forces due to temperature-(in)dependent...
Definition surface_tension_operation.hpp:47
const unsigned int flow_vel_quad_idx
Quadrature index for the flow velocity computation.
Definition surface_tension_operation.hpp:162
const VectorType & solution_curvature
Vector for the curvature values of the solution.
Definition surface_tension_operation.hpp:147
dealii::LinearAlgebra::distributed::BlockVector< number > BlockVectorType
Definition surface_tension_operation.hpp:50
number compute_time_step_limit(const number density_1, const number density_2)
Compute the time step limit for explicit treatment of surface tension [*], as.
Definition surface_tension_operation.cpp:385
const number alpha_residual
Alpha residual.
Definition surface_tension_operation.hpp:192
unsigned int temp_dof_idx
Index for the temperature DoFHandler.
Definition surface_tension_operation.hpp:174
const unsigned int curv_dof_idx
Index for the curvature DoFHandler.
Definition surface_tension_operation.hpp:153
dealii::FullMatrix< number > ls_to_pressure_grad_interpolation_matrix
Matrix for the interpolation from level set to pressure gradient.
Definition surface_tension_operation.hpp:186
void compute_surface_tension(VectorType &force_rhs, const bool zero_out=true)
Compute a DoF vector of the surface tension and add it into to force_rhs.
Definition surface_tension_operation.cpp:98
const unsigned int flow_vel_dof_idx
Index for the flow velocity DoFHandler.
Definition surface_tension_operation.hpp:156
const unsigned int ls_dof_idx
Index for the level set DoFHandler.
Definition surface_tension_operation.hpp:150
std::unique_ptr< const LevelSet::DeltaApproximationBase< number > > delta_phase_weighted
Pointer to the phase-weighted delta approximation object.
Definition surface_tension_operation.hpp:189
const ScratchData< dim, dim, number > & scratch_data
Container for mapping-, finite-element-, and quadrature-related objects.
Definition surface_tension_operation.hpp:141
const bool do_level_set_pressure_gradient_interpolation
Boolean indicator whether level-set pressure gradient interpolation should be done.
Definition surface_tension_operation.hpp:183
void register_temperature_and_normal_vector(const unsigned int temp_dof_idx, const unsigned int normal_dof_idx, const VectorType *temperature, const BlockVectorType *solution_normal_vector)
Registers the DoF vectors of the temperature and normal vector (solution_normal_vector),...
Definition surface_tension_operation.cpp:71
const VectorType * temperature
Pointer to the temperature vector.
Definition surface_tension_operation.hpp:165
unsigned int solid_dof_idx
Index for the solid DoFHandler.
Definition surface_tension_operation.hpp:180
const unsigned int flow_pressure_hanging_nodes_dof_idx
Index for the flow pressure hanging nodes DoFHandler.
Definition surface_tension_operation.hpp:159
unsigned int normal_dof_idx
Index for the normal vector DoFHandler.
Definition surface_tension_operation.hpp:177
const VectorType * solid
Pointer to the solid vector.
Definition surface_tension_operation.hpp:171
const SurfaceTensionData< number > & data
Parameters related to surface tension.
Definition surface_tension_operation.hpp:138
number_surface_tension_coeff local_compute_temperature_dependent_surface_tension_coefficient(const number_surface_tension_coeff &T)
Compute the temperature-dependent surface tension coefficient for a given temperature T,...
Definition surface_tension_operation.cpp:421
const VectorType & level_set_as_heaviside
Level set vector of type heaviside.
Definition surface_tension_operation.hpp:144
dealii::LinearAlgebra::distributed::Vector< number > VectorType
Definition surface_tension_operation.hpp:49
void register_solid_fraction(const unsigned int solid_dof_idx, const VectorType *solid)
Registers the solid fraction, given by a DoF vector solid and a DoF index solid_dof_idx,...
Definition surface_tension_operation.cpp:89
const BlockVectorType * solution_normal_vector
Pointer to the normal vector block vector.
Definition surface_tension_operation.hpp:168
Container for shared scratch data between operations/operators.
Definition scratch_data.hpp:61
Definition equation_of_state.hpp:17