![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <fluid_dynamics_vans_matrix_free.h>
Public Member Functions | |
| FluidDynamicsVANSMatrixFree (CFDDEMSimulationParameters< dim > ¶m) | |
| void | solve () override |
| Public Member Functions inherited from FluidDynamicsMatrixFree< dim > | |
| FluidDynamicsMatrixFree (SimulationParameters< dim > &nsparam, const FluidDynamicsFormulation fluid_dynamics_formulation=FluidDynamicsFormulation::standard) | |
| ~FluidDynamicsMatrixFree () | |
| Public Member Functions inherited from PhysicsSolver< LinearAlgebra::distributed::Vector< double > > | |
| PhysicsSolver (const Parameters::NonLinearSolver non_linear_solver_parameters) | |
| virtual | ~PhysicsSolver () |
| void | solve_governing_system () |
| virtual void | apply_constraints () |
| virtual double | get_current_residual () |
| virtual bool | allow_skip_linear_solve_when_residual_is_below_tolerance () const |
| unsigned int | get_current_newton_iteration () const |
Protected Member Functions | |
| virtual void | read_dem () |
| void | setup_dofs () override |
| void | assemble_system_rhs () override |
| virtual void | finish_time_step_fd () |
| std::vector< OutputStruct< dim, LinearAlgebra::distributed::Vector< double > > > | gather_output_hook () override |
| void | create_GMG () override |
| void | initialize_GMG () override |
| void | evaluate_time_derivative_void_fraction () |
| Protected Member Functions inherited from FluidDynamicsMatrixFree< dim > | |
| virtual void | setup_dofs_fd () override |
| void | multi_stage_preresolution (unsigned int stage, Parameters::SimulationControl::TimeSteppingMethod method) override |
| virtual void | multi_stage_postresolution (unsigned int stage, Parameters::SimulationControl::TimeSteppingMethod method, double time_step) override |
| virtual void | update_multi_stage_solution (double time_step) override |
| void | update_forcing_and_boundary_conditions () override |
| virtual void | set_initial_condition_fd (Parameters::FluidDynamicsInitialConditionType initial_condition_type, bool restart=false) override |
| virtual void | assemble_system_matrix () override |
| virtual void | update_mortar_configuration () override |
| void | reinit_mortar_operators_mf () |
| virtual void | update_multiphysics_time_average_solution () override |
| virtual void | update_solutions_for_multiphysics () override |
| virtual void | update_solutions_for_fluid_dynamics () override |
| void | calculate_time_derivative_previous_solutions () |
| void | setup_preconditioner () override |
| void | solve_linear_system () override |
| void | print_mg_setup_times () |
| Protected Member Functions inherited from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet > | |
| NavierStokesBase (SimulationParameters< dim > &nsparam, const FluidDynamicsFormulation fluid_dynamics_formulation=FluidDynamicsFormulation::standard) | |
| virtual | ~NavierStokesBase ()=default |
| virtual LinearAlgebra::distributed::Vector< double > & | get_evaluation_point () override |
| virtual LinearAlgebra::distributed::Vector< double > & | get_local_evaluation_point () override |
| virtual LinearAlgebra::distributed::Vector< double > & | get_newton_update () override |
| virtual LinearAlgebra::distributed::Vector< double > & | get_present_solution () override |
| virtual LinearAlgebra::distributed::Vector< double > & | get_system_rhs () override |
| virtual AffineConstraints< double > & | get_nonzero_constraints () override |
| virtual void | output_newton_update_norms () override |
| double | get_residual_rescale_metric () const override |
| void | finish_simulation () |
| virtual void | postprocess (bool first_iteration) |
| virtual void | set_initial_condition (const Parameters::FluidDynamicsInitialConditionType initial_condition_type, const bool restart=false) |
| virtual void | finish_time_step () |
| virtual void | percolate_time_vectors_fd () |
| void | finish_simulation_fd () |
| virtual void | postprocess_fd (bool first_iteration) |
| void | postprocessing_forces (const LinearAlgebra::distributed::Vector< double > &evaluation_point) |
| void | postprocessing_torques (const LinearAlgebra::distributed::Vector< double > &evaluation_point) |
| virtual void | dynamic_flow_control () |
| virtual void | set_specified_fluid_dynamics_solution () |
| virtual void | iterate () |
| virtual void | enable_dynamic_zero_constraints_fd () |
| void | box_refine_mesh (const bool restart) |
| virtual void | refine_mesh () |
| void | refine_mesh_adaptive () |
| void | refine_mesh_uniform () |
| void | transfer_solution (SolutionTransfer< dim, LinearAlgebra::distributed::Vector< double > > &solution_transfer, std::vector< SolutionTransfer< dim, LinearAlgebra::distributed::Vector< double > > > &previous_solutions_transfer) |
| virtual void | read_checkpoint () |
| bool | average_velocities_are_enabled () const |
| void | restore_average_velocities_after_checkpoint () |
| virtual void | set_solution_from_checkpoint (const std::string &checkpoint_file_prefix) |
| void | set_nodal_values () |
| void | define_non_zero_constraints () |
| void | define_zero_constraints () |
| void | reinit_mortar_operators () |
| std::shared_ptr< Mapping< dim > > | get_mapping () |
| void | rotate_rotor_mapping (const bool is_first) |
| void | connect_mortar_weight_signals () |
| void | update_boundary_conditions () |
| bool | check_existance_of_bc (BoundaryConditions::FluidDynamicsBoundaryType bc) |
| void | make_solid_domain (const DoFHandler< dim > &dof_handler, const bool non_zero_constraints, AffineConstraints< double > &constraints) |
| bool | cell_in_constraining_domain (const typename DoFHandler< dim >::active_cell_iterator &cell, const Point< dim > &plane_point, const Tensor< 1, dim > &plane_normal_vector) |
| void | get_cell_temperature_values (const typename DoFHandler< dim >::active_cell_iterator &cell, const DoFHandler< dim > *dof_handler_ht, const GlobalVectorType &temperature_solution, std::vector< double > &local_temperature_values) |
| void | get_cell_filtered_phase_indicator_values (const typename DoFHandler< dim >::active_cell_iterator &cell, const DoFHandler< dim > *dof_handler_cls, const GlobalVectorType &filtered_phase_indicator_solution, std::vector< double > &local_filtered_phase_indicator_values) |
| void | identify_cell_and_constrain_velocity (const std::vector< types::global_dof_index > &local_dof_indices, const std::vector< double > &local_temperature_values, StasisConstraintWithTemperature &stasis_constraint_struct) |
| void | constrain_stasis_with_temperature (const DoFHandler< dim > *dof_handler_ht) |
| void | constrain_stasis_with_temperature_cls (const DoFHandler< dim > *dof_handler_cls, const DoFHandler< dim > *dof_handler_ht) |
| virtual std::vector< OutputStructTableHandler > | gather_tables () |
| virtual void | write_checkpoint () |
| void | gather_output_results (const LinearAlgebra::distributed::Vector< double > &solution, std::vector< OutputStruct< dim, LinearAlgebra::distributed::Vector< double > > > &solution_output_structs) |
| void | write_output_results (const LinearAlgebra::distributed::Vector< double > &solution) |
| void | write_output_forces () |
| void | write_output_torques () |
| void | rescale_pressure_dofs_in_newton_update () |
| LinearAlgebra::distributed::Vector< double > | init_temporary_vector () |
| void | verify_consistency_of_boundary_conditions () |
Protected Attributes | |
| CFDDEMSimulationParameters< dim > | cfd_dem_simulation_parameters |
| MappingQGeneric< dim > | particle_mapping |
| Particles::ParticleHandler< dim, dim > | particle_handler |
| ParticleProjector< dim, PropertiesIndex > | particle_projector |
| bool | has_periodic_boundaries |
| std::map< types::boundary_id, Tensor< 1, dim > > | cfd_periodic_offsets |
| std::map< types::boundary_id, unsigned int > | cfd_periodic_directions |
| VectorType | time_derivative_void_fraction |
| Protected Attributes inherited from FluidDynamicsMatrixFree< dim > | |
| std::shared_ptr< NavierStokesOperatorBase< dim, double > > | system_operator |
| std::shared_ptr< MFNavierStokesPreconditionGMGBase< dim > > | gmg_preconditioner |
| std::shared_ptr< TrilinosWrappers::PreconditionILU > | ilu_preconditioner |
| VectorType | time_derivative_previous_solutions |
| DoFHandler< dim > | dof_handler_fe_q_iso_q1 |
| TrilinosWrappers::MPI::Vector | multiphysics_average_velocities |
| std::shared_ptr< TrilinosWrappers::MPI::Vector > | multiphysics_present_solution |
| std::shared_ptr< std::vector< TrilinosWrappers::MPI::Vector > > | multiphysics_previous_solutions |
| VectorType | temperature_present_solution |
| std::shared_ptr< PhysicalPropertiesManager > | physical_properties_manager |
| Protected Attributes inherited from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet > | |
| IndexSet | locally_owned_dofs |
| IndexSet | locally_relevant_dofs |
| MPI_Comm | mpi_communicator |
| const unsigned int | n_mpi_processes |
| const unsigned int | this_mpi_process |
| std::shared_ptr< parallel::DistributedTriangulationBase< dim > > | triangulation |
| std::shared_ptr< DoFHandler< dim > > | dof_handler |
| std::shared_ptr< FESystem< dim > > | fe |
| TimerOutput | computing_timer |
| SimulationParameters< dim > | simulation_parameters |
| PVDHandler | pvdhandler |
| PVDHandler | pvdhandler_boundary |
| Function< dim > * | exact_solution |
| std::shared_ptr< Function< dim > > | forcing_function |
| FlowControl< dim > | flow_control |
| AffineConstraints< double > | zero_constraints |
| AffineConstraints< double > | nonzero_constraints |
| bool | use_manifold_for_normal |
| LinearAlgebra::distributed::Vector< double > | evaluation_point |
| LinearAlgebra::distributed::Vector< double > | local_evaluation_point |
| LinearAlgebra::distributed::Vector< double > | newton_update |
| std::shared_ptr< LinearAlgebra::distributed::Vector< double > > | present_solution |
| LinearAlgebra::distributed::Vector< double > | system_rhs |
| std::shared_ptr< std::vector< LinearAlgebra::distributed::Vector< double > > > | previous_solutions |
| SDIRKVectors | sdirk_vectors |
| const unsigned int | velocity_fem_degree |
| const unsigned int | pressure_fem_degree |
| unsigned int | number_quadrature_points |
| std::shared_ptr< Mapping< dim > > | mapping |
| std::shared_ptr< Quadrature< dim > > | cell_quadrature |
| std::shared_ptr< Quadrature< dim - 1 > > | face_quadrature |
| std::shared_ptr< MortarManagerBase< dim > > | mortar_manager |
| std::shared_ptr< CouplingOperator< dim, double > > | mortar_coupling_operator |
| std::shared_ptr< NavierStokesCouplingEvaluationSIPG< dim, double > > | mortar_coupling_evaluator |
| std::shared_ptr< MappingQCache< dim > > | mapping_cache |
| std::vector< std::shared_ptr< NavierStokesAssemblerBase< dim > > > | assemblers |
| std::shared_ptr< MultiphysicsInterface< dim > > | multiphysics |
| std::shared_ptr< SimulationControl > | simulation_control |
| TableHandler | enstrophy_table |
| TableHandler | pressure_power_table |
| TableHandler | viscous_dissipation_table |
| TableHandler | kinetic_energy_table |
| TableHandler | apparent_viscosity_table |
| TableHandler | pressure_drop_table |
| TableHandler | flow_rate_table |
| std::shared_ptr< AverageVelocities< dim, LinearAlgebra::distributed::Vector< double >, IndexSet > > | average_velocities |
| LinearAlgebra::distributed::Vector< double > | average_solution |
| MeshController | mesh_controller |
| ConvergenceTable | error_table |
| std::vector< std::map< types::boundary_id, Tensor< 1, dim > > > | forces_on_boundaries |
| std::map< types::boundary_id, TableHandler > | forces_tables |
| std::map< types::boundary_id, TableHandler > | torques_tables |
| std::shared_ptr< FEValues< dim > > | fe_values_temperature |
| std::shared_ptr< FEValues< dim > > | fe_values_cls |
| std::vector< StasisConstraintWithTemperature > | stasis_constraint_structs |
| AffineConstraints< double > | dynamic_zero_constraints |
Private Types | |
| using | VectorType = LinearAlgebra::distributed::Vector<double> |
Additional Inherited Members | |
| Public Attributes inherited from PhysicsSolver< LinearAlgebra::distributed::Vector< double > > | |
| ConditionalOStream | pcout |
| Parameters::SimulationControl::TimeSteppingMethod | time_stepping_method |
A solver for the Volume-Averaged incompressible Navier-Stokes equations implemented in a matrix-free fashion.
A matrix-free stabilized solver for the Volume-Averaged incompressible Navier-Stokes (VANS) equations implemented in a matrix-free fashion with a sum-factorization approach. It uses a continuous Galerkin discretization and solves the fully-coupled discretized problem in a monolithic way using multigrid preconditioners. This class greatly inherits from the matrix-free implementation of the Navier-Stokes equations.
| dim | An integer that denotes the dimension of the space in which the flow is solved. |
| PropertiesIndex | Index of the properties used within the ParticleHandler. |
Definition at line 176 of file fluid_dynamics_vans_matrix_free.h.
|
private |
Definition at line 178 of file fluid_dynamics_vans_matrix_free.h.
| FluidDynamicsVANSMatrixFree< dim, PropertiesIndex >::FluidDynamicsVANSMatrixFree | ( | CFDDEMSimulationParameters< dim > & | param | ) |
Constructor that sets the finite element degree and system operator according to simulation parameters. It initializes the CFD-DEM parameters, the particle mapping, the particle handler, and the void fraction manager. It also checks whether there are periodic boundaries.
| [in] | param | Relevant parameters for the solver. |
Definition at line 552 of file fluid_dynamics_vans_matrix_free.cc.
References cfd_dem_simulation_parameters, CFDDEMSimulationParameters< dim >::cfd_parameters, FluidDynamicsMatrixFree< dim >::FluidDynamicsMatrixFree(), has_periodic_boundaries, DEM::has_thermal_properties, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::multiphysics, Parameters::MeshAdaptation::none, particle_handler, particle_mapping, particle_projector, particle_temperature, PhysicsSolver< LinearAlgebra::distributed::Vector< double > >::pcout, BoundaryConditions::periodic, Parameters::SimulationControl::steady, FluidDynamicsMatrixFree< dim >::system_operator, time_stepping_is_sdirk(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::triangulation, and void_fraction.
|
overrideprotectedvirtual |
Assembles the RHS of the VANS system of equation. This function also recalculates the particle-fluid interaction when the drag coupling is implicit.
Reimplemented from FluidDynamicsMatrixFree< dim >.
Definition at line 776 of file fluid_dynamics_vans_matrix_free.cc.
References cfd_dem_simulation_parameters, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::evaluation_point, Parameters::fully_implicit, particle_projector, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, FluidDynamicsMatrixFree< dim >::system_operator, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::system_rhs.
|
overrideprotectedvirtual |
Create geometric multigrid preconditioner.
Reimplemented from FluidDynamicsMatrixFree< dim >.
Definition at line 1159 of file fluid_dynamics_vans_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::cell_quadrature, cfd_dem_simulation_parameters, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::dof_handler, FluidDynamicsMatrixFree< dim >::dof_handler_fe_q_iso_q1, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::fe, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::forcing_function, FluidDynamicsMatrixFree< dim >::gmg_preconditioner, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::mapping, FluidDynamicsMatrixFree< dim >::physical_properties_manager, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control.
|
protected |
Evaluate the time derivative of the void fraction. This evaluates the time-derivative as a solution vector which can be passed to the matrix-free operator.
Definition at line 968 of file fluid_dynamics_vans_matrix_free.cc.
References cfd_dem_simulation_parameters, number_of_previous_solutions(), particle_projector, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control, and time_derivative_void_fraction.
|
protectedvirtual |
Finish the time step and manage the end of the time step for the void fraction.
Definition at line 860 of file fluid_dynamics_vans_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::finish_time_step(), and particle_projector.
|
overrideprotectedvirtual |
Add void fraction field to output files.
Reimplemented from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >.
Definition at line 871 of file fluid_dynamics_vans_matrix_free.cc.
References cfd_dem_simulation_parameters, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::dof_handler, particle_projector, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::triangulation.
|
overrideprotectedvirtual |
Initializes (or re-initializes) geometric multigrid preconditioner
Reimplemented from FluidDynamicsMatrixFree< dim >.
Definition at line 1177 of file fluid_dynamics_vans_matrix_free.cc.
References NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::flow_control, FluidDynamicsMatrixFree< dim >::gmg_preconditioner, particle_projector, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::present_solution, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control, FluidDynamicsMatrixFree< dim >::time_derivative_previous_solutions, and time_derivative_void_fraction.
|
protectedvirtual |
Read particles arising from a DEM simulation.
Reimplemented in CFDDEMMatrixFree< dim, PropertiesIndex >.
Definition at line 682 of file fluid_dynamics_vans_matrix_free.cc.
References cfd_dem_simulation_parameters, check_file_exists(), convert_particle_handler(), particle_handler, particle_mapping, and NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::triangulation.
|
overrideprotectedvirtual |
Setup the degree of freedom of the flow solver and the degrees of freedom and constraints for the void fraction.
Reimplemented from NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >.
Definition at line 632 of file fluid_dynamics_vans_matrix_free.cc.
References cfd_dem_simulation_parameters, fluid_dynamics, DEM::has_thermal_properties, Parameters::LinearSolver::lsmg, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::multiphysics, particle_projector, particle_temperature, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::setup_dofs(), time_derivative_void_fraction, and void_fraction.
|
overridevirtual |
Solve the problem defined by simulation parameters by iterating through time or through the mesh refinements.
Reimplemented from FluidDynamicsMatrixFree< dim >.
Definition at line 1003 of file fluid_dynamics_vans_matrix_free.cc.
References FluidDynamicsMatrixFree< dim >::calculate_time_derivative_previous_solutions(), cfd_dem_simulation_parameters, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::computing_timer, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::dynamic_flow_control(), Parameters::Timer::end, evaluate_time_derivative_void_fraction(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::finish_simulation(), finish_time_step_fd(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::flow_control, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::forcing_function, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::iterate(), Parameters::Timer::iteration, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::multiphysics, particle_projector, PhysicsSolver< LinearAlgebra::distributed::Vector< double > >::pcout, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::postprocess(), FluidDynamicsMatrixFree< dim >::print_mg_setup_times(), read_dem(), read_mesh_and_manifolds(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::refine_mesh(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::set_initial_condition(), setup_dofs(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_control, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::simulation_parameters, FluidDynamicsMatrixFree< dim >::system_operator, FluidDynamicsMatrixFree< dim >::time_derivative_previous_solutions, time_stepping_is_bdf(), NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::triangulation, NavierStokesBase< dim, LinearAlgebra::distributed::Vector< double >, IndexSet >::update_boundary_conditions(), and FluidDynamicsMatrixFree< dim >::update_multiphysics_time_average_solution().
|
protected |
Simulation parameters for CFD-DEM simulations.
Definition at line 256 of file fluid_dynamics_vans_matrix_free.h.
|
protected |
Definition at line 271 of file fluid_dynamics_vans_matrix_free.h.
|
protected |
Definition at line 270 of file fluid_dynamics_vans_matrix_free.h.
|
protected |
Member variables which are used to manage boundary conditions.
Definition at line 269 of file fluid_dynamics_vans_matrix_free.h.
|
protected |
Particle-handler used to store particles in CFD-DEM simulations.
Definition at line 262 of file fluid_dynamics_vans_matrix_free.h.
|
protected |
Mapping used for the particles.
Definition at line 259 of file fluid_dynamics_vans_matrix_free.h.
|
protected |
Object that manages the void fraction calculation from functions or from parameters.
Definition at line 266 of file fluid_dynamics_vans_matrix_free.h.
|
protected |
Vector to store the time derivative of the void fraction.
Definition at line 274 of file fluid_dynamics_vans_matrix_free.h.