.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples\03-harmonic_analyses\00-multi_harmonic.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_03-harmonic_analyses_00-multi_harmonic.py: .. _ref_basic_harmonic: Multi-harmonic response example ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This example shows how to compute a multi-harmonic response using ``fft`` transformations. .. GENERATED FROM PYTHON SOURCE LINES 11-18 .. code-block:: Python import matplotlib.pyplot as pyplot from ansys.dpf import core as dpf from ansys.dpf.core import examples from ansys.dpf.core import operators as ops .. GENERATED FROM PYTHON SOURCE LINES 19-26 Begin by downloading the example harmonic result. This result is not included in the core module by default to speed up the install. Download should only take a few seconds. Next, create the model and display the state of the result. This harmonic result file contains several RPMs, and each RPM has several frequencies. .. GENERATED FROM PYTHON SOURCE LINES 26-32 .. code-block:: Python # The size of this file is 66 MB. Downloading it might take some time. harmonic = examples.download_multi_harmonic_result() model = dpf.Model(harmonic) print(model) .. rst-class:: sphx-glr-script-out .. code-block:: none DPF Model ------------------------------ Harmonic analysis Unit system: MKS: m, kg, N, s, V, A, degC Physics Type: Mechanical Available results: - displacement: Nodal Displacement - elemental_summable_miscellaneous_data: Elemental Elemental Summable Miscellaneous Data - elemental_non_summable_miscellaneous_data: Elemental Elemental Non Summable Miscellaneous Data - structural_temperature: ElementalNodal Structural temperature ------------------------------ DPF Meshed Region: 88 nodes 33 elements Unit: m With beam (1D) elements ------------------------------ DPF Time/Freq Support: Number of sets: 1000 With complex values Cumulative Frequency (Hz) LoadStep Substep RPM 1 1.000000 1 1 100.000000 2 2.000000 1 2 100.000000 3 3.000000 1 3 100.000000 4 4.000000 1 4 100.000000 5 5.000000 1 5 100.000000 6 6.000000 1 6 100.000000 7 7.000000 1 7 100.000000 8 8.000000 1 8 100.000000 9 9.000000 1 9 100.000000 10 10.000000 1 10 100.000000 11 11.000000 1 11 100.000000 12 12.000000 1 12 100.000000 13 13.000000 1 13 100.000000 14 14.000000 1 14 100.000000 15 15.000000 1 15 100.000000 16 16.000000 1 16 100.000000 17 17.000000 1 17 100.000000 18 18.000000 1 18 100.000000 19 19.000000 1 19 100.000000 20 20.000000 1 20 100.000000 21 21.000000 1 21 100.000000 22 22.000000 1 22 100.000000 23 23.000000 1 23 100.000000 24 24.000000 1 24 100.000000 25 25.000000 1 25 100.000000 26 26.000000 1 26 100.000000 27 27.000000 1 27 100.000000 28 28.000000 1 28 100.000000 29 29.000000 1 29 100.000000 30 30.000000 1 30 100.000000 31 31.000000 1 31 100.000000 32 32.000000 1 32 100.000000 33 33.000000 1 33 100.000000 34 34.000000 1 34 100.000000 35 35.000000 1 35 100.000000 36 36.000000 1 36 100.000000 37 37.000000 1 37 100.000000 38 38.000000 1 38 100.000000 39 39.000000 1 39 100.000000 40 40.000000 1 40 100.000000 41 41.000000 1 41 100.000000 42 42.000000 1 42 100.000000 43 43.000000 1 43 100.000000 44 44.000000 1 44 100.000000 45 45.000000 1 45 100.000000 46 46.000000 1 46 100.000000 47 47.000000 1 47 100.000000 48 48.000000 1 48 100.000000 49 49.000000 1 49 100.000000 50 50.000000 1 50 100.000000 51 51.000000 1 51 100.000000 52 52.000000 1 52 100.000000 53 53.000000 1 53 100.000000 54 54.000000 1 54 100.000000 55 55.000000 1 55 100.000000 56 56.000000 1 56 100.000000 57 57.000000 1 57 100.000000 58 58.000000 1 58 100.000000 59 59.000000 1 59 100.000000 60 60.000000 1 60 100.000000 61 61.000000 1 61 100.000000 62 62.000000 1 62 100.000000 63 63.000000 1 63 100.000000 64 64.000000 1 64 100.000000 65 65.000000 1 65 100.000000 66 66.000000 1 66 100.000000 67 67.000000 1 67 100.000000 68 68.000000 1 68 100.000000 69 69.000000 1 69 100.000000 70 70.000000 1 70 100.000000 71 71.000000 1 71 100.000000 72 72.000000 1 72 100.000000 73 73.000000 1 73 100.000000 74 74.000000 1 74 100.000000 75 75.000000 1 75 100.000000 76 76.000000 1 76 100.000000 77 77.000000 1 77 100.000000 78 78.000000 1 78 100.000000 79 79.000000 1 79 100.000000 80 80.000000 1 80 100.000000 81 81.000000 1 81 100.000000 82 82.000000 1 82 100.000000 83 83.000000 1 83 100.000000 84 84.000000 1 84 100.000000 85 85.000000 1 85 100.000000 86 86.000000 1 86 100.000000 87 87.000000 1 87 100.000000 88 88.000000 1 88 100.000000 89 89.000000 1 89 100.000000 90 90.000000 1 90 100.000000 91 91.000000 1 91 100.000000 92 92.000000 1 92 100.000000 93 93.000000 1 93 100.000000 94 94.000000 1 94 100.000000 95 95.000000 1 95 100.000000 96 96.000000 1 96 100.000000 97 97.000000 1 97 100.000000 98 98.000000 1 98 100.000000 99 99.000000 1 99 100.000000 100 100.000000 1 100 100.000000 101 101.000000 1 101 100.000000 102 102.000000 1 102 100.000000 103 103.000000 1 103 100.000000 104 104.000000 1 104 100.000000 105 105.000000 1 105 100.000000 106 106.000000 1 106 100.000000 107 107.000000 1 107 100.000000 108 108.000000 1 108 100.000000 109 109.000000 1 109 100.000000 110 110.000000 1 110 100.000000 111 111.000000 1 111 100.000000 112 112.000000 1 112 100.000000 113 113.000000 1 113 100.000000 114 114.000000 1 114 100.000000 115 115.000000 1 115 100.000000 116 116.000000 1 116 100.000000 117 117.000000 1 117 100.000000 118 118.000000 1 118 100.000000 119 119.000000 1 119 100.000000 120 120.000000 1 120 100.000000 121 121.000000 1 121 100.000000 122 122.000000 1 122 100.000000 123 123.000000 1 123 100.000000 124 124.000000 1 124 100.000000 125 125.000000 1 125 100.000000 126 126.000000 1 126 100.000000 127 127.000000 1 127 100.000000 128 128.000000 1 128 100.000000 129 129.000000 1 129 100.000000 130 130.000000 1 130 100.000000 131 131.000000 1 131 100.000000 132 132.000000 1 132 100.000000 133 133.000000 1 133 100.000000 134 134.000000 1 134 100.000000 135 135.000000 1 135 100.000000 136 136.000000 1 136 100.000000 137 137.000000 1 137 100.000000 138 138.000000 1 138 100.000000 139 139.000000 1 139 100.000000 140 140.000000 1 140 100.000000 141 141.000000 1 141 100.000000 142 142.000000 1 142 100.000000 143 143.000000 1 143 100.000000 144 144.000000 1 144 100.000000 145 145.000000 1 145 100.000000 146 146.000000 1 146 100.000000 147 147.000000 1 147 100.000000 148 148.000000 1 148 100.000000 149 149.000000 1 149 100.000000 150 150.000000 1 150 100.000000 151 151.000000 1 151 100.000000 152 152.000000 1 152 100.000000 153 153.000000 1 153 100.000000 154 154.000000 1 154 100.000000 155 155.000000 1 155 100.000000 156 156.000000 1 156 100.000000 157 157.000000 1 157 100.000000 158 158.000000 1 158 100.000000 159 159.000000 1 159 100.000000 160 160.000000 1 160 100.000000 161 161.000000 1 161 100.000000 162 162.000000 1 162 100.000000 163 163.000000 1 163 100.000000 164 164.000000 1 164 100.000000 165 165.000000 1 165 100.000000 166 166.000000 1 166 100.000000 167 167.000000 1 167 100.000000 168 168.000000 1 168 100.000000 169 169.000000 1 169 100.000000 170 170.000000 1 170 100.000000 171 171.000000 1 171 100.000000 172 172.000000 1 172 100.000000 173 173.000000 1 173 100.000000 174 174.000000 1 174 100.000000 175 175.000000 1 175 100.000000 176 176.000000 1 176 100.000000 177 177.000000 1 177 100.000000 178 178.000000 1 178 100.000000 179 179.000000 1 179 100.000000 180 180.000000 1 180 100.000000 181 181.000000 1 181 100.000000 182 182.000000 1 182 100.000000 183 183.000000 1 183 100.000000 184 184.000000 1 184 100.000000 185 185.000000 1 185 100.000000 186 186.000000 1 186 100.000000 187 187.000000 1 187 100.000000 188 188.000000 1 188 100.000000 189 189.000000 1 189 100.000000 190 190.000000 1 190 100.000000 191 191.000000 1 191 100.000000 192 192.000000 1 192 100.000000 193 193.000000 1 193 100.000000 194 194.000000 1 194 100.000000 195 195.000000 1 195 100.000000 196 196.000000 1 196 100.000000 197 197.000000 1 197 100.000000 198 198.000000 1 198 100.000000 199 199.000000 1 199 100.000000 200 200.000000 1 200 100.000000 201 2.000000 2 1 200.000000 202 4.000000 2 2 200.000000 203 6.000000 2 3 200.000000 204 8.000000 2 4 200.000000 205 10.000000 2 5 200.000000 206 12.000000 2 6 200.000000 207 14.000000 2 7 200.000000 208 16.000000 2 8 200.000000 209 18.000000 2 9 200.000000 210 20.000000 2 10 200.000000 211 22.000000 2 11 200.000000 212 24.000000 2 12 200.000000 213 26.000000 2 13 200.000000 214 28.000000 2 14 200.000000 215 30.000000 2 15 200.000000 216 32.000000 2 16 200.000000 217 34.000000 2 17 200.000000 218 36.000000 2 18 200.000000 219 38.000000 2 19 200.000000 220 40.000000 2 20 200.000000 221 42.000000 2 21 200.000000 222 44.000000 2 22 200.000000 223 46.000000 2 23 200.000000 224 48.000000 2 24 200.000000 225 50.000000 2 25 200.000000 226 52.000000 2 26 200.000000 227 54.000000 2 27 200.000000 228 56.000000 2 28 200.000000 229 58.000000 2 29 200.000000 230 60.000000 2 30 200.000000 231 62.000000 2 31 200.000000 232 64.000000 2 32 200.000000 233 66.000000 2 33 200.000000 234 68.000000 2 34 200.000000 235 70.000000 2 35 200.000000 236 72.000000 2 36 200.000000 237 74.000000 2 37 200.000000 238 76.000000 2 38 200.000000 239 78.000000 2 39 200.000000 240 80.000000 2 40 200.000000 241 82.000000 2 41 200.000000 242 84.000000 2 42 200.000000 243 86.000000 2 43 200.000000 244 88.000000 2 44 200.000000 245 90.000000 2 45 200.000000 246 92.000000 2 46 200.000000 247 94.000000 2 47 200.000000 248 96.000000 2 48 200.000000 249 98.000000 2 49 200.000000 250 100.000000 2 50 200.000000 251 102.000000 2 51 200.000000 252 104.000000 2 52 200.000000 253 106.000000 2 53 200.000000 254 108.000000 2 54 200.000000 255 110.000000 2 55 200.000000 256 112.000000 2 56 200.000000 257 114.000000 2 57 200.000000 258 116.000000 2 58 200.000000 259 118.000000 2 59 200.000000 260 120.000000 2 60 200.000000 261 122.000000 2 61 200.000000 262 124.000000 2 62 200.000000 263 126.000000 2 63 200.000000 264 128.000000 2 64 200.000000 265 130.000000 2 65 200.000000 266 132.000000 2 66 200.000000 267 134.000000 2 67 200.000000 268 136.000000 2 68 200.000000 269 138.000000 2 69 200.000000 270 140.000000 2 70 200.000000 271 142.000000 2 71 200.000000 272 144.000000 2 72 200.000000 273 146.000000 2 73 200.000000 274 148.000000 2 74 200.000000 275 150.000000 2 75 200.000000 276 152.000000 2 76 200.000000 277 154.000000 2 77 200.000000 278 156.000000 2 78 200.000000 279 158.000000 2 79 200.000000 280 160.000000 2 80 200.000000 281 162.000000 2 81 200.000000 282 164.000000 2 82 200.000000 283 166.000000 2 83 200.000000 284 168.000000 2 84 200.000000 285 170.000000 2 85 200.000000 286 172.000000 2 86 200.000000 287 174.000000 2 87 200.000000 288 176.000000 2 88 200.000000 289 178.000000 2 89 200.000000 290 180.000000 2 90 200.000000 291 182.000000 2 91 200.000000 292 184.000000 2 92 200.000000 293 186.000000 2 93 200.000000 294 188.000000 2 94 200.000000 295 190.000000 2 95 200.000000 296 192.000000 2 96 200.000000 297 194.000000 2 97 200.000000 298 196.000000 2 98 200.000000 299 198.000000 2 99 200.000000 300 200.000000 2 100 200.000000 301 202.000000 2 101 200.000000 302 204.000000 2 102 200.000000 303 206.000000 2 103 200.000000 304 208.000000 2 104 200.000000 305 210.000000 2 105 200.000000 306 212.000000 2 106 200.000000 307 214.000000 2 107 200.000000 308 216.000000 2 108 200.000000 309 218.000000 2 109 200.000000 310 220.000000 2 110 200.000000 311 222.000000 2 111 200.000000 312 224.000000 2 112 200.000000 313 226.000000 2 113 200.000000 314 228.000000 2 114 200.000000 315 230.000000 2 115 200.000000 316 232.000000 2 116 200.000000 317 234.000000 2 117 200.000000 318 236.000000 2 118 200.000000 319 238.000000 2 119 200.000000 320 240.000000 2 120 200.000000 321 242.000000 2 121 200.000000 322 244.000000 2 122 200.000000 323 246.000000 2 123 200.000000 324 248.000000 2 124 200.000000 325 250.000000 2 125 200.000000 326 252.000000 2 126 200.000000 327 254.000000 2 127 200.000000 328 256.000000 2 128 200.000000 329 258.000000 2 129 200.000000 330 260.000000 2 130 200.000000 331 262.000000 2 131 200.000000 332 264.000000 2 132 200.000000 333 266.000000 2 133 200.000000 334 268.000000 2 134 200.000000 335 270.000000 2 135 200.000000 336 272.000000 2 136 200.000000 337 274.000000 2 137 200.000000 338 276.000000 2 138 200.000000 339 278.000000 2 139 200.000000 340 280.000000 2 140 200.000000 341 282.000000 2 141 200.000000 342 284.000000 2 142 200.000000 343 286.000000 2 143 200.000000 344 288.000000 2 144 200.000000 345 290.000000 2 145 200.000000 346 292.000000 2 146 200.000000 347 294.000000 2 147 200.000000 348 296.000000 2 148 200.000000 349 298.000000 2 149 200.000000 350 300.000000 2 150 200.000000 351 302.000000 2 151 200.000000 352 304.000000 2 152 200.000000 353 306.000000 2 153 200.000000 354 308.000000 2 154 200.000000 355 310.000000 2 155 200.000000 356 312.000000 2 156 200.000000 357 314.000000 2 157 200.000000 358 316.000000 2 158 200.000000 359 318.000000 2 159 200.000000 360 320.000000 2 160 200.000000 361 322.000000 2 161 200.000000 362 324.000000 2 162 200.000000 363 326.000000 2 163 200.000000 364 328.000000 2 164 200.000000 365 330.000000 2 165 200.000000 366 332.000000 2 166 200.000000 367 334.000000 2 167 200.000000 368 336.000000 2 168 200.000000 369 338.000000 2 169 200.000000 370 340.000000 2 170 200.000000 371 342.000000 2 171 200.000000 372 344.000000 2 172 200.000000 373 346.000000 2 173 200.000000 374 348.000000 2 174 200.000000 375 350.000000 2 175 200.000000 376 352.000000 2 176 200.000000 377 354.000000 2 177 200.000000 378 356.000000 2 178 200.000000 379 358.000000 2 179 200.000000 380 360.000000 2 180 200.000000 381 362.000000 2 181 200.000000 382 364.000000 2 182 200.000000 383 366.000000 2 183 200.000000 384 368.000000 2 184 200.000000 385 370.000000 2 185 200.000000 386 372.000000 2 186 200.000000 387 374.000000 2 187 200.000000 388 376.000000 2 188 200.000000 389 378.000000 2 189 200.000000 390 380.000000 2 190 200.000000 391 382.000000 2 191 200.000000 392 384.000000 2 192 200.000000 393 386.000000 2 193 200.000000 394 388.000000 2 194 200.000000 395 390.000000 2 195 200.000000 396 392.000000 2 196 200.000000 397 394.000000 2 197 200.000000 398 396.000000 2 198 200.000000 399 398.000000 2 199 200.000000 400 400.000000 2 200 200.000000 401 3.000000 3 1 300.000000 402 6.000000 3 2 300.000000 403 9.000000 3 3 300.000000 404 12.000000 3 4 300.000000 405 15.000000 3 5 300.000000 406 18.000000 3 6 300.000000 407 21.000000 3 7 300.000000 408 24.000000 3 8 300.000000 409 27.000000 3 9 300.000000 410 30.000000 3 10 300.000000 411 33.000000 3 11 300.000000 412 36.000000 3 12 300.000000 413 39.000000 3 13 300.000000 414 42.000000 3 14 300.000000 415 45.000000 3 15 300.000000 416 48.000000 3 16 300.000000 417 51.000000 3 17 300.000000 418 54.000000 3 18 300.000000 419 57.000000 3 19 300.000000 420 60.000000 3 20 300.000000 421 63.000000 3 21 300.000000 422 66.000000 3 22 300.000000 423 69.000000 3 23 300.000000 424 72.000000 3 24 300.000000 425 75.000000 3 25 300.000000 426 78.000000 3 26 300.000000 427 81.000000 3 27 300.000000 428 84.000000 3 28 300.000000 429 87.000000 3 29 300.000000 430 90.000000 3 30 300.000000 431 93.000000 3 31 300.000000 432 96.000000 3 32 300.000000 433 99.000000 3 33 300.000000 434 102.000000 3 34 300.000000 435 105.000000 3 35 300.000000 436 108.000000 3 36 300.000000 437 111.000000 3 37 300.000000 438 114.000000 3 38 300.000000 439 117.000000 3 39 300.000000 440 120.000000 3 40 300.000000 441 123.000000 3 41 300.000000 442 126.000000 3 42 300.000000 443 129.000000 3 43 300.000000 444 132.000000 3 44 300.000000 445 135.000000 3 45 300.000000 446 138.000000 3 46 300.000000 447 141.000000 3 47 300.000000 448 144.000000 3 48 300.000000 449 147.000000 3 49 300.000000 450 150.000000 3 50 300.000000 451 153.000000 3 51 300.000000 452 156.000000 3 52 300.000000 453 159.000000 3 53 300.000000 454 162.000000 3 54 300.000000 455 165.000000 3 55 300.000000 456 168.000000 3 56 300.000000 457 171.000000 3 57 300.000000 458 174.000000 3 58 300.000000 459 177.000000 3 59 300.000000 460 180.000000 3 60 300.000000 461 183.000000 3 61 300.000000 462 186.000000 3 62 300.000000 463 189.000000 3 63 300.000000 464 192.000000 3 64 300.000000 465 195.000000 3 65 300.000000 466 198.000000 3 66 300.000000 467 201.000000 3 67 300.000000 468 204.000000 3 68 300.000000 469 207.000000 3 69 300.000000 470 210.000000 3 70 300.000000 471 213.000000 3 71 300.000000 472 216.000000 3 72 300.000000 473 219.000000 3 73 300.000000 474 222.000000 3 74 300.000000 475 225.000000 3 75 300.000000 476 228.000000 3 76 300.000000 477 231.000000 3 77 300.000000 478 234.000000 3 78 300.000000 479 237.000000 3 79 300.000000 480 240.000000 3 80 300.000000 481 243.000000 3 81 300.000000 482 246.000000 3 82 300.000000 483 249.000000 3 83 300.000000 484 252.000000 3 84 300.000000 485 255.000000 3 85 300.000000 486 258.000000 3 86 300.000000 487 261.000000 3 87 300.000000 488 264.000000 3 88 300.000000 489 267.000000 3 89 300.000000 490 270.000000 3 90 300.000000 491 273.000000 3 91 300.000000 492 276.000000 3 92 300.000000 493 279.000000 3 93 300.000000 494 282.000000 3 94 300.000000 495 285.000000 3 95 300.000000 496 288.000000 3 96 300.000000 497 291.000000 3 97 300.000000 498 294.000000 3 98 300.000000 499 297.000000 3 99 300.000000 500 300.000000 3 100 300.000000 501 303.000000 3 101 300.000000 502 306.000000 3 102 300.000000 503 309.000000 3 103 300.000000 504 312.000000 3 104 300.000000 505 315.000000 3 105 300.000000 506 318.000000 3 106 300.000000 507 321.000000 3 107 300.000000 508 324.000000 3 108 300.000000 509 327.000000 3 109 300.000000 510 330.000000 3 110 300.000000 511 333.000000 3 111 300.000000 512 336.000000 3 112 300.000000 513 339.000000 3 113 300.000000 514 342.000000 3 114 300.000000 515 345.000000 3 115 300.000000 516 348.000000 3 116 300.000000 517 351.000000 3 117 300.000000 518 354.000000 3 118 300.000000 519 357.000000 3 119 300.000000 520 360.000000 3 120 300.000000 521 363.000000 3 121 300.000000 522 366.000000 3 122 300.000000 523 369.000000 3 123 300.000000 524 372.000000 3 124 300.000000 525 375.000000 3 125 300.000000 526 378.000000 3 126 300.000000 527 381.000000 3 127 300.000000 528 384.000000 3 128 300.000000 529 387.000000 3 129 300.000000 530 390.000000 3 130 300.000000 531 393.000000 3 131 300.000000 532 396.000000 3 132 300.000000 533 399.000000 3 133 300.000000 534 402.000000 3 134 300.000000 535 405.000000 3 135 300.000000 536 408.000000 3 136 300.000000 537 411.000000 3 137 300.000000 538 414.000000 3 138 300.000000 539 417.000000 3 139 300.000000 540 420.000000 3 140 300.000000 541 423.000000 3 141 300.000000 542 426.000000 3 142 300.000000 543 429.000000 3 143 300.000000 544 432.000000 3 144 300.000000 545 435.000000 3 145 300.000000 546 438.000000 3 146 300.000000 547 441.000000 3 147 300.000000 548 444.000000 3 148 300.000000 549 447.000000 3 149 300.000000 550 450.000000 3 150 300.000000 551 453.000000 3 151 300.000000 552 456.000000 3 152 300.000000 553 459.000000 3 153 300.000000 554 462.000000 3 154 300.000000 555 465.000000 3 155 300.000000 556 468.000000 3 156 300.000000 557 471.000000 3 157 300.000000 558 474.000000 3 158 300.000000 559 477.000000 3 159 300.000000 560 480.000000 3 160 300.000000 561 483.000000 3 161 300.000000 562 486.000000 3 162 300.000000 563 489.000000 3 163 300.000000 564 492.000000 3 164 300.000000 565 495.000000 3 165 300.000000 566 498.000000 3 166 300.000000 567 501.000000 3 167 300.000000 568 504.000000 3 168 300.000000 569 507.000000 3 169 300.000000 570 510.000000 3 170 300.000000 571 513.000000 3 171 300.000000 572 516.000000 3 172 300.000000 573 519.000000 3 173 300.000000 574 522.000000 3 174 300.000000 575 525.000000 3 175 300.000000 576 528.000000 3 176 300.000000 577 531.000000 3 177 300.000000 578 534.000000 3 178 300.000000 579 537.000000 3 179 300.000000 580 540.000000 3 180 300.000000 581 543.000000 3 181 300.000000 582 546.000000 3 182 300.000000 583 549.000000 3 183 300.000000 584 552.000000 3 184 300.000000 585 555.000000 3 185 300.000000 586 558.000000 3 186 300.000000 587 561.000000 3 187 300.000000 588 564.000000 3 188 300.000000 589 567.000000 3 189 300.000000 590 570.000000 3 190 300.000000 591 573.000000 3 191 300.000000 592 576.000000 3 192 300.000000 593 579.000000 3 193 300.000000 594 582.000000 3 194 300.000000 595 585.000000 3 195 300.000000 596 588.000000 3 196 300.000000 597 591.000000 3 197 300.000000 598 594.000000 3 198 300.000000 599 597.000000 3 199 300.000000 600 600.000000 3 200 300.000000 601 4.000000 4 1 400.000000 602 8.000000 4 2 400.000000 603 12.000000 4 3 400.000000 604 16.000000 4 4 400.000000 605 20.000000 4 5 400.000000 606 24.000000 4 6 400.000000 607 28.000000 4 7 400.000000 608 32.000000 4 8 400.000000 609 36.000000 4 9 400.000000 610 40.000000 4 10 400.000000 611 44.000000 4 11 400.000000 612 48.000000 4 12 400.000000 613 52.000000 4 13 400.000000 614 56.000000 4 14 400.000000 615 60.000000 4 15 400.000000 616 64.000000 4 16 400.000000 617 68.000000 4 17 400.000000 618 72.000000 4 18 400.000000 619 76.000000 4 19 400.000000 620 80.000000 4 20 400.000000 621 84.000000 4 21 400.000000 622 88.000000 4 22 400.000000 623 92.000000 4 23 400.000000 624 96.000000 4 24 400.000000 625 100.000000 4 25 400.000000 626 104.000000 4 26 400.000000 627 108.000000 4 27 400.000000 628 112.000000 4 28 400.000000 629 116.000000 4 29 400.000000 630 120.000000 4 30 400.000000 631 124.000000 4 31 400.000000 632 128.000000 4 32 400.000000 633 132.000000 4 33 400.000000 634 136.000000 4 34 400.000000 635 140.000000 4 35 400.000000 636 144.000000 4 36 400.000000 637 148.000000 4 37 400.000000 638 152.000000 4 38 400.000000 639 156.000000 4 39 400.000000 640 160.000000 4 40 400.000000 641 164.000000 4 41 400.000000 642 168.000000 4 42 400.000000 643 172.000000 4 43 400.000000 644 176.000000 4 44 400.000000 645 180.000000 4 45 400.000000 646 184.000000 4 46 400.000000 647 188.000000 4 47 400.000000 648 192.000000 4 48 400.000000 649 196.000000 4 49 400.000000 650 200.000000 4 50 400.000000 651 204.000000 4 51 400.000000 652 208.000000 4 52 400.000000 653 212.000000 4 53 400.000000 654 216.000000 4 54 400.000000 655 220.000000 4 55 400.000000 656 224.000000 4 56 400.000000 657 228.000000 4 57 400.000000 658 232.000000 4 58 400.000000 659 236.000000 4 59 400.000000 660 240.000000 4 60 400.000000 661 244.000000 4 61 400.000000 662 248.000000 4 62 400.000000 663 252.000000 4 63 400.000000 664 256.000000 4 64 400.000000 665 260.000000 4 65 400.000000 666 264.000000 4 66 400.000000 667 268.000000 4 67 400.000000 668 272.000000 4 68 400.000000 669 276.000000 4 69 400.000000 670 280.000000 4 70 400.000000 671 284.000000 4 71 400.000000 672 288.000000 4 72 400.000000 673 292.000000 4 73 400.000000 674 296.000000 4 74 400.000000 675 300.000000 4 75 400.000000 676 304.000000 4 76 400.000000 677 308.000000 4 77 400.000000 678 312.000000 4 78 400.000000 679 316.000000 4 79 400.000000 680 320.000000 4 80 400.000000 681 324.000000 4 81 400.000000 682 328.000000 4 82 400.000000 683 332.000000 4 83 400.000000 684 336.000000 4 84 400.000000 685 340.000000 4 85 400.000000 686 344.000000 4 86 400.000000 687 348.000000 4 87 400.000000 688 352.000000 4 88 400.000000 689 356.000000 4 89 400.000000 690 360.000000 4 90 400.000000 691 364.000000 4 91 400.000000 692 368.000000 4 92 400.000000 693 372.000000 4 93 400.000000 694 376.000000 4 94 400.000000 695 380.000000 4 95 400.000000 696 384.000000 4 96 400.000000 697 388.000000 4 97 400.000000 698 392.000000 4 98 400.000000 699 396.000000 4 99 400.000000 700 400.000000 4 100 400.000000 701 404.000000 4 101 400.000000 702 408.000000 4 102 400.000000 703 412.000000 4 103 400.000000 704 416.000000 4 104 400.000000 705 420.000000 4 105 400.000000 706 424.000000 4 106 400.000000 707 428.000000 4 107 400.000000 708 432.000000 4 108 400.000000 709 436.000000 4 109 400.000000 710 440.000000 4 110 400.000000 711 444.000000 4 111 400.000000 712 448.000000 4 112 400.000000 713 452.000000 4 113 400.000000 714 456.000000 4 114 400.000000 715 460.000000 4 115 400.000000 716 464.000000 4 116 400.000000 717 468.000000 4 117 400.000000 718 472.000000 4 118 400.000000 719 476.000000 4 119 400.000000 720 480.000000 4 120 400.000000 721 484.000000 4 121 400.000000 722 488.000000 4 122 400.000000 723 492.000000 4 123 400.000000 724 496.000000 4 124 400.000000 725 500.000000 4 125 400.000000 726 504.000000 4 126 400.000000 727 508.000000 4 127 400.000000 728 512.000000 4 128 400.000000 729 516.000000 4 129 400.000000 730 520.000000 4 130 400.000000 731 524.000000 4 131 400.000000 732 528.000000 4 132 400.000000 733 532.000000 4 133 400.000000 734 536.000000 4 134 400.000000 735 540.000000 4 135 400.000000 736 544.000000 4 136 400.000000 737 548.000000 4 137 400.000000 738 552.000000 4 138 400.000000 739 556.000000 4 139 400.000000 740 560.000000 4 140 400.000000 741 564.000000 4 141 400.000000 742 568.000000 4 142 400.000000 743 572.000000 4 143 400.000000 744 576.000000 4 144 400.000000 745 580.000000 4 145 400.000000 746 584.000000 4 146 400.000000 747 588.000000 4 147 400.000000 748 592.000000 4 148 400.000000 749 596.000000 4 149 400.000000 750 600.000000 4 150 400.000000 751 604.000000 4 151 400.000000 752 608.000000 4 152 400.000000 753 612.000000 4 153 400.000000 754 616.000000 4 154 400.000000 755 620.000000 4 155 400.000000 756 624.000000 4 156 400.000000 757 628.000000 4 157 400.000000 758 632.000000 4 158 400.000000 759 636.000000 4 159 400.000000 760 640.000000 4 160 400.000000 761 644.000000 4 161 400.000000 762 648.000000 4 162 400.000000 763 652.000000 4 163 400.000000 764 656.000000 4 164 400.000000 765 660.000000 4 165 400.000000 766 664.000000 4 166 400.000000 767 668.000000 4 167 400.000000 768 672.000000 4 168 400.000000 769 676.000000 4 169 400.000000 770 680.000000 4 170 400.000000 771 684.000000 4 171 400.000000 772 688.000000 4 172 400.000000 773 692.000000 4 173 400.000000 774 696.000000 4 174 400.000000 775 700.000000 4 175 400.000000 776 704.000000 4 176 400.000000 777 708.000000 4 177 400.000000 778 712.000000 4 178 400.000000 779 716.000000 4 179 400.000000 780 720.000000 4 180 400.000000 781 724.000000 4 181 400.000000 782 728.000000 4 182 400.000000 783 732.000000 4 183 400.000000 784 736.000000 4 184 400.000000 785 740.000000 4 185 400.000000 786 744.000000 4 186 400.000000 787 748.000000 4 187 400.000000 788 752.000000 4 188 400.000000 789 756.000000 4 189 400.000000 790 760.000000 4 190 400.000000 791 764.000000 4 191 400.000000 792 768.000000 4 192 400.000000 793 772.000000 4 193 400.000000 794 776.000000 4 194 400.000000 795 780.000000 4 195 400.000000 796 784.000000 4 196 400.000000 797 788.000000 4 197 400.000000 798 792.000000 4 198 400.000000 799 796.000000 4 199 400.000000 800 800.000000 4 200 400.000000 801 5.000000 5 1 500.000000 802 10.000000 5 2 500.000000 803 15.000000 5 3 500.000000 804 20.000000 5 4 500.000000 805 25.000000 5 5 500.000000 806 30.000000 5 6 500.000000 807 35.000000 5 7 500.000000 808 40.000000 5 8 500.000000 809 45.000000 5 9 500.000000 810 50.000000 5 10 500.000000 811 55.000000 5 11 500.000000 812 60.000000 5 12 500.000000 813 65.000000 5 13 500.000000 814 70.000000 5 14 500.000000 815 75.000000 5 15 500.000000 816 80.000000 5 16 500.000000 817 85.000000 5 17 500.000000 818 90.000000 5 18 500.000000 819 95.000000 5 19 500.000000 820 100.000000 5 20 500.000000 821 105.000000 5 21 500.000000 822 110.000000 5 22 500.000000 823 115.000000 5 23 500.000000 824 120.000000 5 24 500.000000 825 125.000000 5 25 500.000000 826 130.000000 5 26 500.000000 827 135.000000 5 27 500.000000 828 140.000000 5 28 500.000000 829 145.000000 5 29 500.000000 830 150.000000 5 30 500.000000 831 155.000000 5 31 500.000000 832 160.000000 5 32 500.000000 833 165.000000 5 33 500.000000 834 170.000000 5 34 500.000000 835 175.000000 5 35 500.000000 836 180.000000 5 36 500.000000 837 185.000000 5 37 500.000000 838 190.000000 5 38 500.000000 839 195.000000 5 39 500.000000 840 200.000000 5 40 500.000000 841 205.000000 5 41 500.000000 842 210.000000 5 42 500.000000 843 215.000000 5 43 500.000000 844 220.000000 5 44 500.000000 845 225.000000 5 45 500.000000 846 230.000000 5 46 500.000000 847 235.000000 5 47 500.000000 848 240.000000 5 48 500.000000 849 245.000000 5 49 500.000000 850 250.000000 5 50 500.000000 851 255.000000 5 51 500.000000 852 260.000000 5 52 500.000000 853 265.000000 5 53 500.000000 854 270.000000 5 54 500.000000 855 275.000000 5 55 500.000000 856 280.000000 5 56 500.000000 857 285.000000 5 57 500.000000 858 290.000000 5 58 500.000000 859 295.000000 5 59 500.000000 860 300.000000 5 60 500.000000 861 305.000000 5 61 500.000000 862 310.000000 5 62 500.000000 863 315.000000 5 63 500.000000 864 320.000000 5 64 500.000000 865 325.000000 5 65 500.000000 866 330.000000 5 66 500.000000 867 335.000000 5 67 500.000000 868 340.000000 5 68 500.000000 869 345.000000 5 69 500.000000 870 350.000000 5 70 500.000000 871 355.000000 5 71 500.000000 872 360.000000 5 72 500.000000 873 365.000000 5 73 500.000000 874 370.000000 5 74 500.000000 875 375.000000 5 75 500.000000 876 380.000000 5 76 500.000000 877 385.000000 5 77 500.000000 878 390.000000 5 78 500.000000 879 395.000000 5 79 500.000000 880 400.000000 5 80 500.000000 881 405.000000 5 81 500.000000 882 410.000000 5 82 500.000000 883 415.000000 5 83 500.000000 884 420.000000 5 84 500.000000 885 425.000000 5 85 500.000000 886 430.000000 5 86 500.000000 887 435.000000 5 87 500.000000 888 440.000000 5 88 500.000000 889 445.000000 5 89 500.000000 890 450.000000 5 90 500.000000 891 455.000000 5 91 500.000000 892 460.000000 5 92 500.000000 893 465.000000 5 93 500.000000 894 470.000000 5 94 500.000000 895 475.000000 5 95 500.000000 896 480.000000 5 96 500.000000 897 485.000000 5 97 500.000000 898 490.000000 5 98 500.000000 899 495.000000 5 99 500.000000 900 500.000000 5 100 500.000000 901 505.000000 5 101 500.000000 902 510.000000 5 102 500.000000 903 515.000000 5 103 500.000000 904 520.000000 5 104 500.000000 905 525.000000 5 105 500.000000 906 530.000000 5 106 500.000000 907 535.000000 5 107 500.000000 908 540.000000 5 108 500.000000 909 545.000000 5 109 500.000000 910 550.000000 5 110 500.000000 911 555.000000 5 111 500.000000 912 560.000000 5 112 500.000000 913 565.000000 5 113 500.000000 914 570.000000 5 114 500.000000 915 575.000000 5 115 500.000000 916 580.000000 5 116 500.000000 917 585.000000 5 117 500.000000 918 590.000000 5 118 500.000000 919 595.000000 5 119 500.000000 920 600.000000 5 120 500.000000 921 605.000000 5 121 500.000000 922 610.000000 5 122 500.000000 923 615.000000 5 123 500.000000 924 620.000000 5 124 500.000000 925 625.000000 5 125 500.000000 926 630.000000 5 126 500.000000 927 635.000000 5 127 500.000000 928 640.000000 5 128 500.000000 929 645.000000 5 129 500.000000 930 650.000000 5 130 500.000000 931 655.000000 5 131 500.000000 932 660.000000 5 132 500.000000 933 665.000000 5 133 500.000000 934 670.000000 5 134 500.000000 935 675.000000 5 135 500.000000 936 680.000000 5 136 500.000000 937 685.000000 5 137 500.000000 938 690.000000 5 138 500.000000 939 695.000000 5 139 500.000000 940 700.000000 5 140 500.000000 941 705.000000 5 141 500.000000 942 710.000000 5 142 500.000000 943 715.000000 5 143 500.000000 944 720.000000 5 144 500.000000 945 725.000000 5 145 500.000000 946 730.000000 5 146 500.000000 947 735.000000 5 147 500.000000 948 740.000000 5 148 500.000000 949 745.000000 5 149 500.000000 950 750.000000 5 150 500.000000 951 755.000000 5 151 500.000000 952 760.000000 5 152 500.000000 953 765.000000 5 153 500.000000 954 770.000000 5 154 500.000000 955 775.000000 5 155 500.000000 956 780.000000 5 156 500.000000 957 785.000000 5 157 500.000000 958 790.000000 5 158 500.000000 959 795.000000 5 159 500.000000 960 800.000000 5 160 500.000000 961 805.000000 5 161 500.000000 962 810.000000 5 162 500.000000 963 815.000000 5 163 500.000000 964 820.000000 5 164 500.000000 965 825.000000 5 165 500.000000 966 830.000000 5 166 500.000000 967 835.000000 5 167 500.000000 968 840.000000 5 168 500.000000 969 845.000000 5 169 500.000000 970 850.000000 5 170 500.000000 971 855.000000 5 171 500.000000 972 860.000000 5 172 500.000000 973 865.000000 5 173 500.000000 974 870.000000 5 174 500.000000 975 875.000000 5 175 500.000000 976 880.000000 5 176 500.000000 977 885.000000 5 177 500.000000 978 890.000000 5 178 500.000000 979 895.000000 5 179 500.000000 980 900.000000 5 180 500.000000 981 905.000000 5 181 500.000000 982 910.000000 5 182 500.000000 983 915.000000 5 183 500.000000 984 920.000000 5 184 500.000000 985 925.000000 5 185 500.000000 986 930.000000 5 186 500.000000 987 935.000000 5 187 500.000000 988 940.000000 5 188 500.000000 989 945.000000 5 189 500.000000 990 950.000000 5 190 500.000000 991 955.000000 5 191 500.000000 992 960.000000 5 192 500.000000 993 965.000000 5 193 500.000000 994 970.000000 5 194 500.000000 995 975.000000 5 195 500.000000 996 980.000000 5 196 500.000000 997 985.000000 5 197 500.000000 998 990.000000 5 198 500.000000 999 995.000000 5 199 500.000000 1000 1000.000000 5 200 500.000000 .. GENERATED FROM PYTHON SOURCE LINES 33-34 Read the analysis domain support .. GENERATED FROM PYTHON SOURCE LINES 34-37 .. code-block:: Python tf = model.metadata.time_freq_support print("Number of solution sets", tf.n_sets) .. rst-class:: sphx-glr-script-out .. code-block:: none Number of solution sets 1000 .. GENERATED FROM PYTHON SOURCE LINES 38-42 Compute multi-harmonic response ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This example computes the Rz multi-harmonic responses based on selected nodes and a set of EOs (engine orders). .. GENERATED FROM PYTHON SOURCE LINES 42-77 .. code-block:: Python # Create a total displacement operator and set its time scoping to # the entire time frequency support and its nodes scoping to user-defined nodes. disp_op = ops.result.raw_displacement(data_sources=model) time_ids = list(range(1, model.metadata.time_freq_support.n_sets + 1)) # Define nodal scoping nodes = dpf.Scoping() nodes.ids = [2, 18] # Connect the frequencies and the nodes scopings to the result # provider operator. disp_op.inputs.mesh_scoping.connect(nodes) disp_op.inputs.time_scoping.connect(time_ids) # Extract the Rz component using the component selector operator. comp = dpf.Operator("component_selector_fc") comp.inputs.connect(disp_op.outputs) comp.inputs.component_number.connect(5) # Compute the multi-harmonic response based on Rz and a set of RPMs. rpms = dpf.Scoping() rpms.ids = [1, 2, 3] fft = ops.math.fft_multi_harmonic_minmax() fft.inputs.connect(comp.outputs) fft.inputs.rpm_scoping.connect(rpms) fields = fft.outputs.field_max() len(fields) # one multi-harmonic field response per node field1 = fields[0] field2 = fields[1] .. GENERATED FROM PYTHON SOURCE LINES 78-79 Plot the maximum displacements over time for Node ID 2 and 18 .. GENERATED FROM PYTHON SOURCE LINES 79-86 .. code-block:: Python pyplot.plot(field1.data, "r", label="NODE-ID 2") pyplot.plot(field2.data, "b", label="NODE-ID 18") pyplot.xlabel("Frequency (Hz)") pyplot.ylabel("Displacement (m)") pyplot.legend() pyplot.show() .. image-sg:: /examples/03-harmonic_analyses/images/sphx_glr_00-multi_harmonic_001.png :alt: 00 multi harmonic :srcset: /examples/03-harmonic_analyses/images/sphx_glr_00-multi_harmonic_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 9.269 seconds) .. _sphx_glr_download_examples_03-harmonic_analyses_00-multi_harmonic.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 00-multi_harmonic.ipynb <00-multi_harmonic.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 00-multi_harmonic.py <00-multi_harmonic.py>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_