Skip to content

Commit d15debe

Browse files
theo-brownTorax team
authored andcommitted
Add P_LH_Delabie to PostProcessedOutputs
PiperOrigin-RevId: 884482674
1 parent 5820763 commit d15debe

File tree

54 files changed

+14
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+14
-4
lines changed

torax/_src/output_tools/post_processing.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,14 @@ class PostProcessedOutputs:
104104
P_icrh_e: Ion cyclotron resonance heating to electrons [W]
105105
P_icrh_i: Ion cyclotron resonance heating to ions [W]
106106
P_icrh_total: Total ion cyclotron resonance heating power [W]
107-
P_LH_high_density: H-mode transition power for high density branch [W]
108-
P_LH_min: Minimum H-mode transition power for at n_e_min_P_LH [W]
109-
P_LH: H-mode transition power from maximum of P_LH_high_density and P_LH_min
110-
[W]
107+
P_LH_high_density: H-mode transition power from the Martin scaling law for
108+
high density branch [W]
109+
P_LH_min: Minimum H-mode transition power from the Martin scaling law for at
110+
n_e_min_P_LH [W]
111+
P_LH: H-mode transition power from the Martin scaling law, taken as the
112+
maximum of P_LH_high_density and P_LH_min [W]
111113
n_e_min_P_LH: Density corresponding to the P_LH_min [m^-3]
114+
P_LH_delabie: H-mode transition power from the Delabie scaling law [W]
112115
E_fusion: Total cumulative fusion energy [J]
113116
E_aux_total: Total auxiliary heating energy absorbed by the plasma ( time
114117
integral of P_aux_total) [J].
@@ -238,10 +241,12 @@ class PostProcessedOutputs:
238241
P_icrh_e: array_typing.FloatScalar
239242
P_icrh_i: array_typing.FloatScalar
240243
P_icrh_total: array_typing.FloatScalar
244+
# TODO(b/434175938) Rename to P_LH_martin_high_density etc
241245
P_LH_high_density: array_typing.FloatScalar
242246
P_LH_min: array_typing.FloatScalar
243247
P_LH: array_typing.FloatScalar
244248
n_e_min_P_LH: array_typing.FloatScalar
249+
P_LH_delabie: array_typing.FloatScalar
245250
E_fusion: array_typing.FloatScalar
246251
E_aux_total: array_typing.FloatScalar
247252
E_ohmic_e: array_typing.FloatScalar
@@ -353,6 +358,7 @@ def zeros(cls, geo: geometry.Geometry) -> typing_extensions.Self:
353358
P_LH_min=jnp.array(0.0, dtype=jax_utils.get_dtype()),
354359
P_LH=jnp.array(0.0, dtype=jax_utils.get_dtype()),
355360
n_e_min_P_LH=jnp.array(0.0, dtype=jax_utils.get_dtype()),
361+
P_LH_delabie=jnp.array(0.0, dtype=jax_utils.get_dtype()),
356362
E_fusion=jnp.array(0.0, dtype=jax_utils.get_dtype()),
357363
E_aux_total=jnp.array(0.0, dtype=jax_utils.get_dtype()),
358364
E_ohmic_e=jnp.array(0.0, dtype=jax_utils.get_dtype()),
@@ -669,6 +675,9 @@ def make_post_processed_outputs(
669675
sim_state.geometry, sim_state.core_profiles
670676
)
671677
)
678+
P_LH_delabie = scaling_laws.calculate_plh_delabie(
679+
sim_state.geometry, sim_state.core_profiles
680+
)
672681

673682
# Calculate P_SOL (Power crossing separatrix) = P_sources - P_sinks - dW/dt
674683
integrated_sources['P_SOL_i'] = (
@@ -933,6 +942,7 @@ def cumulative_values():
933942
P_LH_min=P_LH_min,
934943
P_LH_high_density=P_LH_hi_dens,
935944
n_e_min_P_LH=n_e_min_P_LH,
945+
P_LH_delabie=P_LH_delabie,
936946
E_fusion=E_fusion,
937947
E_aux_total=E_aux_total,
938948
E_ohmic_e=E_ohmic_e,
2.14 KB
Binary file not shown.
736 Bytes
Binary file not shown.
703 Bytes
Binary file not shown.
-384 Bytes
Binary file not shown.
1.9 KB
Binary file not shown.
451 Bytes
Binary file not shown.
1.89 KB
Binary file not shown.
11.3 KB
Binary file not shown.
1.29 KB
Binary file not shown.

0 commit comments

Comments
 (0)