Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
isothermal_compressible_navier_stokes_assembler.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2023-2025 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_isothermal_compressible_navier_stokes_assembler_h
5#define lethe_isothermal_compressible_navier_stokes_assembler_h
6
8
9#include <solvers/copy_data.h>
12
13
14/**
15 * @brief Class that assembles the core of the isothermal compressible Navier-Stokes equations.
16 * According to the following weak form:
17 * \f$\nabla \cdot (\rho \mathbf{u}) + \rho \mathbf{u} \cdot \nabla \mathbf{u} -
18 * \nabla p - \mu \nabla^2 \mathbf{u} = 0\f$ with a full GLS stabilization
19 * including the laplacian of the test function.
20 *
21 * @tparam dim An integer that denotes the number of spatial dimensions
22 *
23 * @ingroup assemblers
24 */
25
26template <int dim>
28 : public NavierStokesAssemblerBase<dim>
29{
30public:
35
36 /**
37 * @brief assemble_matrix Assembles the matrix
38 * @param scratch_data (see base class)
39 * @param copy_data (see base class)
40 */
41 virtual void
43 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
44
45 /**
46 * @brief assemble_rhs Assembles the rhs
47 * @param scratch_data (see base class)
48 * @param copy_data (see base class)
49 */
50 virtual void
52 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
53
54 const std::shared_ptr<SimulationControl> simulation_control;
55};
56
57
58/**
59 * @brief Class that assembles the transient time arising from BDF time
60 * integration for the isothermal compressible Navier Stokes equations. For
61 * example, if a BDF1 scheme is chosen, the following is assembled
62 * \f$\frac{(\rho \mathbf{u})^{t+\Delta t}-(\rho \mathbf{u})^{t}}{\Delta t} +
63 * \frac{(\psi \mathbf{p})^{t+\Delta t}-(\psi \mathbf{p})^{t}}{\Delta t} \f$
64 *
65 * @tparam dim An integer that denotes the number of spatial dimensions
66 *
67 * @ingroup assemblers
68 */
69template <int dim>
71 : public NavierStokesAssemblerBase<dim>
72{
73public:
78
79 /**
80 * @brief assemble_matrix Assembles the matrix
81 * @param scratch_data (see base class)
82 * @param copy_data (see base class)
83 */
84 virtual void
86 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
87
88 /**
89 * @brief assemble_rhs Assembles the rhs
90 * @param scratch_data (see base class)
91 * @param copy_data (see base class)
92 */
93 virtual void
95 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
96
97 const std::shared_ptr<SimulationControl> simulation_control;
98};
99
100#endif
virtual void assemble_matrix(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_matrix Assembles the matrix
GLSIsothermalCompressibleNavierStokesAssemblerBDF(const std::shared_ptr< SimulationControl > &simulation_control)
virtual void assemble_rhs(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_rhs Assembles the rhs
virtual void assemble_matrix(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_matrix Assembles the matrix
GLSIsothermalCompressibleNavierStokesAssemblerCore(const std::shared_ptr< SimulationControl > &simulation_control)
virtual void assemble_rhs(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_rhs Assembles the rhs
Class that stores the information required by the assembly procedure for a Navier-Stokes equation....
Class responsible for storing the information calculated using the assembly of stabilized Tensor<1,...
Definition copy_data.h:166
PhysicsAssemblerBase< NavierStokesScratchData< dim >, StabilizedMethodsTensorCopyData< dim > > NavierStokesAssemblerBase
A pure virtual class that serves as an interface for all of the assemblers for the Navier-Stokes Equa...
Simulation control classes for managing time-stepping and iteration control in Lethe.