c******************************************************************************* c ... evaluate the stoichiometric coefficients matrix subroutine getstoichcoefs(nspecies,data_out) IMPLICIT NONE include 'parameter.par' include 'chem.com' include 'chem_ref.com' integer nspecies integer j,k integer ksp,ir,ip3 double precision one,ctot,xik real*8 data_out(nspecies,numreac) !Return the stoichiometric coefficients c--------------------------------------------------------------------------- c Assign values to data_out do k=1,numreac do ksp=1,nspecies data_out(ksp,k) = 0.d0 end do end do c------------------------------------------------------------------------------- c ... evaluate combined coefficients for reactants and products open(unit=888,file='STOIMAT') write(888,*)'Stoi Matrix, signature: ',nspecies,numreac do k=1,numreac do ir = 1, nreac(k) ksp = nunk(ir,k) data_out(ksp,k) = anu(ir,k) ! reactants end do do ip3 = 4, nprod(k)+3 ksp = nunk(ip3,k) data_out(ksp,k) = data_out(ksp,k) + anu(ip3,k) ! products end do end do write(888,*)((data_out(k,j),k=1,nspecies),j=1,numreac) close(888) c------------------------------------------------------------------------------- return end c*******************************************************************************