/* There are a total of 0 entries in the algebraic variable array. There are a total of 1 entries in each of the rate and state variable arrays. There are a total of 5 entries in the constant variable array. */ /* * CONSTANTS[4] is k in component rate_kinetics (per_sec). * CONSTANTS[0] is E in component rate_kinetics (J_per_mol). * CONSTANTS[1] is R in component rate_kinetics (J_per_mol_per_K). * CONSTANTS[2] is T in component rate_kinetics (kelvin). * CONSTANTS[3] is A in component rate_kinetics (per_sec). * VOI is time in component rate_kinetics (second). * STATES[0] is C in component rate_kinetics (conc). * RATES[0] is d/dt C in component rate_kinetics (conc). * There are a total of 0 condition variables. */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { CONSTANTS[0] = 1; CONSTANTS[1] = 8.3143; CONSTANTS[2] = 310; CONSTANTS[3] = 1; STATES[0] = 1; CONSTANTS[4] = CONSTANTS[3]*exp(- (CONSTANTS[0]/( CONSTANTS[1]*CONSTANTS[2]))); RATES[0] = 0.1001; } void computeResiduals(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { resid[0] = RATES[0] - - ( CONSTANTS[4]*STATES[0]); } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { } void computeEssentialVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { } void getStateInformation(double* SI) { SI[0] = 1.0; } void computeRoots(double VOI, double* CONSTANTS, double* RATES, double* OLDRATES, double* STATES, double* OLDSTATES, double* ALGEBRAIC, double* CONDVARS) { }