Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
IBStencil< dim > Class Template Reference

#include <ib_stencil.h>

Public Member Functions

virtual unsigned int number_of_interpolation_support_points (const unsigned int degree)
virtual std::tuple< Point< dim >, std::vector< Point< dim > > > support_points_for_interpolation (const unsigned int degree, const double length_ratio, IBParticle< dim > &p, const Point< dim > &dof_point, const typename DoFHandler< dim >::active_cell_iterator &cell_guess)
virtual std::tuple< Point< dim >, std::vector< Point< dim > > > support_points_for_interpolation (const unsigned int degree, const double length_ratio, IBParticle< dim > &p, const Point< dim > &dof_point)
virtual Point< dim > point_for_cell_detection (IBParticle< dim > &p, const Point< dim > &dof_point, const typename DoFHandler< dim >::active_cell_iterator &cell_guess)
virtual Point< dim > point_for_cell_detection (IBParticle< dim > &p, const Point< dim > &dof_point)
virtual std::vector< double > coefficients (const unsigned int degree, const double length_ratio)
virtual double ib_velocity (IBParticle< dim > &p, const Point< dim > &dof_point, const unsigned int component, const typename DoFHandler< dim >::active_cell_iterator &cell_guess)
virtual double ib_velocity (IBParticle< dim > &p, const Point< dim > &dof_point, const unsigned int component)

Private Member Functions

void p_base (const unsigned int degree)

Private Attributes

std::vector< double > reference_points

Detailed Description

template<int dim>
class IBStencil< dim >

Define where the sharp immersed-boundaries are imposed on Eulerian grid.

Template Parameters
dimAn integer that denotes the dimension of the space in which the flow is solved.

Definition at line 20 of file ib_stencil.h.

Member Function Documentation

◆ coefficients()

template<int dim>
std::vector< double > IBStencil< dim >::coefficients ( const unsigned int degree,
const double length_ratio )
virtual

Return the coefficients (weights) of the stencil.

The coefficients of the IB stencil assume a length between the distance of the farthest interpolation point to the DOF, and the distance between the IB and the DOF of 1/8. The coefficients are defined from the coefficient of the DOF to the coefficient of the farthest interpolation point (sorted by increasing distance).

Parameters
[in]degreeStencil degree.
[in]length_ratioLength ratio between the 2 side of the stencil.

Definition at line 43 of file ib_stencil.cc.

References p_base(), and reference_points.

◆ ib_velocity() [1/2]

template<int dim>
double IBStencil< dim >::ib_velocity ( IBParticle< dim > & p,
const Point< dim > & dof_point,
const unsigned int component )
virtual

◆ ib_velocity() [2/2]

template<int dim>
double IBStencil< dim >::ib_velocity ( IBParticle< dim > & p,
const Point< dim > & dof_point,
const unsigned int component,
const typename DoFHandler< dim >::active_cell_iterator & cell_guess )
virtual

Return the velocity of the IB used in the RHS of the equation.

Parameters
[in]pIB particle that cuts the cell.
[in]dof_pointSupport point of the DOF.
[in]componentStencil component of the dof (vx=0,vy=1,vz=2).
[in]cell_guessGuess of the cell containing the evaluation point, which is useful to reduce computation time.

Definition at line 226 of file ib_stencil.cc.

References IBParticle< dim >::closest_surface_point(), IBParticle< dim >::omega, IBParticle< dim >::position, and IBParticle< dim >::velocity.

◆ number_of_interpolation_support_points()

template<int dim>
unsigned int IBStencil< dim >::number_of_interpolation_support_points ( const unsigned int degree)
virtual

Return the number of points used by the interpolation stencil (excluding the dof itself) for a stencil of a given degree.

Parameters
[in]degreeStencil degree.
Returns
Number of points used by the interpolation stencil.

Definition at line 11 of file ib_stencil.cc.

◆ p_base()

template<int dim>
void IBStencil< dim >::p_base ( const unsigned int degree)
private

Return the points on the reference 1D element for the polynomial base.

Parameters
[in]degreeDegree of the stencil.

Definition at line 27 of file ib_stencil.cc.

References reference_points.

◆ point_for_cell_detection() [1/2]

template<int dim>
Point< dim > IBStencil< dim >::point_for_cell_detection ( IBParticle< dim > & p,
const Point< dim > & dof_point )
virtual

See overloaded function.

Definition at line 209 of file ib_stencil.cc.

References IBParticle< dim >::closest_surface_point().

◆ point_for_cell_detection() [2/2]

template<int dim>
Point< dim > IBStencil< dim >::point_for_cell_detection ( IBParticle< dim > & p,
const Point< dim > & dof_point,
const typename DoFHandler< dim >::active_cell_iterator & cell_guess )
virtual

Define the point used to define the cell used for the stencil calculation.

Parameters
[in]pIB particle that cuts the cell.
[in]dof_pointsupport point of the DOF.
[in]cell_guessGuess of the cell containing the evaluation point, which is useful to reduce computation time.

Definition at line 191 of file ib_stencil.cc.

References IBParticle< dim >::closest_surface_point().

◆ support_points_for_interpolation() [1/2]

template<int dim>
std::tuple< Point< dim >, std::vector< Point< dim > > > IBStencil< dim >::support_points_for_interpolation ( const unsigned int degree,
const double length_ratio,
IBParticle< dim > & p,
const Point< dim > & dof_point )
virtual

See overloaded function.

Definition at line 146 of file ib_stencil.cc.

References IBParticle< dim >::closest_surface_point(), p_base(), and reference_points.

◆ support_points_for_interpolation() [2/2]

template<int dim>
std::tuple< Point< dim >, std::vector< Point< dim > > > IBStencil< dim >::support_points_for_interpolation ( const unsigned int degree,
const double length_ratio,
IBParticle< dim > & p,
const Point< dim > & dof_point,
const typename DoFHandler< dim >::active_cell_iterator & cell_guess )
virtual

Find the DOF at which we try to apply the IB by interpolation and the location of the support points to do so.

Define the points for the IB stencil, based on the degree and the particle position as well as the DOF position. Depending on the degree, the output variable "point" change definition. In the case of stencil degrees 1 to 4 the variable point returns the position of the DOF directly. In the case of high degree stencil, it returns the position of the point that is on the IB. The variable "interpolation points" return the points used to define the cell used for the stencil definition and the locations of the points used in the stencil calculation.

Parameters
[in]degreeStencil degree.
[in]length_ratioLength ratio between the 2 side of the stencil.
[in]pIB particle that cuts the cell.
[in]dof_pointSupport point of the DOF.
[in]cell_guessGuess of the cell containing the evaluation point, which is useful to reduce computation time.
Returns
Tuple containing (point, interpolation_points).

Definition at line 99 of file ib_stencil.cc.

References IBParticle< dim >::closest_surface_point(), p_base(), and reference_points.

Member Data Documentation

◆ reference_points

template<int dim>
std::vector<double> IBStencil< dim >::reference_points
private

Points of the reference 1D stencil.

Definition at line 153 of file ib_stencil.h.


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