The yaml input file
The magnet_name.yaml contains all information allowed to be changed for a simulation. In this section we will go through all parameters and explain how each one of them impact the generated COMSOL model.
sources
bh_curve_source: path to bh_curve_source to be used. This key is currently not used anywhere but read in runtime.
general_parameters
magnet_name: Name of magnet
T_initial: Initial temperature of simulation
power_supply
I_initial: Initial current to apply to model. Found in CircuitParams in the COMSOL model, there named I_0 (see circuit section)
quench_protection
The quench protection key contains variables related to quench heaters and cliq in SIGMA.
quench_heaters
N_strips: Number of quench heaters
t_trigger: Trigger time for each quench heater respectively.
U0: Initial voltage for each quench heater
C: Used to compute tau (exponential time constant decay) in SIGMA together with R_warm.
R_warm: Used to compute tau in SIGMA together with C.
w: Quench heater width
h: Quench heater height
s_ins: Insulation thickness quench heater to coil
type_ins: Not yet implemented
s_ins_He: Insulation thickness QH to bath
type_ins_He: Not yet implemented
l_copper: Used to compute fraction of quench heater station
l_stainless_steel: Used to compute fraction of quench heater station
l: Length quench heaters
f_cover: Used to compute fraction of quench heater station
cliq
These variables are found under CircuitParams
t_trigger: Cliq trigger time
sym_factor: sym_factor in COMSOL
U0: V_cliq_0 in COMSOL - Cliq initial voltage.
I0: I_cliq_0 in COMSOL - Cliq initial current.
C: C_cliq in COMSOL
R: R_cliq in COMSOL
L: L_cliq in COMSOL
options_sigma
Under options sigma are all parameters specifics for steam-pysigma
time_vector_solution
Contains only one key: time_step, which contains the total simulation time and number of time steps. For example [0.0, 0.001, 0.05], [0.05, 0.01, 0.25] means that we start at t=0 aand end at t=0.25s. From t=0 to t=0.05 we take time steps of size 0.001. From t=0.05 to t=0.25 we take time steps of size 0.01. This is only applicable for the transient solution type.
simulation
Here are the general simulation parameters related to sigma.
generate_study is a boolean, when set to true the COMSOL model creates a study, see figure below. study_type is a string which takes two valid values: Transient and Stationary. This specifies which kind of simulation for steam-pysigma to create. When set to Transient pysigma automatically also create related quench parameters that are described on this page too. Observe that for the Transient option pysigma does additional checks of the other input params so that a valid COMSOL model can be generated.
make_batch_mode_executable is a boolean, when set to true the user can run the solution to a COMSOL study in batch mode, which means that the study can be run from the terminal and that the resulting .mph model contains the solution as well. If this argument is set to false then the .mph model will not contain any simulation results as no simulation was executed. In this case to solve the model, one has to manually open the COMSOL model and run the study in the gui.
nbr_elements_mesh_width parameter to specify the meshing of a halfturn on the width
nbr_elements_mesh_height parameter to specify the meshing of a halfturn on the height
physics
FLAG variables in this section are further described in the SIGMA_documentation manual.
FLAG_M_pers: Activates persistent magnetization. Activated when set to 1.
FLAG_ifcc: Activates inter-filament coupling currents. Activated when set to 1.
FLAG_iscc_crossover: WHAT does this do?
FLAG_iscc_adjw: WHAT does this do?
FLAG_iscc_adjn: WHAT does this do?
tauCC_PE: Time constant of dampFactorCC_PE
quench_initialization
PARAM_time_quench: Time of quench initialization for FLAG_quench_all active.
FLAG_quench_all: The whole coil section is quenched at the timePARAM_time_quench . The quench is simulated by setting CFUN_quenchState to 1 in the whole domain
FLAG_quench_off: Quench deactivated by setting CFUN_quenchState to 0 in the whole domain
num_qh_div: Number of subdivisions within the quench heater
quench_init_heat: Initial heat to warm up a half turn (not in SIGMA_documentation).
quench_init_HT: List of half turns to initialize quench. (not in SIGMA_documentation)
quench_stop_temp: Temperature of half turn to stop initial heating. (not in SIGMA_documentation)
postprocessing
out_2D_at_points:
coordinate_source: Specifies whether the field exported should be evaluated in certain coordinates. Here specify path to coordunate file, otherwise type null.
variables: 2D variables to be exported. All variables must have the same name here as in COMSOL.
time: List of lists which indicate which time steps you want to evaluate your variables above. Note that this list must contain as many lists as the variable list.
map2d: If coordinate source is set to null, pysigma will look at this key if a map2d path is specified. It will then use the coordinates in the map2d to evaluate the field. If this key is set to null then COMSOL will use internal functions to evaluate the field.
out_1D_vs_times:
This section is about how we evaulate 1D params like Temperature and Current at specific points in time.
variables: 1D variables to be exported. All variables must have the same name here as in COMSOL.
time: List of lists which indicate which time steps you want to evaluate your variables above. Note that this list must contain as many lists as the variable list.
out_1D_vs_all_times:
This section is about how we evaulate 1D params like Temperature and Current at a range of time from time_vector_solution start to time_vector_solution end time.
variables: 1D variables to be exported. All variables must have the same name here as in COMSOL.
quench_heaters:
quench_heater_positions: List of SIGMA index to put quench heaters. This is found under Definitions\Selections in the COMSOL model
th_coils: Thickness of QH insulation to the coil. Observe that this list must have the same number of elements as number of quench heaters and no element can be negative or 0. This setting can be found in Global Definitions\Parameters for each quench heater.
circuit
R_circuit: R_crow in CircuitParams
L_circuit: Lcir in CircuitParams
R_parallel: Not used currently.