ASPECT
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
aspect::VolumeOfFluidHandler< dim > Class Template Reference
Inheritance diagram for aspect::VolumeOfFluidHandler< dim >:
Inheritance graph
[legend]

Public Member Functions

 VolumeOfFluidHandler (Simulator< dim > &simulator, ParameterHandler &prm)
 
void edit_finite_element_variables (std::vector< VariableDeclaration< dim >> &vars)
 
void parse_parameters (ParameterHandler &prm)
 
unsigned int get_n_fields () const
 
const std::string name_for_field_index (unsigned int i) const
 
const VolumeOfFluidField< dim > & field_struct_for_field_index (unsigned int i) const
 
double get_volume_fraction_threshold () const
 
unsigned int field_index_for_name (const std::string &fieldname) const
 
void initialize (ParameterHandler &prm)
 
void set_initial_volume_fractions ()
 
void initialize_from_composition_field (const VolumeOfFluidField< dim > &field)
 
void initialize_from_level_set (const VolumeOfFluidField< dim > &field)
 
void update_volume_of_fluid_normals (const VolumeOfFluidField< dim > &field, LinearAlgebra::BlockVector &solution)
 
void update_volume_of_fluid_composition (const typename Simulator< dim >::AdvectionField &composition_field, const VolumeOfFluidField< dim > &volume_of_fluid_field, LinearAlgebra::BlockVector &solution)
 
void do_volume_of_fluid_update (const typename Simulator< dim >::AdvectionField &advection_field)
 
void assemble_volume_of_fluid_system (const VolumeOfFluidField< dim > &field, const unsigned int calculation_dim, const bool update_from_old_solution)
 
void solve_volume_of_fluid_system (const VolumeOfFluidField< dim > &field)
 
- Public Member Functions inherited from aspect::SimulatorAccess< dim >
 SimulatorAccess ()
 
 SimulatorAccess (const Simulator< dim > &simulator_object)
 
virtual ~SimulatorAccess ()=default
 
virtual void initialize_simulator (const Simulator< dim > &simulator_object)
 
const Introspection< dim > & introspection () const
 
const Simulator< dim > & get_simulator () const
 
const Parameters< dim > & get_parameters () const
 
SimulatorSignals< dim > & get_signals () const
 
MPI_Comm get_mpi_communicator () const
 
TimerOutput & get_computing_timer () const
 
const ConditionalOStream & get_pcout () const
 
double get_time () const
 
double get_timestep () const
 
double get_old_timestep () const
 
unsigned int get_timestep_number () const
 
const TimeStepping::Manager< dim > & get_timestepping_manager () const
 
unsigned int get_nonlinear_iteration () const
 
const parallel::distributed::Triangulation< dim > & get_triangulation () const
 
double get_volume () const
 
const Mapping< dim > & get_mapping () const
 
std::string get_output_directory () const
 
bool include_adiabatic_heating () const
 
bool include_latent_heat () const
 
bool include_melt_transport () const
 
int get_stokes_velocity_degree () const
 
double get_adiabatic_surface_temperature () const
 
double get_surface_pressure () const
 
bool convert_output_to_years () const
 
unsigned int get_pre_refinement_step () const
 
unsigned int n_compositional_fields () const
 
double get_end_time () const
 
void get_refinement_criteria (Vector< float > &estimated_error_per_cell) const
 
void get_artificial_viscosity (Vector< float > &viscosity_per_cell, const bool skip_interior_cells=false) const
 
void get_artificial_viscosity_composition (Vector< float > &viscosity_per_cell, const unsigned int compositional_variable) const
 
const LinearAlgebra::BlockVectorget_current_linearization_point () const
 
const LinearAlgebra::BlockVectorget_solution () const
 
const LinearAlgebra::BlockVectorget_old_solution () const
 
const LinearAlgebra::BlockVectorget_old_old_solution () const
 
const LinearAlgebra::BlockVectorget_reaction_vector () const
 
const LinearAlgebra::BlockVectorget_mesh_velocity () const
 
const DoFHandler< dim > & get_dof_handler () const
 
const FiniteElement< dim > & get_fe () const
 
const LinearAlgebra::BlockSparseMatrixget_system_matrix () const
 
const LinearAlgebra::BlockSparseMatrixget_system_preconditioner_matrix () const
 
const MaterialModel::Interface< dim > & get_material_model () const
 
const GravityModel::Interface< dim > & get_gravity_model () const
 
const InitialTopographyModel::Interface< dim > & get_initial_topography_model () const
 
const GeometryModel::Interface< dim > & get_geometry_model () const
 
const AdiabaticConditions::Interface< dim > & get_adiabatic_conditions () const
 
bool has_boundary_temperature () const
 
const BoundaryTemperature::Manager< dim > & get_boundary_temperature_manager () const
 
const BoundaryHeatFlux::Interface< dim > & get_boundary_heat_flux () const
 
bool has_boundary_composition () const
 
const BoundaryComposition::Manager< dim > & get_boundary_composition_manager () const
 
const BoundaryTraction::Manager< dim > & get_boundary_traction_manager () const
 
std::shared_ptr< const InitialTemperature::Manager< dim > > get_initial_temperature_manager_pointer () const
 
const InitialTemperature::Manager< dim > & get_initial_temperature_manager () const
 
std::shared_ptr< const InitialComposition::Manager< dim > > get_initial_composition_manager_pointer () const
 
const InitialComposition::Manager< dim > & get_initial_composition_manager () const
 
const std::set< types::boundary_id > & get_fixed_temperature_boundary_indicators () const
 
const std::set< types::boundary_id > & get_fixed_heat_flux_boundary_indicators () const
 
const std::set< types::boundary_id > & get_fixed_composition_boundary_indicators () const
 
const std::set< types::boundary_id > & get_mesh_deformation_boundary_indicators () const
 
const BoundaryVelocity::Manager< dim > & get_boundary_velocity_manager () const
 
const HeatingModel::Manager< dim > & get_heating_model_manager () const
 
const MeshRefinement::Manager< dim > & get_mesh_refinement_manager () const
 
const MeltHandler< dim > & get_melt_handler () const
 
const VolumeOfFluidHandler< dim > & get_volume_of_fluid_handler () const
 
const NewtonHandler< dim > & get_newton_handler () const
 
const MeshDeformation::MeshDeformationHandler< dim > & get_mesh_deformation_handler () const
 
const LateralAveraging< dim > & get_lateral_averaging () const
 
const AffineConstraints< double > & get_current_constraints () const
 
bool simulator_is_past_initialization () const
 
double get_pressure_scaling () const
 
bool pressure_rhs_needs_compatibility_modification () const
 
bool model_has_prescribed_stokes_solution () const
 
TableHandler & get_statistics_object () const
 
const Postprocess::Manager< dim > & get_postprocess_manager () const
 
unsigned int n_particle_managers () const
 
const Particle::Manager< dim > & get_particle_manager (const unsigned int particle_manager_index) const
 
Particle::Manager< dim > & get_particle_manager (const unsigned int particle_manager_index)
 
bool is_stokes_matrix_free ()
 
const StokesMatrixFreeHandler< dim > & get_stokes_matrix_free () const
 
RotationProperties< dim > compute_net_angular_momentum (const bool use_constant_density, const LinearAlgebra::BlockVector &solution, const bool limit_to_top_faces=false) const
 

Static Public Member Functions

static void declare_parameters (ParameterHandler &prm)
 
- Static Public Member Functions inherited from aspect::SimulatorAccess< dim >
static void get_composition_values_at_q_point (const std::vector< std::vector< double >> &composition_values, const unsigned int q, std::vector< double > &composition_values_at_q_point)
 

Private Member Functions

void copy_local_to_global_volume_of_fluid_system (const internal::Assembly::CopyData::VolumeOfFluidSystem< dim > &data)
 

Private Attributes

Simulator< dim > & sim
 
Assemblers::VolumeOfFluidAssembler< dim > assembler
 
unsigned int n_volume_of_fluid_fields
 
std::vector< VolumeOfFluidField< dim > > data
 
double volume_fraction_threshold
 
double volume_of_fluid_solver_tolerance
 
unsigned int n_init_samples
 
std::vector< std::string > volume_of_fluid_field_names
 
std::map< unsigned int, unsigned int > volume_of_fluid_composition_map_index
 
std::vector< VolumeOfFluid::VolumeOfFluidInputType::Kindinitialization_data_type
 

Static Private Attributes

static constexpr double volume_of_fluid_reconstruct_epsilon = 1e-13
 

Friends

class Simulator< dim >
 

Detailed Description

template<int dim>
class aspect::VolumeOfFluidHandler< dim >

A member class that isolates the functions and variables that deal with the Volume of Fluid implementation. If Volume of Fluid interface tracking is not active, there is no instantiation of this class at all.

Definition at line 99 of file simulator.h.

Constructor & Destructor Documentation

§ VolumeOfFluidHandler()

template<int dim>
aspect::VolumeOfFluidHandler< dim >::VolumeOfFluidHandler ( Simulator< dim > &  simulator,
ParameterHandler &  prm 
)

Standard initial constructor

Member Function Documentation

§ edit_finite_element_variables()

template<int dim>
void aspect::VolumeOfFluidHandler< dim >::edit_finite_element_variables ( std::vector< VariableDeclaration< dim >> &  vars)

Add the Volume of Fluid field declaration to the list to be included in the solution vector.

§ declare_parameters()

template<int dim>
static void aspect::VolumeOfFluidHandler< dim >::declare_parameters ( ParameterHandler &  prm)
static

Declare the parameters this class takes through input files.

§ parse_parameters()

template<int dim>
void aspect::VolumeOfFluidHandler< dim >::parse_parameters ( ParameterHandler &  prm)

Read the parameters this class declares from the parameter file.

§ get_n_fields()

template<int dim>
unsigned int aspect::VolumeOfFluidHandler< dim >::get_n_fields ( ) const

Get the number of volume of fluid fields in current model

§ name_for_field_index()

template<int dim>
const std::string aspect::VolumeOfFluidHandler< dim >::name_for_field_index ( unsigned int  i) const

Get the name of volume of fluid field with index i

§ field_struct_for_field_index()

template<int dim>
const VolumeOfFluidField<dim>& aspect::VolumeOfFluidHandler< dim >::field_struct_for_field_index ( unsigned int  i) const

Get the structure containing the variable locations for the volume of fluid field with index i.

§ get_volume_fraction_threshold()

template<int dim>
double aspect::VolumeOfFluidHandler< dim >::get_volume_fraction_threshold ( ) const

Get threshold for volume fraction

§ field_index_for_name()

template<int dim>
unsigned int aspect::VolumeOfFluidHandler< dim >::field_index_for_name ( const std::string &  fieldname) const

Get the local index (within vof fields) for the named composition/volume of fluid field

§ initialize()

template<int dim>
void aspect::VolumeOfFluidHandler< dim >::initialize ( ParameterHandler &  prm)

Do necessary internal initialization that is dependent on having the simulator and Finite Element initialized.

§ set_initial_volume_fractions()

template<int dim>
void aspect::VolumeOfFluidHandler< dim >::set_initial_volume_fractions ( )

Do initialization routine for all volume of fluid fields

§ initialize_from_composition_field()

template<int dim>
void aspect::VolumeOfFluidHandler< dim >::initialize_from_composition_field ( const VolumeOfFluidField< dim > &  field)

Initialize specified field based on a composition field initial condition

§ initialize_from_level_set()

template<int dim>
void aspect::VolumeOfFluidHandler< dim >::initialize_from_level_set ( const VolumeOfFluidField< dim > &  field)

Initialize specified field based on a level set initial condition

§ update_volume_of_fluid_normals()

template<int dim>
void aspect::VolumeOfFluidHandler< dim >::update_volume_of_fluid_normals ( const VolumeOfFluidField< dim > &  field,
LinearAlgebra::BlockVector solution 
)

Do interface reconstruction for specified field and cache result in solution vector

§ update_volume_of_fluid_composition()

template<int dim>
void aspect::VolumeOfFluidHandler< dim >::update_volume_of_fluid_composition ( const typename Simulator< dim >::AdvectionField &  composition_field,
const VolumeOfFluidField< dim > &  volume_of_fluid_field,
LinearAlgebra::BlockVector solution 
)

Use current interface reconstruction to produce a composition field approximation that is bilinear on the unit cell and write that field to the specified AdvectionField

§ do_volume_of_fluid_update()

template<int dim>
void aspect::VolumeOfFluidHandler< dim >::do_volume_of_fluid_update ( const typename Simulator< dim >::AdvectionField &  advection_field)

Do single timestep update, includes logic for doing Strang split update

§ assemble_volume_of_fluid_system()

template<int dim>
void aspect::VolumeOfFluidHandler< dim >::assemble_volume_of_fluid_system ( const VolumeOfFluidField< dim > &  field,
const unsigned int  calculation_dim,
const bool  update_from_old_solution 
)

Assemble matrix and RHS for the specified field and dimension (calculation_dim). If update_from_old_solution is true, the initial values for this update step are in old_solution, otherwise the values in solution are used. This allows a clean restart of the split update from the last timestep if necessary without requiring the overhead of copying the data.

§ solve_volume_of_fluid_system()

template<int dim>
void aspect::VolumeOfFluidHandler< dim >::solve_volume_of_fluid_system ( const VolumeOfFluidField< dim > &  field)

Solve the diagonal matrix assembled in assemble_volume_of_fluid_system for the specified field.

§ copy_local_to_global_volume_of_fluid_system()

template<int dim>
void aspect::VolumeOfFluidHandler< dim >::copy_local_to_global_volume_of_fluid_system ( const internal::Assembly::CopyData::VolumeOfFluidSystem< dim > &  data)
private

Function to copy assembled data to final system. Requires access to the full matrix, so must be in this class.

Friends And Related Function Documentation

§ Simulator< dim >

template<int dim>
friend class Simulator< dim >
friend

Definition at line 221 of file handler.h.

Member Data Documentation

§ sim

template<int dim>
Simulator<dim>& aspect::VolumeOfFluidHandler< dim >::sim
private

Parent simulator

Definition at line 157 of file handler.h.

§ assembler

template<int dim>
Assemblers::VolumeOfFluidAssembler<dim> aspect::VolumeOfFluidHandler< dim >::assembler
private

Assembler object used for doing the matrix and RHS assembly

Definition at line 168 of file handler.h.

§ n_volume_of_fluid_fields

template<int dim>
unsigned int aspect::VolumeOfFluidHandler< dim >::n_volume_of_fluid_fields
private

Number of volume of fluid fields to calculate for

Definition at line 173 of file handler.h.

§ data

template<int dim>
std::vector<VolumeOfFluidField<dim> > aspect::VolumeOfFluidHandler< dim >::data
private

Structures containing the locations of the associated state data for each volume of fluid field.

Definition at line 179 of file handler.h.

§ volume_fraction_threshold

template<int dim>
double aspect::VolumeOfFluidHandler< dim >::volume_fraction_threshold
private

Volume fraction threshold for the reconstruction and advection algorithms indicating minimum relevant volume fraction.

Definition at line 185 of file handler.h.

§ volume_of_fluid_reconstruct_epsilon

template<int dim>
constexpr double aspect::VolumeOfFluidHandler< dim >::volume_of_fluid_reconstruct_epsilon = 1e-13
staticprivate

Tolerance to use for the Newton iteration in the reconstruction step

Definition at line 190 of file handler.h.

§ volume_of_fluid_solver_tolerance

template<int dim>
double aspect::VolumeOfFluidHandler< dim >::volume_of_fluid_solver_tolerance
private

Tolerance to use for the matrix solve in the timestep update

Definition at line 195 of file handler.h.

§ n_init_samples

template<int dim>
unsigned int aspect::VolumeOfFluidHandler< dim >::n_init_samples
private

Number of samples in each dimension to use during the Volume of Fluid initialization, for a total of \(n_init_samples^dim\) points sampled

Definition at line 201 of file handler.h.

§ volume_of_fluid_field_names

template<int dim>
std::vector<std::string> aspect::VolumeOfFluidHandler< dim >::volume_of_fluid_field_names
private

Vector of human readable names for the volume of fluid fields, obtained from the associated composition field name

Definition at line 207 of file handler.h.

§ volume_of_fluid_composition_map_index

template<int dim>
std::map<unsigned int, unsigned int> aspect::VolumeOfFluidHandler< dim >::volume_of_fluid_composition_map_index
private

Map relating the index of a Volume of Fluid based composition field to the index of the corresponding Volume of Fluid field.

Definition at line 212 of file handler.h.

§ initialization_data_type

template<int dim>
std::vector<VolumeOfFluid::VolumeOfFluidInputType::Kind> aspect::VolumeOfFluidHandler< dim >::initialization_data_type
private

Methods to use when initializing the volume of fluid fields. Must be held here as all access to the actual methods for composition initialization is handled by the manager.

Definition at line 219 of file handler.h.


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