WarpX


CustomSimulation

 CustomSimulation (dim:int=None, diag:bool=True, test:bool=True,
                   n0:float=None, m_ion_norm:float=1836.152,
                   m_ion:float=None, v_ti:float=None, nz:int=None,
                   nx:int=None, nppc:int=64, time_norm:float=100.0,
                   dt_norm:float=0.00390625, diag_time_norm:float=1,
                   diag_steps:int=None, diag_part:bool=False,
                   diag_field:bool=True,
                   diag_format:Literal['plotfile','openpmd']='plotfile',
                   diag_openpmd_backend:Literal['h5','bp','json']='h5',
                   diag_field_list:list=['E', 'B', 'J', 'J_displacement',
                   'rho'], diag_part_list:list=None, restart:bool=False,
                   grid_kwargs:dict={}, warpx_kwargs:dict={},
                   **extra_data:Any)

*Usage docs: https://docs.pydantic.dev/2.7/concepts/models/

A base class for creating Pydantic models.

Attributes: class_vars: The names of classvars defined on the model. private_attributes: Metadata about the private attributes of the model. signature: The signature for instantiating the model.

__pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
__pydantic_core_schema__: The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.
__pydantic_custom_init__: Whether the model has a custom `__init__` function.
__pydantic_decorators__: Metadata containing the decorators defined on the model.
    This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1.
__pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
    __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
__pydantic_post_init__: The name of the post-init method for the model, if defined.
__pydantic_root_model__: Whether the model is a `RootModel`.
__pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
__pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_extra__: An instance attribute with the values of extra fields from validation when
    `model_config['extra'] == 'allow'`.
__pydantic_fields_set__: An instance attribute with the names of fields explicitly set.
__pydantic_private__: Instance attribute with the values of private attributes set on the model instance.*

log_sim_info

 log_sim_info (sim:pywarpx.picmi.Simulation)

print out plasma parameters and numerical parameters.

The Courant-Friedrichs–Lewy (CFL) condition for Whistler waves on the time step is typically \(\Omega_{ci} \Delta t < (\Delta x / d_i)^2 / \pi\) (where \(d_i= c/\omega_{pi}\) is the ion skin depth).

I usually check that \(\Omega_{ci}d_i \Delta t = v_A \Delta t < \Delta x\) as a CFL-like condition (where is the Alfven speed) and keep \(\Delta x < d_i\). In cases where super-Alfvenic ions exist it is also good to ensure that \(v_{max}\Delta t < \Delta x\) as a “particle CFL-like” condition. See comment


HybridSimulation

 HybridSimulation (dim:int=None, diag:bool=True, test:bool=True,
                   n0:float=None, m_ion_norm:float=1836.152,
                   m_ion:float=None, v_ti:float=None, nz:int=None,
                   nx:int=None, nppc:int=64, time_norm:float=100.0,
                   dt_norm:float=0.00390625, diag_time_norm:float=1,
                   diag_steps:int=None, diag_part:bool=False,
                   diag_field:bool=True,
                   diag_format:Literal['plotfile','openpmd']='plotfile',
                   diag_openpmd_backend:Literal['h5','bp','json']='h5',
                   diag_field_list:list=['E', 'B', 'J', 'J_displacement',
                   'rho'], diag_part_list:list=None, restart:bool=False,
                   grid_kwargs:dict={}, warpx_kwargs:dict={},
                   beta:float=0.1, B0:float=1.0000000000000001e-07,
                   vA:float=None, vA_over_c:float=None,
                   n_floor_coef:float=0.015625,
                   plasma_resistivity:float=1e-06,
                   plasma_hyper_resistivity:float=1e-06, substeps:int=10,
                   T_plasma:float=None, Te:float=None, Te_norm:float=1,
                   t_ci:float=None, d_i:float=None, Lz_norm:float=None,
                   Lx_norm:float=0, dz_norm:float=0.25, **extra_data:Any)

*Usage docs: https://docs.pydantic.dev/2.7/concepts/models/

A base class for creating Pydantic models.

Attributes: class_vars: The names of classvars defined on the model. private_attributes: Metadata about the private attributes of the model. signature: The signature for instantiating the model.

__pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
__pydantic_core_schema__: The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.
__pydantic_custom_init__: Whether the model has a custom `__init__` function.
__pydantic_decorators__: Metadata containing the decorators defined on the model.
    This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1.
__pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
    __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
__pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
__pydantic_post_init__: The name of the post-init method for the model, if defined.
__pydantic_root_model__: Whether the model is a `RootModel`.
__pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
__pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_extra__: An instance attribute with the values of extra fields from validation when
    `model_config['extra'] == 'allow'`.
__pydantic_fields_set__: An instance attribute with the names of fields explicitly set.
__pydantic_private__: Instance attribute with the values of private attributes set on the model instance.*

log_info

 log_info (sim:__main__.HybridSimulation)

print out plasma parameters and numerical parameters.