12 ngas,& !< number of gases
14 integer,
dimension(:),
allocatable :: &
16 real(dp),
dimension(:),
allocatable :: &
17 dz,& !< size of finite volume
22 public modelpu,ngas,nfv,dz,dif,sol,bc,mor
32 subroutine modelpu(neq, time, ystate, yprime)
34 integer,
intent(in) :: neq
35 real(dp),
intent(in) :: time
36 real(dp),
intent(in) :: ystate(neq)
37 real(dp),
intent(out) :: yprime(neq)
39 real(dp) :: fluxw,fluxe
43 fluxw=-2*dif(k)*sol(k)*(ystate(k)-bc(i))/dz(j)
44 fluxe=-2*dif(k)*dif(k+ngas)*sol(k)*sol(k+ngas)*&
45 (ystate(k+ngas)-ystate(k))/&
46 (dif(k+ngas)*dz(j)*sol(k)+dif(k)*dz(j+1)*sol(k+ngas))
47 yprime(k)=(fluxw-fluxe)/dz(j)
52 fluxw=-2*dif(k-ngas)*dif(k)*sol(k)*sol(k-ngas)*&
53 (ystate(k)-ystate(k-ngas))/&
54 (dif(k)*dz(j-1)*sol(k-ngas)+dif(k-ngas)*dz(j)*sol(k))
55 fluxe=-2*dif(k)*dif(k+ngas)*sol(k)*sol(k+ngas)*&
56 (ystate(k+ngas)-ystate(k))/&
57 (dif(k+ngas)*dz(j)*sol(k)+dif(k)*dz(j+1)*sol(k+ngas))
58 yprime(k)=(fluxw-fluxe)/dz(j)
64 fluxw=-2*dif(k-ngas)*dif(k)*sol(k)*sol(k-ngas)*&
65 (ystate(k)-ystate(k-ngas))/&
66 (dif(k)*dz(j-1)*sol(k-ngas)+dif(k-ngas)*dz(j)*sol(k))
68 yprime(k)=(fluxw-fluxe)/dz(j)
71 end subroutine modelpu
namespace with global variables