Skip to content

Conversation

haykh
Copy link
Collaborator

@haykh haykh commented Sep 15, 2025

  • Npart not being interpreted properly (fixed with a60e7fa)
  • Wrong time stamps in stats
  • E2 vs E^2 (fixed with entity-toolkit/wiki@25c3520)
  • Wrong normalization of particle moments (incl. Npart, T00 etc.)

@haykh haykh self-assigned this Sep 15, 2025
@haykh haykh added bug Something isn't working documentation Improvements or additions to documentation cleanup Cleaning up unnecessary stuff labels Sep 15, 2025
@haykh haykh linked an issue Sep 15, 2025 that may be closed by this pull request
3 tasks
@haykh
Copy link
Collaborator Author

haykh commented Sep 16, 2025

@MGrehan could you pls check this? I also fixed the info in the wiki on stats, and now it should be consistent: https://entity-toolkit.github.io/wiki/content/1-getting-started/5-vis/

@haykh
Copy link
Collaborator Author

haykh commented Sep 16, 2025

like i mentioned in the issue #138, i can't reproduce the problem with timestamps, works ok for me.

@MGrehan
Copy link

MGrehan commented Sep 16, 2025

Re stats issue:

thanks for taking a look. when using this for the interval time

  [output.stats]
    enable = true
    quantities = ["E^2", "B^2", "ExB", "Tij"]
    interval_time = 0.01

the first few outputs looks like this

          step,          time,          E1^2,          E2^2,          E3^2,          B1^2,          B2^2,          B3^2,          ExB1,          ExB2,          ExB3,           Tij,
             4,   0.000828641,   4.73212e-11,    4.7371e-11,   5.34625e-09,     0.0897598,     0.0897598,       21.4001,   1.03267e-09,  -2.31137e-09,  -2.59307e-12,       425.568,     0.0233231,     -0.326416,       425.668,      0.814575,       56575.4,
           200,      0.041432,   7.85533e-09,   7.89272e-09,   1.36386e-08,     0.0897596,     0.0897596,       21.4001,  -2.06001e-10,  -7.21741e-10,   1.03561e-10,       369.796,    -0.0431786,      0.809601,       369.638,      -1.93237,       57485.7,
           396,     0.0820354,   1.23556e-08,   1.24642e-08,     1.471e-08,     0.0897595,     0.0897595,       21.4001,   1.51152e-09,  -1.78403e-09,   2.91613e-10,       407.752,    -0.0848541,      0.515991,        407.46,      -1.87885,       58000.4,
           592,      0.122639,   1.39504e-08,   1.40607e-08,   1.31993e-08,     0.0897597,     0.0897597,       21.4001,  -8.76554e-10,   -2.5118e-09,   6.97707e-10,       403.107,     0.0351982,     -0.339874,       403.231,      0.968445,       56543.9,

which is clearly not right.
when setting interval_time = 0.2 as you did above i get this for the first output

          step,          time,          E1^2,          E2^2,          E3^2,          B1^2,          B2^2,          B3^2,          ExB1,          ExB2,          ExB3,           Tij,
             4,    0.00331456,   1.05483e-09,   1.06176e-09,   1.89642e-07,     0.0897598,     0.0897598,          21.4,  -4.30744e-08,  -1.13807e-08,  -8.63493e-10,       27.4277,     0.0028429,     -0.262203,        27.448,    -0.0226612,       3533.78,
           972,      0.805439,   2.26362e-08,   2.26128e-08,   1.75263e-07,     0.0897591,      0.089759,          21.4,  -1.71031e-07,  -3.33533e-08,   1.26456e-08,       24.9463,    -0.0239451,     -0.257894,       24.9091,   -0.00528336,       3906.55,

seems to be s factor of 4 off in both cases? i will include full toml below

[simulation]
  name    = "fluxtube"
  engine  = "srpic"
  runtime = 4.0

[grid]
  resolution = [1024, 1024]
  extent     = [[-0.75, 0.75], [-0.75, 0.75]]

  [grid.metric]
    metric = "minkowski"

  [grid.boundaries]
    fields    = [["PERIODIC"], ["PERIODIC"]]
    particles = [["PERIODIC"], ["PERIODIC"]]

[scales]
  larmor0    = 2e-4
  skindepth0 = 2e-3

[algorithms]
  current_filters = 4

  [algorithms.timestep]
    CFL = 0.8

[particles]
  ppc0 = 4.0

  [[particles.species]]
    label    = "e-"
    mass     = 1.0
    charge   = -1.0
    maxnpart = 1e8

  [[particles.species]]
    label    = "e+"
    mass     = 1.0
    charge   = 1.0
    maxnpart = 1e8

[setup]
  Bmag    = 1.0
  Bg      = 5.0
  v_drift = 0.1
  R       = 0.5
  A       = 0.0
  R0      = 0.25
  #phi0 = 0.785398 #pi/4
  phi0  = 3.92699 #5pi/4
  Delta = 0.01

[output]
  format        = "BPFile"
  interval_time = 0.1

  [output.fields]
    quantities = ["N_1", "N_2", "E", "B", "J", "V", "T00"]

  [output.particles]
    enable = true
    quantities = ["X","U"]

  [output.spectra]
    enable = false

  [output.stats]
    enable = true
    quantities = ["E^2", "B^2", "ExB", "Tij"]
    interval_time = 0.2

[checkpoint]
  interval_time = 10.0
    keep = 2
    walltime = 23:59:00

@haykh
Copy link
Collaborator Author

haykh commented Sep 16, 2025

oh i think i know what's going on. my bad... this is on 4 GPUs right?

@MGrehan
Copy link

MGrehan commented Sep 16, 2025 via email

@haykh
Copy link
Collaborator Author

haykh commented Sep 16, 2025

ok, should be fixed now. did you check the Tij? the wiki has a rough explanation of what you should expect to see.

@MGrehan
Copy link

MGrehan commented Sep 16, 2025

I have not yet but was my plan to check after energy!

@haykh
Copy link
Collaborator Author

haykh commented Sep 18, 2025

@MGrehan any luck testing this? I want to merge it and move on to other stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cleanup Cleaning up unnecessary stuff documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Issues with stats output
2 participants