SurfaceTensionOperation< dim, number > Class Template Reference

Developer Documentation: MeltPoolDG::Flow::SurfaceTensionOperation< dim, number > Class Template Reference
Developer Documentation
MeltPoolDG::Flow::SurfaceTensionOperation< dim, number > Class Template Reference

This class enables to compute the contribution to interfacial forces due to temperature-(in)dependent surface tension. More...

#include <surface_tension_operation.hpp>

Collaboration diagram for MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >:
[legend]

Public Types

using VectorType = dealii::LinearAlgebra::distributed::Vector< number >
 
using BlockVectorType = dealii::LinearAlgebra::distributed::BlockVector< number >
 

Public Member Functions

 SurfaceTensionOperation (const SurfaceTensionData< number > &data_in, const ScratchData< dim, dim, number > &scratch_data, const VectorType &level_set_as_heaviside, const VectorType &solution_curvature, const unsigned int ls_dof_idx, const unsigned int curv_dof_idx, const unsigned int flow_vel_hanging_nodes_dof_idx, const unsigned int flow_pressure_hanging_nodes_dof_idx, const unsigned int flow_quad_idx)
 Constructor.
 
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), which are required for temperature-dependent surface tension forces, i.e. Marangoni convection.
 
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, which is required if surface tension should be zeroed out in the solid domain.
 
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.
 
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.
 

Private Member Functions

template<typename number_surface_tension_coeff >
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, according to.
 

Private Attributes

const SurfaceTensionData< number > & data
 Parameters related to surface tension.
 
const ScratchData< dim, dim, number > & scratch_data
 Container for mapping-, finite-element-, and quadrature-related objects.
 
const VectorTypelevel_set_as_heaviside
 Level set vector of type heaviside.
 
const VectorTypesolution_curvature
 Vector for the curvature values of the solution.
 
const unsigned int ls_dof_idx
 Index for the level set DoFHandler.
 
const unsigned int curv_dof_idx
 Index for the curvature DoFHandler.
 
const unsigned int flow_vel_dof_idx
 Index for the flow velocity DoFHandler.
 
const unsigned int flow_pressure_hanging_nodes_dof_idx
 Index for the flow pressure hanging nodes DoFHandler.
 
const unsigned int flow_vel_quad_idx
 Quadrature index for the flow velocity computation.
 
const VectorTypetemperature = nullptr
 Pointer to the temperature vector.
 
const BlockVectorTypesolution_normal_vector = nullptr
 Pointer to the normal vector block vector.
 
const VectorTypesolid = nullptr
 Pointer to the solid vector.
 
unsigned int temp_dof_idx
 Index for the temperature DoFHandler.
 
unsigned int normal_dof_idx
 Index for the normal vector DoFHandler.
 
unsigned int solid_dof_idx
 Index for the solid DoFHandler.
 
const bool do_level_set_pressure_gradient_interpolation
 Boolean indicator whether level-set pressure gradient interpolation should be done.
 
dealii::FullMatrix< number > ls_to_pressure_grad_interpolation_matrix
 Matrix for the interpolation from level set to pressure gradient.
 
std::unique_ptr< const LevelSet::DeltaApproximationBase< number > > delta_phase_weighted
 Pointer to the phase-weighted delta approximation object.
 
const number alpha_residual
 Alpha residual.
 

Detailed Description

template<int dim, typename number>
class MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >

This class enables to compute the contribution to interfacial forces due to temperature-(in)dependent surface tension.

    /                \        /                         \

f_st = | N_a, α κ n δ | + | N_a, (I - n ⊗ n ) ∇α δ | \ Γ / \ Γ Γ / Ω Ω

with the curvature

κ = -( ∇ ∙ n )

the temperature-dependent surface tension coefficient

α = α_0 - α'_0 ( T - T ) α_0

and its gradient

∇α = -α'_0 ∇T .

Note
Since it might happen that α gets negative (which does not make sense) we compute a minimum value for the surface tension coefficient as
    /                                 \
α = max | α_min, α_0 - α'_0 ( T - T ) | \ α_0 /

Member Typedef Documentation

◆ BlockVectorType

template<int dim, typename number >
using MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::BlockVectorType = dealii::LinearAlgebra::distributed::BlockVector<number>

◆ VectorType

template<int dim, typename number >
using MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::VectorType = dealii::LinearAlgebra::distributed::Vector<number>

Constructor & Destructor Documentation

◆ SurfaceTensionOperation()

template<int dim, typename number >
MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::SurfaceTensionOperation ( const SurfaceTensionData< number > &  data_in,
const ScratchData< dim, dim, number > &  scratch_data,
const VectorType level_set_as_heaviside,
const VectorType solution_curvature,
const unsigned int  ls_dof_idx,
const unsigned int  curv_dof_idx,
const unsigned int  flow_vel_hanging_nodes_dof_idx,
const unsigned int  flow_pressure_hanging_nodes_dof_idx,
const unsigned int  flow_quad_idx 
)
explicit

Constructor.

Parameters
data_inSurface tension data object for surface tension related parameters.
scratch_dataScratch data object.
level_set_as_heavisideLevel set vector of type heaviside.
solution_curvatureVector of the current solution curvature.
ls_dof_idxIndex for the level set DoFHandler.
curv_dof_idxIndex for the curvature DoFHandler
flow_vel_hanging_nodes_dof_idxIndex for the flow velocity hanging nodes DoFHandler.
flow_pressure_hanging_nodes_dof_idxIndex for the pressure hanging nodes DoFHandler.
flow_quad_idxFlow quadrature index.

Member Function Documentation

◆ compute_surface_tension()

template<int dim, typename number >
void MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::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.

Parameters
force_rhsForce right-hand side vector.
zero_outIndicator whether force_rhs should be zeroed out first.

◆ compute_time_step_limit()

template<int dim, typename number >
number MeltPoolDG::Flow::SurfaceTensionOperation< dim, 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.

           __________________
          / (ρ1 + ρ2) * Δx^3
         / ------------------

Δt = k \/ 2 π α st st

with an arbitrary scale factor 0 <= k <= 1, the densities of the two fluids, ρ1 (density_1) st and ρ2 (density_2), the element size Δx (minimal edge length) and the surface tension coefficient α.

[*] J.U. Brackbill, D.B. Kothe, C. Zemach: A continuum method for modeling surface tension, J. Comput. Phys. 100 (2) (1992) 335–354.

Parameters
density_1Density value for the first fluid.
density_2Density value for the second fluid.
Returns
Time step limit.
Note
As a conservative assumption, we choose α as max (α (T)) in case of temperature-dependent surface tension.

◆ local_compute_temperature_dependent_surface_tension_coefficient()

template<int dim, typename number >
template<typename number_surface_tension_coeff >
number_surface_tension_coeff MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::local_compute_temperature_dependent_surface_tension_coefficient ( const number_surface_tension_coeff &  T)
private

Compute the temperature-dependent surface tension coefficient for a given temperature T, according to.

α = α_0 - α'_0 ( T - T ). α_0

Parameters
TGiven temperature T.
Returns
Temperature-dependent surface tension coefficient.
Note
If α'_0 is positive, α decreases with increasing temperature.

◆ register_solid_fraction()

template<int dim, typename number >
void MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::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, which is required if surface tension should be zeroed out in the solid domain.

Parameters
solid_dof_idxIndex for the solid DoFHandler.
solidPointer to the solid vector.

◆ register_temperature_and_normal_vector()

template<int dim, typename number >
void MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::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), which are required for temperature-dependent surface tension forces, i.e. Marangoni convection.

Parameters
temp_dof_idxIndex for the temperature DoFHandler.
normal_dof_idxIndex for the normal vector DoFHandler.
temperaturePointer to the temperature vector.
solution_normal_vectorPointer to the solution normal vector block vector.

Member Data Documentation

◆ alpha_residual

template<int dim, typename number >
const number MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::alpha_residual
private

Alpha residual.

◆ curv_dof_idx

template<int dim, typename number >
const unsigned int MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::curv_dof_idx
private

Index for the curvature DoFHandler.

◆ data

template<int dim, typename number >
const SurfaceTensionData<number>& MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::data
private

Parameters related to surface tension.

◆ delta_phase_weighted

template<int dim, typename number >
std::unique_ptr<const LevelSet::DeltaApproximationBase<number> > MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::delta_phase_weighted
private

Pointer to the phase-weighted delta approximation object.

◆ do_level_set_pressure_gradient_interpolation

template<int dim, typename number >
const bool MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::do_level_set_pressure_gradient_interpolation
private

Boolean indicator whether level-set pressure gradient interpolation should be done.

◆ flow_pressure_hanging_nodes_dof_idx

template<int dim, typename number >
const unsigned int MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::flow_pressure_hanging_nodes_dof_idx
private

Index for the flow pressure hanging nodes DoFHandler.

◆ flow_vel_dof_idx

template<int dim, typename number >
const unsigned int MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::flow_vel_dof_idx
private

Index for the flow velocity DoFHandler.

◆ flow_vel_quad_idx

template<int dim, typename number >
const unsigned int MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::flow_vel_quad_idx
private

Quadrature index for the flow velocity computation.

◆ level_set_as_heaviside

template<int dim, typename number >
const VectorType& MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::level_set_as_heaviside
private

Level set vector of type heaviside.

◆ ls_dof_idx

template<int dim, typename number >
const unsigned int MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::ls_dof_idx
private

Index for the level set DoFHandler.

◆ ls_to_pressure_grad_interpolation_matrix

template<int dim, typename number >
dealii::FullMatrix<number> MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::ls_to_pressure_grad_interpolation_matrix
private

Matrix for the interpolation from level set to pressure gradient.

◆ normal_dof_idx

template<int dim, typename number >
unsigned int MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::normal_dof_idx
private

Index for the normal vector DoFHandler.

◆ scratch_data

template<int dim, typename number >
const ScratchData<dim, dim, number>& MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::scratch_data
private

Container for mapping-, finite-element-, and quadrature-related objects.

◆ solid

template<int dim, typename number >
const VectorType* MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::solid = nullptr
private

Pointer to the solid vector.

◆ solid_dof_idx

template<int dim, typename number >
unsigned int MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::solid_dof_idx
private

Index for the solid DoFHandler.

◆ solution_curvature

template<int dim, typename number >
const VectorType& MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::solution_curvature
private

Vector for the curvature values of the solution.

◆ solution_normal_vector

template<int dim, typename number >
const BlockVectorType* MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::solution_normal_vector = nullptr
private

Pointer to the normal vector block vector.

◆ temp_dof_idx

template<int dim, typename number >
unsigned int MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::temp_dof_idx
private

Index for the temperature DoFHandler.

◆ temperature

template<int dim, typename number >
const VectorType* MeltPoolDG::Flow::SurfaceTensionOperation< dim, number >::temperature = nullptr
private

Pointer to the temperature vector.


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