simba.Codes.OPAL package
Submodules
simba.Codes.OPAL.OPAL module
- class opalLattice(*args, **kwargs)[source]
Bases:
frameworkLatticeClass for defining the GPT lattice object, used for converting the
frameworkLatticeinto a string representation of the lattice suitable for an OPAL input file.- Parameters:
args (
Any)kwargs (
Any)
-
breakstr:
str= '//----------------------------------------------------------------------------' String used for separating headers in the input file
-
code:
str= 'opal' String indicating the lattice object type
-
headers:
Dict= {} Section headers for OPAL input file
-
maxsteps:
int= 1000000 Maximum number of steps for tracking; will be set dynamically once the lattice is parsed
-
particle_definition:
str= None Name of initial particle distribution
- preProcess()[source]
Pre-process the lattice before running the simulation. This method initializes the initial Twiss parameters by calling the getInitialTwiss method.
- Return type:
None
-
ref_idx:
int= None Reference particle index
-
ref_s:
float= None Reference s position
- property space_charge_mode: str | None
Get the space charge mode based on
globalSettingsorfile_block.- Returns:
Space charge mode as string, or None if not provided.
- Return type:
str
-
time_step_size:
float= 2e-12 Step size for tracking
-
version:
str= '202210' Version of OPAL