Skip to content

Commit

Permalink
improve convergence and clean up:
Browse files Browse the repository at this point in the history
- use AD to improve convergence
- tighten tolerances
- increase max time step to reduce computational time
- remove heavy tests since the test now runs in less than 3 seconds
- update documentation
- regold
  • Loading branch information
simopier committed Oct 28, 2024
1 parent f61dc23 commit 15e3450
Show file tree
Hide file tree
Showing 7 changed files with 1,616 additions and 35,493 deletions.
8 changes: 4 additions & 4 deletions test/tests/val-2a/comparison_val-2a.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def numerical_solution_on_experiment_input(experiment_input, tmap_input, tmap_ou
gs = gridspec.GridSpec(1, 1)
ax = fig.add_subplot(gs[0])

ax.plot(simulation_time_TMAP4/3600, simulation_recom_flux_right_TMAP4, linestyle='-', label=r"TMAP8", c='tab:brown')
ax.plot(experiment_time_TMAP4/3600, experiment_flux_TMAP4, linestyle='--', label=r"experiment", c='k')
ax.plot(simulation_time_TMAP4/3600, simulation_recom_flux_right_TMAP4, linestyle='-', label=r"TMAP8", c='tab:gray')
ax.scatter(experiment_time_TMAP4/3600, experiment_flux_TMAP4, label=r"experiment", c='k', size=10)

ax.set_xlabel(u'time (hr)')
ax.set_ylabel(u"Deuterium flux (atom/m$^2$/s)")
Expand All @@ -68,7 +68,7 @@ def numerical_solution_on_experiment_input(experiment_input, tmap_input, tmap_ou
ax.text(1e4/3600.0,40e15, 'RMSPE = %.2f '%RMSPE+'%',fontweight='bold')
ax.minorticks_on()
ax.ticklabel_format(axis='y', style='sci', scilimits=(15,15))
plt.savefig(f'{TMAP4_file_base}.png', bbox_inches='tight')
plt.savefig(f'{TMAP4_file_base}.png', bbox_inches='tight', dpi=300)
plt.close(fig)


Expand Down Expand Up @@ -98,5 +98,5 @@ def numerical_solution_on_experiment_input(experiment_input, tmap_input, tmap_ou
ax.set_xlim(left=0,right=3e-8)
plt.grid(visible=True, which='major', color='0.65', linestyle='--', alpha=0.3)
ax.minorticks_on()
plt.savefig(f'val-2a_comparison_normal_distribution.png', bbox_inches='tight')
plt.savefig(f'val-2a_comparison_normal_distribution.png', bbox_inches='tight', dpi=300)
plt.close(fig)
Loading

0 comments on commit 15e3450

Please sign in to comment.