Hi SPIS community,
I want to run simulations by inserting populations of electrons and protons defined by me. More specifically, these populations are defined by an energy spectrum with the respective integral fluence and differential fluence associated with each energy value.
What is the correct procedure to insert these populations into the simulator?
I suggest a user defined tabulated distribution function. I fed the SPIS documentation into a LLM, asked it questions and got this little guide:
Enabling a Population with a User-Defined Energy Distribution
To enable a population with a user-defined energy distribution in SPIS, you need to configure several parameters within the software. Here's a breakdown of the process, primarily drawing from the information provided in the sources:
1. Choosing an 'Extended Environment'
For user-defined distributions, you must set the environmentType parameter to ExtendedEnvironment. This environment allows you to introduce new populations in addition to the standard bi-Maxwellian electron and ion populations.
2. Defining the Number of Extended Populations
Use the ExtendedPopNbr parameter to specify the number of additional populations you wish to add to the default environment.
3. Setting up the Extended Population
●
You need to define a set of parameters for each extended population. Source [RD7] ("ControllingNUMfromUI.html"), not provided here, contains a complete list of these parameters.
●
Ensure that the parameter pop#VolDistrib is set to PICVolDistrib if you are modelling the new population using numerical particles.
4. Defining the User-Defined Distribution Function (DF)
You can choose from two primary methods for defining the tabulated DF:
●
Internally Coded Functions: SPIS offers several built-in functions that you can select using the pop#EnvironmentDF parameter. Some options include:
○
IsotropicMaxwellianDF: Controlled by pop#Temperature.
○
IsotropicBiMaxwellianDF: Controlled by pop#Temperature1, pop#Temperature2, pop#RatioN1overN2 (density ratio), and pop#RatioJ1overJ2 (current density ratio).
○
IsotropicKappaDF1: A kappa 3D distribution controlled by pop#Temperature and pop#Kappa.
○
MaxwellianDF: A Maxwellian 3V distribution controlled by pop#Tx, pop#Ty, pop#Tz, pop#Vx, pop#Vy, and pop#Vz.
●
User-Defined Tabulated DF: This method requires an ASCII file referenced by the pop#DF_FileName global parameter.
You have two options for formatting this file:
○
Mode 1 (Matrix Format): Specify the ranges for Vx, Vy, and Vz at the beginning, followed by 2D slices for different Vx values.
○
Mode 2 ("Box" Format): Divide the phase space into 3D elements (slabs) and define the DF value and slopes (df/dvx, df/dvy, df/dvz) within each slab.
5. Specifying Additional Parameters
You might need to configure additional parameters based on the chosen DF and the complexity of your simulation. Some potentially relevant parameters include:
●
pop#Dt: Maximum integration time step for the population.
●
pop#Duration: Maximum integration duration for the population.
●
pop#SEEFlag: Controls secondary electron emission under electron or proton impact.
●
pop#Erosion: Activates erosion and allows you to simulate the dynamics of eroded products using the PIC model.
●
pop#Optimization: Enables optimisation of particle injection for better statistics.
Important Considerations:
●
File Location: Place your input ASCII files for the user-defined DF in the directory mySPISprojectRoot/DefaultStudy/Simulations/RunId/NumKernel/Input.
●
Time Steps and Durations: It's important to set appropriate time steps and durations for your simulation. Refer to the SPIS documentation, particularly source [RD7] ("ControllingNUMfromUI.html"), for detailed guidance on configuring these parameters.
●
Verification: After setting up your simulation, thoroughly verify all parameters and settings to ensure they align with your specific modelling goals. SPIS provides various monitoring and diagnostic tools to help you assess the validity of your results.