- studyThe PICStudy that owns the charged particles
C++ Type:UserObjectName
Controllable:No
Description:The PICStudy that owns the charged particles
- variableThe variable to contribute to the residual of
C++ Type:NonlinearVariableName
Unit:(no unit assumed)
Controllable:No
Description:The variable to contribute to the residual of
ChargeDensityAccumulator
Accumulator used to evaluate the inner product of the particle charge density and the test function required for solving electromagnetic equations.
Overview
In SALAMANDER the charge density is defined as
(1)
where is the number of computational particles in the simulation, is the charge of the particle, is the weight of the particle, and is the position at which the computational particle exists.
Electrostatic PIC
In electrostatic PIC simulations the electric field is indirectly solved for by first solving for the electrostatic potential, , using Poisson's equation
(2)
The weak form of this takes the form
(3)
The second term of the weak form of Poisson's equation can then be evaluated as
(4)
where is the number of particles which exist on the subdomain where the test function is non-zero. This objects evaluates this source term directly and accumulates the result directly into the residual of the variable representing .
This object was verified with the test case found in (test/tests/userobjects/particle_quantity_accumulation/simple_potential_solve.i). This is the same verification case as presented in Gall et al. (2024) only the inner product of the charge density source term and the finite element test function is evaluated directly.
This representation of the charge density means that direct knowledge of the charge density is lost and only the inner product can be evaluated.
The execute_on
parameter of this object is set to PRE_KERNELS
and is not available to be set by the user.
Example Input Syntax
[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
[stepper]
type = TestSimpleStepper
[]
[initializer]
type = TestPlacedParticleInitializer
start_points = '0 0 0
0.25 0 0
0.5 0 0
0.75 0 0
1 0 0'
start_velocities = '0 0 0
0 0 0
0 0 0
0 0 0
0 0 0'
charge = 0.5
weight = 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'
[]
[accumulator]
type = ChargeDensityAccumulator<<<{"description": "Accumulator used to evaluate the inner product of the particle charge density and the test function required for solving electromagnetic equations.", "href": "ChargeDensityAccumulator.html"}>>>
study<<<{"description": "The PICStudy that owns the charged particles"}>>> = study
variable<<<{"description": "The variable to contribute to the residual of"}>>> = phi
extra_vector_tags<<<{"description": "The extra tags for the vectors this Kernel should fill"}>>> = dump_value
[]
[]
(test/tests/userobjects/particle_quantity_accumulation/simple_potential_solve.i)Input Parameters
- matrix_onlyFalseWhether this object is only doing assembly to matrices (no vectors)
Default:False
C++ Type:bool
Controllable:No
Description:Whether this object is only doing assembly to matrices (no vectors)
Optional Parameters
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution
C++ Type:std::vector<TagName>
Controllable:No
Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the matrices this Kernel should fill
- extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the vectors this Kernel should fill
- matrix_tagssystemThe tag for the matrices this Kernel should fill
Default:system
C++ Type:MultiMooseEnum
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagsnontimeThe tag for the vectors this Kernel should fill
Default:nontime
C++ Type:MultiMooseEnum
Controllable:No
Description:The tag for the vectors this Kernel should fill
Contribution To Tagged Field Data 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).
- 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
- 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]