NB. Evaluate charge exchange rates beta & beta' at temp. T NB. assumes the existence of global tables cebbb & cebpp Charge_Ex=: dyad define 'ni n'=. x NB. number of elements and ions t=. 1e_4* y BCE=. BPCE=. (ni,n)$0 bb=. 2}."1 cebbb bat=. (|: bb) betaf t NB. Charge transfer rates at "t" box_index=. <"(1) 2{."1 cebbb NB. i,j indicies of ions, boxed BCE=. bat box_index} BCE NB. insert into ion matrix bp=. 2}."1 cebpp bpat=. (|: bp) bplusf t box_index=. <"(1) 2{."1 cebpp NB. i,j indicies of ions, boxed BPCE=. bpat box_index} BPCE NB. insert into ion matrix BCE;BPCE ) NB. These evaluate the fitting functions beta = a*t^b*(1 + c ^d*t), etc. betaf=: dyad : '(0{x)*(y^(1{x))*(1+(2{x)*^((3{x)*y))' bplusf=: dyad : '(0{x)*(y^(1{x))*(1+(2{x)*^((3{x)*y))*(^-(4{x)%y)'