Documentation 6b54b78464
Loading...
Searching...
No Matches
CMutationTCLib.hpp
Go to the documentation of this file.
1/*!
2 * \file CMutationTCLib.hpp
3 * \brief Defines the class for the link to Mutation++ ThermoChemistry library.
4 * \author C. Garbacz
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 "CNEMOGas.hpp"
31
32#if defined(HAVE_MPP) && !defined(CODI_REVERSE_TYPE) && !defined(CODI_FORWARD_TYPE)
33#include "mutation++.h"
34
35/*!
36 * \derived class CMutationTCLib
37 * \brief Child class for Mutation++ nonequilibrium gas model.
38 * \author: C. Garbacz
39 */
40class CMutationTCLib : public CNEMOGas {
41
42private:
43
44 std::unique_ptr<Mutation::Mixture> mix; /*!< \brief Pointer to object Mixture from Mutation++ library. */
45
46 vector<su2double> Cv_ks, /*!< \brief Species specific heats at constant volume. */
47 es, /*!< \brief Species energies. */
48 omega_vec; /*!< \brief Dummy vector for vibrational energy source term. */
49
50 su2double Tref; /*!< \brief Reference temperature. */
51
52public:
53
54 /*!
55 * \brief Constructor of the class.
56 */
57 CMutationTCLib(const CConfig* config, unsigned short val_nDim);
58
59 /*!
60 * \brief Destructor of the class.
61 */
62 virtual ~CMutationTCLib(void);
63
64 /*!
65 * \brief Set mixture therodynamic state.
66 * \param[in] rhos - Species partial densities.
67 * \param[in] T - Translational/Rotational temperature.
68 * \param[in] Tve - Vibrational/Electronic temperature.
69 */
70 void SetTDStateRhosTTv(vector<su2double>& val_rhos, su2double val_temperature, su2double val_temperature_ve) final;
71
72 /*!
73 * \brief Get species T-R specific heats at constant volume.
74 */
75 vector<su2double>& GetSpeciesCvTraRot() final;
76
77 /*!
78 * \brief Compute species V-E specific heats at constant volume.
79 */
80 vector<su2double>& ComputeSpeciesCvVibEle(su2double val_T) final;
81
82 /*!
83 * \brief Compute mixture energies (total internal energy and vibrational energy).
84 */
85 vector<su2double>& ComputeMixtureEnergies() final;
86
87 /*!
88 * \brief Compute vector of species V-E energy.
89 */
90 vector<su2double>& ComputeSpeciesEve(su2double val_T, bool vibe_only = false) final;
91
92 /*!
93 * \brief Compute species net production rates.
94 */
95 vector<su2double>& ComputeNetProductionRates(bool implicit, const su2double *V, const su2double* eve,
96 const su2double* cvve, const su2double* dTdU, const su2double* dTvedU,
97 su2double **val_jacobian) final;
98
99 /*!
100 * \brief Compute vibrational energy source term.
101 */
102 su2double ComputeEveSourceTerm() final;
103
104 /*!
105 * \brief Compute species enthalpies.
106 */
107 vector<su2double>& ComputeSpeciesEnthalpy(su2double val_T, su2double val_Tve, su2double *val_eves) final;
108
109 /*!
110 * \brief Get species diffusion coefficients.
111 */
112 vector<su2double>& GetDiffusionCoeff() final;
113
114 /*!
115 * \brief Get viscosity.
116 */
117 su2double GetViscosity() final;
118
119
120 /*!
121 * \brief Get T-R and V-E thermal conductivities vector.
122 */
123 vector<su2double>& GetThermalConductivities() final;
124
125 /*!
126 * \brief Compute translational and vibrational temperatures vector.
127 */
128 vector<su2double>& ComputeTemperatures(vector<su2double>& val_rhos, su2double rhoE, su2double rhoEve, su2double rhoEvel, su2double Tve_old) final;
129
130 /*!
131 * \brief Get species molar mass.
132 */
133 vector<su2double>& GetSpeciesMolarMass() final;
134
135 /*!
136 * \brief Get reference temperature.
137 */
138 vector<su2double>& GetRefTemperature() final;
139
140 /*!
141 * \brief Get species formation enthalpy.
142 */
143 vector<su2double>& GetSpeciesFormationEnthalpy() final;
144
145};
146#endif
Defines the nonequilibrium gas model.
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
Class for defining the 2T (trans-rotational and vibro-electronic) nonequilibrium gas model.
Definition CNEMOGas.hpp:38
virtual void SetTDStateRhosTTv(vector< su2double > &val_rhos, su2double val_temperature, su2double val_temperature_ve)
Set mixture thermodynamic state.
Definition CNEMOGas.hpp:102
virtual const vector< su2double > & GetSpeciesCvTraRot()=0
Get species T-R specific heats at constant volume.
passivedouble su2double
Definition code_config.hpp:181
@ V
Menter k-w SST model with vorticity production terms.