BorisStepper

Electromagnetic particle stepper method implementing the Boris Algorithm.

Results of the verification of the BorisStepper can be found in Gall et al. (2024).

In magnetized (or electromagnetic) PIC simulations, the de facto standard particle stepping algorithm is commonly known as the Boris algorithm Boris and others (1970), Birdsall and Langdon (1991), and Qin et al. (2013). This algorithm is similar to a Leap Frog method and has second order accuracy in time when solving the equations of motion for a charged particle, given by

(1)

and

(2)

where is the particle's charge, is the particle's mass, and and are the electric and magnetic fields that the particle is subject to, respectively.

In the Boris algorithm, \cref{eq:pos,eq:vel} are discretized with a central difference scheme and the acceleration due to the electric field and magnetic field are separated. First, half of the impulse due to the electric field is applied to the particle, as

(3)

where is an intermediate particle velocity, is the particle velocity at step , and is the electric field at step . The velocity of the particle after rotation due to the magnetic field is derived as

(4)

with

(5)

where

(6)

which accounts for the effect of , the magnetic field at step . is defined as

(7)

Finally, the rotation due to the presence of the magnetic field is then applied with

(8)

and the final impulse due to the electric field is then applied to the particle using

(9)

The implementation of the Boris algorithm was verified using several single particle motion tests: constant electric field ((test/tests/userobjects/particle_stepper/boris_stepper/boris_parallel_acceleration.i), (test/tests/userobjects/particle_stepper/boris_stepper/boris_projectile_motion.i)), cyclotron motion ((test/tests/userobjects/particle_stepper/boris_stepper/cyclotron_motion.i)), and drift motion ((test/tests/userobjects/particle_stepper/boris_stepper/e_cross_b.i)).

Example Input Syntax

[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
  [stepper]
    type = BorisStepper<<<{"description": "Electromagnetic particle stepper method implementing the Boris Algorithm.", "href": "BorisStepper.html"}>>>
    efield_components<<<{"description": "A list of 3 variables which represent the 3 components of the electric field"}>>> = 'Ex Ey Ez'
    bfield_components<<<{"description": "A list of 3 variables which represent the 3 components of the electric field"}>>> = 'Bx By Bz'
  []

  [initializer]
    type = TestPlacedParticleInitializer
    start_points = '0 1 0'
    start_velocities = '1 0 0'
    mass = 1
    weight = 1
    charge = 1
  []

  [study]
    type = TestInitializedPICStudy
    stepper = stepper
    initializer = initializer
    use_custom_rayids = false
    always_cache_traces = true
    data_on_cache_traces = true
    execute_on = 'TIMESTEP_BEGIN'
  []
[]
(test/tests/userobjects/particle_stepper/boris_stepper/cyclotron_motion.i)

Input Parameters

  • bfield_componentsA list of 3 variables which represent the 3 components of the electric field

    C++ Type:std::vector<VariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:A list of 3 variables which represent the 3 components of the electric field

  • efield_componentsA list of 3 variables which represent the 3 components of the electric field

    C++ Type:std::vector<VariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:A list of 3 variables which represent the 3 components of the electric field

Required Parameters

  • allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Controllable:No

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

  • execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

    Default:TIMESTEP_END

    C++ Type:ExecFlagEnum

    Options:NONE, INITIAL, LINEAR, LINEAR_CONVERGENCE, NONLINEAR, NONLINEAR_CONVERGENCE, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, MULTIAPP_FIXED_POINT_CONVERGENCE, FINAL, CUSTOM

    Controllable:No

    Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

  • execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

    Default:0

    C++ Type:int

    Controllable:No

    Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

  • force_postauxFalseForces the UserObject to be executed in POSTAUX

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in POSTAUX

  • force_preauxFalseForces the UserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in PREAUX

  • force_preicFalseForces the UserObject to be executed in PREIC during initial setup

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in PREIC during initial setup

Execution Scheduling Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters

  • prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Unit:(no unit assumed)

    Controllable:No

    Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

  • use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

Material Property Retrieval Parameters

Input Files

References

  1. Charles K. Birdsall and A. Bruce Langdon. Plasma physics via computer simulation. Adam Hilger, 1991.[BibTeX]
  2. Jay P Boris and others. Relativistic plasma simulation-optimization of a hybrid code. In Proc. Fourth Conf. Num. Sim. Plasmas, 3–67. 1970.[BibTeX]
  3. Grayson S. Gall, Logan H. Harbour, Casey T. Icenhour, Pierre-Clement A. Simon, Derek Gaston, and Amanda M. Lietz. Kinetic plasma simulation in the moose framework: verification of electrostatic particle in cell capabilities. ANS Transactions, 2024.[BibTeX]
  4. Hong Qin, Shuangxi Zhang, Jianyuan Xiao, Jian Liu, Yajuan Sun, and William M Tang. Why is boris algorithm so good? Physics of Plasmas, 2013.[BibTeX]