ASPECT
Functions
aspect::VolumeOfFluid::Utilities Namespace Reference

Functions

double compute_fluid_fraction (const Tensor< 1, 2 > normal, const double d)
 
double compute_fluid_fraction (const Tensor< 1, 3 > normal, const double d)
 
double compute_interface_location (const Tensor< 1, 2 > normal, const double volume_fraction)
 
double compute_interface_location (const Tensor< 1, 3 > normal, const double volume_fraction)
 
void xFEM_Heaviside (const unsigned int degree, const Tensor< 1, 2 > normal, const double d, const std::vector< Point< 2 >> &points, std::vector< double > &values)
 
void xFEM_Heaviside (const unsigned int degree, const Tensor< 1, 3 > normal, const double d, const std::vector< Point< 3 >> &points, std::vector< double > &values)
 
void xFEM_Heaviside_derivative_d (const unsigned int degree, const Tensor< 1, 2 > normal, const double d, const std::vector< Point< 2 >> &points, std::vector< double > &values)
 
void xFEM_Heaviside_derivative_d (const unsigned int degree, const Tensor< 1, 3 > normal, const double d, const std::vector< Point< 3 >> &points, std::vector< double > &values)
 
template<int dim>
double compute_interface_location_newton (const unsigned int degree, const Tensor< 1, dim, double > normal, const double volume_fraction, const double vol, const double epsilon, const std::vector< Point< dim >> &points, const std::vector< double > &weights)
 
template<int dim>
double compute_fluid_volume (const unsigned int degree, const Tensor< 1, dim, double > normal, const double d, const std::vector< Point< dim >> &points, const std::vector< double > &weights)
 
template<int dim>
double calculate_volume_flux (const unsigned int compute_direction, const double time_direction_derivative, const Tensor< 1, dim, double > interface_normal_in_cell, const double d_at_face_center)
 

Function Documentation

§ compute_fluid_fraction() [1/2]

double aspect::VolumeOfFluid::Utilities::compute_fluid_fraction ( const Tensor< 1, 2 >  normal,
const double  d 
)

Function to calculate volume fraction contained by indicator function H(d-normal*(x'-x_{cen}')) on the [0, 1]^dim unit cell where x_{cen} is the unit cell center.

Currently only works assuming constant Jacobian determinant.

§ compute_fluid_fraction() [2/2]

double aspect::VolumeOfFluid::Utilities::compute_fluid_fraction ( const Tensor< 1, 3 >  normal,
const double  d 
)

§ compute_interface_location() [1/2]

double aspect::VolumeOfFluid::Utilities::compute_interface_location ( const Tensor< 1, 2 >  normal,
const double  volume_fraction 
)

Function to calculate required value of d to obtain given volume fraction for indicator function H(d-normal*(x'-x_{cen}')) on the [0, 1]^dim unit cell where x_{cen} is the unit cell center.

Currently only works assuming constant Jacobian determinant.

§ compute_interface_location() [2/2]

double aspect::VolumeOfFluid::Utilities::compute_interface_location ( const Tensor< 1, 3 >  normal,
const double  volume_fraction 
)

§ xFEM_Heaviside() [1/2]

void aspect::VolumeOfFluid::Utilities::xFEM_Heaviside ( const unsigned int  degree,
const Tensor< 1, 2 >  normal,
const double  d,
const std::vector< Point< 2 >> &  points,
std::vector< double > &  values 
)

Obtain values at points for a polynomial function that is equivalent to the Heaviside function \(H(d-normal*xhat)\) on the unit cell when integrated against polynomials of up to the specified degree.

Currently works for degree <=1

Parameters
degreeMaximum degree for exact integration
normalInterface normal vector, pointed away from the included region
dInterface parameter specifying location of interface in unit cell
pointsLocations to evaluate the constructed polynomial
valuesValues of the constructed polynomial at the specified points

§ xFEM_Heaviside() [2/2]

void aspect::VolumeOfFluid::Utilities::xFEM_Heaviside ( const unsigned int  degree,
const Tensor< 1, 3 >  normal,
const double  d,
const std::vector< Point< 3 >> &  points,
std::vector< double > &  values 
)

§ xFEM_Heaviside_derivative_d() [1/2]

void aspect::VolumeOfFluid::Utilities::xFEM_Heaviside_derivative_d ( const unsigned int  degree,
const Tensor< 1, 2 >  normal,
const double  d,
const std::vector< Point< 2 >> &  points,
std::vector< double > &  values 
)

Obtain values at points for a polynomial function that is equivalent to the function \(\frac{d}{dd}H(d-normal*xhat)\) on the unit cell when integrated against polynomials of up to the specified degree.

Currently works for degree <=1

Parameters
degreeMaximum degree for exact integration
normalInterface normal vector, pointed away from the included region
dInterface parameter specifying location of interface in unit cell
pointsLocations to evaluate the constructed polynomial
valuesValues of the constructed polynomial at the specified points

§ xFEM_Heaviside_derivative_d() [2/2]

void aspect::VolumeOfFluid::Utilities::xFEM_Heaviside_derivative_d ( const unsigned int  degree,
const Tensor< 1, 3 >  normal,
const double  d,
const std::vector< Point< 3 >> &  points,
std::vector< double > &  values 
)

§ compute_interface_location_newton()

template<int dim>
double aspect::VolumeOfFluid::Utilities::compute_interface_location_newton ( const unsigned int  degree,
const Tensor< 1, dim, double >  normal,
const double  volume_fraction,
const double  vol,
const double  epsilon,
const std::vector< Point< dim >> &  points,
const std::vector< double > &  weights 
)

Function to do Newton iteration calculation of correct d for a given normal to get volume_fraction from xFEM_Heaviside integrated against the given weights.

Parameters
degreeMaximum degree for exact integration
normalInterface normal vector, pointed away from the included region
volume_fractionCell volume fraction in physical space - used for target value for integration
volCell volume in physical space - used for target value for integration
epsilonTolerance for Newton iteration
pointsQuadrature points to use for update
weightsJxW values to use for quadrature

§ compute_fluid_volume()

template<int dim>
double aspect::VolumeOfFluid::Utilities::compute_fluid_volume ( const unsigned int  degree,
const Tensor< 1, dim, double >  normal,
const double  d,
const std::vector< Point< dim >> &  points,
const std::vector< double > &  weights 
)

Function to calculate volume contained by indicator function \(H(d-normal*(x'-x_{cen}'))\) on the \([0, 1]^dim\) unit cell where \(x_{cen}\) is the unit cell center, using a polynomial mapping of degree up to "degree".

Parameters
degreeMaximum degree for exact integration
normalInterface normal vector, pointed away from the included region
dInterface parameter specifying location of interface in unit cell by distance from cell center
pointsQuadrature points to use for update
weightsJxW values to use for quadrature

§ calculate_volume_flux()

template<int dim>
double aspect::VolumeOfFluid::Utilities::calculate_volume_flux ( const unsigned int  compute_direction,
const double  time_direction_derivative,
const Tensor< 1, dim, double >  interface_normal_in_cell,
const double  d_at_face_center 
)

Function to calculate flux volume fraction based on a method of characteristics approximation of the interface on the cell's face over the timestep. Calculation assumes an approximation to the interface of the form \(H(d-normal*(x'-x_{face center})-time_direction_derivative*t')\) where \(t'\) is in terms of a "unit timestep".

Parameters
compute_directionDimension of unit cell we are currently computing along
time_direction_derivativeApproximated gradient in time for the "level set" describing the interface.
interface_normal_in_cellThe normal vector for the current interface reconstruction in the computing cell.
d_at_face_centerThe correct d value to for the interface description on the face we are computing for.