|
| 1 | +/*! |
| 2 | + * \file CConstantPrandtl.cpp |
| 3 | + * \brief Defines a non-constant laminar Prandtl number thermal conductivity model. |
| 4 | + * \author S. Vitale, M. Pini, G. Gori, A. Guardone, P. Colonna, T. Economon |
| 5 | + * \version 7.0.4 "Blackbird" |
| 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-2020, 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 "CConductivityModel.hpp" |
| 31 | + |
| 32 | +/*! |
| 33 | + * \class CConstantPrandtl |
| 34 | + * \brief Defines a non-constant laminar thermal conductivity using a constant Prandtl's number |
| 35 | + * \author S.Vitale, M.Pini |
| 36 | + */ |
| 37 | +class CConstantPrandtl final : public CConductivityModel { |
| 38 | + public: |
| 39 | + /*! |
| 40 | + * \brief Constructor of the class. |
| 41 | + */ |
| 42 | + CConstantPrandtl(su2double pr_lam) : pr_lam_(pr_lam) {} |
| 43 | + |
| 44 | + /*! |
| 45 | + * \brief return conductivity value. |
| 46 | + */ |
| 47 | + su2double GetConductivity() const override { return kt_; } |
| 48 | + |
| 49 | + /*! |
| 50 | + * \brief return conductivity partial derivative value. |
| 51 | + */ |
| 52 | + su2double Getdktdrho_T() const override { return dktdrho_t_; } |
| 53 | + |
| 54 | + /*! |
| 55 | + * \brief return conductivity partial derivative value. |
| 56 | + */ |
| 57 | + su2double GetdktdT_rho() const override { return dktdt_rho_; } |
| 58 | + |
| 59 | + /*! |
| 60 | + * \brief Set thermal conductivity. |
| 61 | + */ |
| 62 | + void SetConductivity(su2double t, su2double rho, su2double mu_lam, su2double mu_turb, su2double cp) override { |
| 63 | + kt_ = mu_lam * cp / pr_lam_; |
| 64 | + } |
| 65 | + |
| 66 | + /*! |
| 67 | + * \brief Set thermal conductivity derivatives. |
| 68 | + */ |
| 69 | + void SetDerConductivity(su2double t, su2double rho, su2double dmudrho_t, su2double dmudt_rho, su2double cp) override { |
| 70 | + dktdrho_t_ = dmudrho_t * cp / pr_lam_; |
| 71 | + dktdt_rho_ = dmudt_rho * cp / pr_lam_; |
| 72 | + } |
| 73 | + |
| 74 | + private: |
| 75 | + su2double kt_{0.0}; /*!< \brief Thermal conductivity. */ |
| 76 | + su2double dktdrho_t_{0.0}; /*!< \brief DktDrho_T. */ |
| 77 | + su2double dktdt_rho_{0.0}; /*!< \brief DktDT_rho. */ |
| 78 | + su2double pr_lam_{0.0}; /*!< \brief Laminar Prandtl number. */ |
| 79 | +}; |
0 commit comments