Flux e-Machine Toolbox: Workflows
Generate a coupling component for Flux e-Machine Toolbox
Here are the steps to run a computation via Flux e-Machine Toolbox:
- Open the project in Flux starting from the Flux Supervisor
→ The description of the electrical machine is considered done in this project
 - Check the prerequisites in the Flux project for Flux e-Machine Toolbox coupling
 - Open the dialog box of the generation of Flux e-Machine Toolbox coupling
                        component 
Click on the Solving menu and click on Generate component for Flux e-Machine Toolbox coupling
 - Choose the name of the component
 - Choose to overwrite Yes or No the component if already existing (No by default)
 - Choose the save directory (the working directory by default)
 - Choose to run Yes or No the Flux e-Machine Toolbox application and open the generated component (Yes by default)
 - Choose the electrical machine to study (family, type and sub-type of the motor)
 - Choose the prerequisites for the computation of stator winding Joule
                            losses
- The number of phases
 - The coil conductor for each phase
 
 - Choose the prerequisites for the computation of rotor Eddy current losses
- Choose the support type (Sensor or Region or Solid conductor)
 - Choose the support
 
 - Choose the geometric parameter defining the number of poles of the machine
 - Enter the repetition number of the stator periodicity (if it is different from the rotor one)
 - Validate by clicking on OK
→ The coupling component XXX.FEMT has been created
→ Flux e-Machine Toolbox is launched and the coupling component is opened
 
Run a test in Flux e-Machine Toolbox
Here are the steps to run a test in Flux e-Machine Toolbox:
- Open Flux e-Machine Toolbox by clicking in the supervisor on: 

 - Open the coupling component by clicking on the icon: 
 and
                        choose the coupling component XXX.FEMT and validate→ The component is opened in Flux e-Machine Toolbox
 - Define different user parameters
 - Run the test
Click on

→ A progress bar indicates that the test is in progress

→ The Flux solving is run in batch mode
→ Once the Flux solving is done, a postprocessing script is run
→ Once the postprocessing script is completed, perfomance maps are loaded in the central area of Flux e-Machine Toolbox
 - Post-process the maps
→ It is possible to export the results of a test for a report (HTML and PDF format) or to postprocess data (TXT format)
 
Run a test through PBS (by manual Export / Import)
Here are the steps to run a test through PBS:
- Open Flux e-Machine Toolbox by clicking in the supervisor on: 

 - Open the coupling component by clicking on the icon: 
 and
                        choose the coupling component XXX.FEMT and validate→ The component is opened in Flux e-Machine Toolbox
 - Define different user parameters
 - Export to PBS
In FeMT, export all the required files for PBS by clicking on the button:

→This will generate an archive (.zip file)
The PBS Export window opens:

- Select the Destination Directory in which
                                    the archive will be created by clicking on the 
 button - Enter the Archive Name. The default name of the archive is <FeMT_coupling_component_name>_Test.zip
 - Click on the 
 button 
 - Select the Destination Directory in which
                                    the archive will be created by clicking on the 
 - Run the computation through PBS
In PBS:
- Enter the information required for the job:
- Job Name
 - Flux Version
 - Flux application
 - Input file
Drag and drop the archive: <FeMT_coupling_component_name>_Test.zip file (without unzipping it)
 - ...
 
 - Click on the Submit job button and the FeMT computation will be run on the cluster
 - Once the computation is finished, click on the
                                    Download button to download all the
                                        results
→This will create an archive (.zip file)
 
 - Enter the information required for the job:
 - Import from PBS
In FeMT, import the results from PBS by clicking on the button:

The PBS Import window opens:

- Select the Archive Path (i.e. the
                                        .zip result file created in PBS) by
                                    clicking on the 
 button - Enter a Test Name (the name of the test which will appear in FeMT)
 - Click on the 
 button 
 - Select the Archive Path (i.e. the
                                        .zip result file created in PBS) by
                                    clicking on the 
 - Post-process the results in FeMT as you are used to
 
Variant: Run a test from an electrical machine model obtained by FluxMotor
It is possible to do a Flux e-Machine Toolbox coupling from a motor described in FluxMotor and thus benefit from the pre-design done with FluxMotor and the modeling of the losses in Flux to obtain the performance maps in Flux e-Machine Toolbox:
- In FluxMotor, generate a python script corresponding to the studied motor
 - In Flux:
- Run this python script to create the Flux project
 - Save the project
 - Generate the Flux e-Machine Toolbox coupling component
 
 - In Flux e-Machine Toolbox, run the test