Matlab-to-SPINS grid ordering: Difference between revisions
m (→Components) |
|||
Line 6: | Line 6: | ||
== Components == | == Components == | ||
* <code>driver.m</code> Input parameters and main driver file for <code>matlab2spins2d.m</code>. | * <code>driver_unidomain.m</code> Input parameters and main driver file for <code>matlab2spins2d.m</code>. | ||
* <code>driver_multidomain.m</code> Input parameters and main driver file for <code>matlab2spins2d.m</code> with different waves in multiple domains combined together. | |||
* <code>tg.m</code> Taylor-Goldstein equation solver for traveling/standing linear waves. | * <code>tg.m</code> Taylor-Goldstein equation solver for traveling/standing linear waves. | ||
* <code>get_eta.m</code> Main iteration loop of the DJL solver. | * <code>get_eta.m</code> Main iteration loop of the DJL solver. | ||
Line 14: | Line 15: | ||
* <code>find_contour.m</code> Find the contour of Ri=0.25 in the DJL solution. | * <code>find_contour.m</code> Find the contour of Ri=0.25 in the DJL solution. | ||
* <code>contour_data.m</code> Function called by <code>find_contour.m</code>. | * <code>contour_data.m</code> Function called by <code>find_contour.m</code>. | ||
* <code> | * <code>spins_interp.m</code> Interpolation of flow fields from DJL/TG solver onto SPINS grid. | ||
* <code>matlab2spins2d.m</code> Writing data to disk. | |||
* <code>resize_x.m</code> Spectral interpolation in x-direction. | * <code>resize_x.m</code> Spectral interpolation in x-direction. | ||
* <code>resize_z.m</code> Spectral interpolation in z-direction. | * <code>resize_z.m</code> Spectral interpolation in z-direction. |
Revision as of 13:11, 9 July 2018
Matlab to SPINS grid ordering, for a 2D domain with periodic (or free-slip) conditions in the x-direction and free-slip conditions in the z-direction and a flat bottom boundary.
It solves the DJL equation for solitary waves or the Taylor-Goldstein equation for traveling/standing linear waves, interpolates the u, w and rho fields onto a regular (non-Cheb) grid, and then saves the data as SPINS input files (for wave_reader_x
).
Getting the code
The code is hosted in a git repository on the UW git server. To extract the code from the git repository, go to (or create) the directory in which you want to run simulations using SPINS. In that directory, type git clone https://git.uwaterloo.ca/c2xu/matlab2spins.git
. This will create a directory called matlab2spins
where the code is stored.
Components
driver_unidomain.m
Input parameters and main driver file formatlab2spins2d.m
.driver_multidomain.m
Input parameters and main driver file formatlab2spins2d.m
with different waves in multiple domains combined together.tg.m
Taylor-Goldstein equation solver for traveling/standing linear waves.get_eta.m
Main iteration loop of the DJL solver.md_diff.m
Differentiation matrix for the DJL solver.iswpost.m
Post processing for the DJL solver.iswpic.m
Making plots for the DJL solver.find_contour.m
Find the contour of Ri=0.25 in the DJL solution.contour_data.m
Function called byfind_contour.m
.spins_interp.m
Interpolation of flow fields from DJL/TG solver onto SPINS grid.matlab2spins2d.m
Writing data to disk.resize_x.m
Spectral interpolation in x-direction.resize_z.m
Spectral interpolation in z-direction.