Commit Graph

11 Commits

Author SHA1 Message Date
Michele Guerini Rocco
ae139410cb
src/gray_project.f90: preserve sign of J_φ in statistics
This makes the following changes to summary.7.txt:

1. Preserve the sign of J_φ_peak J_φ_max, i.e. if the J_φ is negative,
   those will be negative. Previously they would always be unsigned.

2. If the sign of J_φ is alternating significantly, specifically if
    (∫|J_φ|dA - |∫J_φ⋅dA|) / ∫|J_φ|dA > 10%
   then sign of ρ_avg_J, Δρ_avg_J, ρ_max_J, Δρ_max_J will be negative.
   Previously they were always positive.

3. If there is no current J_φ=0 (power dPdV=0), then
   ρ_avg_J=1, rho_max_J=1 (ρ_avg_P=1, rho_max_P=1).
   Previosuly they would be set to zero.
   This helps producing continuous results as a beam is gradually
   focused into the plasma.
2025-03-17 15:27:21 +01:00
Michele Guerini Rocco
82948593fe
src/gray_core.f90: fix output polarisation for nray>1
Store the polarisation ellipse angles χ, ψ only for the central ray.
Otherwise they'll be zeroed out since `plasma_in` does not compute the
polarisation of the other rays.
2025-02-21 19:58:12 +01:00
Michele Guerini Rocco
7cd8d1a597
src/gray_tables.f90: flux-averages do not go past ρ=1 2025-02-21 19:58:11 +01:00
Michele Guerini Rocco
fde048d3ee
src/gray_core.f90: fix polarisation shown in summary table
This changes the ψ, χ polarisation ellipse angles shown in the summary
table to be those of the current plasma wave mode, not the polarisation
of the beam upon re-entering the plasma boundary after reflecting.

Note that the former has always been the intended value, but was likely
changed inadvertently when reflections have been implemented.
2024-11-04 12:05:49 +01:00
Michele Guerini Rocco
ae6ac735e8
tests: update references after pec rewrite 2024-11-04 12:05:42 +01:00
12f15239df
tests: check flux averages 2024-11-04 12:00:21 +01:00
Michele Guerini Rocco
bd6e1521b0
tests: check EC profiles 2024-11-04 12:00:20 +01:00
Michele Guerini Rocco
ee4183faa7
tests: update references with new tables format 2024-11-04 12:00:18 +01:00
Michele Guerini Rocco
bfd675d505
tests: use new file and column names 2024-10-07 16:19:31 +02:00
Michele Guerini Rocco
babca8bdc4
tests: update references after f82f91bc
The following test cases:

  - 04-JT60SA
  - 05-JT60SA-startup
  - 06-ITER-startup.Mixed

were affected by the bug fixed in f82f91bc, so their reference outputs
had to be updated.
2024-04-11 22:16:45 +02:00
Michele Guerini Rocco
6fad08ed7c
add tests 2024-02-09 11:16:17 +01:00