Skip to content

Conversation

@antonellozito
Copy link

@antonellozito antonellozito commented Dec 7, 2025

This PR contains all the modifications that I coded for SOLPS-ITER in the last months. Whereas they were aimed to my own current research, I coded everything in such a way to make it as general as possible and "ready" to be painlessly merged to the codebase. I have done the equivalent code modifications also for the release/3.1.1 branch. As soon as this PR will have gone through, I will create one also for that branch, already containing any new further modifications which will be suggested during the review of this PR. The manual has been updated accordingly.
The new code is fully working and functional (as I have been using it for several months already). As such, this PR is, from my side, ready to be reviewed.
The changes consist in:

  • Pointer of B2.5 to its version containing extended capabilities of time-dependent ELM transport model and neoclassical transport model and increased output to b2time.nc (see related PR)

  • Expanded capabilities of the nc2text_simple program, in order to make it read also 3-dimensional fields from NetCDF files (so far only 1- and 2-dimensional fields were supported).

  • The 2d, 2da, 2dt, 2dt_av printing/plotting scripts has been expanded to support also the new multi-species fields now contained in b2time.nc.

  • A new 2dds script has been added, to plot profiles from b2time.nc, against the (automatically selected) proper radial coordinate.

  • The 2d_plots and 2d_plots_av scripts have been expanded to include now also species-resolved time traces (plotted together according to the isonuclear sequence of belonging). For consistency and clarity, the generated PostScript file has been renamed from b2time2d(_av).ps to b2time2d_time_traces(_av).ps.

  • The 2d_profiles script has been expanded so that it prints .last10 (pro)files also for multi-species fields (namely one file for each fluid species). Since, for simulations with large number of species, the number of outputted files could become very large, potentially "polluting" a lot the run directory, these files are now created in a /2d_profiles subfolder of the run directory. Additionally now, when the script is invoked, all profiles are also plotted to a new PostScript file, named b2time2d_profiles.ps, in the same fashion as already done for b2time2d_time_traces.ps.

  • A new 2dt_tracing script has been added, which plots time traces of quantities contained in the .trc tracing files (for now only those contained in tracing/blnn_SPb.trc and tracing/blne.trc). Additionally, all time traces are automatically plotted to the PostScript files particle_balance.ps and energy_balance.ps via the auxiliary new scripts particle_balance_tracing and energy_balance_tracing. Note that I created these scripts basically simultaneously as when Andrei wrote some very similar scripts (if not even before), so I did not know about his efforts back then. It is possible that some things are quite redundant.

  • For consistency, new scripts for automatically plotting the norm of the residuals of the ion and electron energy equations (reshe and reshi, respectively) have been added, in the same fashion of the already existing scripts resco and resmo. Additionally, all of the 4 scripts are automatically called through an auxiliary new script plot_residuals, which plots now the norm of all residuals to a new PostScript file residuals.ps.

  • A new auxiliary groups_species script has been added, which prints the ordeded number of species contained in each isonuclear sequence (as something like that was needed for some of the new above mentioned plotting scripts). E.g. executing the script in a run directory of a D+N+He+Ne case outputs 2 8 3 11.

  • The summarize_run script has been updated by simplifying its content. Now it just automatically calls the 2d_profiles, 2d_plots, plot_residuals and last10 scripts.

  • Also, some of the plotting scripts mentioned above, so far left several undesired traces in the run directory (e.g. some temporary gnuplot.data and/or gnuplot.cmd files which were not properly deleted after the call to Gnuplot). This was fixed when present, so that no residual Gnuplot-related files are present in the run directory after calling these scripts.

  • A new auxiliary replace_links has been added, which recursively replaces all symbolic links in a specified directory (and subdirectories) with the real file or folder to which they are linked, keeping the same name of the original link. Especially useful when one wants to transfer a run and/or baserun directory to a new cluster/computer/environment. I think some similar script was already present, but the advantage of this is that it performs the operation fully automatically on all found links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant