4#ifndef lethe_navier_stokes_scratch_data_h
5#define lethe_navier_stokes_scratch_data_h
22#include <deal.II/base/quadrature.h>
24#include <deal.II/fe/fe_system.h>
26#include <deal.II/matrix_free/fe_point_evaluation.h>
28#include <deal.II/particles/particle_handler.h>
62 typename FEValuesViews::Vector<2>::template solution_curl_type<double>;
64 typename FEValuesViews::Vector<3>::template solution_curl_type<double>;
90 const FESystem<dim> &fe,
91 const Quadrature<dim> &quadrature,
92 const Mapping<dim> &mapping,
93 const Quadrature<dim - 1> &face_quadrature)
99 update_values | update_quadrature_points | update_JxW_values |
100 update_gradients | update_hessians)
104 update_values | update_quadrature_points |
105 update_JxW_values | update_gradients | update_hessians |
106 update_normal_vectors)
144 update_values | update_quadrature_points | update_JxW_values |
145 update_gradients | update_hessians)
149 update_values | update_quadrature_points |
150 update_JxW_values | update_gradients | update_hessians |
151 update_normal_vectors)
248 template <
typename VectorType>
250 reinit(
const typename DoFHandler<dim>::active_cell_iterator &cell,
252 const std::vector<VectorType> &previous_solutions,
254 const std::shared_ptr<Function<dim>> &forcing_function,
268 for (
int d = 0; d < dim; ++d)
270 const unsigned int component_i =
271 fe.system_to_component_index(d).first;
275 const unsigned int component_mass =
276 fe.system_to_component_index(dim).first;
284 for (
const unsigned int k :
fe_values.dof_indices())
286 components[k] = fe.system_to_component_index(k).first;
290 double cell_measure =
318 for (
unsigned int q = 0; q < this->n_q_points; ++q)
330 for (
int d1 = 0; d1 < dim; ++d1)
332 for (
int d2 = 0; d2 < dim; ++d2)
348 for (
unsigned int p = 0; p < previous_solutions.size(); ++p)
357 for (
unsigned int p = 0; p < previous_solutions.size(); ++p)
366 for (
unsigned int k = 0; k <
n_dofs; ++k)
374 for (
int d = 0; d < dim; ++d)
388 for (
int d1 = 0; d1 < dim; ++d1)
390 for (
int d2 = 0; d2 < dim; ++d2)
422 std::vector<std::vector<Tensor<2, dim>>>(
426 std::vector<std::vector<Tensor<1, dim>>>(
433 std::vector<std::vector<Tensor<1, dim>>>(
452 for (
const auto face : cell->face_indices())
468 current_solution, this->face_velocity_gradients[face]);
470 current_solution, this->face_velocity_laplacians[face]);
474 current_solution, this->face_pressure_values[face]);
476 current_solution, this->face_pressure_gradients[face]);
496 for (
int d = 0; d < dim; ++d)
525 const Quadrature<dim> &quadrature,
526 const Mapping<dim> &mapping,
543 const Quadrature<dim> &quadrature,
544 const Mapping<dim> &mapping,
545 const std::shared_ptr<ConservativeLevelSetFilterBase> &
filter);
549 const FiniteElement<dim> &fe_projected_phase_indicator_gradient,
550 const Quadrature<dim> &quadrature,
551 const Mapping<dim> &mapping);
555 const Quadrature<dim> &quadrature,
556 const Mapping<dim> &mapping);
572 template <
typename VectorType>
574 reinit_cls(
const typename DoFHandler<dim>::active_cell_iterator &cell,
577 const std::vector<VectorType> &previous_solutions)
582 "You are trying to reinit the CLS model in a cell, but you did not enable CLS for the scratch data (gather_cls=false)."));
588 this->
fe_values_cls->get_function_values(current_filtered_solution,
592 this->
fe_values_cls->get_function_gradients(current_solution,
596 for (
unsigned int p = 0; p < previous_solutions.size(); ++p)
598 this->
fe_values_cls->get_function_values(previous_solutions[p],
603 template <
typename VectorType>
606 const typename DoFHandler<dim>::active_cell_iterator
607 &projected_phase_indicator_gradient_cell,
608 const VectorType ¤t_projected_phase_indicator_gradient_solution)
611 projected_phase_indicator_gradient_cell);
613 FEValuesExtractors::Vector pig(0);
615 (*fe_values_projected_phase_indicator_gradient)[pig].get_function_values(
616 current_projected_phase_indicator_gradient_solution,
620 template <
typename VectorType>
623 const typename DoFHandler<dim>::active_cell_iterator &curvature_cell,
629 "You are trying to reinit the curvature in a cell, but you did not enable curvature for the scratch data (gather_curvature=false)."));
651 const Quadrature<dim> &quadrature,
652 const Mapping<dim> &mapping);
676 const Quadrature<dim> &quadrature,
677 const Mapping<dim> &mapping,
678 const FiniteElement<dim> &fe_particle_drag_proj,
679 const FiniteElement<dim> &fe_particle_two_way_coupling_force_proj,
680 const FiniteElement<dim> &fe_particle_velocity_proj,
681 const FiniteElement<dim> &fe_particle_momentum_transfer_coefficient);
695 template <
typename VectorType>
698 const typename DoFHandler<dim>::active_cell_iterator &cell,
700 const std::vector<VectorType> &previous_solutions)
705 "You are trying to reinit the void fraction in a cell, but you did not enable void fraction for the scratch data (gather_void_fraction=false)."));
716 for (
unsigned int p = 0; p < previous_solutions.size(); ++p)
735 const unsigned int n_global_max_particles_per_cell,
736 const bool enable_void_fraction_interpolation);
743 template <
typename PropertiesIndex>
753 template <
typename PropertiesIndex>
804 template <
typename VectorType>
807 const Quadrature<dim> &q_particles_location,
808 const typename DoFHandler<dim>::active_cell_iterator &velocity_cell,
809 const VectorType &present_velocity_pressure_solution,
810 const VectorType &previous_velocity_pressure_solution,
813 FEValues<dim> fe_values_local_particles(this->
fe_values.get_fe(),
814 q_particles_location,
815 update_gradients | update_values |
829 const auto &velocity_pressure_solution =
831 present_velocity_pressure_solution :
832 previous_velocity_pressure_solution;
834 fe_values_local_particles.reinit(velocity_cell);
837 fe_values_local_particles[
velocities].get_function_values(
840 fe_values_local_particles[
velocities].get_function_laplacians(
841 velocity_pressure_solution,
844 if constexpr (dim == 2)
846 fe_values_local_particles[
velocities].get_function_curls(
847 velocity_pressure_solution,
850 else if constexpr (dim == 3)
852 fe_values_local_particles[
velocities].get_function_curls(
853 velocity_pressure_solution,
857 fe_values_local_particles[
pressure].get_function_gradients(
858 velocity_pressure_solution,
875 template <
typename VectorType>
878 const Quadrature<dim> &q_particles_location,
879 const typename DoFHandler<dim>::active_cell_iterator &void_fraction_cell,
885 "gather_void_fraction has been set to false, yet you are trying to gather the void fraction at the location of the particles. The scratch data is currently unaware of the finite element interpolation for the void fraction and the simulation will abort."));
890 "The vector for the void fraction at the particle location does not have the same size as the quadrature used to evaluate it."));
892 Vector<double> local_void_fraction_dof_values(
893 void_fraction_cell->get_fe().n_dofs_per_cell());
894 void_fraction_cell->get_dof_values(void_fraction_solution,
895 local_void_fraction_dof_values);
898 void_fraction_cell, make_array_view(q_particles_location.get_points()));
900 make_array_view(local_void_fraction_dof_values), EvaluationFlags::values);
902 for (
unsigned int i_particle = 0; i_particle < q_particles_location.size();
923 "The lethe-fluid-particles solver only supports constant densities"));
926 ->is_non_newtonian_rheological_model() &&
928 ->is_non_newtonian_rheological_model(),
930 "The lethe-fluid-particles solver only supports constant rheology model"));
941 double dynamic_viscosity_at_particle_location =
948 dynamic_viscosity_at_particle_location /
977 template <
typename PropertiesIndex>
983 const double Re_particle_tolerance = 1e-3;
984 unsigned int i_particle = 0;
987 for (
auto &particle :
pic)
989 auto particle_properties = particle.get_properties();
998 Re_particle_tolerance +
1002 particle_properties[PropertiesIndex::dp] /
1025 template <
typename VectorType>
1028 const Quadrature<dim> &q_particles_location,
1029 const typename DoFHandler<dim>::active_cell_iterator &phase_cell,
1035 "gather_cls has been set to false, yet you are trying to gather the CLS at the location of the particles. The scratch data is currently unaware of the finite element interpolation for CLS and the simulation will abort."));
1039 Vector<double> local_filtered_phase_dof_values(
1040 phase_cell->get_fe().n_dofs_per_cell());
1041 phase_cell->get_dof_values(current_filtered_solution,
1042 local_filtered_phase_dof_values);
1045 phase_cell, make_array_view(q_particles_location.get_points()));
1047 local_filtered_phase_dof_values),
1048 EvaluationFlags::values);
1085 template <
typename PropertiesIndex,
typename VectorType>
1088 const typename DoFHandler<dim>::active_cell_iterator &velocity_cell,
1089 const typename DoFHandler<dim>::active_cell_iterator &void_fraction_cell,
1090 const VectorType &present_velocity_pressure_solution,
1091 const VectorType &previous_velocity_pressure_solution,
1093 const Particles::ParticleHandler<dim> &particle_handler,
1099 "You are trying to reinit the fluid information at the particle location within a cell,"
1100 " but you did not enable the gathering of the information at the particle location for the scratch data (gather_particles_information=false)."));
1102 pic = particle_handler.particles_in_cell(velocity_cell);
1112 Quadrature<dim> q_particles_location =
1116 q_particles_location,
1118 present_velocity_pressure_solution,
1119 previous_velocity_pressure_solution,
1126 void_fraction_solution);
1166 template <
typename PropertiesIndex,
typename VectorType>
1169 const typename DoFHandler<dim>::active_cell_iterator &velocity_cell,
1170 const typename DoFHandler<dim>::active_cell_iterator &void_fraction_cell,
1171 const typename DoFHandler<dim>::active_cell_iterator &phase_cell,
1172 const VectorType &present_velocity_pressure_solution,
1173 const VectorType &previous_velocity_pressure_solution,
1175 const Particles::ParticleHandler<dim> &particle_handler,
1177 const VectorType ¤t_filtered_CLS_solution)
1179 pic = particle_handler.particles_in_cell(velocity_cell);
1188 Quadrature<dim> q_particles_location =
1191 q_particles_location,
1193 present_velocity_pressure_solution,
1194 previous_velocity_pressure_solution,
1201 void_fraction_solution);
1205 current_filtered_CLS_solution);
1223 const Quadrature<dim> &quadrature,
1224 const Mapping<dim> &mapping);
1241 template <
typename VectorType>
1244 const typename DoFHandler<dim>::active_cell_iterator &cell,
1246 const std::vector<VectorType> &previous_solutions)
1264 for (
unsigned int p = 0; p < previous_solutions.size(); ++p)
1272 std::vector<double> time_vector =
1297 const FiniteElement<dim> &fe,
1298 const Quadrature<dim> &quadrature,
1299 const Mapping<dim> &mapping,
1313 const FiniteElement<dim> &fe,
1314 const Quadrature<dim> &quadrature,
1315 const Mapping<dim> &mapping,
1327 template <
typename VectorType>
1330 const typename DoFHandler<dim>::active_cell_iterator &cell,
1340 .get_function_values(current_solution,
1343 .get_function_values(current_solution,
1346 .get_function_gradients(current_solution,
1351 .get_function_values(current_filtered_solution,
1386 reinit_mortar(
const typename DoFHandler<dim>::active_cell_iterator &cell,
1433 template <
typename VectorType>
1436 const typename DoFHandler<dim>::active_cell_iterator &particle_drag_cell,
1437 const typename DoFHandler<dim>::active_cell_iterator
1438 &particle_two_way_coupling_force_cell,
1439 const typename DoFHandler<dim>::active_cell_iterator
1440 &particle_velocity_cell,
1441 const typename DoFHandler<dim>::active_cell_iterator
1442 &particle_momentum_transfer_coefficient_cell,
1444 const VectorType &particle_fluid_force_two_way_coupling,
1446 const VectorType &particle_momentum_transfer_coefficient,
1449 constexpr FEValuesExtractors::Vector vector_index(0);
1452 particle_two_way_coupling_force_cell);
1454 .get_function_values(particle_fluid_force_two_way_coupling,
1474 particle_momentum_transfer_coefficient_cell);
1476 .get_function_values(
1477 particle_momentum_transfer_coefficient,
1605 std::shared_ptr<ConservativeLevelSetFilterBase>
1639 std::shared_ptr<FEValues<dim>>
1650 std::vector<Tensor<1, dim>>
1658 std::vector<velocity_curl_type_2d>
1660 std::vector<velocity_curl_type_3d>
1668 typename Particles::ParticleHandler<dim>::particle_iterator_range
pic;
1697 std::shared_ptr<CahnHilliardFilterBase>
void bdf_extrapolate(const std::vector< double > &time_vector, const std::vector< std::vector< DataType > > &solution_vector, const unsigned int number_of_previous_solutions, std::vector< DataType > &extrapolated_solution)
Extrapolate vector of solution to time_vector[0] using previous solution times and previous solutions...
unsigned int number_of_previous_solutions(const Parameters::SimulationControl::TimeSteppingMethod method)
Get the number of previous time steps for a specific BDF scheme.
void enable_projected_phase_indicator_gradient(const FiniteElement< dim > &fe_projected_phase_indicator_gradient, const Quadrature< dim > &quadrature, const Mapping< dim > &mapping)
typename FEValuesViews::Vector< 2 >::template solution_curl_type< double > velocity_curl_type_2d
NavierStokesScratchData(const NavierStokesScratchData< dim > &sd)
Copy Constructor. Same as the main constructor. This constructor only uses the other scratch to build...
std::vector< std::vector< double > > previous_phase_values
void reinit_particle_fluid_interactions(const typename DoFHandler< dim >::active_cell_iterator &velocity_cell, const typename DoFHandler< dim >::active_cell_iterator &void_fraction_cell, const VectorType &present_velocity_pressure_solution, const VectorType &previous_velocity_pressure_solution, const VectorType &void_fraction_solution, const Particles::ParticleHandler< dim > &particle_handler, const Parameters::DragCoupling &drag_coupling)
Calculates the variables needed to compute the particle fluid interactions in the VANS equations.
Table< 2, Tensor< 1, dim > > face_normal
Table< 2, double > div_phi_u
std::vector< double > mass_source
std::vector< double > pressure_values
std::vector< Tensor< 1, dim > > sdirk_stage_sum
void enable_cahn_hilliard(const FiniteElement< dim > &fe, const Quadrature< dim > &quadrature, const Mapping< dim > &mapping, const Parameters::CahnHilliard &cahn_hilliard_parameters)
enable_cahn_hilliard Enables the collection of the CahnHilliard data by the scratch
std::vector< double > thermal_expansion_1
std::vector< Tensor< 1, dim > > force
Table< 3, double > face_phi_p
void extract_particle_properties()
Extracts the velocity of the particles and calculates their total volume in the cell....
NavierStokesScratchData(const std::shared_ptr< SimulationControl > &simulation_control, const PhysicalPropertiesManager &properties_manager, const FESystem< dim > &fe, const Quadrature< dim > &quadrature, const Mapping< dim > &mapping, const Quadrature< dim - 1 > &face_quadrature)
Constructor. The constructor creates the fe_values that will be used to fill the member variables of ...
Table< 2, double > face_JxW
std::shared_ptr< FEValues< dim > > fe_values_particle_momentum_transfer_coefficient
std::vector< double > density_1
bool gather_particles_information
void reinit_mortar(const typename DoFHandler< dim >::active_cell_iterator &cell, const Parameters::Mortar< dim > &mortar_parameters)
Renitialize the content of the scratch data for mortar.
std::vector< Tensor< 1, dim > > projected_phase_indicator_gradient_values
unsigned int max_number_of_particles_per_cell
void calculate_fluid_fields_at_particle_location(const Quadrature< dim > &q_particles_location, const typename DoFHandler< dim >::active_cell_iterator &velocity_cell, const VectorType &present_velocity_pressure_solution, const VectorType &previous_velocity_pressure_solution, const Parameters::DragCoupling &drag_coupling)
Interpolates the velocity and pressure of the fluid, as well as the pressure gradient,...
double kinematic_viscosity_scale_0
Scale of the kinematic viscosity for fluid 0.
std::vector< double > density_thermal_expansion
double pressure_scaling_factor
std::vector< velocity_curl_type_2d > fluid_velocity_curls_at_particle_location_2d
FEValuesExtractors::Vector velocities
SDIRKTable sdirk_table
SDIRK Butcher table with coefficients for the SDIRK time-stepping method.
std::shared_ptr< FEValues< dim > > fe_values_cls
Table< 3, Tensor< 2, dim > > face_grad_phi_u
std::vector< Tensor< 3, dim > > velocity_hessians
void enable_void_fraction(const FiniteElement< dim > &fe, const Quadrature< dim > &quadrature, const Mapping< dim > &mapping)
enable_void_fraction Enables the collection of the void fraction data by the scratch
void calculate_force_parameters_at_particle_location()
Calculates the velocity of the fluid relative to that of the particle and the particle Reynolds numbe...
void reinit_projected_phase_indicator_gradient(const typename DoFHandler< dim >::active_cell_iterator &projected_phase_indicator_gradient_cell, const VectorType ¤t_projected_phase_indicator_gradient_solution)
std::vector< Tensor< 1, dim > > void_fraction_gradient_values
void calculate_physical_properties()
Calculates the physical properties. This function calculates the physical properties that may be requ...
std::vector< std::vector< Tensor< 1, dim > > > face_velocity_laplacians
std::shared_ptr< FEValues< dim > > fe_values_cahn_hilliard
std::vector< double > kinematic_viscosity_1
std::vector< std::vector< Tensor< 1, dim > > > previous_velocity_values
std::vector< double > kinematic_viscosity_0
void reinit(const typename DoFHandler< dim >::active_cell_iterator &cell, const VectorType ¤t_solution, const std::vector< VectorType > &previous_solutions, const VectorType &sum_over_previous_stages, const std::shared_ptr< Function< dim > > &forcing_function, const Tensor< 1, dim > &beta_force, const double pressure_scaling_factor)
Reinitializes the content of the scratch.
std::vector< Tensor< 1, dim > > phase_order_cahn_hilliard_gradients
void enable_ale()
enable_ale Enables the calculation of the ALE velocity
void reinit_heat_transfer(const typename DoFHandler< dim >::active_cell_iterator &cell, const VectorType ¤t_solution, const std::vector< VectorType > &previous_solutions)
Reinitialize the content of the scratch for the heat transfer auxiliary physic.
std::shared_ptr< FEValues< dim > > fe_values_particle_velocity
Tensor< 1, dim > average_particle_velocity
std::vector< Tensor< 1, dim > > temperature_gradients
std::shared_ptr< FEPointEvaluation< 1, dim > > point_evaluator_cls
std::vector< Tensor< 1, dim > > phase_gradient_values
std::vector< std::vector< double > > previous_pressure_values
FEValuesExtractors::Scalar phase_order
std::vector< std::vector< Tensor< 1, dim > > > previous_temperature_gradients
void reinit_particle_fluid_interactions(const typename DoFHandler< dim >::active_cell_iterator &velocity_cell, const typename DoFHandler< dim >::active_cell_iterator &void_fraction_cell, const typename DoFHandler< dim >::active_cell_iterator &phase_cell, const VectorType &present_velocity_pressure_solution, const VectorType &previous_velocity_pressure_solution, const VectorType &void_fraction_solution, const Particles::ParticleHandler< dim > &particle_handler, const Parameters::DragCoupling &drag_coupling, const VectorType ¤t_filtered_CLS_solution)
Calculates the variables needed to compute the particle fluid interactions in the VANS equations....
Tensor< 1, dim > average_fluid_particle_relative_velocity
std::shared_ptr< FEValues< dim > > fe_values_void_fraction
std::vector< std::vector< double > > previous_temperature_values
std::vector< unsigned int > components
bool gather_projected_phase_indicator_gradient
bool interpolated_void_fraction
void enable_mortar()
enable_mortar Enables the calculation of ALE velocity within the mortar feature
std::shared_ptr< FEValues< dim > > fe_values_particle_drag
unsigned int n_dofs_void_fraction
std::vector< double > cell_void_fraction
std::vector< double > compressibility_multiplier
std::vector< Tensor< 2, dim > > velocity_gradients
std::vector< double > surface_tension_gradient
void enable_heat_transfer(const FiniteElement< dim > &fe, const Quadrature< dim > &quadrature, const Mapping< dim > &mapping)
enable_heat_transfer Enables the collection of the heat transfer data (Temperature field) by the scra...
void reinit_void_fraction(const typename DoFHandler< dim >::active_cell_iterator &cell, const VectorType ¤t_solution, const std::vector< VectorType > &previous_solutions)
Reinitialize the content of the scratch for the void fraction.
std::vector< std::vector< double > > previous_density
void reinit_ale(const Parameters::ALE< dim > &ale)
Renitialize the content of the scratch data for ALE.
FEValuesExtractors::Scalar pressure
std::vector< double > surface_tension
std::vector< double > density_0
double total_particle_volume
std::vector< Point< dim > > particle_reference_location
FEValues< dim > fe_values
unsigned int n_faces_q_points
void enable_particle_fluid_interactions(const unsigned int n_global_max_particles_per_cell, const bool enable_void_fraction_interpolation)
enable_particle_fluid_interactions Enables the calculation of the fluid information at the particle l...
std::vector< Tensor< 1, dim > > particle_two_way_coupling_force_values
std::vector< Point< dim > > quadrature_points
std::vector< Tensor< 1, dim > > fluid_particle_relative_velocity_at_particle_location
Table< 3, Tensor< 3, dim > > face_hess_phi_u
std::vector< double > particle_momentum_transfer_coefficient_values
Table< 2, Tensor< 1, dim > > phi_u
std::vector< Tensor< 1, dim > > advective_velocity
std::vector< double > void_fraction_values
void calculate_fluid_properties_at_particle_location()
Calculates the properties of the fluid at the locations of the particles. At the moment,...
std::vector< double > dynamic_viscosity_for_stabilization_1
std::map< field, std::vector< double > > fields
typename FEValuesViews::Vector< 3 >::template solution_curl_type< double > velocity_curl_type_3d
std::vector< Tensor< 1, dim > > particle_velocity_values
bool gather_cahn_hilliard
std::shared_ptr< ConservativeLevelSetFilterBase > filter
std::vector< double > dynamic_viscosity_0
double kinematic_viscosity_scale
std::vector< double > kinematic_viscosity
std::vector< double > particle_weights
std::vector< bool > is_boundary_face
std::vector< double > thermal_expansion_0
unsigned int number_of_particles
void calculate_void_fraction_at_particle_location(const Quadrature< dim > &q_particles_location, const typename DoFHandler< dim >::active_cell_iterator &void_fraction_cell, const VectorType &void_fraction_solution)
Interpolates the void fraction at the locations of the particles.
void reinit_cahn_hilliard(const typename DoFHandler< dim >::active_cell_iterator &cell, const VectorType ¤t_solution, const VectorType ¤t_filtered_solution)
Reinitialize the content of the scratch for CH.
std::vector< Tensor< 1, dim > > velocity_values
std::shared_ptr< FEValues< dim > > fe_values_temperature
Table< 3, double > face_div_phi_u
void enable_cls(const FiniteElement< dim > &fe, const Quadrature< dim > &quadrature, const Mapping< dim > &mapping, const Parameters::CLS_PhaseFilter &phase_filter_parameters)
enable_cls Enables the collection of the CLS data by the scratch
std::vector< double > Re_particle
Table< 2, Tensor< 2, dim > > grad_phi_u
std::vector< double > curvature_values
bool gather_particle_field_project
std::vector< double > filtered_phase_values_at_particle_location
Table< 2, Tensor< 3, dim > > hess_phi_u
std::vector< velocity_curl_type_3d > fluid_velocity_curls_at_particle_location_3d
std::shared_ptr< CahnHilliardFilterBase > cahn_hilliard_filter
std::vector< double > phase_values
Particles::ParticleHandler< dim >::particle_iterator_range pic
void enable_curvature(const FiniteElement< dim > &fe_curvature, const Quadrature< dim > &quadrature, const Mapping< dim > &mapping)
Table< 2, Tensor< 1, dim > > laplacian_phi_u
std::vector< std::vector< Tensor< 1, dim > > > face_velocity_values
Quadrature< dim > gather_particles_reference_location()
Creates an object of type Quadrature<dim> that contains the particle reference location....
std::vector< std::vector< double > > previous_void_fraction_values
unsigned int n_dofs_cahn_hilliard
std::vector< double > shear_rate
void calculate_cls_at_particle_location(const Quadrature< dim > &q_particles_location, const typename DoFHandler< dim >::active_cell_iterator &phase_cell, const VectorType ¤t_filtered_solution)
Interpolates the filtered CLS solution at the location of the particles. The latter values are used i...
std::vector< double > phase_order_cahn_hilliard_values
std::vector< Tensor< 1, dim > > particle_velocity
FEValuesExtractors::Scalar chemical_potential
std::vector< Tensor< 1, dim > > filtered_phase_gradient_values
std::vector< std::vector< Tensor< 1, dim > > > face_pressure_gradients
std::shared_ptr< FEPointEvaluation< 1, dim > > point_evaluator_void_fraction
std::shared_ptr< FEValues< dim > > fe_values_projected_phase_indicator_gradient
void reinit_particle_fluid_forces()
Reinitializes the fluid forces and torques on the particles in the cell to zero.
Table< 3, Tensor< 1, dim > > face_phi_u
std::vector< double > dynamic_viscosity_1
std::vector< double > temperature_values
std::vector< Tensor< 1, dim > > fluid_velocity_at_particle_location
bool gather_void_fraction
std::vector< unsigned int > boundary_face_id
std::vector< Tensor< 1, dim > > velocity_gradient_divergence
const std::shared_ptr< SimulationControl > simulation_control
std::vector< double > kinematic_viscosity_for_stabilization
std::vector< Vector< double > > rhs_force
std::vector< double > filtered_phase_values
std::vector< Tensor< 1, dim > > particle_drag_values
void allocate() override
Allocates the memory for the scratch.
void reinit_cls(const typename DoFHandler< dim >::active_cell_iterator &cell, const VectorType ¤t_solution, const VectorType ¤t_filtered_solution, const std::vector< VectorType > &previous_solutions)
Reinitialize the content of the scratch for the cls.
void reinit_curvature(const typename DoFHandler< dim >::active_cell_iterator &curvature_cell, const VectorType ¤t_curvature_solution)
std::vector< Tensor< 1, dim > > fluid_velocity_laplacian_at_particle_location
Table< 3, Tensor< 1, dim > > face_grad_phi_p
std::vector< double > velocity_divergences
std::vector< Tensor< 1, dim > > rotor_linear_velocity_values
std::vector< double > dynamic_viscosity_for_stabilization
Values of the dynamic viscosity used in the SUPG and PSPG stabilizations.
std::vector< double > density_at_particle_location
std::vector< std::vector< double > > face_velocity_divergences
std::vector< double > kinematic_viscosity_at_particle_location
unsigned int n_dofs_heat_transfer
std::vector< std::vector< Tensor< 2, dim > > > face_velocity_gradients
Table< 3, Tensor< 1, dim > > face_laplacian_phi_u
void enable_particle_field_projection(const Quadrature< dim > &quadrature, const Mapping< dim > &mapping, const FiniteElement< dim > &fe_particle_drag_proj, const FiniteElement< dim > &fe_particle_two_way_coupling_force_proj, const FiniteElement< dim > &fe_particle_velocity_proj, const FiniteElement< dim > &fe_particle_momentum_transfer_coefficient)
enable_particle_field_projection Enables the collection of the particle fields projection data by the...
Table< 2, Tensor< 1, dim > > grad_phi_p
std::vector< double > dynamic_viscosity
FEFaceValues< dim > fe_face_values
std::vector< double > grad_kinematic_viscosity_shear_rate
std::vector< double > density
std::shared_ptr< FEValues< dim > > fe_values_curvature
std::vector< std::vector< double > > face_pressure_values
Tensor< 1, dim > beta_force
std::vector< std::vector< Point< dim > > > face_quadrature_points
std::vector< double > filtered_phase_order_cahn_hilliard_values
std::vector< Tensor< 1, dim > > pressure_gradients
Tensor< 1, dim > explicit_particle_volumetric_acceleration_on_fluid
std::vector< Tensor< 1, dim > > fluid_pressure_gradients_at_particle_location
Table< 2, Tensor< 1, dim > > gradient_divergence_phi_u
std::vector< double > thermal_expansion
void calculate_cell_void_fraction(const double &total_particle_volume)
Computes the cell void fraction.
std::vector< Tensor< 1, dim > > velocity_laplacians
const PhysicalPropertiesManager properties_manager
void calculate_particle_fields_values(const typename DoFHandler< dim >::active_cell_iterator &particle_drag_cell, const typename DoFHandler< dim >::active_cell_iterator &particle_two_way_coupling_force_cell, const typename DoFHandler< dim >::active_cell_iterator &particle_velocity_cell, const typename DoFHandler< dim >::active_cell_iterator &particle_momentum_transfer_coefficient_cell, const VectorType &particle_fluid_drag, const VectorType &particle_fluid_force_two_way_coupling, const VectorType &particle_velocity, const VectorType &particle_momentum_transfer_coefficient, const Parameters::DragCoupling &drag_coupling)
Calculates the particle forces and velocities that were projected on the fluid dofs at the quadrature...
std::vector< double > dynamic_viscosity_for_stabilization_0
std::shared_ptr< FEValues< dim > > fe_values_particle_two_way_coupling_force
std::vector< double > chemical_potential_cahn_hilliard_values
double kinematic_viscosity_scale_1
Scale of the kinematic viscosity for fluid 1.
An interface for all the common parameters required to consider a moving frame of reference in a simp...
Class that manages the physical properties model which are required to calculate the various physical...
Base class for scratch data objects of physics and subequations.
double compute_cell_measure_with_JxW(const std::vector< double > &JxW_values)
Computes the area (2D) or volume (3D) of the cell by integrating 1 over the cell, by summing JxW valu...
double calculate_point_property(const double phase, const double property0, const double property1)
Calculate the equivalent properties for a given phase. Method called in quadrature points loops in CL...
double compute_cell_diameter(const double cell_measure, const unsigned int fe_degree)
Computes equivalent cell diameter by comparing the area to a disk (2D) or the volume to a sphere (3D)...
DEM particle property definitions and output name management.
DragCoupling
Defines the numerical coupling strategy used for drag force computation between fluid and particles.
@ fully_implicit
Fully implicit drag coupling.
@ fully_explicit
Explicit drag coupling.
Parameter structures for CFD-DEM coupled simulations.
Parameters for the phase filtration.
Mortar - Defines parameters used to construct mortar elements.
Structure representing a Butcher tableau for a SDIRK method.
GlobalVectorType VectorType
bool time_stepping_is_bdf(const Parameters::SimulationControl::TimeSteppingMethod method)
Determines if the time integration method is within the bdf family.
bool time_stepping_is_sdirk(const Parameters::SimulationControl::TimeSteppingMethod method)
Determines if the time integration method is within the sdirk family.