Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f93d4d3
Added chemistry jacobians function that computes jacobians for mass e…
Apr 9, 2025
d8ec042
Update subproject url from M++ to CHANL
aaronmlarsen Apr 10, 2025
426c9d2
Add CHANL M++ to subprojects
aaronmlarsen Apr 10, 2025
9d948d4
Switch M++ branch to implicit
aaronmlarsen Apr 10, 2025
550a044
Update SHA for implicit CHANL M++
aaronmlarsen Apr 10, 2025
e35fcac
References CHANL/implicit M++ branch, removes print statements
aaronmlarsen Apr 10, 2025
fb183e0
Added chemistry and vibrational energy jacobians for Mutation++ fluid…
raghava-davuluri May 7, 2025
3221fa8
Refactored the chemistry and vibrational energy source term jacobians…
raghava-davuluri Jun 6, 2025
0df59d6
Update Mpp commit
aaronmlarsen Jun 11, 2025
b4b45e5
Removed Mutationpp submodule
aaronmlarsen Jun 11, 2025
923c35a
Update Mutationpp repo for Implicit
aaronmlarsen Jun 11, 2025
f8f53a2
Update .gitmodules M++ branch
aaronmlarsen Jun 11, 2025
c910bd7
Update .gitmodules
aaronmlarsen Jun 11, 2025
637c479
Update M++ SHA version
aaronmlarsen Jun 11, 2025
7ac7fde
Added case label for viscous Jacobians to enable execution with 11-sp…
raghava-davuluri Jun 26, 2025
755c503
Modified a line in CConfig.cpp to assign argon.xml from Mutation++ mi…
raghava-davuluri Jul 30, 2025
2d0a05a
Found a bug and resolved it.
raghava-davuluri Aug 14, 2025
d094f17
Removed my comment in CConfig.cpp
raghava-davuluri Aug 19, 2025
f3dd125
pre-commit: fix trailing whitespace / EOF newline
raghava-davuluri Aug 19, 2025
1a05839
Resolve PR conflict: restore .gitmodules from base branch
raghava-davuluri Aug 19, 2025
f9beb7d
Small fix
raghava-davuluri Aug 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
url = https://github.com/mesonbuild/meson
[submodule "subprojects/Mutationpp"]
path = subprojects/Mutationpp
url = https://github.com/mutationpp/Mutationpp.git
url = https://github.com/hypersonic-lab/Mutationpp.git
[submodule "subprojects/CoolProp"]
path = subprojects/CoolProp
url = https://github.com/CoolProp/CoolProp.git
Expand All @@ -27,3 +27,6 @@
[submodule "subprojects/MLPCpp"]
path = subprojects/MLPCpp
url = https://github.com/EvertBunschoten/MLPCpp.git
[submodule "externals/FADO"]
path = externals/FADO
url = https://github.com/pcarruscag/FADO.git
6 changes: 2 additions & 4 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4024,7 +4024,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
if (Kind_FluidModel == MUTATIONPP && (Kind_TransCoeffModel == TRANSCOEFFMODEL::GUPTAYOS)) {
cout << "Gupta-Yos viscosity model chosen for M++, which is not a thermal conductivity model. Chapman-Enskog default model will be used for Thermal Conductivity." << endl;
}

if (Kind_Species_Model == SPECIES_MODEL::FLAMELET) {

if (Kind_FluidModel != FLUID_FLAMELET) {
Expand Down Expand Up @@ -5474,7 +5474,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
/*--- Specifying a deforming surface requires a mesh deformation solver. ---*/
if (GetSurface_Movement(DEFORMING)) Deform_Mesh = true;

monoatomic = GetGasModel() == "ARGON";
monoatomic = StringToUpperCase(GetGasModel()) == "ARGON";

/*--- Set number of Turbulence Variables. ---*/
switch (TurbModelFamily(Kind_Turb_Model)) {
Expand Down Expand Up @@ -7097,8 +7097,6 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
break;
case EULER_IMPLICIT:
cout << "Euler implicit method for the flow equations." << endl;
if (Kind_FluidModel == MUTATIONPP)
SU2_MPI::Error("Implicit time scheme is not yet implemented with Mutation++. Use EULER_EXPLICIT.", CURRENT_FUNCTION);
switch (Kind_Linear_Solver) {
case BCGSTAB:
case FGMRES:
Expand Down
19 changes: 18 additions & 1 deletion SU2_CFD/include/fluid/CMutationTCLib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ class CMutationTCLib : public CNEMOGas {

vector<su2double> Cv_ks, /*!< \brief Species specific heats at constant volume. */
es, /*!< \brief Species energies. */
omega_vec; /*!< \brief Dummy vector for vibrational energy source term. */
omega_vec, /*!< \brief Dummy vector for vibrational energy source term. */
JacRho, /*!< \brief Dummy vector for partial density dependent chemistry jacobians. */
JacT, /*!< \brief Dummy vector for translational temperature dependent chemistry jacobians. */
JacTv, /*!< \brief Dummy vector for vibrational temperature dependent chemistry jacobians. */
omegaJRho, /*!< \brief Dummy vector for partial density dependent vibrational source term jacobians. */
omegaJTTv; /*!< \brief Dummy vector for temperature (both tr and ve) dependent vibrational source term jacobians. */

su2double Tref; /*!< \brief Reference temperature. */

Expand Down Expand Up @@ -100,11 +105,23 @@ class CMutationTCLib : public CNEMOGas {
const su2double* cvve, const su2double* dTdU, const su2double* dTvedU,
su2double **val_jacobian) final;

/*!
* \brief Compute chemical source term jacobian elements.
*/
void ChemistryJacobian(unsigned short iReaction, const su2double *V, const su2double* eve, const su2double* cvve,
const su2double* dTdU, const su2double* dTvedU, su2double **val_jacobian) final;

/*!
* \brief Compute vibrational energy source term.
*/
su2double ComputeEveSourceTerm() final;

/*!
* \brief Compute vibrational energy source term jacobian elements.
*/
void GetEveSourceTermJacobian(const su2double *V, const su2double *eve, const su2double *cvve,
const su2double *dTdU, const su2double* dTvedU, su2double **val_jacobian) final;

/*!
* \brief Compute species enthalpies.
*/
Expand Down
55 changes: 53 additions & 2 deletions SU2_CFD/src/fluid/CMutationTCLib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ CMutationTCLib::CMutationTCLib(const CConfig* config, unsigned short val_nDim):
es.resize(nEnergyEq*nSpecies,0.0);
omega_vec.resize(1,0.0);
CatRecombTable.resize(nSpecies,2) = 0;

JacRho.resize(nSpecies*nSpecies,0.0);
JacT.resize(nSpecies,0.0);
JacTv.resize(nSpecies,0.0);
omegaJRho.resize(nSpecies,0.0);
omegaJTTv.resize(nEnergyEq,0.0);

/*--- Set up inputs to define type of mixture in the Mutation++ library ---*/

Expand Down Expand Up @@ -157,7 +161,7 @@ vector<su2double>& CMutationTCLib::GetSpeciesCvTraRot(){
mix->getCvsMass(Cv_ks.data());

for(iSpecies = 0; iSpecies < nSpecies; iSpecies++) Cvtrs[iSpecies] = Cv_ks[iSpecies];

return Cvtrs;
}

Expand Down Expand Up @@ -197,9 +201,35 @@ vector<su2double>& CMutationTCLib::ComputeNetProductionRates(bool implicit, cons

mix->netProductionRates(ws.data());

if(implicit) ChemistryJacobian(0, V, eve, cvve, dTdU, dTvedU, val_jacobian);

return ws;
}

void CMutationTCLib::ChemistryJacobian(unsigned short iReaction, const su2double *V, const su2double* eve, const su2double *cvve,
const su2double* dTdU, const su2double* dTvedU, su2double **val_jacobian){

unsigned short iVar, jVar, iSpecies;
unsigned short nEve = nSpecies+nDim+1;
unsigned short nVar = nSpecies+nDim+2;

mix->jacobianRho(JacRho.data());
mix->jacobianT(JacT.data());
mix->jacobianTv(JacTv.data());

for(iSpecies = 0; iSpecies < nSpecies; iSpecies++)
for(jSpecies = 0; jSpecies < nSpecies; jSpecies++)
Comment thread
raghava-davuluri marked this conversation as resolved.
val_jacobian[iSpecies][jSpecies] = JacRho[iSpecies*nSpecies+jSpecies];

for(iSpecies = 0; iSpecies < nSpecies; iSpecies++){
for(iVar = 0; iVar < nVar; iVar++){
val_jacobian[iSpecies][iVar] += JacT[iSpecies]*dTdU[iVar];
val_jacobian[iSpecies][iVar] += JacTv[iSpecies]*dTvedU[iVar];
}
}

}

su2double CMutationTCLib::ComputeEveSourceTerm(){

mix->energyTransferSource(omega_vec.data());
Expand All @@ -209,6 +239,26 @@ su2double CMutationTCLib::ComputeEveSourceTerm(){
return omega;
}

void CMutationTCLib::GetEveSourceTermJacobian(const su2double *V, const su2double *eve, const su2double *cvve, const su2double *dTdU,
const su2double* dTvedU, su2double **val_jacobian){

unsigned short iVar, jVar, iSpecies;
unsigned short nEve = nSpecies+nDim+1;
unsigned short nVar = nSpecies+nDim+2;

mix->energyTransferJacobiansRho(omegaJRho.data());
mix->energyTransferJacobiansTTv(omegaJTTv.data());

for(iSpecies = 0; iSpecies < nSpecies; iSpecies++)
val_jacobian[nEve][iSpecies] = omegaJRho[iSpecies];

for(iVar = 0; iVar < nVar; iVar++){
val_jacobian[nEve][iVar] += omegaJTTv[0]*dTdU[iVar];
val_jacobian[nEve][iVar] += omegaJTTv[1]*dTvedU[iVar];
}

}

vector<su2double>& CMutationTCLib::ComputeSpeciesEnthalpy(su2double val_T, su2double val_Tve, su2double *val_eves){

mix->getEnthalpiesMass(hs.data());
Expand All @@ -221,6 +271,7 @@ vector<su2double>& CMutationTCLib::GetDiffusionCoeff(){
mix->averageDiffusionCoeffs(DiffusionCoeff.data());

return DiffusionCoeff;

}

su2double CMutationTCLib::GetViscosity(){
Expand Down
3 changes: 3 additions & 0 deletions SU2_CFD/src/numerics/NEMO/CNEMONumerics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ void CNEMONumerics::GetViscousProjJacs(const su2double *val_Mean_PrimVar,
case 12:
return COMPUTE_VISCOUS_JACS(12, 7);

case 15:
return COMPUTE_VISCOUS_JACS(15,11);

default:
return COMPUTE_VISCOUS_JACS(DynamicSize,DynamicSize);

Expand Down
4 changes: 2 additions & 2 deletions meson_scripts/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def init_submodules(
github_repo_meson = "https://github.com/mesonbuild/meson"
sha_version_ninja = "52649de2c56b63f42bc59513d51286531c595b44"
github_repo_ninja = "https://github.com/ninja-build/ninja"
sha_version_mpp = "5ff579f43781cae07411e5ab46291c9971536be6"
github_repo_mpp = "https://github.com/mutationpp/Mutationpp"
sha_version_mpp = "c3c0c51cab2fc42f6c24e7d2d37135a131fd5a16"
github_repo_mpp = "https://github.com/hypersonic-lab/Mutationpp"
sha_version_coolprop = "bafdea1f39ee873a6bb9833e3a21fe41f90b85e8"
github_repo_coolprop = "https://github.com/CoolProp/CoolProp"
sha_version_mel = "46205ab019e5224559091375a6d71aabae6bc5b9"
Expand Down
2 changes: 1 addition & 1 deletion subprojects/Mutationpp
Submodule Mutationpp updated 537 files