build_shape_simserver.m
USAGE: build_shape_simserver.m
PURPOSE: Validate Simulink simserver simulation and generate executable version.
INPUTS:
Set on the command line:
tokamak = string defining name of tokamak
extension = string defining input script to execute (defining the input
file input_bld_<tokamak>_sim_<extension>.m that will be executed.
All other variables are set in that script.)
Define in the input file:
mdl = Simulink model name eg.'d3d_sim'
shot = Shotnumber for equilibrium eg. 146970
read_shot_data =
equil_time = Equilibrium time in sec. eg. 2.4
tval = interval [tmin,tmax] in which to do validation of constructed simserver
efit_source = EFIT source eg. 'EFIT01'
mds_server =
noise_option = See help for setup_bld_d3d_sim
disturbance_option = See help for setup_bld_d3d_sim
ivalidate = See help for setup_bld_d3d_sim
ichannelmap = See help for setup_bld_d3d_sim
iconvergeq = See help for setup_bld_d3d_sim
iverbose = See help for setup_bld_d3d_sim
rtwcompile = set to 1 (default) to compile the executable simserver, else 0 (if the
RTW license is available)
master_cpu_cycle_time = PCS master cpu cycle time in us eg. 50
dt_simulink = Simulink cycle time in sec. 5.0e-6 avoids discontinuous derivatives; s
state_shot =
state_time =
init_sim_time =
patch_source = If 'shot' use the F-coil patch panel used in experiment, otherwise use this file.
Rp_ext = Plasma resistance (ohms). If set, overrides Rp value that will make predicted flux
induction agree with resistive flux consumption. Otherwise, do not define
default_init_filename = name of file that will contain designeq currents can be generated using
get_sim_initial_currents.m
objdir =
obj_file =
pcs_dir = Directory containing infra and INTEL_DIR directories
intel_dir =
ncpus =
master_cpu_num =
cpu_order =
cycle_times = (us)
calc_delay_times= (us)
cmd_delay_times = (us)
use_fpcom =
OUTPUTS:
all variables needed to set up the simserver plant model and, if rtwcompile=1, an
executable version of the simserver
RESTRICTIONS: Requires executing the PCS in closed loop with the plant simulation as
part of the build process.
Dependencies