Buckets:
| from fluidsim import load_sim_for_plot | |
| # Charger la nouvelle simulation Taylor-Green correcte | |
| sim_corrected = load_sim_for_plot("/root/Sim_data/NS2D_48x48_S8x8_2026-01-08_19-42-37") | |
| print("=== SIMULATION TAYLOR-GREEN CORRECTE ===") | |
| print(f"Résolution: {sim_corrected.params.oper.nx} x {sim_corrected.params.oper.ny}") | |
| print(f"Domaine: {sim_corrected.params.oper.Lx} x {sim_corrected.params.oper.Ly}") | |
| print(f"Temps final: {sim_corrected.params.time_stepping.t_end}") | |
| # Analyser l'énergie | |
| energy = sim_corrected.output.spatial_means.load_mean('E') | |
| print(" | |
| Énergie:") | |
| print(".6f") | |
| print(".6f") | |
| print(".1f") | |
| # Visualisation des champs initiaux | |
| import matplotlib.pyplot as plt | |
| fig, axes = plt.subplots(1, 3, figsize=(15, 5)) | |
| rot_init = sim_corrected.output.phys_fields.get_field_to_plot(key='rot', time=0) | |
| ux_init = sim_corrected.output.phys_fields.get_field_to_plot(key='ux', time=0) | |
| uy_init = sim_corrected.output.phys_fields.get_field_to_plot(key='uy', time=0) | |
| axes[0].imshow(rot_init.T, origin='lower', extent=[0, 8, 0, 8]) | |
| axes[0].set_title('Vorticité initiale') | |
| plt.colorbar(axes[0].imshow(rot_init.T, origin='lower', extent=[0, 8, 0, 8]), ax=axes[0]) | |
| axes[1].imshow(ux_init.T, origin='lower', extent=[0, 8, 0, 8]) | |
| axes[1].set_title('Vitesse Ux initiale') | |
| plt.colorbar(axes[1].imshow(ux_init.T, origin='lower', extent=[0, 8, 0, 8]), ax=axes[1]) | |
| axes[2].imshow(uy_init.T, origin='lower', extent=[0, 8, 0, 8]) | |
| axes[2].set_title('Vitesse Uy initiale') | |
| plt.colorbar(axes[2].imshow(uy_init.T, origin='lower', extent=[0, 8, 0, 8]), ax=axes[2]) | |
| plt.tight_layout() | |
| plt.savefig('taylor_green_corrected_init.png', dpi=150, bbox_inches='tight') | |
| plt.show() | |
| print("Image sauvegardée: taylor_green_corrected_init.png") |
Xet Storage Details
- Size:
- 1.72 kB
- Xet hash:
- a3f962a59c1c9e78b0f17abcaa143420b437a6b519ea215c95cf905ff8549b0e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.