Recent Releases of Stokesian Dynamics in Python
Stokesian Dynamics in Python - v3.1.0: Speed increases and small bugfixes
This update of the code primarily brings big speed increases, with more use of Numba and better matrix generation algorithms. It also fixes some qualitatively small bugs in the periodic Minfinity matrix generation code.
Speed increases:
- Significantly faster contraction of 4- and 3-dimensional matrices to 2-dimensional matrices by using a better algorithm.
- More use of Numba. This occasionally has downsides which will make the code slightly slower in non-Numba mode. For example: (i) Numba prefers Numpy arrays to Python lists and dislikes list comprehension; (ii) Numba doesn't support Numpy slices, which makes the code slightly more clunky in places; (iii) Numba doesn't support the axis keyword in np.linalg.norm. But for anything but the smallest simulations, users should enable Numba, so overall this version will provide big speed-ups.
- Default Numba behaviour is to now to cache functions.
Bugfixes:
- Removed the assumption in the definition of periodic Minfinity that, for example,
Minfinity[Bt_coords_21] = -Minfinity[Bt_coords], without first checking that the particles are of equal sizes. - Made consistent the order of
a1anda2in the definitions of the dumbbell section of periodic and non-periodic Minfinity,M24andM34. - Fixed an error in the dumbbell section of periodic Minfinity,
M14, where error functions for-rwere used instead of error functions forr. - Fixed a sign error in the definition of the Fourier transformed wavespace Oseen tensor,
Jtilde, ingenerate_Minfinity_periodic. - Fixed a mismatched bracket in the definition of
m_k0ingenerate_Minfinity_periodic.
Misc:
- Made the direction of displacement between pairs of particles consistent between the periodic and non-periodic versions of Minfinity.
Scientific Software - Peer-reviewed
- Python
Published by Pecnut over 1 year ago
Stokesian Dynamics in Python - v3.0.2: Reviewed version for JOSS
This update consists of:
- Minor subediting changes to the associated journal paper in the Journal of Open Source Software.
- Minor code tidying under the hood, primarily the removal of arguments which are not used by functions in the plotting code.
Scientific Software - Peer-reviewed
- Python
Published by Pecnut almost 2 years ago
Stokesian Dynamics in Python - v3.0.0: Improved file structure and fuller documentation
This is a significant update of the code which primarily:
- Rationalises the core file structure
- Adds full documentation of the settings you can change
- Adds fuller descriptions of test cases you can run, with graphical examples and better defaults for visualisation
Minor changes include:
- Small tweaks so that the code works properly on Windows systems as well as Linux/Mac
The core file structure has been refactored to fit Python's Hitchhiker's Guide, which should improve legibility. The code base for finding the resistance scalars, which runs independently of the Stokesian Dynamics software, is separated at a higher level to aid users who are only interested in one of these two features of this project. The contents of any moved files are mostly unchanged. All READMEs have been updated with changes to file locations. As most of the file restructuring is under the hood, users upgrading should not feel any significant change to the way they interact with the software.
These changes should serve only to improve the code base, and should not change any results.
Thank you to @rajeshrinet and @szwiep for their reviews of the code base for the Journal of Open Source Software.
Full changelog: https://github.com/Pecnut/stokesian-dynamics/compare/v2.1.0...v3.0.0
Scientific Software - Peer-reviewed
- Python
Published by Pecnut almost 2 years ago
Stokesian Dynamics in Python - v2.1.0: Clearer polydisperse scaling and full docstrings
This is a significant update of the code which primarily: - Adds docstrings to nearly all functions - Rationalises how the resistance matrix is formed for polydisperse suspensions. Nondimensionalisation of resistance and mobility scalars is now all done using the convention in Kim & Karrila which should make validation of the code and its results easier. - Adds tests
Minor update: - The resistance scalars are now calculated from Lamb's solution using a tighter tolerance of 1e-8 rather than 1e-6. This fixes a slightly odd problem where known symmetry results between resistance and mobility scalars are not validated.
These changes should serve only to improve and validate the code base, and should not significantly change any results.
Scientific Software - Peer-reviewed
- Python
Published by Pecnut over 2 years ago
Stokesian Dynamics in Python - v2.0.0: Python 3 and Numba
Significant changes:
- This updated version of the software now runs in Python 3 rather than Python 2.
- It also now uses Numba rather than Cython for speed. This significantly reduces the number of steps to get the software working, and improves the readability of the code, while maintaining speed benefits. The use of Numba can be enabled or disabled easily with a simple flag, increasing flexibility for beginners working on small problems.
Additional changes:
- A new timestepping option: two-step Adams–Bashforth
- An input flag for RK4 timestepping that allows the choice of whether to regenerate M∞ at each of the four stages or only for the first one
- Worked, verifiable examples in the
examplesfolder - Tidier code in general and a few variables renamed for clarity
Scientific Software - Peer-reviewed
- Python
Published by Pecnut over 2 years ago