Once the new electrical machine geometry is defined, one must define the simulation project, which is created by copying/pasting the reference project file default_project.m and renaming it for instance as tuto_test_SPMSM_01.m. You can also use the GUI to create a new simulation.

The simulation input parameters are organized in different chapters. To navigate through the different chapters of the simulation project, one can use the Matlab Editor function "Go To". Some of the input parameters might deal with topologies that are different from the one you want to simulate, these parameters should then be simply ignored. In the GUI, they will simply be hidden.

### Operational parameters

Operational parameters include name of the machine, the speed / current / voltage operating point and the control strategy.
The name file of the electrical machine to be simulated is here given by :

`Input.Simu.machine_name = 'machine_test_SPMSM_A'`

### Multi-simulation parameters

Multi simulation is used to run sensitivity studies, optimizations or speed by speed calculations in variable speed mode.
All parameters can be ignored for a single speed simulation. However, the speed range (e.g. 1500 to 7500 rpm) should be specified as it used for theoretical calculations and synthesized spectrogram calculation:

`Input.Simu.N0_min=1500; `

Input.Simu.N0_max=7500;

### Electrical model

The electrical model parameters define how to calculate the currents and the equivalent circuit parameters. In the open-circuit case it is not used and all parameters can be left as default.

### Electromagnetic model

The electromagnetic model parameters define how to calculate the airgap flux distribution (e.g. with FEMM, with subdomain models, etc) and how to account for non-linearities.

For this first simulation, the electromagnetic that is chosen is the semi-analytical models (subdomain models giving radial and tangential airgap flux density components) with :

`Input.Simu.type_Bmodel = 1;`

This fast model is advised for a first run of MANATEE, to quickly check that everything works fine.

One should also desactivate the calculation of the back emf used in electrical equivalent circuit (useful for the loaded case where voltage is speficied):

`Input.Simu.type_comp_PhiPM = 0;`

### Fault simulation parameters

The fault simulation includes the definition of short circuits, broken bars, eccentricities etc. Most of these faults are modelled using the permeance/mmf electromagnetic model.

The default project does not include any fault so this part can be skipped.

### Structural mechanics model

The structural model parameters define how to calculate the dynamic deflection of the stator or rotor structure (e.g. with FEA, with experimental modal parameters).

The maximum number of circumferential spatial orders is here set to **Input.Simu.Nmax_fft_orders_circ = 7**, meaning that the spatial orders 0, 1, 2 … until 6 are taken into account by the structural simulation. Depending on the yoke stiffness and slot numbers, one may have to include up to 20 spatial orders (example of a large multi-pole synchronous generator) to correctly model main vibration waves. To include the largest vibration wave with a spatial frequency of the pole pair number, this parameter should be at least 2p+1 as a rule of thumb; a warning message is given if it is not the case.

The default 2D analytical model for the calculation of natural frequencies is chosen with:

`Input.Simu.type_natfreq = 0;`

A constant damping is applied to all structural modes using :

`Input.Simu.type_damping = 0;`

The value of this constant damping is in the machine data file. The circumferential modes of electrical machine usually lie between 0.8% and 2.5%, here a 2% value is set with:

`Input.Simu.ksi_damp =0.02;`

The FEA structural model parameters are here ignored as an analytical calculation is run.

### Acoustic model

The acoustic model parameters define how the sound power level is calculated.

### Thermal model

The thermal model here only consists in specifying the average stator and rotor winding temperatures. These values will affect in particular the effective resistance of the equivalent circuit, and therefore the current values.

### Converter model

For an open circuit simulation all these parameters can be skipped.

### Numerical parameters

This part contains all the numerical parameters of the simulation. MANATEE contains several checks and warnings to ensure that the simulation results are numerically sound.

An important input variable is the maximum frequency **Input.Simu.freq_max_spec = 12800** to be taken into account during vibroacoustic calculations. It should be chosen depending on the highest “dangerous” natural frequency observed in the machine, and the highest significant magnetic excitation frequency (e.g. twice the switching frequency for PWM operation, and 4 times the slot passing frequency for sinusoidal operation). Small power machines will have high frequency modes, thus requiring high time sampling frequency.

One should be sure that the numerical discretization is high enough, taking at least **Input.Simu.Na_tot = 2^10 and Input.Simu.Nt_tot = 2^10**.
The text output of MANATEE gives an indication of the discretization quality. Powers of 2 slightly speed up the FFT calculations.

### Other parameters

This part contains miscellaneous parameters like the saving mode, the text outputs, the post processing scripts to be run, the relative position of stator and rotor.