forked from CPRA-MP/ICM_Hydro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chemical.f
30 lines (23 loc) · 1.13 KB
/
chemical.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cc**********************Start Subroutine for Change in Cell Chemistry*******JAM Oct 2010********
Subroutine chemical(mm,iab,jnb,j,k,ichem) ! face values from node values **** Collect Advective diffusion terms
use params
if(iab /= 0) then
if(Q(iab,1) >= 0.0) then
Cchemface(ichem) = Chem(jus(abs(icc(j,k))),ichem,1)
! Cchemface(ichem)= ((fa(iab)*
! & Chem(jus(abs(icc(j,k))),ichem,1)
! & + fb(iab)*Chem(jds(abs(icc(j,k))),ichem,1)))
else
Cchemface(ichem) = Chem(jds(abs(icc(j,k))),ichem,1)
! Cchemface(ichem) =
! & ((fa(iab)*Chem(jds(abs(icc(j,k))),ichem,1)
! & + fb(iab)*Chem(jus(abs(icc(j,k))),ichem,1)))
endif
diffus = EAOL(iab)
QChemSUMflows(ichem)=QChemSUMflows(ichem) + sicc(j,k)*
& (Q(abs(icc(j,k)),1))*Cchemface(ichem)
& +fe*diffus*(Chem(j,ichem,1)-Chem(jnb,ichem,1)) !zw 4/28/2015 delete /2.
endif
return
end
c***********************End Subroutine for Chemical Conditions**********************************