![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <continuum_solid_dynamics.h>
Public Member Functions | |
| ContinuumSolidDynamics (MultiphysicsInterface< dim > *multiphysics_interface, const SimulationParameters< dim > &p_simulation_parameters, const std::shared_ptr< parallel::DistributedTriangulationBase< dim > > &p_triangulation, const std::shared_ptr< SimulationControl > &p_simulation_control) | |
| std::vector< OutputStruct< dim, GlobalVectorType > > | gather_output_hook () override |
| void | finish_simulation () override |
| void | percolate_time_vectors () override |
| void | postprocess (bool first_iteration) override |
| void | output_per_iteration_timer () override |
| void | pre_mesh_adaptation () override |
| void | post_mesh_adaptation () override |
| void | compute_error_estimate (const std::pair< const Variable, Parameters::MultipleAdaptationParameters > &ivar, dealii::Vector< float > &estimated_error_per_cell) override |
| void | write_checkpoint () override |
| void | read_checkpoint () override |
| std::vector< OutputStructTableHandler > | gather_tables () override |
| void | setup_dofs () override |
| void | set_initial_conditions () override |
| void | solve_linear_system () override |
| bool | should_solve_auxiliary_physics () override |
| const DoFHandler< dim > & | get_dof_handler () override |
| GlobalVectorType & | get_evaluation_point () override |
| GlobalVectorType & | get_local_evaluation_point () override |
| GlobalVectorType & | get_newton_update () override |
| GlobalVectorType & | get_present_solution () override |
| GlobalVectorType & | get_system_rhs () override |
| AffineConstraints< double > & | get_nonzero_constraints () override |
| void | output_newton_update_norms () override |
| double | get_residual_rescale_metric () const override |
| Public Member Functions inherited from AuxiliaryPhysics< dim, GlobalVectorType > | |
| AuxiliaryPhysics (const Parameters::NonLinearSolver non_linear_solver_parameters) | |
| virtual | ~AuxiliaryPhysics ()=default |
| virtual void | modify_solution () |
| virtual void | update_boundary_conditions () |
| void | setup_preconditioner () override |
| Public Member Functions inherited from PhysicsSolver< GlobalVectorType > | |
| PhysicsSolver (const Parameters::NonLinearSolver non_linear_solver_parameters) | |
| virtual | ~PhysicsSolver () |
| void | solve_governing_system () |
| virtual void | apply_constraints () |
| virtual double | get_current_residual () |
| virtual bool | allow_skip_linear_solve_when_residual_is_below_tolerance () const |
| unsigned int | get_current_newton_iteration () const |
Private Member Functions | |
| void | assemble_system_matrix () override |
| void | assemble_system_rhs () override |
| void | define_constraints () |
Private Attributes | |
| MultiphysicsInterface< dim > * | multiphysics |
| TimerOutput | computing_timer |
| const SimulationParameters< dim > & | simulation_parameters |
| std::shared_ptr< parallel::DistributedTriangulationBase< dim > > | triangulation |
| std::shared_ptr< SimulationControl > | simulation_control |
| std::shared_ptr< DoFHandler< dim > > | dof_handler |
| std::shared_ptr< FiniteElement< dim > > | fe |
| std::shared_ptr< Mapping< dim > > | mapping |
| std::shared_ptr< Quadrature< dim > > | cell_quadrature |
| std::shared_ptr< Quadrature< dim - 1 > > | face_quadrature |
| const FEValuesExtractors::Vector | solid_velocity_extractor |
| const FEValuesExtractors::Scalar | solid_volume_fraction_extractor |
| IndexSet | locally_owned_dofs |
| IndexSet | locally_relevant_dofs |
| GlobalVectorType | evaluation_point |
| GlobalVectorType | local_evaluation_point |
| GlobalVectorType | newton_update |
| std::shared_ptr< GlobalVectorType > | present_solution |
| GlobalVectorType | system_rhs |
| AffineConstraints< double > | nonzero_constraints |
| AffineConstraints< double > | zero_constraints |
| TrilinosWrappers::SparseMatrix | system_matrix |
| std::shared_ptr< std::vector< GlobalVectorType > > | previous_solutions |
| std::shared_ptr< SolutionTransfer< dim, GlobalVectorType > > | solution_transfer |
| std::vector< SolutionTransfer< dim, GlobalVectorType > > | previous_solutions_transfer |
Additional Inherited Members | |
| Public Attributes inherited from PhysicsSolver< GlobalVectorType > | |
| ConditionalOStream | pcout |
| Parameters::SimulationControl::TimeSteppingMethod | time_stepping_method |
Solid phase of the Euler-Euler model, solved as an auxiliary physics coupled to the VANS fluid dynamics solver.
Component layout of the FESystem: components [0, dim) hold the solid velocity and component dim holds the solid volume fraction.
| dim | Number of spatial dimensions. |
Definition at line 75 of file continuum_solid_dynamics.h.
| ContinuumSolidDynamics< dim >::ContinuumSolidDynamics | ( | MultiphysicsInterface< dim > * | multiphysics_interface, |
| const SimulationParameters< dim > & | p_simulation_parameters, | ||
| const std::shared_ptr< parallel::DistributedTriangulationBase< dim > > & | p_triangulation, | ||
| const std::shared_ptr< SimulationControl > & | p_simulation_control ) |
Constructor of the solid phase physics.
| [in] | multiphysics_interface | Multiphysics interface through which the solid phase exchanges fields with the other physics. |
| [in] | p_simulation_parameters | Simulation parameters. |
| [in] | p_triangulation | Distributed triangulation shared by all physics. |
| [in] | p_simulation_control | Simulation control (time stepping). |
Definition at line 33 of file continuum_solid_dynamics.cc.
References AuxiliaryPhysics< dim, GlobalVectorType >::AuxiliaryPhysics(), cell_quadrature, computing_timer, continuum_solid_dynamics, dof_handler, face_quadrature, fe, mapping, maximum_number_of_previous_solutions(), multiphysics, PhysicsSolver< GlobalVectorType >::pcout, PhysicsSolver< GlobalVectorType >::physics_solving_strategy, present_solution, previous_solutions, previous_solutions_transfer, simulation_control, simulation_parameters, solid_velocity_extractor, solid_volume_fraction_extractor, solution_transfer, and triangulation.
|
overrideprivatevirtual |
Assemble the system matrix. Not implemented yet.
Implements PhysicsSolver< GlobalVectorType >.
Definition at line 335 of file continuum_solid_dynamics.cc.
|
overrideprivatevirtual |
Assemble the system right-hand side. Not implemented yet.
Implements PhysicsSolver< GlobalVectorType >.
Definition at line 344 of file continuum_solid_dynamics.cc.
|
overridevirtual |
Compute the error estimate used for mesh adaptation. Not supported yet for the solid phase.
| [in] | ivar | Variable and adaptation parameters. |
| [out] | estimated_error_per_cell | Estimated error per cell. |
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 183 of file continuum_solid_dynamics.cc.
|
private |
Define the constraints (hanging nodes only for now).
Definition at line 246 of file continuum_solid_dynamics.cc.
References dof_handler, locally_owned_dofs, locally_relevant_dofs, nonzero_constraints, and zero_constraints.
|
overridevirtual |
Finish the simulation (print timers).
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 114 of file continuum_solid_dynamics.cc.
References announce_string(), computing_timer, Parameters::Timer::end, PhysicsSolver< GlobalVectorType >::pcout, and simulation_parameters.
|
overridevirtual |
Gather the solid velocity and solid volume fraction for output.
Reimplemented from AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 90 of file continuum_solid_dynamics.cc.
References dof_handler, and present_solution.
|
overridevirtual |
Gather the post-processing tables to serialize. None yet.
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 239 of file continuum_solid_dynamics.cc.
|
inlineoverridevirtual |
Get the DoFHandler of the solid phase.
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 210 of file continuum_solid_dynamics.h.
References dof_handler.
|
inlineoverridevirtual |
Get the evaluation point.
Implements PhysicsSolver< GlobalVectorType >.
Definition at line 221 of file continuum_solid_dynamics.h.
References evaluation_point.
|
inlineoverridevirtual |
Get the local (non-ghosted) evaluation point.
Implements PhysicsSolver< GlobalVectorType >.
Definition at line 232 of file continuum_solid_dynamics.h.
References local_evaluation_point.
|
inlineoverridevirtual |
Get the Newton update.
Implements PhysicsSolver< GlobalVectorType >.
Definition at line 243 of file continuum_solid_dynamics.h.
References newton_update.
|
inlineoverridevirtual |
Get the non-zero constraints.
Implements PhysicsSolver< GlobalVectorType >.
Definition at line 276 of file continuum_solid_dynamics.h.
References nonzero_constraints.
|
inlineoverridevirtual |
Get the present solution.
Implements PhysicsSolver< GlobalVectorType >.
Definition at line 254 of file continuum_solid_dynamics.h.
References present_solution.
|
overridevirtual |
Get the metric used to rescale the residual.
Implements PhysicsSolver< GlobalVectorType >.
Definition at line 363 of file continuum_solid_dynamics.cc.
References continuum_solid_dynamics, mapping, simulation_parameters, and triangulation.
|
inlineoverridevirtual |
Get the system right-hand side.
Implements PhysicsSolver< GlobalVectorType >.
Definition at line 265 of file continuum_solid_dynamics.h.
References system_rhs.
|
overridevirtual |
Print the norms of the Newton update.
Implements PhysicsSolver< GlobalVectorType >.
Definition at line 353 of file continuum_solid_dynamics.cc.
References newton_update, and PhysicsSolver< GlobalVectorType >::pcout.
|
overridevirtual |
Print the timer summary at each iteration.
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 141 of file continuum_solid_dynamics.cc.
References announce_string(), computing_timer, and PhysicsSolver< GlobalVectorType >::pcout.
|
overridevirtual |
Shift the solution history for the BDF time-stepping schemes.
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 127 of file continuum_solid_dynamics.cc.
References present_solution, and previous_solutions.
|
overridevirtual |
Interpolate the solution vectors onto the adapted mesh.
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 162 of file continuum_solid_dynamics.cc.
References locally_owned_dofs, nonzero_constraints, present_solution, previous_solutions, previous_solutions_transfer, solution_transfer, and triangulation.
|
overridevirtual |
Post-process the solid phase solution. Nothing is computed yet.
| [in] | first_iteration | Whether this is the first iteration. |
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 136 of file continuum_solid_dynamics.cc.
|
overridevirtual |
Prepare the solution vectors for mesh refinement/coarsening.
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 152 of file continuum_solid_dynamics.cc.
References present_solution, previous_solutions, previous_solutions_transfer, and solution_transfer.
|
overridevirtual |
Deserialize the present and previous solutions for restart.
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 212 of file continuum_solid_dynamics.cc.
References locally_owned_dofs, PhysicsSolver< GlobalVectorType >::pcout, present_solution, previous_solutions, solution_transfer, and triangulation.
|
overridevirtual |
Set the initial conditions. Fields are set to zero for now.
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 317 of file continuum_solid_dynamics.cc.
References percolate_time_vectors(), and present_solution.
|
overridevirtual |
Distribute the DoFs, allocate the vectors and matrix, and register the solid phase fields in the multiphysics interface.
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 261 of file continuum_solid_dynamics.cc.
References continuum_solid_dynamics, define_constraints(), dof_handler, evaluation_point, fe, local_evaluation_point, locally_owned_dofs, locally_relevant_dofs, mapping, multiphysics, newton_update, nonzero_constraints, PhysicsSolver< GlobalVectorType >::pcout, present_solution, previous_solutions, system_matrix, system_rhs, and triangulation.
|
inlineoverridevirtual |
Indicate whether the solid phase should be solved. Returns false until the governing equations are implemented.
Reimplemented from AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 199 of file continuum_solid_dynamics.h.
|
overridevirtual |
Solve the linear system. Not implemented yet.
Implements PhysicsSolver< GlobalVectorType >.
Definition at line 326 of file continuum_solid_dynamics.cc.
|
overridevirtual |
Serialize the present and previous solutions for restart.
Implements AuxiliaryPhysics< dim, GlobalVectorType >.
Definition at line 196 of file continuum_solid_dynamics.cc.
References present_solution, previous_solutions, and solution_transfer.
|
private |
Definition at line 338 of file continuum_solid_dynamics.h.
|
private |
Timer of the solid phase physics.
Definition at line 319 of file continuum_solid_dynamics.h.
|
private |
DoFHandler of the solid phase.
Definition at line 331 of file continuum_solid_dynamics.h.
|
private |
Solution and solver vectors.
Definition at line 350 of file continuum_solid_dynamics.h.
|
private |
Definition at line 339 of file continuum_solid_dynamics.h.
|
private |
FESystem: dim velocity components + 1 volume fraction component.
Definition at line 334 of file continuum_solid_dynamics.h.
|
private |
Definition at line 351 of file continuum_solid_dynamics.h.
|
private |
Locally owned and locally relevant DoFs.
Definition at line 346 of file continuum_solid_dynamics.h.
|
private |
Definition at line 347 of file continuum_solid_dynamics.h.
|
private |
Mapping, cell and face quadratures.
Definition at line 337 of file continuum_solid_dynamics.h.
|
private |
Multiphysics interface used to exchange fields with other physics.
Definition at line 316 of file continuum_solid_dynamics.h.
|
private |
Definition at line 352 of file continuum_solid_dynamics.h.
|
private |
Definition at line 355 of file continuum_solid_dynamics.h.
|
private |
Definition at line 353 of file continuum_solid_dynamics.h.
|
private |
Previous solutions for the BDF time-stepping schemes.
Definition at line 360 of file continuum_solid_dynamics.h.
|
private |
Definition at line 365 of file continuum_solid_dynamics.h.
|
private |
Simulation control.
Definition at line 328 of file continuum_solid_dynamics.h.
|
private |
Simulation parameters.
Definition at line 322 of file continuum_solid_dynamics.h.
|
private |
Extractors of the solid velocity and solid volume fraction.
Definition at line 342 of file continuum_solid_dynamics.h.
|
private |
Definition at line 343 of file continuum_solid_dynamics.h.
|
private |
Solution transfer for mesh adaptation and checkpointing.
Definition at line 363 of file continuum_solid_dynamics.h.
|
private |
Definition at line 357 of file continuum_solid_dynamics.h.
|
private |
Definition at line 354 of file continuum_solid_dynamics.h.
|
private |
Triangulation shared by all physics.
Definition at line 325 of file continuum_solid_dynamics.h.
|
private |
Definition at line 356 of file continuum_solid_dynamics.h.