C++ code for the simulation.
Currently unused. Contains files that help to verify CUDA functions run and exit successfully.
- These files come from the NVIDIA cuda-samples repository
- Located in
Common
directory
C and C++ Files for importing and exporting data from simulation.
HOOMD GSD library for direct GSD I/O
Wrapper for gsd class that loads data relevant to simulation.
Calculates hydrodynamic tensors (mass matrices and gradients) and forces for spheres in potential flow.
We only look at the leading-order dipole-dipole interactions
Numerical integration of kinematic data over one time step using the public integrate()
method with a Runge-Kutta 4th order method.
Modify this class for alternate system configurations and constraints.
The private method accelerationUpdate()
updates the acceleration using the constrained Lagrangian mechanics framework developed by Udwadia and Kalaba in 1996 (paper, Wikipedia).
Systems invariant to rigid spatial translation and rotation can also use the private momentumLinAngFree()
method to calculate the rigid body motion portion of the motion. This assumes the articulation velocity and acceleration is known as well as the locater point. Before calling this method, call articulationVel()
, articulationAcc()
and rLoc()
to update the relevant member variables.
The Engine class assembles the simulation system and runs the time integration with the public run()
method.
The constructor also constructs the integrators and forces needed for the dynamics.
ProgressBar.hpp
modified version of prakhar1989/progress-cpp that displays simulation progress to terminal during execution.
The SystemData class contains all relevant data for the general simulation and can be accessed through relevant getter and setter functions. The constructor also constructs the GSD parser class and loads data into itself.
CMakeLists.txt
links all files and external libraries into an executable named bodies-in-potential-flow
.
main.cpp
main file of the project that constructs and runs the simulation.
Requires two command line inputs: (1) input GSD filepath and (2) output directory to write data, respectively.
The output directory must already exist, as the C++ code will not create it.