First run on two fixed grids
May, 29, 2020
This is the first time we run PHARE, for a "real" simulation, understand that all parts of the multiple refinement levels Hybrid PIC algorithm works from start to end.
Initial condition
The box is 1D and the simulation is configured in the following way:
Simulation(
smallest_patch_size=20,
largest_patch_size=20,
time_step_nbr=100, # number of time steps (not specified if time_step and final_time provided)
final_time=30., # simulation final time (not specified if time_step and time_step_nbr provided)
boundary_types="periodic", # boundary condition, string or tuple, length == len(cell) == len(dl)
cells=40, # integer or tuple length == dimension
dl=0.3, # mesh size of the root level, float or tuple
refinement_boxes={"L0": {"B0": [(10, ), (20, )]}},
diag_options={"format": "phareh5", "options": {"dir": "phare_outputs","mode":"overwrite"}}
)
The initial condition used for this first case was quite simple: an Aflvén wave. The run is 1D along the x axis, so there's an homogeneous Bx component that will never change. Then the other magnetic field components By and Bz are simple sine functions, with constant density ,constant temperature. The ion temperature is super cold (and the electron temperature is zero) so that we can get rid of the noise and see any problem that could occur.
Two fixed grids
As a first test, we designed a simple configuration where there are only 2 refinement levels. The coarse level is made of 2 adjacent patches filling the whole domain. The fine level is fixed in the initial condition by setting the "refinement_boxes" parameter in the Simulation object:
refinement_boxes={"L0": {"B0": [(10, ), (20, )]}},
which means PHARE will refine the domain from cells 10 to 20.
In this first test we see PHARE can run on several ion cyclotron times during which the wave propagates in the domain through the fine grid without any problem occuring at the fine level boundaries.