plot_simulink_shapes.m
SYNTAX: plot_simulink_shapes
PURPOSE: Plot results of SIMULINK simulations which use the S-file
sim_Xpt2.c in an EFIT type contour plot.
INPUT:
algorithm = one of 'isosnull', 'isousnull', or 'isodnull'
filename = g0 file containing equilibrium around which plant
model was created
tstart = first time to plot simulated boundary (seconds), default 0.0
stepsize = steps for boundary plots (seconds), default 0.01s
plot_geometry = set to 1 to plot D3d geometry around equil. (default 0)
axis_to_show = plot range to show = argument to axis function
(optional, default = [1 2.3 -1.4 1.4]
figure_num
(generated by simulink simulation and its setup process):
time_sim0 = output of simulink model
nsegments
Xpt_sim
tgt_sim
simXpt2_flux_sim
OUTPUT:
plot - Steps through multiple time slices:
- shows yellow x on control segments where flux = Xpt flux
- connects yellow line between these x's and to Xpt.
- shows yellow * for location of magnetic axis (location is
updated for z coordinate, r coordinate is assumed fixed)
- shows target points with red +
- original equilibrium shown in white (with mag axis = x)
figure_num
RESTRICTIONS:
(1) requires g0* file exist
METHOD: The flux on each control segment at time t is approximated
by adding the flux on the segment at equilibrium to the change in flux
of the chosen control point (on that segment) from equilibrium.
Then the point on the segment whose flux is closest to the Xpt flux value
at time t is used to define the boundary location at time t.
Dependencies