fsciortino/Aurora

Inclusion of advanced recycling model and ELM-based transport model

antonellozito opened this issue · 1 comments

Work has been started in order to include a more advanced recycling model which includes:

  • A more realistic (and optionally device-specific) pumping specification,

  • A treatment of wall retention which involves physics-based plasma-wall interaction models (including reflection, long term retention and release by ion sputtering), and

  • The possibility to impose semi-automatically a time-dependent transport model which mimics the ELM behavior.

Changes are being currently committed to the branch recycling_model.

Changes/amendments included in the commit 5071cdb:

core.py:

  • Adapted inputs to main Fortran subroutine for the simulation (not the Julia one!!!).
  • Added option to simply control the graphical output of time and radial grids.
  • Added subroutine calc_taumain for calculating the impurity confinement time in the entire plasma (in a very simplified way) at all time steps.
  • Added subroutine calc_compression for calculating the divertor compression ratio at all time steps (requires phys_volumes in the input namelist to be True).
  • Renamed subroutine check_conservation into plot_reservoirs, reorganized plots in it, and now the particle content in the reservoirs is expressed in particle densities when phys_volumes in the input namelist is True.
  • Added subroutine plot_reservoirs_average for plotting the particle content in the various reservoirs time-averaged over cycles (useful for ELMs).
  • Corrected bug in the particle conservation: in the calculation of the total number of impurity particles in the plasma, the volume integral is now extended over the entire radial grid (i.e. using rvol_max = None rather than rvol_max = asim.rvol_lcfs).
  • Changed the notation for the particles permanently removed from the system through pumping from [variable N_pump, label “particles in pump”] to [variable N_out, label “particles pumped”] for consistency.

default_nml.py:

  • Added input variable for adapting some geometric input parametrs for a given device (For now only AUG option present additionally to the default None. Parameters for other devices might be easily added).
  • Added a new sub-dict containing default parameters for the ELM transport model:
    ELM_flag (False by default) is a convenience logic key. Regardless, it is always needed that the user manually creates the time-dependent transport coefficients arrays for implementing ELMs, through transport_utils.ELM_model.
    ELM_time_windows is a list of lists, which defines one or more time windows within the entire simulation times in which ELMs are desired (e.g. [[1,2],[3,4]]). If None (default) then ELMs occur during the entire simulation time.
    ELM_frequency straightforward meaning. Different time windows as defined in ELM_time_windows can have different ELM frequencies.
    crash_duration is the duration of the time windows, within an ELM, during which the transport coefficients (at each radial location) are ramped up linearly from their inter-ELM values to their intra-ELM values.
    plateau_duration is the duration of the time windows, within an ELM, during which the transport coefficients (at each radial location) stays constantly at their intra-ELM values.
    recovery_duration is the duration of the time windows, within an ELM, during which the transport coefficients (at each radial location) are ramped down linearly from their intra-ELM values to their inter-ELM values.
  • Added a new sub-dict containing default parameters for the pumping model.
    If phys_volumes is False then the pumping (from the divertor chamber) is defined through a pumping time tau_pump_ms (as before). If True then the pumping is defined through a pumping speed S_pump in cm^3/s. This needs to be coupled with a particle density in the volume, therefore we need to specify the physical volume vol_div of the divertor reservoir, in cm^3.
    If pump_chamber is False then the pumping is performed directly from the divertor chamber (as before). If True then particles travel first from the divertor reservoir towards a secondary pump reservoir, and from there they are removed from the system. For this option to work, phys_volumes must be True. In this case, S_pump will refer to the pumping from this second reservoir. It will be needed to specify also the physical volume vol_pump of this second reservoir. The transport between divertor chamber and pump chamber will be quantified through the neutral transport conductance L_divpump, in cm^3/s. Additionally one can also specify a further conductance L_leak, in cm^3/s, which quantifies the particle leakage from the pump reservoir towards the core.

impden.f90:

  • Both subroutines impden0 and impden1 adapted to include the new particle source for the core arising from leakage from the pump reservoir (if present).

main.f90:

  • New inputs: S_pump, voldiv, cond, volpump, leak, coming from the new pumping model specifications in the default namelist.
  • Improved pumping model in the edge_model subroutine to include the possibility of defining the pumping in terms of a pumping speed, and the possibility of assuming the presence of a secondary “pump reservoir”, connected to the divertor reservoir through a conductance model, from which the particles are really removed from the system through the pump, or can “leak” back towards the core. See also related point in the description to the changes in default_nml.py.

source_utils.py:

  • Corrected a bug in the definition of the energy of the injected ions when imp_source_energy_eV < 0.
  • Corrected a bug in the definition of the puff duration in the option “step” for “source_type” (now we assume tbuf is a list i.e. allowing for different durations for each puff).

transport_utils.py:

  • NEW FILE: contains functions to efficiently set a radial profile and a time dependency for the anomalous transport coefficient (particle diffusivity and radial pinch velocity) and possibly impose other time-dependent models (e.g. for ELMs).
  • Subroutine interp_coeffs: routine for interpolating a radial transport profile onto the radial grid, at each user-specified time. The user needs to specify a number of transport coefficients values at arbitrary radial locations (not necessary belonging to the radial grid).
  • Subroutine ELM_model: routine for creating a 2D grid for the transport coefficients where the space dependence is given interpolating a user-imposed transport profile onto the radial grid, and the time dependence is given according to the user-specified model for ELMs. The used needs to specify a number of transport coefficients values at arbitrary radial locations for both the inter-ELM windows and the intra-ELM time windows.
  • Subroutine ELM_time_grid: routine for adapting the time grid to imposed ELM time characteristics (as read from the input namelist). Running this subroutine might be useful (but not necessary) before calling ELM_model. A constant and small time steps is maintained during ELMs, which can gradually increase again outside ELMs.

plot_tools.py:

  • Added new subroutine time_average_profiles which performs time average over cycles of a time-dependent multidimensional variable (e.g. nz).
  • Added new subroutine time_average_reservoirs which performs time average over cycles of a time-dependent variable (e.g. particle content in the reservoirs).