|
38 | 38 | "output_type": "display_data", |
39 | 39 | "data": { |
40 | 40 | "text/plain": "<IPython.core.display.HTML object>", |
41 | | - "text/html": "<div id='05be0942-5075-4058-b88c-78a13b8ff65b'></div>" |
| 41 | + "text/html": "<div id='727ce7fe-0f63-49f4-9277-3d53bf33114f'></div>" |
42 | 42 | }, |
43 | 43 | "metadata": {} |
44 | 44 | } |
|
103 | 103 | "mySimu.input.N0 = 2000\n", |
104 | 104 | "\n", |
105 | 105 | "# time discretization [s]\n", |
106 | | - "mySimu.input.time= linspace(start=0, stop=60/mySimu.input.N0, num=16, endpoint=False)# 16 timesteps\n", |
| 106 | + "mySimu.input.time = linspace(start=0, stop=60/mySimu.input.N0, num=16, endpoint=False) # 16 timesteps\n", |
107 | 107 | "\n", |
108 | 108 | "# Angular discretization along the airgap circonference for flux density calculation\n", |
109 | 109 | "mySimu.input.angle = linspace(start = 0, stop = 2*pi, num=2048, endpoint=False) # 2048 steps \n", |
|
135 | 135 | "cell_type": "markdown", |
136 | 136 | "metadata": {}, |
137 | 137 | "source": [ |
138 | | - "The stator currents are enforced as a function of time for each phase. The current can also be enforced sinusoïdal by using Id_ref/Iq_ref as explained in the [How to set the Operating Point tutorial](https://www.pyleecan.org/tuto_Elec.html).\n", |
| 138 | + "The stator currents are enforced as a function of time for each phase. The current can also be enforced sinusoïdal by using Id_ref/Iq_ref as explained in the [How to set the Operating Point tutorial](https://www.pyleecan.org/tuto_Operating_point.html).\n", |
139 | 139 | "\n", |
140 | 140 | "### MagFEMM configuration\n", |
141 | 141 | "For the configuration of the Magnetic module, we use the object [**MagFEMM**](https://www.pyleecan.org/pyleecan.Classes.MagFEMM.html) that compute the airgap flux density by calling FEMM. The model parameters are set though the properties of the [**MagFEMM**](https://www.pyleecan.org/pyleecan.Classes.MagFEMM.html) object. In this tutorial we will present the main ones, the complete list is available by looking at [**Magnetics**](http://www.pyleecan.org/pyleecan.Classes.Magnetics.html) and [**MagFEMM**](http://www.pyleecan.org/pyleecan.Classes.MagFEMM.html) classes documentation.\n", |
|
213 | 213 | "cell_type": "code", |
214 | 214 | "execution_count": 6, |
215 | 215 | "metadata": {}, |
216 | | - "outputs": [ |
217 | | - { |
218 | | - "output_type": "error", |
219 | | - "ename": "ValueError", |
220 | | - "evalue": "matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 3 is different from 16)", |
221 | | - "traceback": [ |
222 | | - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", |
223 | | - "\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)", |
224 | | - "\u001b[1;32m<ipython-input-6-cd7bedb9114e>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mpyleecan\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mClasses\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mOutput\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mOutput\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[0mmyResults\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mOutput\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msimu\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmySimu\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mmySimu\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", |
225 | | - "\u001b[1;32md:\\GitHub\\pyleecan\\pyleecan\\Methods\\Simulation\\Simulation\\run.py\u001b[0m in \u001b[0;36mrun\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 41\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 42\u001b[0m \u001b[1;31m# Compute the simulation\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 43\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun_single\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 44\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 45\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mresults\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", |
226 | | - "\u001b[1;32md:\\GitHub\\pyleecan\\pyleecan\\Methods\\Simulation\\Simu1\\run_single.py\u001b[0m in \u001b[0;36mrun_single\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 20\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 21\u001b[0m \u001b[1;31m# Init the input of the first module\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 22\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0minput\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mgen_input\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 23\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 24\u001b[0m \u001b[1;31m# Run the modules\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", |
227 | | - "\u001b[1;32md:\\GitHub\\pyleecan\\pyleecan\\Methods\\Simulation\\InputCurrent\\gen_input.py\u001b[0m in \u001b[0;36mgen_input\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 111\u001b[0m )\n\u001b[0;32m 112\u001b[0m \u001b[1;31m# Compute corresponding Id/Iq reference\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 113\u001b[1;33m \u001b[0mIdq\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mn2dq\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0moutput\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mIs\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mvalues\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m2\u001b[0m \u001b[1;33m*\u001b[0m \u001b[0mpi\u001b[0m \u001b[1;33m*\u001b[0m \u001b[0moutput\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfelec\u001b[0m \u001b[1;33m*\u001b[0m \u001b[0moutput\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtime\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 114\u001b[0m \u001b[0moutput\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mId_ref\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mmean\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mIdq\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 115\u001b[0m \u001b[0moutput\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mIq_ref\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mmean\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mIdq\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", |
228 | | - "\u001b[1;32md:\\GitHub\\pyleecan\\pyleecan\\Functions\\Electrical\\coordinate_transformation.py\u001b[0m in \u001b[0;36mn2dq\u001b[1;34m(Z_n, theta, n)\u001b[0m\n\u001b[0;32m 155\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 156\u001b[0m \"\"\"\n\u001b[1;32m--> 157\u001b[1;33m \u001b[1;32mreturn\u001b[0m \u001b[0mab2dq\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mn2ab\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mZ_n\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mn\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mn\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtheta\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 158\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 159\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n", |
229 | | - "\u001b[1;32md:\\GitHub\\pyleecan\\pyleecan\\Functions\\Electrical\\coordinate_transformation.py\u001b[0m in \u001b[0;36mn2ab\u001b[1;34m(Z_n, n)\u001b[0m\n\u001b[0;32m 74\u001b[0m )\n\u001b[0;32m 75\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 76\u001b[1;33m \u001b[0mZ_ab\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mmatmul\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mZ_n\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mn_2_ab\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 77\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 78\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mZ_ab\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", |
230 | | - "\u001b[1;31mValueError\u001b[0m: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 3 is different from 16)" |
231 | | - ] |
232 | | - } |
233 | | - ], |
| 216 | + "outputs": [], |
234 | 217 | "source": [ |
235 | | - "_myResults = mySimu.run()" |
| 218 | + "myResults = mySimu.run()" |
236 | 219 | ] |
237 | 220 | }, |
238 | 221 | { |
|
243 | 226 | "\n", |
244 | 227 | "The simulation will compute 16 different timesteps by updating the current and the sliding band boundary condition.\n", |
245 | 228 | "\n", |
246 | | - "Once the simulation is finished, an Output object is return. The results are stored in the magnetic part of the output (i.e. _myResults.mag_ ) and we can call different plots. This _myResults.mag_ contains: \n", |
| 229 | + "Once the simulation is finished, an Output object is return. The results are stored in the magnetic part of the output (i.e. _myResults.mag_ ) and different plots can be called. This _myResults.mag_ contains: \n", |
247 | 230 | "- *time*: magnetic time vector without symmetry \n", |
248 | 231 | "- *angle*: magnetic position vector without symmetry \n", |
249 | 232 | "- *B*: airgap flux density (contains radial and tangential components) \n", |
|
278 | 261 | "output_type": "display_data", |
279 | 262 | "data": { |
280 | 263 | "text/plain": "<IPython.core.display.HTML object>", |
281 | | - "text/html": "<div id='48117cd5-41a3-4b0e-8b8e-40715d7d1306'></div>" |
| 264 | + "text/html": "<div id='7a622370-1512-42c4-9c6f-e8235c008a14'></div>" |
282 | 265 | }, |
283 | 266 | "metadata": {} |
284 | | - }, |
285 | | - { |
286 | | - "output_type": "error", |
287 | | - "ename": "AttributeError", |
288 | | - "evalue": "'NoneType' object has no attribute 'name'", |
289 | | - "traceback": [ |
290 | | - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", |
291 | | - "\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)", |
292 | | - "\u001b[1;32m<ipython-input-7-b1987da9c589>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[0mget_ipython\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun_line_magic\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'matplotlib'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'notebook'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mmyResults\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mplot_A_space\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"mag.B\"\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mt_index\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mis_fft\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mr_max\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m76\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m", |
293 | | - "\u001b[1;32md:\\GitHub\\pyleecan\\pyleecan\\Methods\\Output\\Output\\plot\\plot_A_space.py\u001b[0m in \u001b[0;36mplot_A_space\u001b[1;34m(self, Data_str, index_list, t, t_index, is_deg, is_fft, is_spaceorder, r_max, fund_harm, is_norm, unit, data_list, component_list, legend_list, color_list, save_path, y_min, y_max, mag_max, is_auto_ticks, fig)\u001b[0m\n\u001b[0;32m 176\u001b[0m \u001b[0mmag_max\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mmag_max\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 177\u001b[0m \u001b[0mis_auto_ticks\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mis_auto_ticks\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 178\u001b[1;33m \u001b[0mfig\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mfig\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 179\u001b[0m )\n", |
294 | | - "\u001b[1;32md:\\GitHub\\pyleecan\\pyleecan\\Functions\\Plot\\plot_A_space.py\u001b[0m in \u001b[0;36mplot_A_space\u001b[1;34m(data, index_list, t, t_index, is_deg, is_fft, is_spaceorder, r_max, fund_harm, is_norm, unit, data_list, legend_list, color_list, save_path, y_min, y_max, mag_max, is_auto_ticks, fig, subplot_index)\u001b[0m\n\u001b[0;32m 80\u001b[0m \u001b[0mdata_list2\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mdata_list\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 81\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mlegend_list\u001b[0m \u001b[1;33m==\u001b[0m \u001b[1;33m[\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 82\u001b[1;33m \u001b[0mlegend_list\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0md\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mname\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0md\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mdata_list2\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 83\u001b[0m \u001b[0mcurve_colors\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mconfig_dict\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"PLOT\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"COLOR_DICT\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"CURVE_COLORS\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 84\u001b[0m \u001b[0mphase_colors\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mconfig_dict\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"PLOT\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"COLOR_DICT\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"PHASE_COLORS\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", |
295 | | - "\u001b[1;32md:\\GitHub\\pyleecan\\pyleecan\\Functions\\Plot\\plot_A_space.py\u001b[0m in \u001b[0;36m<listcomp>\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m 80\u001b[0m \u001b[0mdata_list2\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mdata\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mdata_list\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 81\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mlegend_list\u001b[0m \u001b[1;33m==\u001b[0m \u001b[1;33m[\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 82\u001b[1;33m \u001b[0mlegend_list\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0md\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mname\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0md\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mdata_list2\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 83\u001b[0m \u001b[0mcurve_colors\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mconfig_dict\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"PLOT\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"COLOR_DICT\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"CURVE_COLORS\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 84\u001b[0m \u001b[0mphase_colors\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mconfig_dict\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"PLOT\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"COLOR_DICT\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m\"PHASE_COLORS\"\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n", |
296 | | - "\u001b[1;31mAttributeError\u001b[0m: 'NoneType' object has no attribute 'name'" |
297 | | - ] |
298 | 267 | } |
299 | 268 | ], |
300 | 269 | "source": [ |
301 | 270 | "%matplotlib notebook\n", |
302 | 271 | "myResults.plot_A_space(\"mag.B\",t_index=1, is_fft=True, r_max=76)" |
303 | 272 | ] |
304 | 273 | }, |
| 274 | + { |
| 275 | + "cell_type": "markdown", |
| 276 | + "metadata": {}, |
| 277 | + "source": [ |
| 278 | + "If the mesh was saved in the output object (mySimu.mag.is_get_mesh = True), it can be plotted with:" |
| 279 | + ] |
| 280 | + }, |
| 281 | + { |
| 282 | + "cell_type": "code", |
| 283 | + "execution_count": 11, |
| 284 | + "metadata": { |
| 285 | + "tags": [] |
| 286 | + }, |
| 287 | + "outputs": [ |
| 288 | + { |
| 289 | + "output_type": "stream", |
| 290 | + "name": "stderr", |
| 291 | + "text": "DEBUG:matplotlib.pyplot:Loaded backend nbAgg version unknown.\nWARNING:root:VTK requires 3D points, but 2D points given. Appending 0 third component.\n" |
| 292 | + } |
| 293 | + ], |
| 294 | + "source": [ |
| 295 | + "%matplotlib notebook\n", |
| 296 | + "myResults.mag.meshsolution.plot_contour(label=\"B\")" |
| 297 | + ] |
| 298 | + }, |
305 | 299 | { |
306 | 300 | "cell_type": "markdown", |
307 | 301 | "metadata": {}, |
|
357 | 351 | "kernelspec": { |
358 | 352 | "display_name": "Python 3.7.2 64-bit", |
359 | 353 | "language": "python", |
360 | | - "name": "python_defaultSpec_1597763043508" |
| 354 | + "name": "python_defaultSpec_1597849012176" |
361 | 355 | }, |
362 | 356 | "language_info": { |
363 | 357 | "codemirror_mode": { |
|
0 commit comments