![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <core/fluid_dynamics_boundary_conditions.h>#include <solvers/physical_properties_manager.h>#include <deal.II/base/quadrature_lib.h>#include <deal.II/dofs/dof_handler.h>Go to the source code of this file.
Macros | |
| #define | lethe_postprocessing_cfd_h |
Functions | |
| template<int dim, typename VectorType> | |
| std::pair< double, double > | calculate_pressure_drop (const DoFHandler< dim > &dof_handler, const Mapping< dim > &mapping, const VectorType &evaluation_point, const Quadrature< dim > &cell_quadrature_formula, const Quadrature< dim - 1 > &face_quadrature_formula, const unsigned int inlet_boundary_id, const unsigned int outlet_boundary_id) |
| template<int dim, typename VectorType> | |
| double | calculate_CFL (const DoFHandler< dim > &dof_handler, const VectorType &evaluation_point, const double time_step, const Quadrature< dim > &quadrature_formula, const Mapping< dim > &mapping) |
| template<int dim, typename VectorType> | |
| double | calculate_enstrophy (const DoFHandler< dim > &dof_handler, const VectorType &evaluation_point, const Quadrature< dim > &quadrature_formula, const Mapping< dim > &mapping) |
| template<int dim, typename VectorType> | |
| double | calculate_kinetic_energy (const DoFHandler< dim > &dof_handler, const VectorType &evaluation_point, const Quadrature< dim > &quadrature_formula, const Mapping< dim > &mapping) |
| template<int dim, typename VectorType> | |
| double | calculate_pressure_power (const DoFHandler< dim > &dof_handler, const VectorType &evaluation_point, const Quadrature< dim > &quadrature_formula, const Mapping< dim > &mapping) |
| template<int dim, typename VectorType> | |
| double | calculate_viscous_dissipation (const DoFHandler< dim > &dof_handler, const VectorType &evaluation_point, const Quadrature< dim > &quadrature_formula, const Mapping< dim > &mapping, const PhysicalPropertiesManager &properties_manager) |
| template<int dim, typename VectorType> | |
| double | calculate_apparent_viscosity (const DoFHandler< dim > &dof_handler, const VectorType &evaluation_point, const Quadrature< dim > &quadrature_formula, const Mapping< dim > &mapping, const PhysicalPropertiesManager &properties_manager) |
| template<int dim, typename VectorType> | |
| std::vector< std::map< types::boundary_id, Tensor< 1, dim > > > | calculate_forces (const DoFHandler< dim > &dof_handler, const VectorType &evaluation_point, const PhysicalPropertiesManager &properties_manager, const BoundaryConditions::FluidDynamicsBoundaryConditions< dim > &boundary_conditions, const Quadrature< dim - 1 > &face_quadrature_formula, const Mapping< dim > &mapping) |
| template<int dim, typename VectorType> | |
| std::map< types::boundary_id, Tensor< 1, 3 > > | calculate_torques (const DoFHandler< dim > &dof_handler, const VectorType &evaluation_point, const PhysicalPropertiesManager &properties_manager, const BoundaryConditions::FluidDynamicsBoundaryConditions< dim > &boundary_conditions, const Quadrature< dim - 1 > &face_quadrature_formula, const Mapping< dim > &mapping) |
| template<int dim, typename VectorType> | |
| std::pair< double, double > | calculate_L2_error (const DoFHandler< dim > &dof_handler, const VectorType &evaluation_point, const Function< dim > *exact_solution, const Quadrature< dim > &quadrature_formula, const Mapping< dim > &mapping) |
| template<int dim, typename VectorType> | |
| std::pair< double, double > | calculate_flow_rate (const DoFHandler< dim > &dof_handler, const VectorType &present_solution, const unsigned int &boundary_id, const Quadrature< dim - 1 > &face_quadrature_formula, const Mapping< dim > &mapping) |
| template<int dim, typename VectorType> | |
| double | calculate_average_velocity (const DoFHandler< dim > &dof_handler, const VectorType &present_solution, const unsigned int &boundary_id, const Quadrature< dim - 1 > &face_quadrature_formula, const Mapping< dim > &mapping) |
| template<int dim, typename VectorType> | |
| double | calculate_average_velocity (const DoFHandler< dim > &dof_handler, const DoFHandler< dim > &void_fraction_dof_handler, const VectorType &present_solution, const VectorType &present_void_fraction_solution, const unsigned int &flow_direction, const Quadrature< dim > &quadrature_formula, const Mapping< dim > &mapping) |
| #define lethe_postprocessing_cfd_h |
Definition at line 352 of file postprocessing_cfd.h.
| double calculate_apparent_viscosity | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | evaluation_point, | ||
| const Quadrature< dim > & | quadrature_formula, | ||
| const Mapping< dim > & | mapping, | ||
| const PhysicalPropertiesManager & | properties_manager ) |
Calculates the apparent viscosity of the fluid for non Newtonian flows.
| dof_handler | The dof_handler used for the calculation |
| evaluation_point | The solution at which the force is calculated |
| quadrature_formula | The quadrature formula for the calculation |
| mapping | The mapping of the simulation |
| physical_properties | The parameters containing the required physical properties |
Definition at line 757 of file postprocessing_cfd.cc.
References calculate_shear_rate_magnitude(), PhysicalPropertiesManager::get_rheology(), shear_rate, and velocity.
| double calculate_average_velocity | ( | const DoFHandler< dim > & | dof_handler, |
| const DoFHandler< dim > & | void_fraction_dof_handler, | ||
| const VectorType & | present_solution, | ||
| const VectorType & | present_void_fraction_solution, | ||
| const unsigned int & | flow_direction, | ||
| const Quadrature< dim > & | quadrature_formula, | ||
| const Mapping< dim > & | mapping ) |
calculate_average_velocity. This function calculates the average velocity of the domain for the solver GLS VANS.
Ū = ∫ε(v⋅γ)dΩ/∫εdΩ Where Ū is the average velocity, ε is the void fraction, v is the velocity of the cell, γ is the vector of the cell (flow direction) and dΩ is the volume of the cell.
| dof_handler. | The argument used to get velocity at quadrature points |
| void_fraction_dof_handler. | The argument used to get void fraction at quadrature points |
| present_solution. | The vector which contains the velocity values |
| present_void_fraction_solution. | The vector which contains the void fraction values |
| flow_direction. | The flow direction |
| quadrature_formula | The quadrature formula for the calculation |
| mapping | The mapping of the simulation |
Definition at line 1564 of file postprocessing_cfd.cc.
References void_fraction.
| double calculate_average_velocity | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | present_solution, | ||
| const unsigned int & | boundary_id, | ||
| const Quadrature< dim - 1 > & | face_quadrature_formula, | ||
| const Mapping< dim > & | mapping ) |
calculate_average_velocity. This function calculates average velocity from the volumetric flow rate at the selected boundary.
| dof_handler. | The argument used to get finite elements |
| present_solution. | The vector which contains all the values to calculate the flow rate |
| boundary_id. | The inlet boundary |
| face_quadrature_formula | The face quadrature formula for the calculation |
| mapping | The mapping of the simulation |
Definition at line 1497 of file postprocessing_cfd.cc.
References calculate_flow_rate().
| double calculate_CFL | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | evaluation_point, | ||
| const double | time_step, | ||
| const Quadrature< dim > & | quadrature_formula, | ||
| const Mapping< dim > & | mapping ) |
Calculate the CFL condition on the simulation domain.
| dof_handler | The dof_handler used for the calculation |
| evaluation_point | The solution for which the CFL is calculated. The velocity field is assumed to be the first field. |
| quadrature_formula | The quadrature formula for the calculation |
| mapping | The mapping of the simulation |
Definition at line 234 of file postprocessing_cfd.cc.
References compute_cell_diameter(), and compute_cell_measure_with_JxW().
| double calculate_enstrophy | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | evaluation_point, | ||
| const Quadrature< dim > & | quadrature_formula, | ||
| const Mapping< dim > & | mapping ) |
Calculate the average enstrophy in the simulation domain.
| dof_handler | The dof_handler used for the calculation |
| evaluation_point | The solution at which the force is calculated |
| quadrature_formula | The quadrature formula for the calculation |
| mapping | The mapping of the simulation |
Definition at line 339 of file postprocessing_cfd.cc.
| std::pair< double, double > calculate_flow_rate | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | present_solution, | ||
| const unsigned int & | boundary_id, | ||
| const Quadrature< dim - 1 > & | face_quadrature_formula, | ||
| const Mapping< dim > & | mapping ) |
calculate_flow_rate. This function calculates the volumetric flow rate at the selected boundary. It actually calculates the flow rate through the summation of the value at each cell surface with the normal vector, the velocity value and the area.
| dof_handler. | The argument used to get finite elements |
| present_solution. | The vector which contains all the values to calculate the flow rate |
| boundary_id. | The inlet boundary |
| face_quadrature_formula | The face quadrature formula for the calculation |
| mapping | The mapping of the simulation |
Definition at line 1392 of file postprocessing_cfd.cc.
| std::vector< std::map< types::boundary_id, Tensor< 1, dim > > > calculate_forces | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | evaluation_point, | ||
| const PhysicalPropertiesManager & | properties_manager, | ||
| const BoundaryConditions::FluidDynamicsBoundaryConditions< dim > & | boundary_conditions, | ||
| const Quadrature< dim - 1 > & | face_quadrature_formula, | ||
| const Mapping< dim > & | mapping ) |
Calculates the force due to the fluid motion on every boundary conditions.
| dof_handler | The dof_handler used for the calculation |
| evaluation_point | The solution at which the force is calculated |
| physical_properties | The parameters containing the required physical properties |
| boundary_conditions | The boundary conditions object |
| face_quadrature_formula | The face quadrature formula for the calculation |
| mapping | The mapping of the simulation |
Definition at line 882 of file postprocessing_cfd.cc.
References calculate_shear_rate_magnitude(), PhysicalPropertiesManager::get_rheology(), pressure, shear_rate, and BoundaryConditions::BoundaryConditions< BoundaryType >::type.
| double calculate_kinetic_energy | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | evaluation_point, | ||
| const Quadrature< dim > & | quadrature_formula, | ||
| const Mapping< dim > & | mapping ) |
Calculate the average kinetic energy in the simulation domain.
| [in] | dof_handler | The dof_handler used for the calculation |
| [in] | evaluation_point | The solution for the calculation |
| [in] | quadrature_formula | The quadrature formula for the calculation |
| [in] | mapping | The mapping of the simulation |
Definition at line 660 of file postprocessing_cfd.cc.
| std::pair< double, double > calculate_L2_error | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | evaluation_point, | ||
| const Function< dim > * | exact_solution, | ||
| const Quadrature< dim > & | quadrature_formula, | ||
| const Mapping< dim > & | mapping ) |
Calculates the L2 norm of the error on velocity and pressure.
| dof_handler | The dof_handler used for the calculation. |
| evaluation_point | The solution at which the torque is calculated. |
| exact_solution | The exact solution, a function of dim+1 component for velocity + pressure |
| quadrature_formula | The quadrature formula for the calculation. |
| mapping | The mapping of the simulation. |
Definition at line 1233 of file postprocessing_cfd.cc.
References pressure.
| std::pair< double, double > calculate_pressure_drop | ( | const DoFHandler< dim > & | dof_handler, |
| const Mapping< dim > & | mapping, | ||
| const VectorType & | evaluation_point, | ||
| const Quadrature< dim > & | cell_quadrature_formula, | ||
| const Quadrature< dim - 1 > & | face_quadrature_formula, | ||
| const unsigned int | inlet_boundary_id, | ||
| const unsigned int | outlet_boundary_id ) |
Calculate the pressure drop and total pressure drop between two boundaries. The pressure drop thus calculated has units of Length^2/Time^2.
| dof_handler | The dof_handler used for the calculation |
| evaluation_point | The solution for which the pressure drop is calculated. The velocity field is assumed to be the "dim" field |
| cell_quadrature_formula | The cell quadrature formula for the calculation |
| face_quadrature_formula | The face quadrature formula for the calculation |
| mapping | The mapping of the simulation |
| inlet_boundary_id | The id of the inlet boundary |
| outlet_boundary_id | The id of the outlet boundary |
Definition at line 41 of file postprocessing_cfd.cc.
References pressure.
| double calculate_pressure_power | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | evaluation_point, | ||
| const Quadrature< dim > & | quadrature_formula, | ||
| const Mapping< dim > & | mapping ) |
Calculate the average power done by pressure in the simulation domain. The average power is defined as ∫u.∇pdΩ/∫1dΩ
| [in] | dof_handler | The dof_handler used for the calculation |
| [in] | evaluation_point | The solution for the calculation |
| [in] | quadrature_formula | The quadrature formula for the calculation |
| [in] | mapping | The mapping of the simulation |
Definition at line 448 of file postprocessing_cfd.cc.
| std::map< types::boundary_id, Tensor< 1, 3 > > calculate_torques | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | evaluation_point, | ||
| const PhysicalPropertiesManager & | properties_manager, | ||
| const BoundaryConditions::FluidDynamicsBoundaryConditions< dim > & | boundary_conditions, | ||
| const Quadrature< dim - 1 > & | face_quadrature_formula, | ||
| const Mapping< dim > & | mapping ) |
Calculates the torques due to the fluid motion on every boundary conditions.
| dof_handler | The dof_handler used for the calculation. |
| evaluation_point | The solution at which the torque is calculated. |
| physical_properties | The parameters containing the required physical properties. |
| boundary_conditions | The boundary conditions object. |
| face_quadrature_formula | The face quadrature formula for the calculation. |
| mapping | The mapping of the simulation. |
Definition at line 1055 of file postprocessing_cfd.cc.
References calculate_shear_rate_magnitude(), PhysicalPropertiesManager::get_rheology(), BoundaryConditions::FluidDynamicsBoundaryConditions< dim >::navier_stokes_functions, pressure, shear_rate, and BoundaryConditions::BoundaryConditions< BoundaryType >::type.
| double calculate_viscous_dissipation | ( | const DoFHandler< dim > & | dof_handler, |
| const VectorType & | evaluation_point, | ||
| const Quadrature< dim > & | quadrature_formula, | ||
| const Mapping< dim > & | mapping, | ||
| const PhysicalPropertiesManager & | properties_manager ) |
Calculate the viscous dissipation of kinetic energy which is defined as ∫∇u.τdΩ/∫1dΩ
| [in] | dof_handler | The dof_handler used for the calculation |
| [in] | evaluation_point | The solution for the calculation |
| [in] | quadrature_formula | The quadrature formula for the calculation |
| [in] | mapping | The mapping of the simulation |
| [in] | properties_manager | Manager for the physical properties used to calculate the kinematic viscosity |
Definition at line 543 of file postprocessing_cfd.cc.
References calculate_shear_rate_magnitude(), PhysicalPropertiesManager::get_rheology(), shear_rate, and velocity.