Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
tracer_drift_velocity.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2024-2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_tracer_drift_velocity_h
5#define lethe_tracer_drift_velocity_h
6
7#include <deal.II/base/function.h>
8#include <deal.II/base/parameter_handler.h>
9#include <deal.II/base/parsed_function.h>
10
11#include <memory>
12
13using namespace dealii;
14/**
15 * Drift velocity that is added to the tracer velocity to account for simplified
16 *multiphase simulations using drift-flux modeling.
17 **/
18
19namespace Parameters
20{
21 /**
22* @brief Implements a drift velocity function to account for simplified multiphase flows.
23*
24* @tparam dim An integer that denotes the dimension of the space in which
25* the flow is solved.
26
27 * The drift velocity provides a simple way to model dilute disperse multiphase
28flow through the tracer physics.
29 **/
30
31 template <int dim>
33 {
34 public:
36 {
37 drift_velocity = std::make_shared<Functions::ParsedFunction<dim>>(dim);
38 }
39
40 /**
41 * @brief Declare the parameters required by the drift velocity.
42 *
43 * @param[in,out] prm The parameter handler object.
44 *
45 */
46 virtual void
47 declare_parameters(ParameterHandler &prm);
48
49 /**
50 * @brief Parse the parameters required by the analytical solution
51 * within a parameter file
52 *
53 * @param[in] prm The parameter handler object.
54 *
55 */
56 virtual void
57 parse_parameters(ParameterHandler &prm);
58
59 // Drift velocity
60 std::shared_ptr<Functions::ParsedFunction<dim>> drift_velocity;
61 };
62
63 template <int dim>
64 void
66 {
67 prm.enter_subsection("tracer drift velocity");
68
69 prm.enter_subsection("drift velocity");
70 drift_velocity->declare_parameters(prm, dim);
71 prm.leave_subsection();
72
73 prm.leave_subsection();
74 }
75
76 template <int dim>
77 void
79 {
80 prm.enter_subsection("tracer drift velocity");
81
82 prm.enter_subsection("drift velocity");
83 drift_velocity->parse_parameters(prm);
84 prm.leave_subsection();
85
86 prm.leave_subsection();
87 }
88} // namespace Parameters
89
90
91#endif
virtual void parse_parameters(ParameterHandler &prm)
Parse the parameters required by the analytical solution within a parameter file.
virtual void declare_parameters(ParameterHandler &prm)
Declare the parameters required by the drift velocity.
std::shared_ptr< Functions::ParsedFunction< dim > > drift_velocity