Documentation 6b54b78464
Loading...
Searching...
No Matches
CSutherland.hpp
Go to the documentation of this file.
1/*!
2 * \file CSutherland.hpp
3 * \brief Defines Sutherland's Law for laminar viscosity.
4 * \author S. Vitale, M. Pini, G. Gori, A. Guardone, P. Colonna, T. Economon
5 * \version 8.5.0 "Harrier"
6 *
7 * SU2 Project Website: https://su2code.github.io
8 *
9 * The SU2 Project is maintained by the SU2 Foundation
10 * (http://su2foundation.org)
11 *
12 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
13 *
14 * SU2 is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * SU2 is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26 */
27
28#pragma once
29
30#include "CViscosityModel.hpp"
31
32/*!
33 * \class CSutherland
34 * \brief Defines Sutherland's Law for laminar viscosity.
35 * \author S.Vitale, M.Pini
36 */
37class CSutherland final : public CViscosityModel {
38 public:
39 /*!
40 * \brief Constructor of the class.
41 */
42 CSutherland(su2double mu_ref, su2double t_ref, su2double s) : mu_ref_(mu_ref), t_ref_(t_ref), s_(s) {}
43
44 /*!
45 * \brief Set Viscosity.
46 */
47 void SetViscosity(su2double t, su2double rho) override {
48 const su2double t_ref_inv = 1.0 / t_ref_;
49 const su2double t_nondim = t_ref_inv * t;
50 mu_ = mu_ref_ * t_nondim * sqrt(t_nondim) * ((t_ref_ + s_) / (t + s_));
51
52 /*--- Set Viscosity Derivatives. ---*/
53 const su2double ts_inv = 1.0 / (t + s_);
54 dmudrho_t_ = 0.0;
55 dmudt_rho_ = mu_ref_ * (t_ref_ + s_) * ts_inv * sqrt(t_nondim) * (1.5 * t_ref_inv - t_nondim * ts_inv);
56 }
57
58 private:
59 const su2double mu_ref_{0.0}; /*!< \brief Internal Energy. */
60 const su2double t_ref_{0.0}; /*!< \brief DpDd_e. */
61 const su2double s_{0.0}; /*!< \brief DpDe_d. */
62};
Interface class for defining laminar viscosity models.
Defines Sutherland's Law for laminar viscosity.
Definition CSutherland.hpp:37
void SetViscosity(su2double t, su2double rho) override
Set Viscosity.
Definition CSutherland.hpp:47
CSutherland(su2double mu_ref, su2double t_ref, su2double s)
Constructor of the class.
Definition CSutherland.hpp:42
Interface class for defining the laminar viscosity model.
Definition CViscosityModel.hpp:39
su2double mu_
Dynamic viscosity.
Definition CViscosityModel.hpp:67
su2double dmudt_rho_
DmuDT_rho.
Definition CViscosityModel.hpp:69
su2double dmudrho_t_
DmuDrho_T.
Definition CViscosityModel.hpp:68
passivedouble su2double
Definition code_config.hpp:181
FORCEINLINE ARRAY_T sqrt(const ARRAY_T &x)
Definition special_vectorization.hpp:116