Integration with ASCFD - Week 5
April 7, 2025
This week I committed the work I have to my organization’s GitHub repository meaning that I have to set up my PIC code for a virtual environment to ensure that it runs as expected. This mainly continues with what I had previously set up and I have tested the PIC code to ensure that it can function tangentially and can be properly called and run with the correct initial conditions and parameters. The main update that I had to make to the PIC code was to a lot of the visualization methods so that it can take elements of some of the other code in ASCFD.
The first change was to the “fig” and “plt.subplots” which creates the plotting canvas and axes. This takes a “figsize” parameter and in the case that we were testing it with, we set it to figsize = (8,8). The next change was to the “ax.set_xlim” and “ax.setylim” which is pretty self explanatory as it just sets the x and y limits of the grid. Next, I had to change the “shape_path” section that creates the visualization of the shape. Previously I was relying on some libraries to do this for me, but the resources to create and display the visualizations are available in the ASCFD repository. Then I updated the function “animate(frame)”. This function is what creates the stitched up frames to create the “movie”.
While these were all relatively simple updates since a lot of the frame work was already within the ASCFD repository, what created a lot of issues were the particles themselves. I had a lot of issues with them not correctly being updated which was strange since I did not alter any of the functions that dealt with particle updates. As it turns out, when I was saving the position of the particle for it to be displayed in the visualization, it would save and then get the next update without checking for an interaction with the shape creating a loop in which particles would skip over the point detection.

Leave a Reply
You must be logged in to post a comment.