## GAC Filter Model Graphic User Interface

### Matrix Approximation

One part of the research that has been developed and improved is the approximations used for the partial in the form of the weights, first order derivative and Laplacian matrices and doing this in a way that can allow for further better approximations if necessary. Unlike up to this moment the program has been changed to select and input the desired number of axial and radial points. Through a MATLAB program the desired matrices are now calculated without having to input them from a particular paper. This has the following advantages: allowing for a much easier change from one set of parameters to another, allows for the user to easily upgrade to as high as an accuracy as needed without having to do any extra research to find the desired matrices and this change also allows for a greater accuracy in the matrices as these are calculated now to double precision within MATLAB rather than 5-6 digits accuracy when hardcoded. The only current drawback of using this technique is that the values of the Legendre Roots have to be specified for the spherical geometry with weighting function w = 1-x 2 but included in the code are the values of the first 7 roots of the Legendre polynomials and for simulating the carbon itself this number is more than enough for any practical purposes.

The code used was validated against the tables provided for both symmetrical and non-symmetrical results from “SPEEDUP TM ION EXCHANGE COLUMN MODEL” (1) which was the paper initially used to obtain the hardcoded matrices. Results were also compared against the examples provided in “The Method of Weighted Residuals and Variational Principles” (2) Chapter 5.1 page103 from which the procedure to generate the matrices was taken.

### Legendre Roots

The Legendre Roots for the axial points used in the scheme are now calculated using a MATLAB program that auto generates the n th degree Legendre Polynomial. The program uses the generation function described in “Computational Algorithm for Higher Order Legendre Polynomial and Gaussian Quadrature Method” (3) to generate the Legendre polynomials. The roots are then calculated for the symmetric planar geometry and through manipulation of the solutions the correct roots can be produced for symmetric planar geometry, symmetric spherical geometry and non-symmetric planar geometry(used for the axial points). All roots generated are for Legendre Polynomials with a unity weight function. The roots were against verified against “SPEEDUP TM ION EXCHANGE COLUMN MODEL” (1) for the first roots and then against “Multiple Root Finder for Legendre and Chebyshev polynomials via Newton’s Method” (4).

### Graphic User Interface

While these accomplishments improve the quality of the simulation most of them can remain hidden from the user of the code so during our time in this project the team also worked to improve on the basic interface to the GAC filter simulation using MATLAB’s built in GUIDE system (4). The new GUI will present the option to change the basic GAC filter properties and approximations without having to manually edit the .m file. The GUI also helps in easily identifying variables and values needed for them as it starts with a default test case already loaded. The new GUI also presents the results incorporated within the interface rather than as a separate graph appearing in a more complete way. The GUI also presents tabs for the selection of different input conditions than constant loading like intermittent loading, input according to a function or input read in from an Excel file. The GUI now also allows printing the results to a Excel file for further analysis.