# How are organized the Input and Output of the mechanical module?

### Natural frequencies

To compute the natural frequencies, we need to determine the types of cylindrical modes that we need for our computation. There are two cases: if you have run the electromagnetic module, MANATEE knows the Maxwell stress and therefore knows up to which order the modes must be computed (this number is limited by Input.Simu.Nmax_fft_orders_circ and Input.Simu.Nmax_fft_orders_long). Otherwise all the spatial orders are taken into account up the specified maximum values:

```Output.Mechanics.orders_circ = 0:Input.Simu.Nmax_fft_orders_circ-1; Output.Mechanics.orders_long = 0:Input.Simu.Nmax_fft_orders_long-1;```

For each type of exciting force wave (m,n) where m is the circumferential wavenumber and n is the longitudinal wavenumber, three values are computed:

• The cylindrical mode identification number (m,n) which can be potentially excited
• The corresponding natural frequency [Hz]
• The corresponding critical damping []

These values are store respectively in:

• Output.Mechanics.ModeID
• Output.Mechanics.natFreqE
• Output.Mechanics.Xia

natFreqE and Xia are both vectors matching the length of structural modes in ModeID.
Output.Mechanics.ModeID is a two column matrix, each line is a mode identification (m,n) which corresponds to a natural frequency of natFreqE. It contains every combination of (positive) circumferential and longitudinal order.

For instance, in default_proj:

```Output.Mechanics.orders_circ = [-8    -7    -6    -5    -4    -3    -2    -1     0     1     2     3     4     5     6     7     8] Output.Mechanics.orders_long = ; length(Output.Mechanics.natFreqE) = 9 Output.Mechanics.ModeID(1,:) = (0,0) Output.Mechanics.natFreqE(1) = 3450.7 Output.Mechanics.Xia = 0.02```

It means that the mode (0,0) corresponds to a natural frequency at 3450.7 HZ and a damping of 2%.

In this example, ModeID contains the mode (0,0), (1,0), (2,0),... (8,0).
With orders_long = [0 1], ModeID would have contained (0,0),(1,0),(2,0)....(8,0),(0,1),(1,1),(2,1)....(8,1); If there is no skew in the simulation there is no need for Input.Simu.Nmax_fft_orders_long >1 (and therefore orders_long will remain equal to ).

Note that for computation convenience we also define Output.Mechanics.Xiacirc and Output.Mechanics.natFreqEcirc which are "extended version" of Xia and natFreqE following the position of order_circ.

When natural frequencies are calculated using numerical model and not analytical models, the identification of the (m,n) mode is made by analyzing the 2D Fourier transform of the yoke displacement surface.

Finally, to visualize the natural frequency, one can use plot_nat_freq.

### FRF

The needed Input parameters to compute a FRF with MANATEE are:

• The circumferential wavenumbers of the cylindrical modes for the excitation: Output.Mechanics.orders_circ_FRF
• The frequency vector for the abscissa of the FRF: Output.Mechanics.freqs_FRF

There are several ways to set these parameters:

• If the electromagnetic module has been run in single speed, MANATEE knows the maxwell stess and will set these parameters with Output.Mechanics.orders_circ and Output.Mechanics.freqs
• If the electromagnetic module has been run in variable speed, MANATEE will set:
```fmin_FRF = 0; fmax_FRF = Input.Simu.freq_max_spec; Npts=3;%nb of points per xi*f deltaf_FRF = min (Output.Mechanics.Xiacirc.* Output.Mechanics.natFreqEcirc) / Npts; Output.Mechanics.freqs_FRF=fmin_FRF:deltaf_FRF:fmax_FRF Output.Mechanics.orders_circ_FRF=Output.Mechanics.orders_circ;```
• Otherwise it will be set with:
```Output.Mechanics.freqs_FRF= Input.Simu.fmin_FRF:Input.Simu.deltaf_FRF:Input.Simu.fmax_FRF Output.Mechanics.orders_circ_FRF=Input.Simu.orders_circ_FRF;```

Note that you can enforce the last case (user-defined even if the electromagnetic module has been run) with:

`Input.Simu.is_enforced_FRF_param =1;`

Please note that, when enforcing orders_circ_FRF, you need to select at least the content of Output.Mechanics.orders_circ to match the maxwell stress.

Finally, if the FRF is loaded from a mat file or an excel file, Output.Mechanics.orders_circ_FRF will be set according to the content of the file (if missing, Input.Simu.orders_circ_FRF will be used).

At the end of the simulation, there are 3 meaningful parameters:

• Output.Mechanics.FRF_rad: a cell array containing matrices (first column: frequency, second column: complex quadratic average displacement over all external surfaces under a unit pressure wave of 1 N/m^2) for radial excitation
• Output.Mechanics.FRF_tan: a cell array containing matrices (first column: frequency, second column: complex quadratic average displacement over all external surfaces under a unit pressure wave of 1 N/m^2) for tangential excitation
• Output.Mechanics.orders_circ_FRF: list of the circumferential wavenumbers (integer array)

The cell array FRF_rad and FRF_tan follows the size and position of orders_circ_FRF (FRF_rad{1} is the radial FRF for the order orders_circ_FRF). The first column of every matrices are the same: Output.Mechanics.freqs_FRF.

These output can be displayed using plot_FRF.

### Displacement

For Input.Simu.type_mech_workflow = 2, MANATEE computes analytically the displacement from the natural frequencies (Output.Mechanics.natFreqEcirc) and the radial maxwell stress experienced by the outer structure (Output.Mechanics.XPradwr).

For the other workflows, the displacement is computed by EVS method. The FRF (Output.Mechanics.FRF_rad) and the radial maxwell stress experienced by the outer structure (Output.Mechanics.XPradwr) are needed for this computation.

In both cases, at the end of the computation 4 matrices are accessible:

```Output.Mechanics.Ydwm % Dynamic deflections[m] Output.Mechanics.Yswm % Static deflections [m] Output.Mechanics.Vwm % Complex vibration speed [m/s] Output.Mechanics.Awm % Complex acceleration [m/s^2]```

All these matrices have the shape [Input.Simu.Nt_tot, Norder_circ] with

`Norder_circ = length(Input.Simu.orders_circ);`

To display the result at single speed, one can use:

Displacement post-processing
Output NameSingle speedVariable speed
Dynamic deflections
Output.Mechanics.Ydwm
plot_Ur_fft2 X
Static deflections
Output.Mechanics.Yswm
plot_Ur_static_fft2 X
Complex vibration speed
Output.Mechanics.Vwm
plot_Vr_modal_cont
plot_Vr_fft
plot_VS_Vr_spectrogram
Complex acceleration
Output.Mechanics.Awm
plot_Ar_modal_cont
plot_Ar_fft
plot_VS_Ar_spectrogram

bla