NB. From list of n-1 Theta's and -(dalpha/dt)/alpha's, NB. get n ion fractions & their T and Ne derivatives NB. note: d(Theta)/dt = Theta * (-(dalpha/dt)/alpha) NB. (lhs x. is the total abundance A_i*N_H) NB. (Assumes Ne is a global variable) Ifrac=: dyad define 'Theta DalphDt'=. y Denom=. +/Lambda=. */\ 1, Theta frac=. x * Lambda % Denom n=. #Qt=. 0,+/\ DalphDt Qz=. |: Qp=. (n,n)\$Qt dfdt=. Denom %~ +/Lambda *(Qp - Qz) Qz=. |: Qp=. (n,n)\$ >: i. n dfdn=. (Ne*Denom) %~ +/Lambda *(Qz - Qp) frac; (frac*dfdt); (frac*dfdn) ) NB. From matrix of Theta's and -(dalpha/dt)/alpha's, NB. get all ion fractions & their T and Ne derivatives NB. note: d(Theta)/dt = Theta * (-(dalpha/dt)/alpha) NB. (lhs x are the total abundances A_i*N_H) NB. (Assumes Ne is a global variable) IFrac=: dyad define 'Theta DalphDt'=. y Denom=. +/"1 Lambda=. */\"1 (1,"1 Theta) frac=. x* Lambda% Denom 'ni n'=. \$Qt=. 0,"1 (+/\"1 DalphDt) Qz=. |:"2 Qp=. (ni,n)\$ n#Qt dfdt=. Denom %~ +/"_1 Lambda *(Qp - Qz) Qz=. |:"2 Qp=. (ni,n,n)\$ >: i. n dfdn=. (Ne*Denom) %~ +/"_1 Lambda *(Qz - Qp) frac; (frac*dfdt); (frac*dfdn) )