With respect to the master version of code_saturne there is a bug in file /src/cogz/cs_combustion_read_data.cpp, line 1067 which has the following loop:
// Stoichiometry in global reaction species
for (int ir= 0; ir < n_gas_species; ir++) {
for (int igg = 0; igg < n_gas_species; igg++) {
stoeg[ir][igg] = 0.;
for (int ige = 0; ige < ngase; ige++) {
stoeg[ir][igg] += cm->compog[igg][ige]*nreact[igg];
}
}
The "ir" counter should iterate through the number of reactions and not the number of gas species. This causes memory overwriting which, at least on my computer, caused the corruption of some other neighbouring data structure causing a crash. The correct code is the following:
// Stoichiometry in global reaction species
for (int ir= 0; ir < cm->n_reactions; ir++) {
for (int igg = 0; igg < n_gas_species; igg++) {
stoeg[ir][igg] = 0.;
for (int ige = 0; ige < ngase; ige++) {
stoeg[ir][igg] += cm->compog[igg][ige]*nreact[igg];
}
}
With respect to the master version of code_saturne there is a bug in file /src/cogz/cs_combustion_read_data.cpp, line 1067 which has the following loop:
The "ir" counter should iterate through the number of reactions and not the number of gas species. This causes memory overwriting which, at least on my computer, caused the corruption of some other neighbouring data structure causing a crash. The correct code is the following: