Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
dem_solver_parameters.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2020-2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_dem_solver_parameters_h
5#define lethe_dem_solver_parameters_h
6
8#include <core/manifolds.h>
9#include <core/parameters.h>
12
13/**
14 * @brief Handles all the parameters declared in the parameter handler file.
15 */
16template <int dim>
18{
19public:
22 std::shared_ptr<Parameters::MeshBoxRefinement<dim>> mesh_box_refinement;
37 std::shared_ptr<Parameters::DEMSolidObjects<dim>> solid_objects;
38
39 /**
40 * @brief Declare all the parameters of a DEM simulation.
41 *
42 * @param[in,out] prm The parameter handler object.
43 * @param[in] size_of_subsections The maximum size of the variable-size
44 * subsections of the parameter file, as returned by
45 * Parameters::get_size_of_subsections.
46 */
47 void
48 declare(ParameterHandler &prm,
49 const Parameters::SizeOfSubsections size_of_subsections)
50 {
51 prm.declare_entry("dimension",
52 "0",
53 Patterns::Integer(),
54 "Dimension of the problem");
55
56 prm.declare_entry("print parameters",
57 "none",
58 Patterns::Selection("none|only changed|all"),
59 "Print all the parameters, or only"
60 "the changed parameters or none");
61
62 prm.declare_entry(
63 "comment message",
64 "",
65 Patterns::Anything(),
66 "Print a comment at the beginning of the console output.");
67
68 simulation_control.declare_parameters(prm);
69 mesh.declare_parameters(prm);
70 manifolds_parameters.declare_parameters(prm, size_of_subsections.manifolds);
72 std::make_shared<Parameters::MeshBoxRefinement<dim>>();
73 mesh_box_refinement->declare_parameters(prm);
74 restart.declare_parameters(prm);
75 timer.declare_parameters(prm);
76 test.declare_parameters(prm);
77 lagrangian_physical_properties.declare_parameters(prm);
78 insertion_info.declare_parameters(prm);
79 model_parameters.declare_parameters(prm);
80 floating_walls.declare_parameters(prm);
81 floating_grid.declare_parameters(prm);
82 boundary_conditions.declare_parameters(prm);
83 forces_torques.declare_parameters(prm);
84 grid_motion.declare_parameters(prm);
85 post_processing.declare_parameters(prm);
86 solid_objects = std::make_shared<Parameters::DEMSolidObjects<dim>>();
87 solid_objects->declare_parameters(prm);
88 }
89
90 /**
91 * @brief Parse all the parameters of a DEM simulation.
92 *
93 * @param[in] prm The parameter handler object.
94 */
95 void
96 parse(ParameterHandler &prm)
97 {
98 mesh.parse_parameters(prm);
99 manifolds_parameters.parse_parameters(prm);
100 mesh_box_refinement->parse_parameters(prm);
101 test.parse_parameters(prm);
102 restart.parse_parameters(prm);
103 timer.parse_parameters(prm);
104 lagrangian_physical_properties.parse_parameters(prm);
105 insertion_info.parse_parameters(prm);
106 model_parameters.parse_parameters(prm);
107 simulation_control.parse_parameters(prm);
108 floating_walls.parse_parameters(prm);
109 floating_grid.parse_parameters(prm);
110 boundary_conditions.parse_parameters(prm);
111 forces_torques.parse_parameters(prm);
112 grid_motion.parse_parameters(prm);
113 post_processing.parse_parameters(prm);
114 solid_objects->parse_parameters(prm);
115
116 // The walls with an imposed temperature exchange heat with the particles
117 // only in multiphysic DEM.
118 AssertThrow(boundary_conditions.boundary_temperature.empty() ||
120 ExcMessage(
121 "DEM boundary conditions with the temperature thermal "
122 "boundary type can only be used in multiphysic DEM. Set the "
123 "solver type to dem_mp in the model parameters subsection or "
124 "set the thermal boundary types to adiabatic."));
125 }
126};
127
128#endif
Handles all the parameters declared in the parameter handler file.
std::shared_ptr< Parameters::DEMSolidObjects< dim > > solid_objects
Parameters::Mesh< dim > mesh
Parameters::Lagrangian::LagrangianPhysicalProperties lagrangian_physical_properties
std::shared_ptr< Parameters::MeshBoxRefinement< dim > > mesh_box_refinement
Parameters::Restart restart
Parameters::Lagrangian::LagrangianPostProcessing post_processing
void parse(ParameterHandler &prm)
Parse all the parameters of a DEM simulation.
Parameters::Lagrangian::GridMotion< dim > grid_motion
Parameters::Lagrangian::FloatingWalls< dim > floating_walls
Parameters::Lagrangian::InsertionInfo< dim > insertion_info
Parameters::Lagrangian::BCDEM boundary_conditions
Parameters::Lagrangian::FloatingGrid< dim > floating_grid
Parameters::Manifolds manifolds_parameters
Parameters::Testing test
void declare(ParameterHandler &prm, const Parameters::SizeOfSubsections size_of_subsections)
Declare all the parameters of a DEM simulation.
Parameters::SimulationControl simulation_control
Parameters::Lagrangian::ModelParameters< dim > model_parameters
Parameters::Lagrangian::ForceTorqueOnWall< dim > forces_torques
Parameters for a floating grid in DEM simulations.
Parameters for floating walls in DEM simulations.
ForceTorqueOnWall - Defines the parameters for the force and torques calculation on boundaries of the...
Parameters for grid (mesh) motion in DEM simulations.
Parameters controlling particle insertion in DEM simulations.
Numerical model parameters for DEM simulations.
Manifolds - This class manages attaching manifolds to faces when a manual attachment is required (for...
Definition manifolds.h:25
Mesh - Parameters that control mesh reading and mesh generation.
DEM particle property definitions and output name management.
Parameter structures for Lagrangian (DEM) particle simulations.
Parameter classes for solid objects used in Nitsche immersed boundary and DEM simulations.
Boundary conditions for DEM simulations.
Physical properties of particles, walls, and interstitial gas for Lagrangian (DEM) simulations.
Lagrangian Postprocessing - Defines the parameters for the Lagrangian post-processing.
Restart - Controls writing and reading simulation checkpoints.
SimulationControl - Defines the parameter that control the flow of the simulation as well as the freq...
Definition parameters.h:87
Testing - Some solvers have a specific testing mode that can be enabled to output more variables to t...
Timer - Defines the parameters that control the timing of the simulation. Lethe supports advanced tim...