enable_control_program#
- SetupMaxwell.enable_control_program(control_program_path, control_program_args=' ', call_after_last_step=False)#
Enable control program option is solution setup.
Provide externally created executable files, or Python (*.py) scripts that are called after each time step, and allow you to control the source input, circuit elements, mechanical quantities, time step, and stopping criteria, based on the updated solutions.
- Parameters:
- control_program_path
strorpathlib.Path File path of control program.
- control_program_args
str,optional Arguments to pass to control program. Default value is
" ".- call_after_last_stepbool,
optional If
Truethe control program is called after the simulation is completed. Default value isFalse.
- control_program_path
- Returns:
- bool
Trueif successful,Falseif it fails.
Notes
By default a control program script will be called by the pre-installed Python interpreter:
<install_path>\Win64\commonfiles\CPython\37\winx64\Release\python\python.exe. However, the user can specify a custom Python interpreter to be used by setting following environment variable:EM_CTRL_PROG_PYTHON_PATH=<path_to\python.exe>References
>>> oModule.EditSetup