4#ifndef lethe_fluid_dynamics_vans_h
5#define lethe_fluid_dynamics_vans_h
17#include <deal.II/fe/mapping_q.h>
19#include <deal.II/particles/particle_handler.h>
20#include <deal.II/particles/property_pool.h>
44template <
int dim,
typename PropertiesIndex>
195 const typename DoFHandler<dim>::active_cell_iterator &cell,
214 const typename DoFHandler<dim>::active_cell_iterator &cell,
266 virtual std::vector<OutputStruct<dim, GlobalVectorType>>
281 std::vector<std::shared_ptr<ParticleFluidAssemblerBase<dim, PropertiesIndex>>>
297 std::map<
unsigned int,
298 std::set<typename DoFHandler<dim>::active_cell_iterator>>
303 std::map<
unsigned int,
304 std::set<typename DoFHandler<dim>::active_cell_iterator>>
FluidDynamicsMatrixBased(SimulationParameters< dim > &nsparam, const FluidDynamicsFormulation fluid_dynamics_formulation=FluidDynamicsFormulation::standard)
Construct the matrix-based Navier-Stokes solver.
CFDDEMSimulationParameters< dim > cfd_dem_simulation_parameters
Member Variables.
void vertices_cell_mapping()
Create mapping between vertices and cells.
std::map< types::boundary_id, Tensor< 1, dim > > cfd_periodic_offsets
Map of offset vectors for periodic boundary condition calculations.
ParticleProjector< dim, PropertiesIndex > particle_projector
Particle projector for calculating void fraction and particle effects.
virtual void finish_time_step_fd()
Complete operations at the end of a time step.
std::vector< std::shared_ptr< ParticleFluidAssemblerBase< dim, PropertiesIndex > > > particle_fluid_assemblers
Vector of assembler objects for particle-fluid interaction terms.
double pressure_drop
Pressure drop across the computational domain.
std::map< unsigned int, std::set< typename DoFHandler< dim >::active_cell_iterator > > vertices_to_periodic_cell
virtual void iterate() override
Execute a single VANS iteration.
void assemble_local_system_rhs(const typename DoFHandler< dim >::active_cell_iterator &cell, NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > ©_data) override
Assemble the local right-hand side vector for a given cell.
virtual void read_dem()
Read DEM data for particle-fluid coupling.
void assemble_mass_matrix_diagonal(TrilinosWrappers::SparseMatrix &mass_matrix)
Assemble the diagonal mass matrix for the VANS system.
void assemble_system_matrix() override
Assemble the global system matrix for the VANS equations.
std::map< unsigned int, std::set< typename DoFHandler< dim >::active_cell_iterator > > vertices_to_cell
Mapping from vertex indices to sets of cells containing each vertex.
void assemble_local_system_matrix(const typename DoFHandler< dim >::active_cell_iterator &cell, NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > ©_data) override
Assemble the local system matrix for a given cell.
FluidDynamicsVANS(CFDDEMSimulationParameters< dim > &nsparam)
Constructor for the VANS solver.
virtual void setup_dofs() override
Set up degrees of freedom and initialize void fraction field.
virtual std::vector< OutputStruct< dim, GlobalVectorType > > gather_output_hook() override
Gather additional output fields for visualization.
const bool SUPG
Flag enabling Streamline Upwind Petrov-Galerkin (SUPG) stabilization.
void copy_local_rhs_to_global_rhs(const StabilizedMethodsTensorCopyData< dim > ©_data) override
Copy local right-hand side contributions to the global vector.
std::map< types::boundary_id, unsigned int > cfd_periodic_directions
Map of direction indices for periodic boundary conditions.
MappingQGeneric< dim > particle_mapping
Mapping object for particle position calculations and projections.
Particles::ParticleHandler< dim, dim > particle_handler
Particle handler for managing particle data and operations.
const double GLS_u_scale
Scaling factor for GLS velocity stabilization terms.
~FluidDynamicsVANS()
Destructor for the VANS solver.
virtual void monitor_mass_conservation()
Monitor mass conservation in the VANS system.
void copy_local_matrix_to_global_matrix(const StabilizedMethodsTensorCopyData< dim > ©_data) override
Copy local matrix contributions to the global system matrix.
void setup_assemblers() override
Set up the vector of assembler functions for VANS equations.
void update_solution_and_constraints()
Update solution vectors and constraint objects.
bool has_periodic_boundaries
Flag indicating whether the domain has periodic boundary conditions.
void assemble_system_rhs() override
Assemble the global right-hand side vector for the VANS equations.
void calculate_void_fraction(const double time)
Calculate void fraction field based on particle positions.
const bool PSPG
Flag enabling Pressure Stabilizing Petrov-Galerkin (PSPG) stabilization.
virtual void solve() override
Main solver loop for the VANS equations.
Class that stores the information required by the assembly procedure for a Navier-Stokes equation....
Particle information projection. This class manages the calculation of the projection of the particle...
Class responsible for storing the information calculated using the assembly of stabilized Tensor<1,...
Assemblers for the Volume-Averaged Navier-Stokes (VANS) equations.