ASPECT
utilities.h
Go to the documentation of this file.
1 // ------------------------------------------------------
2 //
3 // SPDX-License-Identifier: GPL-2.0-or-later
4 //
5 // SPDX-FileCopyrightText: Copyright (C) 2016-2025 by the ASPECT authors.
6 //
7 // This file is part of ASPECT.
8 //
9 // Detailed license information governing the source code and
10 // contributions can be found in the folder LICENSES and in
11 // LICENSE and CONTRIBUTING.md at the top level directory.
12 //
13 // ------------------------------------------------------
14 
15 #ifndef _aspect_volume_of_fluid_utilities_h
16 #define _aspect_volume_of_fluid_utilities_h
17 
18 #include <deal.II/base/point.h>
19 
20 #include <aspect/global.h>
21 
22 namespace aspect
23 {
24  namespace VolumeOfFluid
25  {
26  namespace Utilities
27  {
41  using namespace aspect::Utilities;
42 
50  double compute_fluid_fraction (const Tensor<1, 2> normal,
51  const double d);
52  double compute_fluid_fraction (const Tensor<1, 3> normal,
53  const double d);
54 
62  double compute_interface_location (const Tensor<1, 2> normal,
63  const double volume_fraction);
64  double compute_interface_location (const Tensor<1, 3> normal,
65  const double volume_fraction);
66 
80  void xFEM_Heaviside(const unsigned int degree,
81  const Tensor<1, 2> normal,
82  const double d,
83  const std::vector<Point<2>> &points,
84  std::vector<double> &values);
85  void xFEM_Heaviside(const unsigned int degree,
86  const Tensor<1, 3> normal,
87  const double d,
88  const std::vector<Point<3>> &points,
89  std::vector<double> &values);
90 
104  void xFEM_Heaviside_derivative_d(const unsigned int degree,
105  const Tensor<1, 2> normal,
106  const double d,
107  const std::vector<Point<2>> &points,
108  std::vector<double> &values);
109  void xFEM_Heaviside_derivative_d(const unsigned int degree,
110  const Tensor<1, 3> normal,
111  const double d,
112  const std::vector<Point<3>> &points,
113  std::vector<double> &values);
114 
115 
129  template <int dim>
130  double compute_interface_location_newton(const unsigned int degree,
131  const Tensor<1, dim, double> normal,
132  const double volume_fraction,
133  const double vol,
134  const double epsilon,
135  const std::vector<Point<dim>> &points,
136  const std::vector<double> &weights);
137 
150  template <int dim>
151  double compute_fluid_volume(const unsigned int degree,
152  const Tensor<1, dim, double> normal,
153  const double d,
154  const std::vector<Point<dim>> &points,
155  const std::vector<double> &weights);
156 
169  template <int dim>
170  double calculate_volume_flux (const unsigned int compute_direction,
171  const double time_direction_derivative,
172  const Tensor<1, dim, double> interface_normal_in_cell,
173  const double d_at_face_center);
174  }
175  }
176 }
177 
178 #endif
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)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
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)
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)
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)
double compute_interface_location(const Tensor< 1, 2 > normal, const double volume_fraction)
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)
SymmetricTensor< 2, dim, Number > epsilon(const Tensor< 2, dim, Number > &Grad_u)
double compute_fluid_fraction(const Tensor< 1, 2 > normal, const double d)