SWE
Main Class for Importing Simulation
To use this class, please first import the class with
SWE.simulation
Method to import simulation resulted by SimulWave.
Parameters
dir: string
directory of the simulation result file
chunked: boolean (optional)
`TRUE` if simulation result is chunked
Returns
void
NOTES: From here to below, make sure to import the simulation first like in the example above SWE.simulation. From here on we'll be using 'swe.**' with imported simulation.
SWE.get_eta
Method to get wave amplitude.
Parameters
void
Returns
res: number[][]
2D or 3D array (according to simulation type done) of wave amplitude
SWE.get_computational_domain
Method to get simulation computational domain.
Parameters
void
Returns
res: dictionary
dictionary of simulation computional domain
SWE.generate_animation
Parameters
y_lim: integer[]
an array of integer that defined the interval of y axis (ex: [-1, 10])
nt: integer
number of animation frame
Returns
res: matplotlib.animation.figure
a matplotlib animation figure
SWE.generate_animation_2d
Parameters
plane: 'xz' or 'yz'
generated animation axis plane
at: float
generated animation axis plane point
y_lim: integer[]
an array of integer that defined the interval of y axis (ex: [-1, 10])
nt: integer
number of animation frame
Returns
res: matplotlib.animation.figure
a matplotlib animation figure
SWE.plot_across_spatial
Parameters
t: float
time to plot wave simulation across the spatial domain
Returns
res: matplotlib.figure
a matplotlib figure
SWE.plot_across_spatial_2d
Parameters
plane: 'xz' or 'yz'
generated plot axis plane
at: float
generated plot axis plane point
t: float
time to plot wave simulation across the spatial domain
Returns
res: matplotlib.figure
a matplotlib figure
SWE.plot_across_time
Parameters
x: float
point at x-axis to plot wave simulation across the time domain
Returns
res: matplotlib.figure
a matplotlib figure
SWE.plot_across_time_2d
Parameters
x: float
point at x axis to plot wave simulation across the time domain
y: float
point at y axis to plot wave simulation across the time domain
Returns
res: matplotlib.figure
a matplotlib figure
Last updated