nickabattista / IB2d

An easy to use immersed boundary method in 2D, with full implementations in MATLAB and Python that contains over 75 built-in examples, including multiple options for fiber-structure models and advection-diffusion, Boussinesq approximations, and/or artificial forcing.
GNU General Public License v3.0
164 stars 90 forks source link

Frontend Script for pyIB2d #5

Closed dmsenter89 closed 7 years ago

dmsenter89 commented 7 years ago

In the current version of pyIB2d, each simulation needs to be accompanied by a main2d file which itself includes a path to the IBM_Blackbox folder. This leads to unnecessary code duplication. The pyIB2d.py file has been written to address this issue. It is in the folder that houses the IBM_Blackbox folder. The script allows the user to specify the location of the simulation and its input2d file and then starts the simulation with pyIB2d. The changes are backwards compatible with the previous method of having separate main2d files per simulation as no changes have been made to the IBM_Blackbox files. Using the os library, path resolution should be platform agnostic.

One downside of the backwards compatibility is that the simulation files will be generated in the same folder as this script, as opposed to being placed in the simulation folder itself.

This script adds no additional library requirements (all libraries used are shipped with Python or are already in use with pyIB2d).

The script is mostly a wrapping around the main2d file as written by Christopher Strickland.