### Objectives

This article shows how to use MANATEE software vibroacoustic model of electrical machines without running electromagnetic calculations inside MANATEE. This can be done by **importing the flux density distribution in the middle of the airgap** calculated with a **third party electromagnetic software** (e.g. Flux from Altair, Maxwell from Ansys, Jmag from Jsol, Magnet from Infolytica).

This is possible using **special projection coefficients** to obtain the magnetic load vector per tooth from airgap Maxwell stress waves.

### Principle

MANATEE software includes projection techniques to calculate the equivalent forces applied to stator teeth or magnets from the knowledge of the airgap Maxwell stress distribution.

##### Case of fixed speed

The radial and tangential airgap flux density variation with time (along lines) and airgap angle (along columns) must be imported as two separate files (see how to extract this value from Maxwell software) for a given rotation speed.

The files format can be .txt, .csv or .xls. More precisely the value of the i-th line and j-th colum (i=1..M, j=1..N) is :

Therefore the last angular step is not 2 and the last time step is not exactly the final time T_{f}, p times the electrical period. The factors N_{sa} and N_{st} account for the spatial and time symmetries you might have in your flux distribution. For instance if you have only simulated in FEA one electrical period and you want to import this flux data in MANATEE, you should specify N_{st}=p as the default final simulation time in MANATEE is p/fs.

All the standard calculations (e.g. calculation of variable speed spectrograms based on load extrapolation) of MANATEE are still available in this mode.

When importing an external flux data file, an electromagnetic simulation is run by default using the permeance mmf model in order to define all the standard electromagnetic outputs available in MANATEE. The flux distribution is then overloaded with the imported one, and the calculations are continued. You therefore have access to the permeance and mmf values although they may be inconsistent with the imported flux density.

##### Case of variable speed

For a **variable speed simulation**, two options are possible. Either one can use load extrapolation algorithm without having any control on the current (constant current assumption), either one can import radial and tangential flux density files for each speed.

In this case, the radial and tangential flux density files to be imported must be stored in two separate folders. The flux density related to the i-th speed must have "_i" in the end of its filename, so that MANATEE knows which file to load for each speed. This import is only possible in scripting using mode and is detailed in the following.

### Scripting implementation

##### Case of fixed speed

To activate the import of the flux one must specify

`Input.Simu.is_loadBext = 1;`

In case the flux density is calculated in the rotor reference frame, one should specify

`Input.Simu.is_flux_data_rotor = 0;`

The flux density data files must be placed in a folder which is in your Matlab path (e.g. in your MachineData/MyMachines folder). The names of the paths are defined for radial and tangential flux by

`Input.Simu.pathname_Bext_rad = 'XBr_val24.txt';`

Input.Simu.pathname_Bext_tan = 'XBt_val24.txt';

The corresponding MANATEE input variables are

`Input.Simu.Nsyma_Bext = 2;`

Input.Simu.Nsymt_Bext = 2;

1 means no symmetry, 2 means half symmetry, etc. The type of the symmetry (1: anti-symmetric, meaning the flux is repeated with -1 multiplication; 0: symmetric, meaning the flux is repeated as it is) is specified with

`Input.Simu.type_symt_Bext = 1;`

Input.Simu.type_syma_Bext = 1;

Do not forget to update the corresponding number of time and angular steps, accounting for all symmetries (not the size of your matrices containing the flux distribution), in project file :

`Input.Simu.Na_tot = 2^11;`

Input.Simu.Nt_tot = 2^10;

**These total number of time and angular steps must be even. To be sure that this condition is fulfilled, one can use an even number of steps in the flux distribution**.

If you want to only import the radial flux density distribution to approximate the magnetic force calculation (which is usually valid in induction machines), this can be done using (in project file) :

`Input.Simu.is_approxrad=1;`

##### Case of variable speed

Starting from a single speed flux density distribution, variable speed Load Extrapolation Algorithm can be activated with

`Input.Simu.type_varspeed=1;`

This approach is valid if the current is unchanged with speed, and in the particular case of open circuit for PMSM. Current control must therefore be set to none with

`Input.Simu.type_control=0;`

For a speed by speed simulation based on several flux density files one must use the speed by speed mode with

`Input.Simu.type_varspeed=2`

and then indicate the full path of the two folders containing radial and tangential flux density files:

`Input.Simu.pathname_Bext_rad = 'C:\User\Radial_Flux';`

Input.Simu.pathname_Bext_tan = 'C:\User\Tangential_Flux';

MANATEE automatically scans both folders and look for files having .txt, .csv, .xls, .xlsx, .mat extensions. The flux density file associated to the i-th speed must finish with "_i" as MANATEE loads the files in ascending numerical orders.

Periodicity and antisymmetry input parameters must also be set such as for the external flux density import at fixed speed (see paragraph above).

### Case of proFEMAG software

A special article is dedicated to the import of ProFEMAG results in MANATEE.

### See also

The import of flux density is tested in validation case ALG_041.