4#ifndef lethe_fluid_dynamics_vans_matrix_free_h
5#define lethe_fluid_dynamics_vans_matrix_free_h
30#if DEAL_II_VERSION_GTE(9, 8, 0)
78 template <
typename PropertiesIndex>
80 initialize(
const std::shared_ptr<SimulationControl> &simulation_control,
83 const VectorType &time_derivative_previous_solutions,
84 const VectorType &time_derivative_void_fraction,
130 MGLevelObject<MGTwoLevelTransfer<dim, MGVectorType>>
142 MGLevelObject<MGTwoLevelTransfer<dim, MGVectorType>>
175template <
int dim,
typename PropertiesIndex>
178 using VectorType = LinearAlgebra::distributed::Vector<double>;
232 std::vector<OutputStruct<dim, LinearAlgebra::distributed::Vector<double>>>
Dynamic flow controller that drives the average velocity of the flow towards a target value.
FluidDynamicsMatrixFree(SimulationParameters< dim > &nsparam, const FluidDynamicsFormulation fluid_dynamics_formulation=FluidDynamicsFormulation::standard)
Constructor that sets the finite element degree and system operator according to simulation parameter...
std::map< types::boundary_id, unsigned int > cfd_periodic_directions
LinearAlgebra::distributed::Vector< double > VectorType
virtual void read_dem()
Read particles arising from a DEM simulation.
void evaluate_time_derivative_void_fraction()
Evaluate the time derivative of the void fraction. This evaluates the time-derivative as a solution v...
void solve() override
Solve the problem defined by simulation parameters by iterating through time or through the mesh refi...
virtual void finish_time_step_fd()
Finish the time step and manage the end of the time step for the void fraction.
bool has_periodic_boundaries
Member variables which are used to manage boundary conditions.
void create_GMG() override
Create geometric multigrid preconditioner.
ParticleProjector< dim, PropertiesIndex > particle_projector
std::map< types::boundary_id, Tensor< 1, dim > > cfd_periodic_offsets
CFDDEMSimulationParameters< dim > cfd_dem_simulation_parameters
Simulation parameters for CFD-DEM simulations.
void setup_dofs() override
Setup the degree of freedom of the flow solver and the degrees of freedom and constraints for the voi...
FluidDynamicsVANSMatrixFree(CFDDEMSimulationParameters< dim > ¶m)
Constructor that sets the finite element degree and system operator according to simulation parameter...
Particles::ParticleHandler< dim, dim > particle_handler
Particle-handler used to store particles in CFD-DEM simulations.
void initialize_GMG() override
VectorType time_derivative_void_fraction
Vector to store the time derivative of the void fraction.
void assemble_system_rhs() override
Assembles the RHS of the VANS system of equation. This function also recalculates the particle-fluid ...
std::vector< OutputStruct< dim, LinearAlgebra::distributed::Vector< double > > > gather_output_hook() override
Add void fraction field to output files.
MappingQGeneric< dim > particle_mapping
Mapping used for the particles.
void initialize()
Initialize smoother, coarse grid solver and multigrid object needed for the geometric multigrid preco...
const DoFHandler< dim > & dof_handler
Describes the layout of DoFs and the type of FE.
DoFHandler< dim > dof_handler_fe_q_iso_q1
Describes the layout of DoFs for FE_Q_iso_Q1 elements.
typename MFNavierStokesPreconditionGMGBase< dim >::MGVectorType MGVectorType
typename MFNavierStokesPreconditionGMGBase< dim >::MGNumber MGNumber
MFNavierStokesPreconditionGMG(const SimulationParameters< dim > &simulation_parameters, const DoFHandler< dim > &dof_handler, const DoFHandler< dim > &dof_handler_fe_q_iso_q1)
typename MFNavierStokesPreconditionGMGBase< dim >::VectorType VectorType
const CFDDEMSimulationParameters< dim > & cfd_dem_simulation_parameters
Reference to the simulation parameters.
typename MFNavierStokesPreconditionGMG< dim >::VectorType VectorType
Useful aliases to improve readability.
typename MFNavierStokesPreconditionGMG< dim >::MGVectorType MGVectorType
typename MFNavierStokesPreconditionGMG< dim >::MGNumber MGNumber
MGLevelObject< MGTwoLevelTransfer< dim, MGVectorType > > transfers_pf_force
MGTransferMatrixFree< dim, MGNumber > LSTransferType
std::shared_ptr< GCTransferType > mg_transfer_gc_momentum_transfer_coefficient
Transfer operator for global coarsening for the particle-fluid drag.
std::shared_ptr< GCTransferType > mg_transfer_gc_void_fraction
Transfer operator for global coarsening for the void fraction.
std::shared_ptr< LSTransferType > mg_transfer_ls_momentum_transfer_coefficient
std::shared_ptr< GCTransferType > mg_transfer_gc_pf_drag
Transfer operator for global coarsening for the particle-fluid drag.
MGLevelObject< DoFHandler< dim > > momentum_transfer_coefficient_dof_handlers
MGLevelObject< MGTwoLevelTransfer< dim, MGVectorType > > transfers_momentum_transfer_coefficient
void create_level_operator(const unsigned int level) override
Creates the operator on a given level.
MGLevelObject< MGTwoLevelTransfer< dim, MGVectorType > > transfers_particle_velocity
std::shared_ptr< LSTransferType > mg_transfer_ls_void_fraction
MGLevelObject< DoFHandler< dim > > pf_force_dof_handlers
std::shared_ptr< LSTransferType > mg_transfer_ls_particle_velocity
MGLevelObject< DoFHandler< dim > > void_fraction_dof_handlers
std::shared_ptr< GCTransferType > mg_transfer_gc_particle_velocity
Transfer operator for global coarsening for the particle velocity.
MFNavierStokesVANSPreconditionGMG(const CFDDEMSimulationParameters< dim > ¶m, const DoFHandler< dim > &dof_handler, const DoFHandler< dim > &dof_handler_fe_q_iso_q1)
Constructor.
MGTransferGlobalCoarsening< dim, MGVectorType > GCTransferType
std::shared_ptr< GCTransferType > mg_transfer_gc_pf_force
Transfer operator for global coarsening for the particle-fluid forces.
MGLevelObject< MGTwoLevelTransfer< dim, MGVectorType > > transfers_pf_drag
MGLevelObject< DoFHandler< dim > > particle_velocity_dof_handlers
std::shared_ptr< LSTransferType > mg_transfer_ls_pf_force
MGLevelObject< DoFHandler< dim > > pf_drag_dof_handlers
MGLevelObject< MGTwoLevelTransfer< dim, MGVectorType > > transfers_void_fraction
std::shared_ptr< LSTransferType > mg_transfer_ls_pf_drag
Particle information projection. This class manages the calculation of the projection of the particle...