This code simulates 2-dimensional fluid motion of very low Reynolds number.
## Getting Started
This repository is entirely comprised of MATLAB files, so you will need access to MATLAB either as installed on your local computer or through access to a remote instance of MATLAB (say, through a cluster you may have access to).
For some example videos that these files constructed, see some gifs on the main page of the [website][0] we made.
For in-depth tutorials on how and when to use each file, see [here][3], also on the website.
Below are some descriptions of the four video-writing files in the repository.
## Description
The main functionality of these files is to write videos of simulations using MATLAB's native [VideoWriter object][1].
There are four distinct scripts, each of which writes videos using MATLAB's native VideoWriter object. These scripts are dependent on two function files, quadr.m and StoDLP_closeglobal.m.
## Video-writing scripts and when to use each
### InterpVideoWriter.m (for use on personal computers)
**Location of best use:** Personal computer with MATLAB installed. Works just as well on a cluster, but ParallelInterpVideoWriter.m is a parallelization of this file (so just use that if working on a cluster).
**Limitations:** This file **cannot** run simulations where the flow velocity is dependent on time (for those simulations, use StokesVideoWriter.m or ParallelStokesVideoWriter.m).
**Simulations of best use:** This file runs simulations MUCH faster than StokesVideoWriter.m or ParallelStokesVideoWriter.m. Any simulation that can be done on InterpVideoWriter.m should be done on InterpVideoWriter.m.
### ParallelInterpVideoWriter.m (for use on a cluster)
This file is a parallelization of InterpVideoWriter.m, designed to run on any cluster. Note that MATLAB's [VideoWriter object][1] cannot write .mp4 files through Linux. See [the documentation][1] for supported file types.
See documentation on MATLAB [parpool][2] for details on parallelization.
**Location of best use:** Any cluster.
**Limitations:** See InterpVideoWriter.m
**Simulations of best use:** See InterpVideoWriter.m
### StokesVideoWriter.m (for use on personal computers)
**Location of best use:** Personal computer with MATLAB installed.
**Limitations:** This file runs simulations MUCH slower than InterpVideoWriter.m. Any simulation that can be run on InterpVideoWriter.m should be run on InterpVideoWriter.m
**Simulations of best use:** This file allows for simulations with flow velocity varying over time. For short (~200 time steps, see usage tutorial) simulations of that nature, this file is best for use on your laptop or desktop.
### ParallelStokesVideoWriter.m (for use on a cluster)
This file is a parallelization of StokesVideoWriter.m, designed to run on any cluster. Note that MATLAB's [VideoWriter object][1] cannot write .mp4 files through Linux. See [the documentation][1] for supported file types.
See documentation on MATLAB [parpool][2] for details on parallelization.
**Location of best use:** Any cluster.
**Limitations:** See StokesVideoWriter.m
**Simulations of best use:** Usage on a cluster makes running longer simulations more convenient. Use this file for any simulation you can't run on ParallelInterpVideoWriter.m.