In the other hand, I've tried to perform complexer gas combustion simulations by using the reference file "dp_C4P" file, which contains:
7 Nb especes courantes
8 Nb de points de tabulation ENTH-TEMP
300. TMIN
3000. TMAX
Especes Gazeuses
CH4 C2H4 CO O2 CO2 H2O N2
.35 .35 .35 .35 .35 .35 .35 coeff absorption (ray)
4 Nb especes elementaires / Composition CHON
.012 1 2 1 0 1 0 0
.001 4 4 0 0 0 2 0
.016 0 0 1 2 2 1 0
.014 0 0 0 0 0 0 2
4 Nb d'especes globales (ici : / Fuel / Oxydant / Produits1 / Produits2)/ composition en especes elementaires
1. 0. 0. 0. 0. 0. 0. CH4
0. 0. 0. 1. 0. 0. 3.76 Air
0. 0. 1. 0. 0. 2. 1.88 CH4+.5*Air=CO +2H2O+qspN2
0. 0. 0. 0. 1. 2. 7.52 CH4+ 2*Air=CO2+2H2O+qspN2
2 Nb de reactions mises en jeu pour les especes globales/stoechiometrie en nb de mole especes globales
1 2 -1. -2.38 4.88 0.
3 2 0. -7.14 -4.88 10.52
...as far as I've learn from the previous "dp_C3P" thermochemistry file, this file indicates two different reactions for one fuel gas depending on its stoichiometry relations:
CH4+.5*Air=CO +2H2O+qspN2
CH4+ 2*Air=CO2+2H2O+qspN2
Although I don't really understand the two sequential numbers (1 2 and 3 2) at the beginning of the last two lines and which defines the reactions but anyway the point is when I launch the simulation the following error is given:
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ @@ ATTENTION : ARRET A L'ENTREE DES DONNEES (COLECD)
@ =========
@ PHYSIQUE PARTICULIERE (COMBUSTION GAZ)
@
@ Le nombre d'especes globales doit etre 3
@ Il vaut 4 dans le fichier parametrique
@
@ Le calcul ne sera pas execute.
@
@ Verifier le fichier parametrique.
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
...in fact, there are 4 global species (1 fuel, 1 oxidant and 2 products).
According to the documentation, this value is related with variables ngazg (read from the thermochemistry file, value 4 for the simulation) and ngazm (maximum of global species, value 3 as seen in the error log) which comparison seems to lead to the aforementioned error.
I have been looking for a way to modify this maximum, but I haven't found any, either in the XML or via user functions, and the only place seems to be the "colecd.f90" file, where it can be seen:
ncgm = 3
if ( ngazg.ne.ncgm ) then
write(nfecra,9995) ncgm,ngazg
call csexit (1)
!==========
endif
...being the 9995 error the previously shown one.
I have tried to modify the "colecd.f90" file as follows in line :
ncgm = 5
if ( ngazg.gt.ncgm ) then
write(nfecra,9995) ncgm,ngazg
call csexit (1)
!==========
endif
...as well as in:
! On ne considere qu'UNE SEULE REACTION GLOBALE
! NGAZG = NCGM = 3 par consequent (F, O, P)
ngazg = 5
...so that the maximum number of global species is not limited to 3 but to 5. This modification requires a re-compilation after headings clear (removing the ".lo" files ).
Now, when I launch the simulation, the following error is obtained:
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ @@ ATTENTION : ARRET A L'ENTREE DES DONNEES (COLECD)
@ =========
@ PHYSIQUE PARTICULIERE (COMBUSTION GAZ)
@
@ Le nombre de reactions globales doit etre 1
@ Il vaut 2 dans le fichier parametrique
@
@ Le calcul ne sera pas execute.
@
@ Verifier le fichier parametrique.
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
...in fact, there are 2 global reactions (1 per product).
Once again, I've looking in the documentation, and this error is related with variables nrgaz (read from the thermochemistry file, value 2 for the simulation) and nrgm (maximum of global reactions, value 1 as seen in the error log) which comparison seems to lead to the aforementioned new error.
I have been looking for a way to modify this maximum, but once again I haven't found any and again the only place seems to be the "colecd.f90" file, where it can be seen a limitation to 1 global reaction:
nrgm = 1
if ( nrgaz.ne.nrgm ) then
write(nfecra,9996) nrgm,nrgaz
call csexit (1)
!==========
endif
So, I have tried to modify the "colecd.f90" file as follows:
nrgm = 2
if ( nrgaz.gt.nrgm ) then
write(nfecra,9996) nrgm,nrgaz
call csexit (1)
!==========
endif
...as well as in:
! On ne considere qu'UNE SEULE REACTION GLOBALE
nrgaz = 2
...so that the maximum number of global reactions is not limited to 1 but to 2. This modification requires once again a re-compilation after headings clear (removing the ".lo" files ).
Now, when I launch the simulation, the following error is obtained:
SIGFPE signal (floating point exception) intercepted!
Call stack:
1: 0x7f8501178de1 <colecd_+0x14d4> (libsaturne.so.0)
2: 0x7f8500fa145d <pplecd_+0x2a> (libsaturne.so.0)
3: 0x7f8500e8e0ea <fldvar_+0x829> (libsaturne.so.0)
4: 0x7f8500e9a3e7 <iniusi_+0x2c7> (libsaturne.so.0)
5: 0x7f8500e99b97 <initi1_+0x57> (libsaturne.so.0)
6: 0x7f8500da7ee9 <cs_run+0x2c9> (libsaturne.so.0)
7: 0x7f8500da7b12 <main+0x112> (libsaturne.so.0)
8: 0x7f85009a1f45 <__libc_start_main+0xf5> (libc.so.6)
9: 0x4006e9 <> (cs_solver)
End of stack
...so, my questions are:
- - Is there a way to allow using more global species which it does not involve a modification in the kernel (plus re-compiling)? (i.e.with a user_subroutine)
- Is the code able to manage more than 2 global combustion reactions?
- Am I making the correct and enough modifications in the "colecd.f90" subroutine?
Thanks in advance.