Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
lagrangian_post_processing.h File Reference
#include <core/pvd_handler.h>
#include <dem/adaptive_sparse_contacts.h>
#include <dem/data_containers.h>
#include <dem/dem_solver_parameters.h>
#include <deal.II/distributed/tria.h>
Include dependency graph for lagrangian_post_processing.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<int dim, typename PropertiesIndex>
void write_post_processing_results (const parallel::distributed::Triangulation< dim > &triangulation, PVDHandler &grid_pvdhandler, const DoFHandler< dim > &background_dh, const Particles::ParticleHandler< dim > &particle_handler, const DEMSolverParameters< dim > &dem_parameters, const double current_time, const unsigned int step_number, const MPI_Comm &mpi_communicator, AdaptiveSparseContacts< dim, PropertiesIndex > &sparse_contacts_object)
template<int dim, typename PropertiesIndex>
void calculate_average_particles_velocity (const parallel::distributed::Triangulation< dim > &triangulation, const Particles::ParticleHandler< dim > &particle_handler, Vector< double > &velocity_average_x, Vector< double > &velocity_average_y, Vector< double > &velocity_average_z, Vector< double > &velocity_average_magnitude)
template<int dim, typename PropertiesIndex>
void calculate_average_granular_temperature (const parallel::distributed::Triangulation< dim > &triangulation, const Particles::ParticleHandler< dim > &particle_handler, Vector< double > &granular_temperature_average)
template<int dim, typename PropertiesIndex>
Tensor< 1, dim > calculate_cell_average_particles_velocity (const typename parallel::distributed::Triangulation< dim >::cell_iterator &cell, const Particles::ParticleHandler< dim > &particle_handler)

Function Documentation

◆ calculate_average_granular_temperature()

template<int dim, typename PropertiesIndex>
void calculate_average_granular_temperature ( const parallel::distributed::Triangulation< dim > & triangulation,
const Particles::ParticleHandler< dim > & particle_handler,
Vector< double > & granular_temperature_average )

Carries out the calculation of the granular temperature in each local cell. These values are summed up during the post-processing steps (imposed by post-processing frequency), and finally divided by the sampling counter to calculate time-averaged granular temperature distribution.

Parameters
triangulationTriangulation.
particle_handlerParticle handler.
granular_temperature_averageAverage granular temperature.

Definition at line 59 of file lagrangian_post_processing.cc.

References calculate_cell_average_particles_velocity().

◆ calculate_average_particles_velocity()

template<int dim, typename PropertiesIndex>
void calculate_average_particles_velocity ( const parallel::distributed::Triangulation< dim > & triangulation,
const Particles::ParticleHandler< dim > & particle_handler,
Vector< double > & velocity_average_x,
Vector< double > & velocity_average_y,
Vector< double > & velocity_average_z,
Vector< double > & velocity_average_magnitude )

Carries out the calculation of the average particles velocity in each local cell. These values are summed up during the post-processing steps (imposed by post-processing frequency), and finally divided by the sampling counter to calculate time-averaged particles velocity distribution.

Parameters
triangulationTriangulation.
particle_handlerParticle handler.
velocity_average_xAverage velocity in x-direction.
velocity_average_yAverage velocity in y-direction.
velocity_average_zAverage velocity in z-direction.
velocity_average_magnitudeAverage velocity magnitude.

Definition at line 17 of file lagrangian_post_processing.cc.

References calculate_cell_average_particles_velocity().

◆ calculate_cell_average_particles_velocity()

template<int dim, typename PropertiesIndex>
Tensor< 1, dim > calculate_cell_average_particles_velocity ( const typename parallel::distributed::Triangulation< dim >::cell_iterator & cell,
const Particles::ParticleHandler< dim > & particle_handler )

Carries out the calculation of average particles velocity for a single cell. It is defined as a separate private function since the calculate_average_granular_temperature function also needs to obtain the average velocity in the cell.

Parameters
cellA single cell in the triangulation
particle_handler
Returns
A tensor which stores the average particles velocity in the input cell

Definition at line 129 of file lagrangian_post_processing.cc.

◆ write_post_processing_results()

template<int dim, typename PropertiesIndex>
void write_post_processing_results ( const parallel::distributed::Triangulation< dim > & triangulation,
PVDHandler & grid_pvdhandler,
const DoFHandler< dim > & background_dh,
const Particles::ParticleHandler< dim > & particle_handler,
const DEMSolverParameters< dim > & dem_parameters,
const double current_time,
const unsigned int step_number,
const MPI_Comm & mpi_communicator,
AdaptiveSparseContacts< dim, PropertiesIndex > & sparse_contacts_object )

Carries out writing the cell data of the domain.

This class deals with Lagrangian post-processing. At the moment, calculation of time-averaged particles velocity and granular temperature are added to the class.

Todo
Add tracer particles
Template Parameters
dimAn integer that denotes the number of spatial dimensions.
PropertiesIndexIndex of the properties used within the ParticleHandler.
Parameters
triangulationTriangulation of the domain.
grid_pvdhandlerPVD handler for grid.
background_dhBackground DoF handler.
particle_handlerParticle handler.
dem_parametersDEM parameters.
current_timeSimulation time.
step_numberDEM step number.
mpi_communicatorMPI communicator.
sparse_contacts_objectÀdaptive sparse contacts object.

Definition at line 172 of file lagrangian_post_processing.cc.

References calculate_average_granular_temperature(), calculate_average_particles_velocity(), AdaptiveSparseContacts< dim, PropertiesIndex >::get_mobility_status_vector(), Parameters::SimulationControl::group_files, Parameters::SimulationControl::output_folder, Parameters::SimulationControl::output_name, DEMSolverParameters< dim >::simulation_control, and write_vtu_and_pvd().