From b7f699f3f7b6a45ab176c17bad682608a716efff Mon Sep 17 00:00:00 2001 From: apearce Date: Wed, 13 Nov 2024 10:03:19 +0000 Subject: [PATCH] rebase --- .../proc-pages/development/add-vars.md | 8 +- .../proc-pages/development/standards.md | 10 +- .../NBI/culham_nb.md | 8 +- .../heating_and_current_drive/NBI/iter_nb.md | 4 +- .../RF/ec_overview.md | 2 +- ...conversion-and-heat-dissipation-systems.md | 2 +- documentation/proc-pages/index.md | 14 + .../proc-pages/physics-models/error.txt | 26 +- .../fusion_reactions/beam_reactions.md | 392 ---- .../deuterium_branching_plot.png | Bin 42945 -> 0 bytes .../fusion_reactions/plasma_bosch_hale.md | 92 - .../fusion_reactions/plasma_reactions.md | 236 --- .../physics-models/plasma_confinement.md | 6 +- .../physics-models/plasma_geometry.md | 4 +- .../physics-models/plasma_power_balance.md | 2 +- .../plasma_radiation_impurities.md | 2 +- .../physics-models/plasma_reactions.md | 66 + examples/csv_output.ipynb | 184 +- examples/examples.ipynb | 1 - examples/scan.ipynb | 2 +- mkdocs.yml | 5 +- process/__init__.py | 3 - process/availability.py | 8 +- process/costs.py | 10 +- process/costs_2015.py | 10 +- process/current_drive.py | 100 +- process/dcll.py | 19 +- process/evaluators.py | 2 +- process/hcpb.py | 53 +- process/io/mfile_comparison.py | 18 +- process/io/obsolete_vars.py | 10 +- process/io/plot_proc.py | 24 +- process/io/sankey_funcs.py | 66 +- process/io/variable_metadata.py | 2 +- process/io/write_new_in_dat.py | 6 +- process/main.py | 9 - process/physics.py | 568 ++---- process/physics_functions.py | 1691 +++++------------ process/plasma_geometry.py | 8 +- process/plasma_profiles.py | 2 +- process/power.py | 43 +- process/stellarator.py | 258 ++- process/vacuum.py | 6 +- scripts/create_dicts_config.py | 2 +- source/fortran/const_and_precisions.f90 | 6 +- source/fortran/constants.f90 | 166 +- source/fortran/constraint_equations.f90 | 98 +- source/fortran/current_drive_variables.f90 | 12 +- source/fortran/evaluators.f90 | 8 +- source/fortran/ife.f90 | 40 +- source/fortran/init_module.f90 | 2 +- source/fortran/initial.f90 | 10 +- source/fortran/input.f90 | 32 +- source/fortran/iteration_variables.f90 | 12 +- source/fortran/main_module.f90 | 2 +- source/fortran/neoclassics_module.f90 | 14 +- source/fortran/numerics.f90 | 2 +- source/fortran/output.f90 | 6 +- source/fortran/physics_variables.f90 | 165 +- source/fortran/scan.f90 | 12 +- .../data/large_tokamak_1_MFILE.DAT | 12 +- .../data/large_tokamak_2_MFILE.DAT | 12 +- .../data/large_tokamak_3_MFILE.DAT | 12 +- .../data/large_tokamak_4_MFILE.DAT | 12 +- .../integration/data/large_tokamak_MFILE.DAT | 12 +- tests/integration/ref_dicts.json | 257 ++- tests/integration/test_solver.py | 2 +- .../input_files/st_regression.IN.DAT | 14 +- .../regression/input_files/stellarator.IN.DAT | 2 +- tests/unit/test_availability.py | 2 +- tests/unit/test_ccfe_hcpb.py | 58 +- tests/unit/test_costs_1990.py | 38 +- tests/unit/test_costs_2015.py | 8 +- tests/unit/test_current_drive.py | 26 +- tests/unit/test_dcll.py | 10 +- tests/unit/test_main.py | 1 - tests/unit/test_physics.py | 286 ++- tests/unit/test_physics_functions.py | 372 ++-- tests/unit/test_power.py | 38 +- tests/unit/test_stellarator.py | 42 +- tests/unit/test_vacuum.py | 2 +- tracking/tracking_data.py | 4 +- 82 files changed, 2007 insertions(+), 3786 deletions(-) delete mode 100644 documentation/proc-pages/physics-models/fusion_reactions/beam_reactions.md delete mode 100644 documentation/proc-pages/physics-models/fusion_reactions/deuterium_branching_plot.png delete mode 100644 documentation/proc-pages/physics-models/fusion_reactions/plasma_bosch_hale.md delete mode 100644 documentation/proc-pages/physics-models/fusion_reactions/plasma_reactions.md create mode 100644 documentation/proc-pages/physics-models/plasma_reactions.md diff --git a/documentation/proc-pages/development/add-vars.md b/documentation/proc-pages/development/add-vars.md index 59347e92..c8a2b173 100644 --- a/documentation/proc-pages/development/add-vars.md +++ b/documentation/proc-pages/development/add-vars.md @@ -247,15 +247,15 @@ Constraint equations are added to *PROCESS* in the following way: !! Logic change during pre-factoring: err, symbol, units will be assigned only if present. !! ffuspow : input real : f-value for maximum fusion power !! powfmax : input real : maximum fusion power (MW) - !! fusion_power : input real : fusion power (MW) + !! powfmw : input real : fusion power (MW) use constraint_variables, only: ffuspow, powfmax - use physics_variables, only: fusion_power + use physics_variables, only: powfmw implicit none type (constraint_args_type), intent(out) :: args - args%cc = 1.0D0 - ffuspow * powfmax/fusion_power + args%cc = 1.0D0 - ffuspow * powfmax/powfmw args%con = powfmax * (1.0D0 - args%cc) - args%err = fusion_power * args%cc + args%err = powfmw * args%cc args%symbol = '<' args%units = 'MW' diff --git a/documentation/proc-pages/development/standards.md b/documentation/proc-pages/development/standards.md index 59a7b449..5cbad1f7 100644 --- a/documentation/proc-pages/development/standards.md +++ b/documentation/proc-pages/development/standards.md @@ -259,7 +259,7 @@ real(kind(1.0D0)) :: alphan = 0.25D0 real(kind(1.0D0)) :: alphap = 0.0D0 !! Pressure profile index -real(kind(1.0D0)) :: alpha_rate_density = 0.0D0 +real(kind(1.0D0)) :: alpharate = 0.0D0 !! Alpha particle production rate (particles/m3/sec) ``` @@ -306,16 +306,16 @@ subroutine constraint_eqn_001(args) !! - \( T_i \) -- density weighted average ion temperature [keV] !! - \( B_{tot} \) -- total toroidal + poloidal field [T] - use physics_variables, only: betaft, beta_beam, dene, ten, dnitot, tin, btot, beta - use constants, only: electron_charge,rmu0 + use physics_variables, only: betaft, betanb, dene, ten, dnitot, tin, btot, beta + use constants, only: echarge,rmu0 implicit none type(constraint_args_type), intent(out) :: args !! constraint derived type - args%cc = 1.0D0 - (betaft + beta_beam + & - 2.0D3*rmu0*electron_charge * (dene*ten + dnitot*tin)/btot**2 )/beta + args%cc = 1.0D0 - (betaft + betanb + & + 2.0D3*rmu0*echarge * (dene*ten + dnitot*tin)/btot**2 )/beta args%con = beta * (1.0D0 - args%cc) args%err = beta * args%cc args%symbol = '=' diff --git a/documentation/proc-pages/eng-models/heating_and_current_drive/NBI/culham_nb.md b/documentation/proc-pages/eng-models/heating_and_current_drive/NBI/culham_nb.md index b3b62345..40ecbd11 100644 --- a/documentation/proc-pages/eng-models/heating_and_current_drive/NBI/culham_nb.md +++ b/documentation/proc-pages/eng-models/heating_and_current_drive/NBI/culham_nb.md @@ -49,11 +49,11 @@ $$ Deuterium and tritium beam densities $$ -\mathtt{dend} = n_{\text{ion}} \times (1-\mathtt{f_tritium_beam}) +\mathtt{dend} = n_{\text{ion}} \times (1-\mathtt{ftritbm}) $$ $$ -\mathtt{dent} = n_{\text{ion}} \times \mathtt{f_tritium_beam} +\mathtt{dent} = n_{\text{ion}} \times \mathtt{ftritbm} $$ Power split to the ions and electrons is clauclated with the $\mathtt{cfnbi()}$ method found [here](../NBI/nbi_overview.md/#ion-coupled-power-cfnbi) and outputs $\mathtt{fpion}$ @@ -72,7 +72,7 @@ plus correction terms outlined in Culham Report AEA FUS 172. | $\mathtt{aspect}$, $A$ | aspect ratio | | $\mathtt{dene}$, $n_{\text{e}}$ | volume averaged electron density $(\text{m}^{-3})$ | | $\mathtt{dnla}$, $n_{\text{e,0}}$ | line averaged electron density $(\text{m}^{-3})$ | -| $\mathtt{beam_energy}$ | neutral beam energy $(\text{keV})$ | +| $\mathtt{enbeam}$ | neutral beam energy $(\text{keV})$ | | $\mathtt{frbeam}$ | R_tangent / R_major for neutral beam injection | | $\mathtt{fshine}$ | shine-through fraction of beam | | $\mathtt{rmajor}$, $R$ | plasma major radius $(\text{m})$ | @@ -114,7 +114,7 @@ $$ Beam energy in MeV $$ -\mathtt{ebmev} = \frac{\mathtt{beam_energy}}{10^3} +\mathtt{ebmev} = \frac{\mathtt{enbeam}}{10^3} $$ x and y coefficients of function J0(x,y) (IPDG89) diff --git a/documentation/proc-pages/eng-models/heating_and_current_drive/NBI/iter_nb.md b/documentation/proc-pages/eng-models/heating_and_current_drive/NBI/iter_nb.md index 56cca157..ee91af1a 100644 --- a/documentation/proc-pages/eng-models/heating_and_current_drive/NBI/iter_nb.md +++ b/documentation/proc-pages/eng-models/heating_and_current_drive/NBI/iter_nb.md @@ -39,11 +39,11 @@ $$ Deuterium and tritium beam densities: $$ -n_D = n_i * (1.0 - \mathtt{f_tritium_beam}) +n_D = n_i * (1.0 - \mathtt{ftritbm}) $$ $$ -n_T = n_i * \mathtt{f_tritium_beam} +n_T = n_i * \mathtt{ftritbm} $$ Power split to ions / electrons is calculated via the the `cfnbi` method described [here](nbi_overview.md) diff --git a/documentation/proc-pages/eng-models/heating_and_current_drive/RF/ec_overview.md b/documentation/proc-pages/eng-models/heating_and_current_drive/RF/ec_overview.md index 0dee08f3..b94ead6a 100644 --- a/documentation/proc-pages/eng-models/heating_and_current_drive/RF/ec_overview.md +++ b/documentation/proc-pages/eng-models/heating_and_current_drive/RF/ec_overview.md @@ -33,7 +33,7 @@ The answer ECGAM is the normalised efficiency $n_{\text{e}}IR/P$ with $n_{\text{ $$ -\mathtt{mcsq} = m_{\text{e}} \frac{c^2}{1 \text{keV}} +\mathtt{mcsq} = 9.1095\times10^{-31} \frac{c^2}{1 \text{keV}} $$ $$ diff --git a/documentation/proc-pages/eng-models/power-conversion-and-heat-dissipation-systems.md b/documentation/proc-pages/eng-models/power-conversion-and-heat-dissipation-systems.md index e4329a83..e00c351e 100644 --- a/documentation/proc-pages/eng-models/power-conversion-and-heat-dissipation-systems.md +++ b/documentation/proc-pages/eng-models/power-conversion-and-heat-dissipation-systems.md @@ -11,7 +11,7 @@ turbines. Figure 1 shows the power flow. ## Divertor -All of the charged particle transport power leaving the plasma (excluding the `1-f_alpha_plasma` portion of +All of the charged particle transport power leaving the plasma (excluding the `1-falpha` portion of the alpha power that escapes directly to the first wall) is assumed to be absorbed in the divertor, along with a proportion `fdiv` of the radiation power and the neutron power. diff --git a/documentation/proc-pages/index.md b/documentation/proc-pages/index.md index 07937b06..7202d847 100644 --- a/documentation/proc-pages/index.md +++ b/documentation/proc-pages/index.md @@ -65,6 +65,20 @@ itself to ensure that the documentation remains consistent with the latest versi It is to be hoped that it will be of assistance not only to users of PROCESS, but to anyone using PROCESS outputs or models based on them. +## Developer Group + +- [James Morris](mailto:james.morris2@ukaea.uk) +- [Michael Kovari](mailto:michael.kovari@ukaea.uk) +- [Stuart Muldrew](mailto:stuart.muldrew@ukaea.uk) +- [Alex Pearce](mailto:alexander.pearce@ukaea.uk) +- [Jonathan Maddock](mailto:jonathan.maddock@ukaea.uk) +- [Timothy Nunn](mailto:timothy.nunn@ukaea.uk) +- [Christopher Ashe](mailto:christopher.ashe@ukaea.uk) +- [Georgina Graham](mailto:georgina.graham@ukaea.uk) +- [Jack Foster](mailto:jack.foster@ukaea.uk) +- [Graeme Turkington](mailto:graeme.turkington@ukaea.uk) +- [Jonathan Matthews](mailto:jonathan.matthews@ukaea.uk) + ## References Below is a list of PROCESS publications describing the models: diff --git a/documentation/proc-pages/physics-models/error.txt b/documentation/proc-pages/physics-models/error.txt index 0681200e..f7d77d83 100644 --- a/documentation/proc-pages/physics-models/error.txt +++ b/documentation/proc-pages/physics-models/error.txt @@ -207,7 +207,7 @@ deuterium-tritium reaction: \] 20\% of the energy produced is given to the alpha particles (\(^4\)He), -a fraction of which remain (c.f. \texttt{f_alpha_plasma}) within the plasma and +a fraction of which remain (c.f. \texttt{falpha}) within the plasma and thermalise (slow down) due to collisions, thus heating the plasma. The remaining 80\% is carried away by the neutrons, which deposit their energy within the blanket and shield. @@ -254,17 +254,17 @@ integrated over the plasma profiles (correctly, with or without pedestals). The fractional composition of the `fuel' ions (D, T and \(^3\)He) is -controlled using the three variables \texttt{f_deuterium}, \texttt{f_tritium} and -\texttt{f_helium3}, respectively: +controlled using the three variables \texttt{fdeut}, \texttt{ftrit} and +\texttt{fhe3}, respectively: \[\begin{aligned} n_{\mbox{fuel}} & = n_D + n_T + n_{\mathrm{^{3}He}} \;\;\; \mbox{particles/m$^3$} \\ -n_D & = \mathtt{f_deuterium} \, n_{\mbox{fuel}} \\ -n_T & = \mathtt{f_tritium} \, n_{\mbox{fuel}} \\ -n_{\mathrm{^{3}He}} & = \mathtt{f_helium3} \, n_{\mbox{fuel}} +n_D & = \mathtt{fdeut} \, n_{\mbox{fuel}} \\ +n_T & = \mathtt{ftrit} \, n_{\mbox{fuel}} \\ +n_{\mathrm{^{3}He}} & = \mathtt{fhe3} \, n_{\mbox{fuel}} \end{aligned}\] -PROCESS checks that \(f_deuterium + f_tritium + f_helium3 = 1.0\), and stops with an +PROCESS checks that \(fdeut + ftrit + fhe3 = 1.0\), and stops with an error message otherwise. \subsection{Plasma Profiles}\label{plasma-profiles} @@ -499,8 +499,8 @@ model. The available impurities are as follows: As stated above, the number density fractions for hydrogen (all isotopes) and helium need not be set, as they are calculated by the code to ensure that plasma quasi-neutrality is maintained, and taking into -account the fuel ratios \texttt{f_deuterium}, \texttt{f_tritium} and -\texttt{f_helium3}, and the alpha particle fraction \texttt{ralpne} which may +account the fuel ratios \texttt{fdeut}, \texttt{ftrit} and +\texttt{fhe3}, and the alpha particle fraction \texttt{ralpne} which may be input by the user. The impurity fraction of one of the elements listed in array @@ -994,18 +994,18 @@ is derived directly from the energy confinement scaling law. \texttt{iradloss\ =\ 0} -- Total power lost is scaling power plus radiation -\texttt{pscaling\ +\ pradpv\ =\ f_alpha_plasma*alpha_power_density\ +\ charged_power_density\ +\ pohmpv\ +\ pinjmw/plasma_volume} +\texttt{pscaling\ +\ pradpv\ =\ falpha*palppv\ +\ pchargepv\ +\ pohmpv\ +\ pinjmw/vol} \texttt{iradloss\ =\ 1} -- Total power lost is scaling power plus core radiation only -\texttt{pscaling\ +\ pcoreradpv\ =\ f_alpha_plasma*alpha_power_density\ +\ charged_power_density\ +\ pohmpv\ +\ pinjmw/plasma_volume} +\texttt{pscaling\ +\ pcoreradpv\ =\ falpha*palppv\ +\ pchargepv\ +\ pohmpv\ +\ pinjmw/vol} \texttt{iradloss\ =\ 2} -- Total power lost is scaling power only, with no additional allowance for radiation. This is not recommended for power plant models. -\texttt{pscaling\ =\ f_alpha_plasma*alpha_power_density\ +\ charged_power_density\ +\ pohmpv\ +\ pinjmw/plasma_volume} +\texttt{pscaling\ =\ falpha*palppv\ +\ pchargepv\ +\ pohmpv\ +\ pinjmw/vol} \subsection{Plasma Core Power Balance}\label{plasma-core-power-balance} @@ -1027,7 +1027,7 @@ The primary sources of power are the fusion reactions themselves, ohmic power due to resistive heating within the plasma, and any auxiliary power provided for heating and current drive. The power carried by the fusion-generated neutrons is lost from the plasma, but is deposited in -the surrounding material. A fraction \texttt{f_alpha_plasma} of the alpha +the surrounding material. A fraction \texttt{falpha} of the alpha particle power is assumed to stay within the plasma core to contribute to the plasma power balance. The sum of this core alpha power, any power carried by non-alpha charged particles, the ohmic power and any injected diff --git a/documentation/proc-pages/physics-models/fusion_reactions/beam_reactions.md b/documentation/proc-pages/physics-models/fusion_reactions/beam_reactions.md deleted file mode 100644 index 2f324520..00000000 --- a/documentation/proc-pages/physics-models/fusion_reactions/beam_reactions.md +++ /dev/null @@ -1,392 +0,0 @@ -# Neutral Beam Injection Fusion - -The main function called for calculating the fusion reactions produced by neutral beam injection is `beam_fusion()` -Due to the small contribution of fusion power from the neutral beams only D-T reactions are taken into account, as D-D additions to fusion power are deemed to be negligible. -The beam fusion calculations will only run if the calculated beam current is greater than 0. This is done by having a NBI heating and current drive configuration. - -The NBI parameters taken from the current drive module to be used in the beam fusion calculations are the beam current (`beam_current`), beam energy (`beam_energy`) and the tritium component of the beam (`f_tritium_beam`). - -Please see the [H&CD section](../../eng-models/heating_and_current_drive/heating-and-current-drive.md) of the docs for more info. - ------------------------- - -## Beam slowing down properties | `beam_fusion()` - -1. **Calculate the beam ion slowing down time given by**: - - $$ - \tau_{\text{slow}} = 1.99 \times 10^{19}\left(A_{\text{D}}\left(1.0-f_{\text{tritium-beam}}\right)+(A_{\text{T}}f_{\text{tritium-beam}})\right)\frac{\langle T_{\text{e}}\rangle^{3/2}}{\langle n_{\text{e}} \rangle \Lambda_{\text{ie}}} - $$ - -2. **Calculate the the beam critical energy** - - The alpha particles are born with an energy of 3.5 MeV and initially slow down mainly by collisions with electrons. At a critical energy $E_{\text{crit}}$ the rate of loss to the ions becomes equal to that to the electrons, and at lower energies the loss to the ions predominates.[^1] - - $$ - E_{\text{crit}} = 14.8 A T_{\text{e}}\left[\frac{1}{n_{\text{e} \ln{ \Lambda_{\text{e}}}}}\left[\Sigma \frac{n_j Z_j^2\ln{\Lambda_{\text{i}}}}{A_j}\right]\right]^{2/3} \ [\text{eV}] - $$ - - This can be approximated to: - - $$ - E_{\text{crit}} \approx 0.1AT_{10} \ \ [\text{MeV}] - $$ - - Though is currently implemented for deuterium as: - - $$ - E_{\text{crit,D}} = 14.8A_{\text{D}}T_{\text{e}}Z_{\text{eff}}^{2/3}\frac{\ln \Lambda_{\text{ie}}+4.0}{\Lambda_{\text{ie}}} - $$ - - The tritium critical energy is simply just scaled with the ratio of atomic mass numbers - - $$ - E_{\text{crit,T}} = E_{\text{crit,D}}\left(\frac{A_{\text{T}}}{A_{\text{D}}}\right) - $$ - - --------------------------- - - ### Derivation of beam slowing down rate and critical energy - - The rate of slowing down of a test particle of mass $M$, charge $Z\text{e}$ and energy $E$, due to Coulomb collisions with a background species off mass $m_{\text{j}}$, charge $Z_{\text{j}}\text{e}$, density $n_{\text{j}}$ and temperature $T_{\text{j}}$ is given by[^2]: - - $$ - \frac{\mathrm{dE}}{\mathrm{dt}}=\left[-\Phi\left(x_{\text{j}}\right)+x_{\text{j}}\left(1+\frac{m_{\text{j}}}{M} \Phi^{\prime}\left(x_{\text{j}}\right)\right)\right] \frac{4 \pi n_{\text{j}}}{m_{\text{j}} V}\left(\frac{Z z_{\text{j}} Z \text{e}^2}{4 \pi \varepsilon_0}\right)^2 \ln \Lambda_{\text{j}}, - $$ - - where $\Phi(x)$ is the error function, - - $$ - \Phi^{\prime}(x) = \frac{\mathrm{d\Phi}}{\mathrm{dx}}, \ \ V = \sqrt{\frac{2E}{M}}, \ \ V_{\text{j}} = \sqrt{\frac{2kT_{\text{j}}}{m_{\text{j}}}}, \ \ x_{\text{j}} = \frac{V}{V_{\text{j}}} - $$ - - and $\ln \Lambda_{\text{j}}$ is the usual Coulomb logarithm for the test particle and background species interactions. - - For the contribution to the slowing down due to interaction with the background ions, we can use a large argument expansion for the error function. This is because the fusion born ions have a velocity $V$, much greater than the thermal velocity $V_{\text{j}}$, of the background ions. The velocity of the fast ions is much less than the thermal velocity of electrons, however. For the electron contribution to the slowing down we use the small argument expansion for the error function. The net slowing down rate is then given by - $$ - \frac{\mathrm{d E}}{\mathrm{d t}}=-\frac{A Z^2 \sqrt{M}}{\sqrt{E}}-\frac{B Z^2 E}{M} - $$ - where the coefficients $A$ and $B$ are given by - $$ - \begin{aligned} - & A=\frac{4 \pi}{\sqrt{2}}\left(\frac{\text{e}^2}{4 \pi \varepsilon_0}\right)^2 \sum_j\left(\frac{n_{\text{j}} Z_{\text{j}}^2}{m_{\text{j}}} \ln \Lambda_j\right) \\ - & B=\frac{16 \sqrt{\pi}}{3 k T_{\text{e}}} \sqrt{\frac{m_{\text{e}}}{2 k T_{\text{e}}}}\left(\frac{\text{e}^2}{4 \pi \varepsilon_0}\right)^2 n_{\text{e}} \ln \Lambda_{\text{e}} - \end{aligned} - $$ - - The sum over $\text{j}$ in $A$ is over the various ionic species. The quantities with subscript $\text{e}$ refer to the electrons. - - $\frac{\mathrm{d E}}{\mathrm{d t}}$ can be rewritten in the form, - - $$ - \frac{d E}{d t}=-\frac{2 E}{\tau_{\text{slow}}}\left[1+\left(\frac{E}{E}\right)^{3 / 2}\right] - $$ - - The critical energy $E_{\text{c}}$ is given by - - $$ - E_c=\left[\frac{3 \sqrt{\pi}}{4} \frac{M^{3 / 2}}{n_{\text{e}} \sqrt{m}_{\text{e}}} \sum_j\left(\frac{n_{\text{j}} z_{\text{j}}^2}{m_{\text{j}}} \ln \Lambda_{\text{j}}\right) \frac{1}{\ln \Lambda_{\text{e}}}\right]^{2 / 3} k T_{\text{e}} - $$ - - Some authors take $\ln \Lambda_i=\ln \Lambda_{\text{e}}$ in the expression for $E_C$, but this is not a good approximation for fast ion slowing down in fusion plasmas since $\ln \Lambda_{\text{e}} \approx 17$, while $\ln \Lambda_i \approx 22$. The slowing down time, $\tau_{\text{slow}}$ is given by - - $$ - \tau_{\text{slow}}=\frac{3(k T_{\text{e}})^{3 / 2}}{4 \sqrt{2 \pi m_{\text{e}}} Z^2}\left(\frac{4 \pi \varepsilon_0}{\text{e}^2}\right)^2 \frac{M}{n_{\text{e}} \ln \Lambda_{\text{e}}} - $$ - - When the particle energy $E$ is above $E_C$ the contribution of the electrons to the slowing down is larger than that of the ions. The slowing down time $\tau_s$ is actually the time scale for $V$ to decrease due to electron drag, i.e. $\tau_{\text{slow}}=-V /(d V / d t) e^*$ - - $\blacksquare$ - - ------------------------- - -3. **Set the plasma tritium and ion densities** - - $$ - \mathtt{deuterium\_density = deni * f\_deuterium\_plasma} \\ - \mathtt{tritium\_density = deni * f\_tritium\_plasma} - $$ - -4. **Calculate the beam alpha powers, density and deposited energy** - - [`beamcalc()`](#neutral-beam-alpha-power-and-ion-energy--beamcalc) is ran to find the alpha power from the beams, the beam densities and the total energy deposited into the plasma. - -5. **Set the returned alpha power** - - $$ - P_{\alpha,\text{beam}} = \mathtt{beamfus0} \times \left(P_{\alpha,\text{D-beam}} + P_{\alpha,\text{T-beam}}\right) - $$ - -6. **Calculate the neutral beam beta** - - $$ - \beta_{\text{beam}} = \mathtt{betbm0}\times \frac{2}{3}4.03\times10^{-22} \frac{n_{\text{beam}}E_{\text{hot,beam}}}{B_{\text{tot}}^2} - $$ - - The value of $E_{\text{hot,beam}}$ is the energy deposited by the fast beam ions into the plasma, NOT the initial energy of the beam. - ------------------------- - -## Neutral beam alpha powers, density and deposited energy | `beamcalc()` - -1. **Calculate the beam current densities** - - $$ - I_{\text{beam,D}} = I_{\text{beam}} \times \left(1-\mathtt{f\_tritium\_beam}\right) \\ - I_{\text{beam,T}} = I_{\text{beam}} \times \mathtt{f\_tritium\_beam} - $$ - -2. **Calculate the characteristic time taken for the beam energy to comparable to that of the thermal energy** - - The attenuation of the beam energy as it penetrates into the plasma is given by[^3]: - - $$ - E_{\text{beam}} = E_{\text{beam,0}} \left[e^{-\frac{3t}{\tau_{\text{slow}}}}-\left(\frac{E_{\text{crit}}}{E_{\text{beam,0}}}\right)^{\frac{3}{2}}\left(1-e^{-\frac{3t}{\tau_{\text{slow}}}}\right)\right]^{\frac{2}{3}} - $$ - - Where the characteristic time taken for the beam energy to fall to that of the thermal energy: - - $$ - \tau_{\text{slow,D*}} = \frac{\tau_{\text{slow}}}{3}\ln\left(1+\left(\frac{E_{\text{beam,0}}}{E_{\text{crit,D}}}\right)^{\frac{3}{2}}\right) \\ - \tau_{\text{slow,T*}} = \frac{\tau_{\text{slow}}}{3}\ln\left(1+\left(\frac{E_{\text{beam,0}}}{E_{\text{crit,T}}}\right)^{\frac{3}{2}}\right) - $$ - - This is calculated for the deuterium and the tritium beam components - -3. **Set the fast beam ion densities** - - $$ - \langle n_{\text{beam}} \rangle_{\text{D}} = \frac{I_{\text{beam,D}}\tau_{\text{slow,D*}}}{V_{\text{plasma}}} \\ - \langle n_{\text{beam}} \rangle_{\text{T}} = \frac{I_{\text{beam,T}}\tau_{\text{slow,T*}}}{V_{\text{plasma}}} - $$ - - We can also set the total hot ion beam density as: - - $$ - \langle n_{\text{beam}} \rangle_{\text{total}} = \langle n_{\text{beam}} \rangle_{\text{D}} + \langle n_{\text{beam}} \rangle_{\text{T}} - $$ - -4. **Calculate the speeds of ions when at the critical energy** - - Assuming non-relativistic energies, we set the velocities of the deuterium and tritium particles when they have the critical energy: - - $$ - v_{\text{crit,D}} = \sqrt{\left(2m_{\text{D}}E_{\text{crit,D}}\right)} \quad - v_{\text{crit,T}} = \sqrt{\left(2m_{\text{T}}E_{\text{crit,T}}\right)} - $$ - -5. **Calculate the fast ion pressures** - - The fast ion pressure is set as: - - $$ - p_{\text{D}}=\frac{m_{\text{D}} \tau_{\text{slow}} v_{\text{crit,D}}^2 I_{\text{beam,D}}}{3 V_{\text{plasma}}} \times \\ - \underbrace{\left[\frac{x_c^2}{2}+\frac{1}{6} \ln \left(\frac{x_c^2+2 x_c+1}{x_c^2-x_c+1}\right)-\frac{1}{\sqrt{3}} \tan ^{-1}\left(\frac{2 x_c-1}{\sqrt{3}}\right)-\frac{1}{\sqrt{3}} \tan \left(\frac{1}{\sqrt{3}}\right)\right]}_{\mathtt{\_fast\_ion\_pressure\_integral(E_{\text{beam}},E_{\text{crit,D}})}} \\ - p_{\text{T}}=\frac{m_{\text{T}} \tau_{\text{slow}} v_{\text{crit,T}}^2 I_{\text{beam,T}}}{3 V_{\text{plasma}}} \times \\ \quad - \underbrace{\left[\frac{x_c^2}{2}+\frac{1}{6} \ln \left(\frac{x_c^2+2 x_c+1}{x_c^2-x_c+1}\right)-\frac{1}{\sqrt{3}} \tan ^{-1}\left(\frac{2 x_c-1}{\sqrt{3}}\right)-\frac{1}{\sqrt{3}} \tan \left(\frac{1}{\sqrt{3}}\right)\right]}_{\mathtt{\_fast\_ion\_pressure\_integral(E_{\text{beam}},E_{\text{crit,T}})}} - $$ - - --------------------------------- - - ### Beam fast ion pressure integral | `_fast_ion_pressure_integral()` - - This internal function is for returning the main integral value for the fast ion pressure. It takes the initial beam energy ($E_{\text{beam}}$) and the critical energy ($E_{\text{crit}}$) for the required ion species. - - This integral derivation is originally of the form derived by D.Baiquan et.al.[^2] - - #### Derivation - - The fast ions, because of their finite slowing down time, develop a certain amount of pressure which has to be supported by the magnetic field. - - This is in addition to the pressure of accumulated thermal "ash" in the plasma. To calculate this pressure we introduce a kinetic equation for the slowing down particles and solve it for their distribution function. Integration of the distribution function then determines the fast ion pressure. - - We introduce the distribution function $g$ , of fast ions; $g$ is defined as the number of ions per unit energy per unit spatial volume and satisfies the steady-state kinetic equation, - - $$ - \frac{\partial}{\partial E}\left(g \frac{d E}{d t}\right)=S(E), - $$ - - where $S(E)$ is the source function in this "phase" space and $d E / d t$ is given by: - - $$ - \frac{dE}{dT} = -\frac{2E}{\tau_s}\left[1+\left(\frac{E_c}{E}^{\frac{3}{2}}\right)\right] - $$ - - This is the same form as above for deriving the critical energy and beam slow time in [`beam_fusion()`](#beam-slowing-down-properties--beam_fusion) - - This equation assumes the ions have a confinement time much longer than the slowing down time. For cases in which this is not true, an additional loss term would have to be introduced in the equation above. If we assume the ions are born monoenergetically, then: - - $$ - S(E)=S_0 \delta\left(E-E_0\right), - $$ - - where $\mathrm{S}_0$ is the number of ions born per unit time per unit volume and $\delta$ is the [Dirac delta function](https://en.wikipedia.org/wiki/Dirac_delta_function). - - We impose the boundary condition that $\mathrm{g}=0$ for $\mathrm{E}>\mathrm{E}_0$. Our steady state kinetic distribution function can then be integrated to yield: - - $$ - g(E)= \begin{cases}\frac{S_0 T_s}{2 E\left(1+\left(E_c / E\right)^{3 / 2}\right)}, & EE_0\end{cases} - $$ - - If we consider the appropriate limiting cases. - - The pressure $p$ of the fast ions is - - $$ - p=\frac{2}{3} \int_0^{E_0} g(E) E \ \ \mathrm{dE} - $$ - - which can be rewritten as - - $$ - p=\frac{M S_0 \tau_s V_c^2}{3} \int_0^{X_c} \frac{x^4}{1+x^3} \quad \mathrm{dx} - $$ - - The integral above can also be evaluated analytically to yield: - - $$ - p=\frac{M \tau_s V_c^2 S_0}{3}\left[\frac{x_c^2}{2}+\frac{1}{6} \ln \left(\frac{x_c^2+2 x_c+1}{x_c^2-x_c+1}\right) \\ - -\frac{1}{\sqrt{3}} \tan ^{-1}\left(\frac{2 x_c-1}{\sqrt{3}}\right)-\frac{1}{\sqrt{3}} \tan \left(\frac{1}{\sqrt{3}}\right)\right] - $$ - - For most applications to fusion born particles, the dominant term is the first term in the square brackets. - This function returns the terms in the square brackets. - - $\blacksquare$ - - -------------------------- - -6. **Calculate the deposited fast ion energy from the pressure** - - This can be simply done by applying the Ideal gas law approximation that, $P = \frac{1}{3}nmv_{\text{rms}^2} = \frac{2}{3}n \langle E \rangle$ - - $$ - E_{\text{hot,D}} = \frac{3}{2}p_{\text{D}} \langle n_{\text{beam}} \rangle_{\text{D}} \\ - E_{\text{hot,T}} = \frac{3}{2}p_{\text{T}} \langle n_{\text{beam}} \rangle_{\text{T}} - $$ - - We can thus also define the total hot ion depoisted energy as: - - $$ - E_{\text{hot,total}} = \frac{\left( E_{\text{hot,D}} \langle n_{\text{beam}} \rangle_{\text{D}}\right) + \left( E_{\text{hot,T}} \langle n_{\text{beam}} \rangle_{\text{T}}\right)}{\langle n_{\text{beam}} \rangle_{\text{total}}} - $$ - -7. **Calculate the hot ion species fusion rates** - - The D-T fusion reaction rate is calculated from the [`beam_reaction_rate()`](#beam-fusion-reaction-rate--beam_reaction_rate) function. - - ------------------------ - - ### Beam fusion reaction rate | `beam_reaction_rate()` - - 1. **Calculate beam velocity** - - The beam velocity ($v_{\text{beam}}$) is calculated from the inputted beam energy and relative ion mass of the beam by simply re-arranging the kinetic energy equation - - 2. **Define the integral coefficient** - - $$ - \frac{3v_{\text{critical}}}{\ln\left(1+\frac{v_{\text{beam}}}{v_{\text{critical}}}\right)^{3}} - $$ - - 3. **Perform the fusion rate integral** - - $$ - \int_0^{v_{\text{relative}}} \frac{u^3}{1+u^3}\sigma_{\text{bmfus}}(E_{\text{amu}}) - $$ - - -------------------- - - #### Hot Beam Fusion Reaction Rate Integrand | `_hot_beam_fusion_reaction_rate_integrand()` - - This function computes the integrand for the hot beam fusion reaction rate based on the ratio of beam velocity to the critical velocity and the critical velocity for electron/ion slowing down of the beam ion. - - The integrand function is: - - $$ - \int \frac{u^3}{1+u^3}\sigma_{\text{bmfus}}(E_{\text{amu}}) - $$ - - Where $u$ is the inputted ratio of the beam to the critical velocity. - $E_{\text{amu}}$ represents the beam kinetic energy per atomic mass unit. - - The calculated beam fusion cross section $\sigma_{\text{bmfus}}$ is calculated from [`_beam_fusion_cross_section()`](#beam-fusion-cross-section--_beam_fusion_cross_section) - - ------------------------ - - #### Beam fusion cross section | `_beam_fusion_cross_section()` - - This internal function is used to find the beam cross section. - It sets limits on cross-section at low and high beam energies. The plasma ions are assumed to be stationary: - - $$ - \sigma_{\text{bm}}(E) = - \begin{cases} - 1.0 \times 10^{-27} \ \text{cm}^2 & \text{if } E < 10.0 \ \text{keV/amu} \\ - 8.0 \times 10^{-26} \ \text{cm}^2 & \text{if } E > 10^4 \ \text{keV/amu} \\ - \frac{1.0 \times 10^{-24} \cdot \left( \frac{a_2}{1.0 + (a_3 E - a_4)^2} + a_5 \right)}{E \left( \exp\left(\frac{a_1}{\sqrt{E}}\right) - 1.0 \right)} \ \text{cm}^2 & \text{otherwise} - \end{cases} - $$ - - where: - - - \( E \) is the beam energy in, $\text{keV/amu}$ - - - \( a_1, a_2, a_3, a_4, a_5 \) are constants. - - The constants are defined as: - - - \( a_1 = 45.95 \) - - \( a_2 = 5.02 \times 10^4 \) - - \( a_3 = 1.368 \times 10^{-2} \) - - \( a_4 = 1.076 \) - - \( a_5 = 4.09 \times 10^2 \) - - ---------------------- - - 4. **Multiply by the coefficient to get the full fusion rate** - - $$ - \frac{3v_{\text{critical}}}{\ln\left(1+\frac{v_{\text{beam}}}{v_{\text{critical}}}\right)^{3}}\int_0^{v_{\text{relative}}} \frac{u^3}{1+u^3}\sigma_{\text{bmfus}}(E_{\text{amu}}) - $$ - - ------------------------- - -8. **Calculate the alpha power produced by the hot ion species** - - The function [`alpha_power_beam()`](#beam-fusion-alpha-power--alpha_power_beam) is ran to calculate the alpha power produced by the deuterium and tritium fast ions. - - ----------------------- - - ### Beam fusion alpha power | `alpha_power_beam()` - - 1. **Calculate reactivity ratio** - - The ratio between the profile averaged reactivity for D-T reactions and the reactivity for the D-T reactions if the plasma is assumed to be homogeneously at the volume averaged ion temperature ($T_{\text{i}}$) is calculated. - - $$ - f_{\text{DT}} = \frac{\langle\langle \sigma v \rangle\rangle_{\text{DT}}}{\langle \sigma v \rangle_{\text{DT}}} - $$ - - 2. **Calculate the alpha fusion power** - - The alpha powers from the deuterium and tritium beam components are calculated: - - $$ - P_{\alpha,\text{D}} = \langle n_{\text{beam}} \rangle_{\text{D}} n_{\text{i}} \langle \sigma v \rangle_{\text{beam}} E_{\alpha} V_{\text{plasma}} f_{\text{DT}} \\ - P_{\alpha,\text{T}} = \langle n_{\text{beam}} \rangle_{\text{T}} n_{\text{i}} \langle \sigma v \rangle_{\text{beam}} E_{\alpha} V_{\text{plasma}} f_{\text{DT}} - $$ - ------------------------------- - -## Key Constraints - -### Hot beam ion density limit - -This constraint can be activated by stating `icc = 7` in the input file. - -The desired value of the hot ion beam density calculated from the code (`beam_density_out`) can be constrained using the input variable, `rnbeam`. Which is the ratio of the beam density to the plasma electron density. It can be set as an iteration variable by setting `ixc = 7`. - -[^1]: J. W. Sheffield, “The physics of magnetic fusion reactors,” vol. 66, no. 3, pp. 1015–1103,Jul. 1994, doi: https://doi.org/10.1103/revmodphys.66.1015. -[^2]: Deng Baiquan and G. A. Emmert, “Fast ion pressure in fusion plasma,” Nuclear Fusion and Plasma Physics,vol. 9, no. 3, pp. 136–141, 2022, Available: https://fti.neep.wisc.edu/fti.neep.wisc.edu/pdf/fdm718.pdf -[^3]: Wesson, J. (2011) Tokamaks. 4th Edition, 2011 Oxford Science Publications,International Series of Monographs on Physics, Volume 149. \ No newline at end of file diff --git a/documentation/proc-pages/physics-models/fusion_reactions/deuterium_branching_plot.png b/documentation/proc-pages/physics-models/fusion_reactions/deuterium_branching_plot.png deleted file mode 100644 index abf404cc4f8e8d719ad63eb846947e2c6b67c516..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 42945 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%0Ai;5t24dE5TDi| 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 E08tx}zW@LL diff --git a/documentation/proc-pages/physics-models/fusion_reactions/plasma_bosch_hale.md b/documentation/proc-pages/physics-models/fusion_reactions/plasma_bosch_hale.md deleted file mode 100644 index 2c3e64e4..00000000 --- a/documentation/proc-pages/physics-models/fusion_reactions/plasma_bosch_hale.md +++ /dev/null @@ -1,92 +0,0 @@ -# Bosch-Hale Methods - -These methods are still kept in `physics_functions.py` but outside the [`FusionReactionRate`](plasma_reactions.md) class. - -## Bosch-Hale Constants | `BoschHaleConstants` - -The `BoschHaleConstants` class is a data structure designed to hold the constants required for the Bosch-Hale calculation for a given fusion reaction. The values for each of the given reactions are given in the original paper[^1]. - -### Attributes - -- **bg (float)**: Represents the Gamow energy parameter. -- **mrc2 (float)**: Represents the reduced mass energy term. -- **cc1 (float)**: Coefficient for the first term in the Bosch-Hale polynomial. -- **cc2 (float)**: Coefficient for the second term in the Bosch-Hale polynomial. -- **cc3 (float)**: Coefficient for the third term in the Bosch-Hale polynomial. -- **cc4 (float)**: Coefficient for the fourth term in the Bosch-Hale polynomial. -- **cc5 (float)**: Coefficient for the fifth term in the Bosch-Hale polynomial. -- **cc6 (float)**: Coefficient for the sixth term in the Bosch-Hale polynomial. -- **cc7 (float)**: Coefficient for the seventh term in the Bosch-Hale polynomial. - --------------------------- - -## Volumetric Fusion Rate | `bosch_hale_reactivity()` - -This function calcualtes the relative velocity fusion reactivity $\langle \sigma v \rangle$ for each point in the plasma profile based on the temperature. - - | Input Variable | Variable Name | - |----------------------------------|-----------| - | Array of temperature values for the plasma profile | `temperature_profile` | - | Bosch-Hale constants for the specific reaction | `reaction_constants` | - -$$ -\theta = \frac{\text{T}}{\left[1-\frac{\text{T(C2+T(C4+TC6))}}{1+\text{T(C3+T(C5+TC7))}} \right]} -$$ - -$$ -\xi = \left(\frac{\text{B}_\text{G}^2}{4\theta}\right)^{\frac{1}{3}} -$$ - -$$ -\langle \sigma v \rangle = \text{C1} \times \theta \times \sqrt{\frac{\xi}{m_{\text{r}}\text{c}^2\text{T}^3}} \times e^{-3\xi} -$$ - -This will output a numpy array for of the relative velocity fusion reactivity $\langle \sigma v \rangle$ for each point in the temperature profile in units of $[\text{m}^3\text{s}^{-1}]$ After calculation each value is multiplied by $10^{-6}$ as the original Bosch-Hale calculation[^1] give the output in $[\text{cm}^3\text{s}^{-1}]$ - --------------------------------- - -## Fusion Rate Integral | `fusion_rate_integral()` - -| Input Variable | Variable Name | - |----------------------------------|-----------| - | PlasmaProfile object | `plasma_profile` | - | Bosch-Hale constants for the specific reaction | `reaction_constants` | - -This function calculates the integrand for the fusion power integration by evaluating the number of fusion reactions per unit volume per particle volume density [$\text{m}^3\text{s}^{-1}$]. It scales the ion temperature profile by the ratio of the volume-averaged ion to electron temperature and normalizes the density profile by the volume-averaged density. The resulting integrand is used to compute the volume-averaged fusion reaction rate, which can be scaled with the volume-averaged ion density. - -1. **Scale Ion Temperature Profile**: - - Scale the ion temperature profile by the ratio of the volume-averaged ion to electron temperature. - - $$ - \mathtt{ion\_temperature\_profile} = \frac{\langle T_{\text{i}} \rangle}{\langle T_{\text{e}} \rangle} \\ - \times \mathtt{plasma\_profile.teprofile.profile\_y} - $$ - -2. **Calculate Fusion Reactivity**: - - Calculate the number of fusion reactions per unit volume per particle volume density using the [`bosch_hale_reactivity`](#volumetric-fusion-rate--bosch_hale_reactivity) function. - - $$ - \langle \sigma v \rangle = \mathtt{bosch\_hale\_reactivity( \\ - ion\_temperature\_profile, reaction\_constants)} - $$ - -3. **Normalize Density Profile**: - - Normalize the density profile by the volume-averaged density. - - $$ - \mathtt{density\_profile\_normalised} = \frac{1}{\langle n_{\text{i}} \rangle} \\ - \times \mathtt{plasma\_profile.neprofile.profile\_y} - $$ - -4. **Compute and return the Fusion Integral**: - - Calculate the volume-averaged fusion reaction integral. - - $$ - \mathtt{fusion\_integral} =2 \int \langle \sigma v \rangle \times \\ - \mathtt{plasma\_profile.teprofile.profile\_x} \times \mathtt{density\_profile\_normalised}^2 - $$ - - The above is returned. - - -[^1]: H.-S. Bosch and G. M. Hale, “Improved formulas for fusion cross-sections and thermal reactivities,”Nuclear Fusion, vol. 32, no. 4, pp. 611–631, Apr. 1992,doi: https://doi.org/10.1088/0029-5515/32/4/i07. diff --git a/documentation/proc-pages/physics-models/fusion_reactions/plasma_reactions.md b/documentation/proc-pages/physics-models/fusion_reactions/plasma_reactions.md deleted file mode 100644 index 993183e9..00000000 --- a/documentation/proc-pages/physics-models/fusion_reactions/plasma_reactions.md +++ /dev/null @@ -1,236 +0,0 @@ -# Fusion Reactions - -## Overview - -The most likely fusion reaction to be utilised in a power plant is the -deuterium-tritium reaction: - -$$ -\mathrm{D + T} \Longrightarrow \mathrm{^{4}He + n + 17.6 \,MeV} -$$ - -Roughly 20% of the energy produced is given to the alpha particles (\(^4\)He). The remaining 80% is carried -away by the neutrons, which deposit their energy within the blanket and shield and other reactor components. -The fraction of the alpha energy deposited in the plasma is [`f_alpha_plasma`](#coupled-alpha-particle-power). -**`PROCESS` only assumes the alpha power produced is coupled to and self heats the plasma, other charged particles do not.** - -PROCESS can also model D-\(^3\)He power plants, which utilise the following -primary fusion reaction: - -$$ -\mathrm{D + \text{$^3$He}} \Longrightarrow \mathrm{^{4}He + p + 18.3 \,MeV} -$$ - -The fusion reaction rate is significantly different to that for D-T fusion, -and the power flow from the plasma is modified since charged particles are -produced rather than neutrons. Because only charged particles (which remain in -the plasma) are produced by this reaction, the whole of the fusion power is -used to heat the plasma. Useful energy is extracted from the plasma since the -radiation power produced is very high, and this, in theory, can be converted to -electricity without using a thermal cycle. - -Since the temperature required to ignite the D-\(^3\)He reaction is considerably -higher than that for D-T, it is necessary to take into account the following -D-D reactions, which have significant reaction rates at such temperatures: - -$$\begin{aligned} -\mathrm{D + D} & \Longrightarrow \mathrm{^{3}He + n + 3.27 \,MeV} \\ -\mathrm{D + D} & \Longrightarrow \mathrm{T + p + 4.03 \,MeV} -\end{aligned}$$ - -Also, as tritium is produced by the latter reaction, D-T fusion also occurs. -As a result, there is still a small amount of neutron power -extracted from the plasma. - -Pure D-\(^3\)He tokamak power plants do not include breeding blankets, because -no tritium needs to be produced for fuel. - -The contributions from all four of the above fusion reactions are included in -the total fusion power production calculation. The fusion reaction rates are -calculated using the parameterizations in [^1], integrated over the plasma -profiles - -------------------------- - -## Setting of plasma fuel composition - -The fractional composition of the 'fuel' ions ($\text{D}$, $\text{T}$ and $^3\text{He}$) is -controlled using the three variables `f_deuterium`, `f_tritium` and `f_helium3`, respectively. -More information about setting seeded impurities and simulating first wall sputtering can be found in the [impurities and radiation section](../plasma_radiation_impurities.md) - -!!! note "Reactions not calculated" - - `PROCESS` at the moment does not do calculations for the core reactions of $\text{T-T}$, $\text{T-}^3\text{He}$, $^3$$\text{He}$ $-^3$$\text{He}$ and $\text{p}$ -$^{11}$$\text{B}$. - - Fusion reactions involving fusion products such as $\text{n}$, $\text{p}$ and $\alpha$ are also not calculated. - -------------------------- - -## Fusion Reaction Class | `FusionReactionRate` - -### Initialization | `__init__()` - -Initialize the FusionReactionRate class with the given plasma profile. - -#### Parameters: -- `plasma_profile (PlasmaProfile)`: The parameterized temperature and density profiles of the plasma. Taken from the plasma_profile object. - -#### Attributes: -- `plasma_profile (PlasmaProfile)`: The parameterized temperature and density profiles of the plasma. -- `sigmav_dt_average (float)`: Average fusion reaction rate $<\sigma v>$ for D-T. -- `dhe3_power_density (float)`: Fusion power density produced by the D-3He reaction. -- `dd_power_density (float)`: Fusion power density produced by the D-D reactions. -- `dt_power_density (float)`: Fusion power density produced by the D-T reaction. -- `alpha_power_density (float)`: Power density of alpha particles produced. -- `charged_power_density (float)`: Power density of charged particles produced. -- `neutron_power_density (float)`: Power density of neutrons produced. -- `fusion_rate_density (float)`: Fusion reaction rate density. -- `alpha_rate_density (float)`: Alpha particle production rate density. -- `proton_rate_density (float)`: Proton production rate density. -- `f_dd_branching_trit (float)`: The rate of tritium producing D-D reactions to 3He ones. - -All variables above are initialized to be 0.0. - ---------------------- - -### Deuterium Branching fraction | `deuterium_branching()` - -Calculates the relative rate of tritium producing D-D reactions to 3He ones based on the volume averaged ion temperature[^1]. -Valid for ion temperatures between 0.5 keV and 200 keV. -The deviation of the fit from the R-matrix branching ratio is always smaller than 0.5%. - -$$ - = 1.02934 - 8.3264\times 10^{-3}\langle T_{\text{i}} \rangle + 1.7631\times 10^{-4}\langle T_{\text{i}} \rangle^2 \\ --1.8201\times 10^{-6}\langle T_{\text{i}} \rangle^3 + 6.9855\times 10^{-9}\langle T_{\text{i}} \rangle^4 -$$ - -
-![D-D reaction branching ratio](./deuterium_branching_plot.png){ width = "100"} -
Figure 1: Ratio of the neutron producing to proton producing D-D reaction branches based on the ion temperature .
-
- -#### Attributes updated -The method updates the following attributes: - -- `self.f_dd_branching_trit`: The rate of tritium producing D-D reactions to 3He ones - ------------------------ - -### Calculate fusion reactions - -There are 4 key functions for calculating the fusion reaction for the plasma. They are `dt_reaction()`, `dhe3_reaction()`, `dd_helion_reaction()` and `dd_triton_reaction()`. They all perform the same key calculations below but with their own specific values for their reactions. - -#### Detailed Steps -1. **Initialize Bosch-Hale Constants**: Initializes the Bosch-Hale constants for the required reaction using predefined reaction constants stored in the BoschHaleConstants dataclass. -2. **Calculate Fusion Reaction Rate**: Uses Simpson's rule to integrate the fusion reaction rate over the plasma profile. -3. **Calculate Fusion Power Density**: Compute the fusion power density produced by the given reaction. Using the reaction energy calculated and stored in `constants.f90`. The reactant density is given by $\mathtt{f\_deuterium, f\_tritium}$ or $\mathtt{f\_helium3}$ multiplied by the volume averaged ion density. For the D-D reactions the fusion reaction rate is scaled with the output of [`deuterium_branching()`](#deuterium-branching-fraction--deuterium_branching) to simulate the different branching ratios. -4. **Calculate Specific Fusion Power Densities**: Compute the fusion power density for alpha particles, neutrons and other charged particles, depending on the reaction. Energy branching fractions used are calculated and called from `constants.f90`. -5. **Calculate Fusion Rate Densities**: Compute the total fusion rate density and fusion rates just for the alpha particles, neutrons and other charged particles, depending on the reaction. -6. **Update Reaction Power Density**: Updates the object attribute for the specific reaction power density. -7. **Sum Fusion Rates**: Call the [`sum_fusion_rates()`](#sum-the-fusion-rates--sum_fusion_rates) function to add the reaction to the global plasma power balance. - -#### Attributes Updated -The method updates the following attributes: - -- `self.sigmav_dt_average`: Average fusion reaction rate `` for D-T. -- `self.dt_power_density`: Fusion power density produced by the D-T reaction. -- `self.alpha_power_density`: Power density of alpha particles produced. -- `self.charged_power_density`: Power density of charged particles produced. -- `self.neutron_power_density`: Power density of neutrons produced. -- `self.fusion_rate_density`: Fusion reaction rate density. -- `self.alpha_rate_density`: Alpha particle production rate density. -- `self.proton_rate_density`: Proton production rate density. - ------------------------ - -### Sum the fusion rates | `sum_fusion_rates()` - -This method updates the cumulative class fusion power densities and reaction rates for alpha particles, charged particles, neutrons, and protons. - -#### Parameters: -- `alpha_power_add` (float): Alpha particle fusion power per unit volume [MW/m³]. -- `charged_power_add` (float): Other charged particle fusion power per unit volume [MW/m³]. -- `neutron_power_add` (float): Neutron fusion power per unit volume [MW/m³]. -- `fusion_rate_add` (float): Fusion reaction rate per unit volume [reactions/m³/s]. -- `alpha_rate_add` (float): Alpha particle production rate per unit volume [/m³/s]. -- `proton_rate_add` (float): Proton production rate per unit volume [/m³/s]. - -The above input values are added to the current object values for their respective power density. - ------------------------ - -### Calculate fusion rates | `calculate_fusion_rates()` - -This runner function is called to run all 4 fusion reaction calculation functions. - -This method sequentially calculates the fusion reaction rates and power densities for the following reactions: -- Deuterium-Tritium (D-T) -- Deuterium-Helium-3 (D-3He) -- Deuterium-Deuterium (D-D) first branch -- Deuterium-Deuterium (D-D) second branch - -It updates the instance attributes for the cumulative power densities and reaction rates for alpha particles, charged particles, neutrons, and protons. - ------------------------ - -### Set global physics variables | `set_physics_variables()` - -This method sets the required physics variables in the `physics_variables` and `physics_module` modules. It updates the global physics variables and module variables with the current instance's fusion power densities and reaction rates. - -#### Updates: -- `physics_variables.alpha_power_density_plasma`: Updated with `self.alpha_power_density` -- `physics_variables.charged_power_density`: Updated with `self.charged_power_density` -- `physics_variables.neutron_power_density_plasma`: Updated with `self.neutron_power_density` -- `physics_variables.fusion_rate_density_plasma`: Updated with `self.fusion_rate_density` -- `physics_variables.alpha_rate_density_plasma`: Updated with `self.alpha_rate_density` -- `physics_variables.proton_rate_density`: Updated with `self.proton_rate_density` -- `physics_module.sigmav_dt_average`: Updated with `self.sigmav_dt_average` -- `physics_module.dt_power_density_plasma`: Updated with `self.dt_power_density` -- `physics_module.dhe3_power_density`: Updated with `self.dhe3_power_density` -- `physics_module.dd_power_density`: Updated with `self.dd_power_density` -- `physics_functions.f_dd_branching_trit`: Updated with `self.f_dd_branching_trit` - ------------------------ - -## Coupled alpha particle power - -!!! quote "ITER Physics Expert Group on Energetic Particles, Heating and Current Drive" - - *"Present day experiments (1999) show that in a quiescent plasma the diffusion rate of the fast particles is close to the neoclassical level. Even if one considers the case when anomalous diffusion by the fast alpha particles is at a rate nearly the same as that predicted by empirical scaling for the particles in the main plasma, estimates show that the energy loss fraction will be less than the ITER design specification of 5%.[^2]"* - -The fraction of alpha particle power produced by the plasma that gets coupled to the plasma for internal heating can be set in `PROCESS` with the `f_alpha_plasma` input variable. By default it is set to 95% or 0.95 as is the assumed ITER default.[^2] - -**`PROCESS` only assumes the alpha power produced is coupled to and self heats the plasma, other charged particles do not.** - ------------------------------ - -## Key Constraints - -### Global plasma power balance - -This constraint can be activated by stating `icc = 2` in the input file. - -**It is highly recommended to always have this constraint on as it is a global power balance checker** - -This model ensures that the sum of the ion and electron power densities plus the radiation density is equal to the sum of the coupled alpha power density, charged particle power density, ohmic heating power density and injected heating power density. - -If the plasma is classed as ignited then the injected heating power density is not considered. - -------------------------------- - -### Fusion Power Upper limit - -This constraint can be activated by stating `icc = 9` in the input file. - -The value of `powfmax` can be set to the desired maximum fusion power. The scaling value `ffuspow` can be varied also. - ---------------------------------- - -### Q value lower limit - -This constraint can be activated by stating `icc = 28` in the input file. - -The value of `bigqmin` can be set to the minimum desired $Q_{\text{plasma}}$ value. The scaling value `fqval` can be varied also. - -[^1]: H.-S. Bosch and G. M. Hale, “Improved formulas for fusion cross-sections and thermal reactivities,” Nuclear Fusion, vol. 32, no. 4, pp. 611–631, Apr. 1992, doi: https://doi.org/10.1088/0029-5515/32/4/i07. -[^2]: I. P. E. G. on E. Drive and I. P. B. Editors, “Chapter 5: Physics of energetic ions,” Nuclear Fusion, vol. 39, no. 12, pp. 2471–2495, Dec. 1999, doi: https://doi.org/10.1088/0029-5515/39/12/305. \ No newline at end of file diff --git a/documentation/proc-pages/physics-models/plasma_confinement.md b/documentation/proc-pages/physics-models/plasma_confinement.md index ec079e85..17d8ea31 100644 --- a/documentation/proc-pages/physics-models/plasma_confinement.md +++ b/documentation/proc-pages/physics-models/plasma_confinement.md @@ -78,17 +78,17 @@ derived directly from the energy confinement scaling law. `iradloss = 0` -- Total power lost is scaling power plus radiation: -`pscaling + pradpv = f_alpha_plasma*alpha_power_density_total + charged_power_density + pohmpv + pinjmw/plasma_volume` +`pscaling + pradpv = falpha*palppv + pchargepv + pohmpv + pinjmw/vol` `iradloss = 1` -- Total power lost is scaling power plus radiation from a region defined as the "core": -`pscaling + pcoreradpv = f_alpha_plasma*alpha_power_density_total + charged_power_density + pohmpv + pinjmw/plasma_volume` +`pscaling + pcoreradpv = falpha*palppv + pchargepv + pohmpv + pinjmw/vol` `iradloss = 2` -- Total power lost is scaling power only, with no additional allowance for radiation. This is not recommended for power plant models. -`pscaling = f_alpha_plasma*alpha_power_density_total + charged_power_density + pohmpv + pinjmw/plasma_volume` +`pscaling = falpha*palppv + pchargepv + pohmpv + pinjmw/vol` ## L-H Power Threshold Scalings diff --git a/documentation/proc-pages/physics-models/plasma_geometry.md b/documentation/proc-pages/physics-models/plasma_geometry.md index 158fb6e0..a0229dea 100644 --- a/documentation/proc-pages/physics-models/plasma_geometry.md +++ b/documentation/proc-pages/physics-models/plasma_geometry.md @@ -330,7 +330,7 @@ Plasma geometry based on equations (36) in O. Sauter, Fusion Engineering and Des | `pperim` | Plasma Poloidal perimeter length [$\text{m}$] | | `sarea` | Plasma surface area [$\text{m}^2$] | | `xarea` | Plasma cross-sectional area [$\text{m}^2$] | -| `plasma_volume` | Plasma volume [$\text{m}^3$] | +| `vol` | Plasma volume [$\text{m}^3$] | $$ \mathtt{w07} = 1 @@ -365,7 +365,7 @@ $$ Volume $$ -\mathtt{plasma_volume} = 2.0\pi R (1 - 0.25 \delta \epsilon) \mathtt{xarea} +\mathtt{vol} = 2.0\pi R (1 - 0.25 \delta \epsilon) \mathtt{xarea} $$ diff --git a/documentation/proc-pages/physics-models/plasma_power_balance.md b/documentation/proc-pages/physics-models/plasma_power_balance.md index 66329576..d58f58b4 100644 --- a/documentation/proc-pages/physics-models/plasma_power_balance.md +++ b/documentation/proc-pages/physics-models/plasma_power_balance.md @@ -11,7 +11,7 @@ The primary sources of power are the fusion reactions themselves, ohmic power due to resistive heating within the plasma, and any auxiliary power provided for heating and current drive. The power carried by the fusion-generated neutrons is lost from the plasma, but is deposited in the surrounding material. -A fraction `f_alpha_plasma` of the alpha particle power is assumed to stay within the +A fraction `falpha` of the alpha particle power is assumed to stay within the plasma core to contribute to the plasma power balance. The sum of this core alpha power, any power carried by non-alpha charged particles, the ohmic power and any injected power, is converted into charged particle transport power diff --git a/documentation/proc-pages/physics-models/plasma_radiation_impurities.md b/documentation/proc-pages/physics-models/plasma_radiation_impurities.md index 48589657..bac62e01 100644 --- a/documentation/proc-pages/physics-models/plasma_radiation_impurities.md +++ b/documentation/proc-pages/physics-models/plasma_radiation_impurities.md @@ -27,7 +27,7 @@ using input array `fimp(1,...,14)`. The available species are as follows: As stated above, the number density fractions for hydrogen (all isotopes) and helium need not be set, as they are calculated by the code to ensure plasma quasi-neutrality taking into account the fuel ratios -`f_deuterium`, `f_tritium` and `f_helium3`, and the alpha particle fraction `ralpne` which may +`fdeut`, `ftrit` and `fhe3`, and the alpha particle fraction `ralpne` which may be input by the user or selected as an iteration variable. The impurity fraction of any one of the elements listed in array `fimp` (other than hydrogen diff --git a/documentation/proc-pages/physics-models/plasma_reactions.md b/documentation/proc-pages/physics-models/plasma_reactions.md new file mode 100644 index 00000000..d774892d --- /dev/null +++ b/documentation/proc-pages/physics-models/plasma_reactions.md @@ -0,0 +1,66 @@ +# Fusion Reactions + +The most likely fusion reaction to be utilised in a power plant is the +deuterium-tritium reaction: + +$$ +\mathrm{D + T} \Longrightarrow \mathrm{^{4}He + n + 17.6 \,MeV} +$$ + +20% of the energy produced is given to the alpha particles (\(^4\)He). The remaining 80% is carried +away by the neutrons, which deposit their energy within the blanket and shield and other reactor components. +The fraction of the alpha energy deposited in the plasma is `falpha`. + +PROCESS can also model D-\(^3\)He power plants, which utilise the following +primary fusion reaction: + +$$ +\mathrm{D + \text{$^3$He}} \Longrightarrow \mathrm{^{4}He + p + 18.3 \,MeV} +$$ + +The fusion reaction rate is significantly different to that for D-T fusion, +and the power flow from the plasma is modified since charged particles are +produced rather than neutrons. Because only charged particles (which remain in +the plasma) are produced by this reaction, the whole of the fusion power is +used to heat the plasma. Useful energy is extracted from the plasma since the +radiation power produced is very high, and this, in theory, can be converted to +electricity without using a thermal cycle. + +Since the temperature required to ignite the D-\(^3\)He reaction is considerably +higher than that for D-T, it is necessary to take into account the following +D-D reactions, which have significant reaction rates at such temperatures: + +$$\begin{aligned} +\mathrm{D + D} & \Longrightarrow \mathrm{^{3}He + n + 3.27 \,MeV} \\ +\mathrm{D + D} & \Longrightarrow \mathrm{T + p + 4.03 \,MeV} +\end{aligned}$$ + +Also, as tritium is produced by the latter reaction, D-T fusion also occurs. +As a result, there is still a small amount of neutron power +extracted from the plasma. + +Pure D-\(^3\)He tokamak power plants do not include breeding blankets, because +no tritium needs to be produced for fuel. + +The contributions from all four of the above fusion reactions are included in +the total fusion power production calculation. The fusion reaction rates are +calculated using the parameterizations in [^1], integrated over the plasma +profiles (correctly, with or without pedestals). + +The fractional composition of the 'fuel' ions (D, T and \(^3\)He) is +controlled using the three variables `fdeut`, `ftrit` and `fhe3`, respectively: + +$$\begin{aligned} +n_{\mbox{fuel}} & = n_D + n_T + n_{\mathrm{^{3}He}} \;\;\; \mbox{particles/m$^3$} \\ +n_D & = \mathtt{fdeut} \, n_{\mbox{fuel}} \\ +n_T & = \mathtt{ftrit} \, n_{\mbox{fuel}} \\ +n_{\mathrm{^{3}He}} & = \mathtt{fhe3} \, n_{\mbox{fuel}} +\end{aligned}$$ + +PROCESS checks that $fdeut + ftrit + fhe3 = 1.0$, and stops with an error message otherwise. + +Constraint equation no. 28 can be turned on to enforce the fusion gain *Q* to be at +least equal to `bigqmin`. + +[^1]: H.S. Bosch and G.M. Hale, 'Improved Formulas for Fusion Cross-sections +and Thermal Reactivities', Nuclear Fusion **32** (1992) 611 \ No newline at end of file diff --git a/examples/csv_output.ipynb b/examples/csv_output.ipynb index a8166c40..2531c24c 100644 --- a/examples/csv_output.ipynb +++ b/examples/csv_output.ipynb @@ -1,94 +1,94 @@ { - "cells": [ - { - "cell_type": "markdown", - "metadata": { - "slideshow": { - "slide_type": "slide" - } - }, - "source": [ - "# Output to csv\n", - "\n", - "Routine to read from a PROCESS MFILE and write specified values into a csv.\n", - "\n", - "Input files:\n", - "- MFILE.DAT as output from PROCESS\n", - "- .json variable list as defined by user (defaults to local `mfile_to_csv_vars.json`)\n", - "\n", - "Instructions:\n", - "- from command line: `python mfile_to_csv.py -f -v `\n", - "- from this Jupyter notebook: run the cell below\n", - "\n", - "Output file:\n", - "- .csv will be saved to the directory of the input file" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "slideshow": { - "slide_type": "subslide" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Fetching list of variables from data/mfile_to_csv_vars.json\n", - "Reading from MFILE: data/csv_output_large_tokamak_MFILE.DAT\n", - "Writing to csv file: data/csv_output_large_tokamak_MFILE.csv\n", - "Complete.\n" - ] - } - ], - "source": [ - "from pathlib import Path\n", - "from process.io import mfile_to_csv\n", - "\n", - "# Project directory for example result file and default .json list;\n", - "# not needed if you replace both target filepaths below.\n", - "data_dir = Path(\"data\")\n", - "# Replace this path/to/MFILE.DAT with your target file:\n", - "mfilename = data_dir / \"csv_output_large_tokamak_MFILE.DAT\"\n", - "\n", - "# Either replace this with your own path/to/file.json target,\n", - "# or add your required variables into the identified file:\n", - "varfilename = data_dir / \"mfile_to_csv_vars.json\"\n", - "# This routine attempts to find every variable in the given list and\n", - "# writes the variable name, description and value to the output csv.\n", - "# Any listed variable that isn't in that MFILE will be skipped.\n", - "\n", - "# call to function:\n", - "mfile_to_csv.main(args=[\"-f\", str(mfilename), \"-v\", str(varfilename)])" - ] - } - ], - "metadata": { - "celltoolbar": "Slideshow", - "interpreter": { - "hash": "2b39e51c046bf6c3306ffb86d6add9e7c858c4c325822baa27448d1520edb182" - }, - "kernelspec": { - "display_name": "Python 3.8.5 64-bit ('env': venv)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.12" - } - }, - "nbformat": 4, - "nbformat_minor": 2 + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, + "source": [ + "# Output to csv\n", + "\n", + "Routine to read from a PROCESS MFILE and write specified values into a csv.\n", + "\n", + "Input files:\n", + "- MFILE.DAT as output from PROCESS\n", + "- .json variable list as defined by user (defaults to local `mfile_to_csv_vars.json`)\n", + "\n", + "Instructions:\n", + "- from command line: `python mfile_to_csv.py -f -v `\n", + "- from this Jupyter notebook: run the cell below\n", + "\n", + "Output file:\n", + "- .csv will be saved to the directory of the input file" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "slideshow": { + "slide_type": "subslide" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fetching list of variables from data/mfile_to_csv_vars.json\n", + "Reading from MFILE: data/csv_output_large_tokamak_MFILE.DAT\n", + "Writing to csv file: data/csv_output_large_tokamak_MFILE.csv\n", + "Complete.\n" + ] + } + ], + "source": [ + "from pathlib import Path\n", + "from process.io import mfile_to_csv\n", + "\n", + "# Project directory for example result file and default .json list;\n", + "# not needed if you replace both target filepaths below.\n", + "data_dir = Path(\"data\")\n", + "# Replace this path/to/MFILE.DAT with your target file:\n", + "mfilename = data_dir / \"csv_output_large_tokamak_MFILE.DAT\"\n", + "\n", + "# Either replace this with your own path/to/file.json target,\n", + "# or add your required variables into the identified file:\n", + "varfilename = data_dir / 'mfile_to_csv_vars.json'\n", + "# This routine attempts to find every variable in the given list and \n", + "# writes the variable name, description and value to the output csv.\n", + "# Any listed variable that isn't in that MFILE will be skipped.\n", + "\n", + "# call to function:\n", + "mfile_to_csv.main(args=[\"-f\", str(mfilename), \"-v\", str(varfilename)])" + ] + } + ], + "metadata": { + "celltoolbar": "Slideshow", + "interpreter": { + "hash": "2b39e51c046bf6c3306ffb86d6add9e7c858c4c325822baa27448d1520edb182" + }, + "kernelspec": { + "display_name": "Python 3.8.5 64-bit ('env': venv)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.12" + } + }, + "nbformat": 4, + "nbformat_minor": 2 } diff --git a/examples/examples.ipynb b/examples/examples.ipynb index 4e0b822e..8b0cc43e 100644 --- a/examples/examples.ipynb +++ b/examples/examples.ipynb @@ -459,7 +459,6 @@ "source": [ "from process.main import VaryRun\n", "import os\n", - "\n", "input_rel = script_dir / \"data/run_process.conf\"\n", "temp_dir, temp_input_path = copy_to_temp_dir(input_rel)\n", "\n", diff --git a/examples/scan.ipynb b/examples/scan.ipynb index fcb524de..3f504575 100644 --- a/examples/scan.ipynb +++ b/examples/scan.ipynb @@ -293,7 +293,7 @@ " \"-f\",\n", " str(mfile_name),\n", " \"-yv\",\n", - " \"bt rmajor pnetelmw fusion_power capcost\",\n", + " \"bt rmajor pnetelmw powfmw capcost\",\n", " \"--outputdir\",\n", " str(output_dir),\n", " ]\n", diff --git a/mkdocs.yml b/mkdocs.yml index 9389ff36..4ddb8a43 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -48,10 +48,7 @@ nav: - Density Profile: physics-models/profiles/plasma_density_profile.md - Temperature Profile: physics-models/profiles/plasma_temperature_profile.md - Profile Base Class: physics-models/profiles/plasma_profiles_abstract_class.md - - Fusion Reactions: - - Overview: physics-models/fusion_reactions/plasma_reactions.md - - Beam reactions: physics-models/fusion_reactions/beam_reactions.md - - Bosch-Hale Methods: physics-models/fusion_reactions/plasma_bosch_hale.md + - Fusion Reactions: physics-models/plasma_reactions.md - Beta Limit: physics-models/plasma_beta.md - Fast Alpha: physics-models/plasma_alpha.md - Density Limit: physics-models/plasma_density.md diff --git a/process/__init__.py b/process/__init__.py index da0ebfd4..e69de29b 100644 --- a/process/__init__.py +++ b/process/__init__.py @@ -1,3 +0,0 @@ -from importlib.metadata import version - -__version__ = version("process") diff --git a/process/availability.py b/process/availability.py index d7218b8e..4c1dc06a 100644 --- a/process/availability.py +++ b/process/availability.py @@ -86,8 +86,8 @@ def avail(self, output: bool): # - the neutron energy spectrum # - all of the above and more leading to the dpa/fpy in EUROfer at the FW OMP # About a relatively "constant" reference point, we can reasonably assume they all equal to 1.0. - ref_fusion_power = 2.0e3 # (MW) fusion power for EU-DEMO - f_scale = pv.fusion_power / ref_fusion_power + ref_powfmw = 2.0e3 # (MW) fusion power for EU-DEMO + f_scale = pv.powfmw / ref_powfmw ref_dpa_fpy = ( 10.0e0 # dpa per fpy from T. Franke 2020 states up to 10 dpa/FPY ) @@ -463,8 +463,8 @@ def calc_u_planned(self, output: bool) -> float: # - the neutron energy spectrum # - all of the above and more leading to the dpa/fpy in EUROfer at the FW OMP # About a relatively "constant" reference point, we can reasonably assume they all equal to 1.0. - ref_fusion_power = 2.0e3 # (MW) fusion power for EU-DEMO - f_scale = pv.fusion_power / ref_fusion_power + ref_powfmw = 2.0e3 # (MW) fusion power for EU-DEMO + f_scale = pv.powfmw / ref_powfmw ref_dpa_fpy = 10.0e0 # dpa per fpy from T. Franke 2020 states up to 10 dpa/FPY dpa_fpy = f_scale * ref_dpa_fpy diff --git a/process/costs.py b/process/costs.py index 13ef0d2a..9aacb7fd 100644 --- a/process/costs.py +++ b/process/costs.py @@ -2193,7 +2193,7 @@ def acc2272(self): """ if ife_variables.ife != 1: # Previous calculation, using qfuel in Amps: - # 1.3 should have been physics_variables.afuel*umass/electron_charge*1000*s/day = 2.2 + # 1.3 should have been physics_variables.afuel*umass/echarge*1000*s/day = 2.2 # wtgpd = burnup * qfuel * 1.3e0 # New calculation: 2 nuclei * reactions/sec * kg/nucleus * g/kg * sec/day @@ -2212,7 +2212,7 @@ def acc2272(self): * 3.0e0 * 1.67e-27 * 1.0e3 - / (constants.electron_volt * 17.6e6 * ife_variables.fburn) + / (1.602e-19 * 17.6e6 * ife_variables.fburn) ) physics_variables.wtgpd = targtm * ife_variables.reprat * 86400.0e0 @@ -2235,7 +2235,7 @@ def acc2273(self): cfrht = 1.0e5 # No detritiation needed if purely D-He3 reaction - if physics_variables.f_tritium > 1.0e-3: + if physics_variables.ftrit > 1.0e-3: self.c2273 = ( 1.0e-6 * cost_variables.ucdtc @@ -2422,7 +2422,7 @@ def acc26(self): # Calculate rejected heat for non-reactor (==0) and reactor (==1) if cost_variables.ireactor == 0: pwrrej = ( - physics_variables.fusion_power + physics_variables.powfmw + heat_transport_variables.pinjwp + tfcoil_variables.tfcmw ) @@ -2792,7 +2792,7 @@ def coelc(self): annfuel = ( cost_variables.ucfuel * heat_transport_variables.pnetelmw / 1200.0e0 + 1.0e-6 - * physics_variables.f_helium3 + * physics_variables.fhe3 * physics_variables.wtgpd * 1.0e-3 * cost_variables.uche3 diff --git a/process/costs_2015.py b/process/costs_2015.py index 086a34e1..ccb1a5d4 100644 --- a/process/costs_2015.py +++ b/process/costs_2015.py @@ -1016,7 +1016,7 @@ def calc_remaining_subsystems(self): # Cost of ITER pellet injector and pellet injection system self.s_cref[46] = 25.0e6 # Scale with fusion power (MW) - self.s_k[46] = physics_variables.fusion_power + self.s_k[46] = physics_variables.powfmw self.s_kref[46] = 500.0e0 self.s_cost[46] = ( self.s_cost_factor[46] @@ -1028,7 +1028,7 @@ def calc_remaining_subsystems(self): # # Cost of ITER gas injection system, GDC, Gi valve boxes self.s_cref[47] = 32.0e6 # Scale with fusion power (MW) - self.s_k[47] = physics_variables.fusion_power + self.s_k[47] = physics_variables.powfmw self.s_kref[47] = 500.0e0 self.s_cost[47] = ( self.s_cost_factor[47] @@ -1040,7 +1040,7 @@ def calc_remaining_subsystems(self): # Cost of ITER vacuum pumping self.s_cref[48] = 201.0e6 # Scale with fusion power (MW) - self.s_k[48] = physics_variables.fusion_power + self.s_k[48] = physics_variables.powfmw self.s_kref[48] = 500.0e0 self.s_cost[48] = ( self.s_cost_factor[48] @@ -1052,7 +1052,7 @@ def calc_remaining_subsystems(self): # Cost of ITER tritium plant self.s_cref[49] = 226.0e6 # Scale with fusion power (MW) - self.s_k[49] = physics_variables.fusion_power + self.s_k[49] = physics_variables.powfmw self.s_kref[49] = 500.0e0 self.s_cost[49] = ( self.s_cost_factor[49] @@ -1108,7 +1108,7 @@ def calc_remaining_subsystems(self): # Cost of ITER radiological protection self.s_cref[54] = 19.0e6 # Scale with fusion power (MW) - self.s_k[54] = physics_variables.fusion_power + self.s_k[54] = physics_variables.powfmw self.s_kref[54] = 500.0e0 self.s_cost[54] = ( self.s_cost_factor[54] diff --git a/process/current_drive.py b/process/current_drive.py index 17b35ccf..c39a0395 100644 --- a/process/current_drive.py +++ b/process/current_drive.py @@ -31,8 +31,8 @@ def cudriv(self, output: bool): current_drive_variables.echpwr = 0.0e0 current_drive_variables.pnbeam = 0.0e0 current_drive_variables.plhybd = 0.0e0 - current_drive_variables.beam_current = 0.0e0 - beam_current_fix = 0.0e0 + current_drive_variables.cnbeam = 0.0e0 + cnbeamfix = 0.0e0 current_drive_variables.porbitlossmw = 0.0e0 porbitlossmwfix = 0.0e0 @@ -176,17 +176,17 @@ def cudriv(self, output: bool): 1.0e0 / (2.0e0 * np.pi) * current_drive_variables.harnum - * constants.electron_charge + * constants.echarge * physics_variables.bt - / constants.electron_mass + / constants.emass ) fp = ( 1.0e0 / (2.0e0 * np.pi) * np.sqrt( physics_variables.dene - * constants.electron_charge**2 - / (constants.electron_mass * constants.epsilon0) + * constants.echarge**2 + / (constants.emass * constants.epsilon0) ) ) @@ -204,9 +204,9 @@ def cudriv(self, output: bool): fc = ( 1 / (2 * np.pi) - * constants.electron_charge + * constants.echarge * physics_variables.bt - / constants.electron_mass + / constants.emass ) fp = ( 1 @@ -214,8 +214,8 @@ def cudriv(self, output: bool): * np.sqrt( ( (physics_variables.dene / 1.0e19) - * constants.electron_charge**2 - / (constants.electron_mass * constants.epsilon0) + * constants.echarge**2 + / (constants.emass * constants.epsilon0) ) ) ) @@ -348,8 +348,8 @@ def cudriv(self, output: bool): current_drive_variables.etacdfix = current_drive_variables.etanbi gamnb = effnbssfix * (dene20 * physics_variables.rmajor) gamcdfix = gamnb - beam_current_fix = ( - 1.0e-3 * (pnbitotfix * 1.0e6) / current_drive_variables.beam_energy + cnbeamfix = ( + 1.0e-3 * (pnbitotfix * 1.0e6) / current_drive_variables.enbeam ) # Neutral beam current (A) auxiliary_cdfix = ( effnbssfix @@ -471,17 +471,17 @@ def cudriv(self, output: bool): 1.0e0 / (2.0e0 * np.pi) * current_drive_variables.harnum - * constants.electron_charge + * constants.echarge * physics_variables.bt - / constants.electron_mass + / constants.emass ) fp = ( 1.0e0 / (2.0e0 * np.pi) * np.sqrt( physics_variables.dene - * constants.electron_charge**2 - / (constants.electron_mass * constants.epsilon0) + * constants.echarge**2 + / (constants.emass * constants.epsilon0) ) ) @@ -502,9 +502,9 @@ def cudriv(self, output: bool): fc = ( 1 / (2 * np.pi) - * constants.electron_charge + * constants.echarge * physics_variables.bt - / constants.electron_mass + / constants.emass ) fp = ( 1 @@ -512,8 +512,8 @@ def cudriv(self, output: bool): * np.sqrt( ( (physics_variables.dene / 1.0e19) - * constants.electron_charge**2 - / (constants.electron_mass * constants.epsilon0) + * constants.echarge**2 + / (constants.emass * constants.epsilon0) ) ) ) @@ -674,10 +674,10 @@ def cudriv(self, output: bool): current_drive_variables.etacd = current_drive_variables.etanbi gamnb = effnbss * (dene20 * physics_variables.rmajor) current_drive_variables.gamcd = gamnb - current_drive_variables.beam_current = ( + current_drive_variables.cnbeam = ( 1.0e-3 * (current_drive_variables.pnbitot * 1.0e6) - / current_drive_variables.beam_energy + / current_drive_variables.enbeam ) # Neutral beam current (A) # Total injected power @@ -708,7 +708,7 @@ def cudriv(self, output: bool): ): current_drive_variables.bigq = 1.0e18 else: - current_drive_variables.bigq = physics_variables.fusion_power / ( + current_drive_variables.bigq = physics_variables.powfmw / ( current_drive_variables.pinjmw + current_drive_variables.porbitlossmw + physics_variables.pohmmw @@ -1036,8 +1036,8 @@ def cudriv(self, output: bool): po.ovarre( self.outfile, "Neutral beam energy (keV)", - "(beam_energy)", - current_drive_variables.beam_energy, + "(enbeam)", + current_drive_variables.enbeam, ) if (current_drive_variables.iefrf == 5) or ( current_drive_variables.iefrf == 8 @@ -1045,8 +1045,8 @@ def cudriv(self, output: bool): po.ovarre( self.outfile, "Neutral beam current (A)", - "(beam_current)", - current_drive_variables.beam_current, + "(cnbeam)", + current_drive_variables.cnbeam, "OP ", ) @@ -1056,8 +1056,8 @@ def cudriv(self, output: bool): po.ovarre( self.outfile, "Secondary fixed neutral beam current (A)", - "(beam_current_fix)", - beam_current_fix, + "(cnbeamfix)", + cnbeamfix, "OP ", ) @@ -1317,7 +1317,7 @@ def iternb(self): # Calculate beam stopping cross-section sigstop = self.sigbeam( - current_drive_variables.beam_energy / physics_variables.abeam, + current_drive_variables.enbeam / physics_variables.abeam, physics_variables.te, physics_variables.dene, physics_variables.ralpne, @@ -1334,13 +1334,13 @@ def iternb(self): fshine = max(fshine, 1e-20) # Deuterium and tritium beam densities - dend = physics_variables.deni * (1.0 - current_drive_variables.f_tritium_beam) - dent = physics_variables.deni * current_drive_variables.f_tritium_beam + dend = physics_variables.deni * (1.0 - current_drive_variables.ftritbm) + dent = physics_variables.deni * current_drive_variables.ftritbm # Power split to ions / electrons fpion = self.cfnbi( physics_variables.abeam, - current_drive_variables.beam_energy, + current_drive_variables.enbeam, physics_variables.ten, physics_variables.dene, dend, @@ -1356,7 +1356,7 @@ def iternb(self): physics_variables.alphat, physics_variables.aspect, physics_variables.dene, - current_drive_variables.beam_energy, + current_drive_variables.enbeam, physics_variables.rmajor, physics_variables.ten, physics_variables.zeff, @@ -1515,9 +1515,7 @@ def eccdef(self, tlocal, epsloc, zlocal, cosang, coulog): ITER Physics Design Guidelines: 1989 [IPDG89], N. A. Uckan et al, ITER Documentation Series No.10, IAEA/ITER/DS/10, IAEA, Vienna, 1990 """ - mcsq = ( - constants.electron_mass * 2.9979e8**2 / (1.0e3 * constants.electron_volt) - ) # keV + mcsq = 9.1095e-31 * 2.9979e8**2 / (1.0e3 * 1.6022e-19) # keV f = 16.0e0 * (tlocal / mcsq) ** 2 # fp is the derivative of f with respect to gamma, the relativistic @@ -1587,7 +1585,7 @@ def culnbi(self): # Calculate beam stopping cross-section sigstop = self.sigbeam( - current_drive_variables.beam_energy / physics_variables.abeam, + current_drive_variables.enbeam / physics_variables.abeam, physics_variables.te, physics_variables.dene, physics_variables.ralpne, @@ -1607,14 +1605,14 @@ def culnbi(self): # Deuterium and tritium beam densities - dend = physics_variables.deni * (1.0e0 - current_drive_variables.f_tritium_beam) - dent = physics_variables.deni * current_drive_variables.f_tritium_beam + dend = physics_variables.deni * (1.0e0 - current_drive_variables.ftritbm) + dent = physics_variables.deni * current_drive_variables.ftritbm # Power split to ions / electrons fpion = self.cfnbi( physics_variables.abeam, - current_drive_variables.beam_energy, + current_drive_variables.enbeam, physics_variables.ten, physics_variables.dene, dend, @@ -1632,7 +1630,7 @@ def culnbi(self): physics_variables.aspect, physics_variables.dene, physics_variables.dnla, - current_drive_variables.beam_energy, + current_drive_variables.enbeam, current_drive_variables.frbeam, fshine, physics_variables.rmajor, @@ -1707,7 +1705,7 @@ def etanb2( aspect, dene, dnla, - beam_energy, + enbeam, frbeam, fshine, rmajor, @@ -1725,7 +1723,7 @@ def etanb2( aspect : input real : aspect ratio dene : input real : volume averaged electron density (m**-3) dnla : input real : line averaged electron density (m**-3) - beam_energy : input real : neutral beam energy (keV) + enbeam : input real : neutral beam energy (keV) frbeam : input real : R_tangent / R_major for neutral beam injection fshine : input real : shine-through fraction of beam rmajor : input real : plasma major radius (m) @@ -1757,7 +1755,7 @@ def etanb2( ecrit = 0.01 * abeam * ten # Beam energy in MeV - ebmev = beam_energy / 1e3 + ebmev = enbeam / 1e3 # x and y coefficients of function J0(x,y) (IPDG89) xjs = ebmev / (bbd * ecrit) @@ -1948,7 +1946,7 @@ def cfnbi(self, afast, efast, te, ne, nd, nt, zeffai, xlmbda): atmdt = 2.5 # atmt = 3.0 c = 3.0e8 - me = constants.electron_mass + me = 9.1e-31 # zd = 1.0 # zt = 1.0 @@ -1960,18 +1958,18 @@ def cfnbi(self, afast, efast, te, ne, nd, nt, zeffai, xlmbda): xlmbdai = self.xlmbdabi(afast, atmdt, efast, te, ne) sumln = zeffai * xlmbdai / xlmbda - xlnrat = ( - 3.0e0 * np.sqrt(np.pi) / 4.0e0 * me / constants.proton_mass * sumln - ) ** (2.0e0 / 3.0e0) + xlnrat = (3.0e0 * np.sqrt(np.pi) / 4.0e0 * me / constants.mproton * sumln) ** ( + 2.0e0 / 3.0e0 + ) ve = c * np.sqrt(2.0e0 * te / 511.0e0) ecritfi = ( afast - * constants.proton_mass + * constants.mproton * ve * ve * xlnrat - / (2.0e0 * constants.electron_charge * 1.0e3) + / (2.0e0 * constants.echarge * 1.0e3) ) x = np.sqrt(efast / ecritfi) diff --git a/process/dcll.py b/process/dcll.py index bf1f5189..b059cf4d 100644 --- a/process/dcll.py +++ b/process/dcll.py @@ -127,15 +127,13 @@ def dcll_neutronics_and_power(self, output: bool): # Nuclear heating in the first wall (MW) fwbs_variables.pnucfw = ( - physics_variables.neutron_power_total - * fwbs_variables.pnuc_fw_ratio_dcll - * covf + physics_variables.pneutmw * fwbs_variables.pnuc_fw_ratio_dcll * covf ) # Nuclear heating in the blanket with energy multiplication (MW) fwbs_variables.pnuc_blkt_ratio_dcll = 1 - fwbs_variables.pnuc_fw_ratio_dcll fwbs_variables.pnucblkt = ( - physics_variables.neutron_power_total + physics_variables.pneutmw * fwbs_variables.pnuc_blkt_ratio_dcll * fwbs_variables.emult * covf @@ -143,10 +141,7 @@ def dcll_neutronics_and_power(self, output: bool): # Energy multiplication energy (MW) fwbs_variables.emultmw = ( - ( - physics_variables.neutron_power_total - * fwbs_variables.pnuc_blkt_ratio_dcll - ) + (physics_variables.pneutmw * fwbs_variables.pnuc_blkt_ratio_dcll) * (fwbs_variables.emult - 1) * covf ) @@ -156,17 +151,13 @@ def dcll_neutronics_and_power(self, output: bool): if physics_variables.idivrt == 2: # Double null configuration # Nuclear heating in the divertor (MW), neutron power times fdiv - fwbs_variables.pnucdiv = ( - physics_variables.neutron_power_total * 2 * fwbs_variables.fdiv - ) + fwbs_variables.pnucdiv = physics_variables.pneutmw * 2 * fwbs_variables.fdiv # Radiation power incident on divertor (MW) fwbs_variables.praddiv = physics_variables.pradmw * 2 * fwbs_variables.fdiv else: # Single null configuration # Nuclear heating in the divertor (MW), neutron power times fdiv - fwbs_variables.pnucdiv = ( - physics_variables.neutron_power_total * fwbs_variables.fdiv - ) + fwbs_variables.pnucdiv = physics_variables.pneutmw * fwbs_variables.fdiv # Radiation power incident on divertor (MW) fwbs_variables.praddiv = physics_variables.pradmw * fwbs_variables.fdiv diff --git a/process/evaluators.py b/process/evaluators.py index 4c9c5fb1..3d3ad3f9 100644 --- a/process/evaluators.py +++ b/process/evaluators.py @@ -66,7 +66,7 @@ def fcnvmc1(self, n, m, xv, ifail): logger.debug(f"{pv.te = }") logger.debug(f"{cv.coe = }") logger.debug(f"{pv.rmajor = }") - logger.debug(f"{pv.fusion_power = }") + logger.debug(f"{pv.powfmw = }") logger.debug(f"{pv.bt = }") logger.debug(f"{tv.tburn = }") logger.debug(f"{sqsumconfsq = }") diff --git a/process/hcpb.py b/process/hcpb.py index b69abb3f..31a8e5c1 100644 --- a/process/hcpb.py +++ b/process/hcpb.py @@ -79,7 +79,7 @@ def run(self, output: bool): # TF fast neutron flux (E > 0.1 MeV) [m^{-2}.s^{-1}] fwbs_variables.neut_flux_cp = self.st_tf_centrepost_fast_neut_flux( - physics_variables.neutron_power_total, + physics_variables.pneutmw, build_variables.shldith, physics_variables.rmajor, ) @@ -90,7 +90,7 @@ def run(self, output: bool): fwbs_variables.pnuc_cp_sh, fwbs_variables.pnuc_cp, ) = self.st_centrepost_nuclear_heating( - physics_variables.neutron_power_total, build_variables.shldith + physics_variables.pneutmw, build_variables.shldith ) else: # No CP @@ -143,7 +143,7 @@ def run(self, output: bool): (fwbs_variables.pnucfw / ccfe_hcpb_module.pnuc_tot_blk_sector) * fwbs_variables.emult * f_geom_blanket - * physics_variables.neutron_power_total + * physics_variables.pneutmw ) # Power to the blanket (MW) @@ -151,7 +151,7 @@ def run(self, output: bool): (fwbs_variables.pnucblkt / ccfe_hcpb_module.pnuc_tot_blk_sector) * fwbs_variables.emult * f_geom_blanket - * physics_variables.neutron_power_total + * physics_variables.pneutmw ) # Power to the shield(MW) @@ -160,7 +160,7 @@ def run(self, output: bool): (fwbs_variables.pnucshld / ccfe_hcpb_module.pnuc_tot_blk_sector) * fwbs_variables.emult * f_geom_blanket - * physics_variables.neutron_power_total + * physics_variables.pneutmw ) # Power to the TF coils (MW) @@ -169,28 +169,25 @@ def run(self, output: bool): (fwbs_variables.ptfnuc / ccfe_hcpb_module.pnuc_tot_blk_sector) * fwbs_variables.emult * f_geom_blanket - * physics_variables.neutron_power_total + * physics_variables.pneutmw + fwbs_variables.pnuc_cp_tf ) # Power deposited in the CP fwbs_variables.pnuc_cp_sh = ( - f_geom_cp * physics_variables.neutron_power_total - - fwbs_variables.pnuc_cp_tf + f_geom_cp * physics_variables.pneutmw - fwbs_variables.pnuc_cp_tf ) # Old code kept for backward compatibility # --- # pnucdiv is not changed. # The energy due to multiplication, by subtraction: - # emultmw = pnucfw + pnucblkt + pnucshld + ptfnuc + pnucdiv - neutron_power_total + # emultmw = pnucfw + pnucblkt + pnucshld + ptfnuc + pnucdiv - pneutmw # --- # New code, a bit simpler fwbs_variables.emultmw = ( - (fwbs_variables.emult - 1) - * f_geom_blanket - * physics_variables.neutron_power_total + (fwbs_variables.emult - 1) * f_geom_blanket * physics_variables.pneutmw ) # powerflow calculation for pumping power @@ -305,7 +302,7 @@ def nuclear_heating_magnets(self, output: bool): # Total heating (MW) fwbs_variables.ptfnuc = ( ccfe_hcpb_module.tfc_nuc_heating - * (physics_variables.fusion_power / 1000.0) + * (physics_variables.powfmw / 1000.0) / 1.0e6 ) @@ -335,12 +332,7 @@ def nuclear_heating_magnets(self, output: bool): "(ptfnuc.)", fwbs_variables.ptfnuc, ) - po.ovarre( - self.outfile, - "fusion_power", - "(fusion_power.)", - physics_variables.fusion_power, - ) + po.ovarre(self.outfile, "powfmw", "(powfmw.)", physics_variables.powfmw) po.ovarre( self.outfile, "total mass of the TF coils (kg)", @@ -361,13 +353,13 @@ def nuclear_heating_fw(self): fwbs_variables.pnucfw = ( fwbs_variables.fwmass * ccfe_hcpb_module.fw_armour_u_nuc_heating - * physics_variables.fusion_power + * physics_variables.powfmw ) if fwbs_variables.pnucfw < 0: raise RuntimeError( f"""Error in nuclear_heating_fw. {fwbs_variables.pnucfw = }, - {physics_variables.fusion_power = }, {fwbs_variables.fwmass = }""" + {physics_variables.powfmw = }, {fwbs_variables.fwmass = }""" ) def nuclear_heating_blanket(self): @@ -385,13 +377,13 @@ def nuclear_heating_blanket(self): # Total blanket nuclear heating (MW) ccfe_hcpb_module.exp_blanket = 1 - np.exp(-b * mass) fwbs_variables.pnucblkt = ( - physics_variables.fusion_power * a * ccfe_hcpb_module.exp_blanket + physics_variables.powfmw * a * ccfe_hcpb_module.exp_blanket ) if fwbs_variables.pnucblkt < 1: eh.fdiags[0] = fwbs_variables.pnucblkt eh.fdiags[1] = ccfe_hcpb_module.exp_blanket - eh.fdiags[2] = physics_variables.fusion_power + eh.fdiags[2] = physics_variables.powfmw eh.fdiags[3] = mass eh.report_error(274) @@ -430,7 +422,7 @@ def nuclear_heating_shield(self): # Total nuclear heating in shield (MW) fwbs_variables.pnucshld = ( ccfe_hcpb_module.shld_u_nuc_heating - * (physics_variables.fusion_power / 1000) + * (physics_variables.powfmw / 1000) / 1.0e6 ) @@ -451,12 +443,12 @@ def nuclear_heating_divertor(self): if physics_variables.idivrt == 2: # Double null configuration fwbs_variables.pnucdiv = ( - 0.8 * physics_variables.fusion_power * 2 * fwbs_variables.fdiv + 0.8 * physics_variables.powfmw * 2 * fwbs_variables.fdiv ) else: # single null configuration fwbs_variables.pnucdiv = ( - 0.8 * physics_variables.fusion_power * fwbs_variables.fdiv + 0.8 * physics_variables.powfmw * fwbs_variables.fdiv ) # No heating of the H & CD @@ -720,7 +712,7 @@ def st_cp_angle_fraction(self, h_cp_top, r_cp_mid, r_cp_top, rmajor): # Solid angle fraction covered by the CP (OUTPUT) [-] return 0.25 * cp_sol_angle / np.pi - def st_tf_centrepost_fast_neut_flux(self, neutron_power_total, sh_width, rmajor): + def st_tf_centrepost_fast_neut_flux(self, pneutmw, sh_width, rmajor): """Author S Kahn Routine calculating the fast neutron (E > 0.1 MeV) flux reaching the TF at the centerpost. These calcualtion are made from a CP only MCNP fit @@ -731,7 +723,7 @@ def st_tf_centrepost_fast_neut_flux(self, neutron_power_total, sh_width, rmajor) of 16.6 cm, close to the "15 - 16 cm" of Menard et al. 2016. (This is an e-folding lenth of 7.22 cm.) - :param neutron_power_total: neutron fusion power [MW] + :param pneutmw: neutron fusion power [MW] :param sh_width: Neutron shield width [m] :param rmajor: Plasma major radius [m] """ @@ -761,10 +753,7 @@ def st_tf_centrepost_fast_neut_flux(self, neutron_power_total, sh_width, rmajor) # Scaling to the actual plasma neutron power neut_flux_cp = ( - f_wc_density - * f_neut_flux_out_wall - * neut_flux_cp - * (neutron_power_total / 800) + f_wc_density * f_neut_flux_out_wall * neut_flux_cp * (pneutmw / 800) ) return neut_flux_cp diff --git a/process/io/mfile_comparison.py b/process/io/mfile_comparison.py index f3b08b26..91f53915 100755 --- a/process/io/mfile_comparison.py +++ b/process/io/mfile_comparison.py @@ -50,13 +50,13 @@ "fimp(13", "fimp(14", "sarea", - "plasma_volume", + "vol", "n_tf", "shldith", "shldoth", "blnkith", "blnkoth", - "fusion_power", + "powfmw", "plasma_current_MA", "bt", "q95", @@ -88,7 +88,7 @@ "aux_current_fraction", "inductive_current_fraction", "gamnb", - "beam_energy", + "enbeam", "powerht", ] @@ -107,9 +107,9 @@ "triang", "triang95", "sarea", - "plasma_volume", + "vol", "n_tf", - "fusion_power", + "powfmw", "plasma_current_MA", "bt", "q95", @@ -135,7 +135,7 @@ "ralpne", "wallmw", "pinnerzoneradmw", - "psyncpv*plasma_volume", + "psyncpv*vol", "pradmw", "pnucblkt", "pnucshld", @@ -177,7 +177,7 @@ "aux_current_fraction", "inductive_current_fraction", "gamnb", - "beam_energy", + "enbeam", "powerht", "pdivt", "vssoft", @@ -195,7 +195,7 @@ BLANKET_COMPARE_PARAMS = [ "blnkith", "blnkoth", - "fusion_power", + "powfmw", "pnucblkt", "pnucfw", "ptfnuc", @@ -215,7 +215,7 @@ "kappa95", "triang", "triang95", - "fusion_power", + "powfmw", "plasma_current_MA", "bt", "q95", diff --git a/process/io/obsolete_vars.py b/process/io/obsolete_vars.py index 06568ead..3a5a1f5a 100644 --- a/process/io/obsolete_vars.py +++ b/process/io/obsolete_vars.py @@ -96,7 +96,7 @@ "sigvvall": "max_vv_stress", "ftaucq": "fmaxvvstress", "fradmin": None, - "ftr": "f_tritium", + "ftr": "ftrit", "iculdl": "idensl", "iiter": None, "ires": None, @@ -108,7 +108,7 @@ "fvolbi": "fhole", "fvolbo": "fhole", "fvolcry": None, - "idhe3": "f_helium3", + "idhe3": "fhe3", "blnktth": None, "theat": "t_fusion_ramp", "ieped": None, @@ -121,12 +121,6 @@ "bscfmax": "bootstrap_current_fraction_max", "vgap2": "vgap_vv_thermalshield", "vgap": "vgap_xpoint_divertor", - "ftritbm": "f_tritium_bream", - "enbeam": "beam_energy", - "fdeut": "f_deuterium", - "ftrit": "f_tritium", - "fhe3": "f_helium3", - "falpha": "f_alpha_plasma", } OBS_VARS_HELP = { diff --git a/process/io/plot_proc.py b/process/io/plot_proc.py index 822202d3..d04a6d85 100755 --- a/process/io/plot_proc.py +++ b/process/io/plot_proc.py @@ -377,7 +377,7 @@ def color_key(axis, mfile_data, scan, colour_scheme): axis.text( -5, 12, - "*The CS comp is not shown in the poloidal cross-section", + "*The CS comp and thermal shield are not shown in the poloidal cross-section", ha="left", va="top", size="medium", @@ -895,7 +895,7 @@ def synchrotron_rad(): # rpow is the(1-Rsyn) power dependence based on plasma shape # (see Fidone) rpow = 0.62 - kap = plasma_volume / (2.0 * 3.1415**2 * rmajor * rminor**2) + kap = vol / (2.0 * 3.1415**2 * rmajor * rminor**2) # No account is taken of pedestal profiles here, other than use of # the correct ne0 and te0... @@ -915,8 +915,8 @@ def synchrotron_rad(): # psyncpv should be per unit volume # Albajar gives it as total - psyncpv = psync / plasma_volume - print("psyncpv = ", psyncpv * plasma_volume) # matches the out.dat file + psyncpv = psync / vol + print("psyncpv = ", psyncpv * vol) # matches the out.dat file return psyncpv @@ -1050,8 +1050,8 @@ def plot_radprofile(prof, mfile_data, scan, impp, demo_ranges) -> float: # print('pbrem = ',pbrem) # print(1.0e32*lz[12]) # print('pradpv = ',pradint) - # print('pbremmw = ',pbremint*plasma_volume) - # print('pradmw = ', pradint*plasma_volume, 'MW') # pimp = pline + pbrem + # print('pbremmw = ',pbremint*vol) + # print('pradmw = ', pradint*vol, 'MW') # pimp = pline + pbrem prof.plot(rho, prad, label="Total") prof.plot(rho, pimpden[0] * 2.0e-6, label="H") @@ -2349,7 +2349,7 @@ def plot_geometry_info(axis, mfile_data, scan): ("triang95", r"$\delta_{95}$", ""), ("sarea", "Plasma surface area", "m$^2$"), ("xarea", "Plasma cross-sectional area", "m$^2$"), - ("plasma_volume", "Plasma volume", "m$^3$"), + ("vol", "Plasma volume", "m$^3$"), ("n_tf", "No. of TF coils", ""), (in_blanket_thk, "Inboard blanket+shield", "m"), ("inboard_build", "Inboard build thickness", "m"), @@ -2402,7 +2402,7 @@ def plot_physics_info(axis, mfile_data, scan): pthresh = mfile_data.data["pthrmw(6)"].get_scan(scan) data = [ - ("fusion_power", "Fusion power", "MW"), + ("powfmw", "Fusion power", "MW"), ("bigq", "$Q_{p}$", ""), ("plasma_current_MA", "$I_p$", "MA"), ("bt", "Vacuum $B_T$ at $R_0$", "T"), @@ -2604,7 +2604,7 @@ def plot_power_info(axis, mfile_data, scan): plant_eff = 100.0 * ( mfile_data.data["pnetelmw"].get_scan(scan) - / mfile_data.data["fusion_power"].get_scan(scan) + / mfile_data.data["powfmw"].get_scan(scan) ) # Define appropriate pedestal and impurity parameters @@ -2780,7 +2780,7 @@ def plot_current_drive_info(axis, mfile_data, scan): ("aux_current_fraction", "Auxiliary fraction", ""), ("inductive_current_fraction", "Inductive fraction", ""), ("gamnb", "NB gamma", "$10^{20}$ A W$^{-1}$ m$^{-2}$"), - ("beam_energy", "NB energy", "keV"), + ("enbeam", "NB energy", "keV"), ("powerht", "Plasma heating used for H factor", "MW"), (pdivr, r"$\frac{P_{\mathrm{div}}}{R_{0}}$", "MW m$^{-1}$"), ( @@ -3171,10 +3171,10 @@ def main(args=None): # rad profile global ssync global bt - global plasma_volume + global vol ssync = m_file.data["ssync"].get_scan(scan) bt = m_file.data["bt"].get_scan(scan) - plasma_volume = m_file.data["plasma_volume"].get_scan(scan) + vol = m_file.data["vol"].get_scan(scan) # Build the dictionaries of radial and vertical build values and cumulative values global vertical_upper diff --git a/process/io/sankey_funcs.py b/process/io/sankey_funcs.py index 6ae38492..da42e08f 100644 --- a/process/io/sankey_funcs.py +++ b/process/io/sankey_funcs.py @@ -22,23 +22,17 @@ def plot_full_sankey( m_file = MFile(mfilename) # Used in [PLASMA] - fusion_power = m_file.data["fusion_power"].get_scan(-1) # Fusion power (MW) + powfmw = m_file.data["powfmw"].get_scan(-1) # Fusion power (MW) pinjmw = m_file.data["pinjmw"].get_scan(-1) # Total auxiliary injected power (MW) pohmmw = m_file.data["pohmmw"].get_scan(-1) # Ohmic heating power (MW) - totalplasma = fusion_power + pinjmw + pohmmw # Total Power in plasma (MW) - neutron_power_total = m_file.data["neutron_power_total"].get_scan( - -1 - ) # Neutron fusion power (MW) - non_alpha_charged_power = m_file.data["non_alpha_charged_power"].get_scan( + totalplasma = powfmw + pinjmw + pohmmw # Total Power in plasma (MW) + pneutmw = m_file.data["pneutmw"].get_scan(-1) # Neutron fusion power (MW) + pchargemw = m_file.data["pchargemw"].get_scan( -1 ) # Non-alpha charged particle power (MW) - pcharohmmw = ( - non_alpha_charged_power + pohmmw - ) # The ohmic and charged particle power (MW) - alpha_power_total = m_file.data["alpha_power_total"].get_scan( - -1 - ) # Alpha power (MW) - palpinjmw = alpha_power_total + pinjmw # Alpha particle and HC&D power (MW) + pcharohmmw = pchargemw + pohmmw # The ohmic and charged particle power (MW) + palpmw = m_file.data["palpmw"].get_scan(-1) # Alpha power (MW) + palpinjmw = palpmw + pinjmw # Alpha particle and HC&D power (MW) # Used in [NEUTRONICS] emultmw = m_file.data["emultmw"].get_scan( @@ -63,12 +57,10 @@ def plot_full_sankey( pdivt = m_file.data["pdivt"].get_scan( -1 ) # Charged particle power deposited on divertor (MW) - f_alpha_plasma = m_file.data["f_alpha_plasma"].get_scan( + falpha = m_file.data["falpha"].get_scan( -1 ) # Fraction of alpha power deposited in plasma - palpfwmw = alpha_power_total * ( - 1 - f_alpha_plasma - ) # Alpha particles hitting first wall (MW) + palpfwmw = palpmw * (1 - falpha) # Alpha particles hitting first wall (MW) pradmw = m_file.data["pradmw"].get_scan(-1) # Total radiation Power (MW) # Used in [RADIATION] @@ -116,14 +108,7 @@ def plot_full_sankey( # --------------------------------------- PLASMA - 0 -------------------------------------- # Fusion, Injected, Ohmic, -Charged P.-Ohmic, -Alphas-Injected, -Neutrons - PLASMA = [ - fusion_power, - pinjmw, - pohmmw, - -pcharohmmw, - -palpinjmw, - -neutron_power_total, - ] + PLASMA = [powfmw, pinjmw, pohmmw, -pcharohmmw, -palpinjmw, -pneutmw] sankey.add( flows=PLASMA, # [left(in), down(in), down(in), up(out), up(out), right(out)] @@ -150,14 +135,7 @@ def plot_full_sankey( # ------------------------------------- NEUTRONICS - 1 ------------------------------------ # Neutrons, -Divertor, -1st wall, -Shield, -TF coils, -Blanket+Energy Mult. - NEUTRONS = [ - neutron_power_total, - -pnucdiv, - -pnucfw, - -pnucshld, - -ptfnuc, - -pnucemblkt, - ] + NEUTRONS = [pneutmw, -pnucdiv, -pnucfw, -pnucshld, -ptfnuc, -pnucemblkt] sankey.add( flows=NEUTRONS, # left(in), up(out), up(out), up(out), up(out), right(out) @@ -436,10 +414,10 @@ def plot_full_sankey( t.set_position((pos[0]-0.2,pos[1])) if t == diagrams[0].texts[4]: # Charged Particles t.set_horizontalalignment('right') - t.set_position((pos[0]-0.5*(non_alpha_charged_power/totalplasma)-0.05,pos[1])) + t.set_position((pos[0]-0.5*(pchargemw/totalplasma)-0.05,pos[1])) if t == diagrams[0].texts[5]: # Alphas t.set_horizontalalignment('left') - t.set_position((pos[0]+0.5*(alpha_power_total/totalplasma)+0.05,pos[1]-0.1)) + t.set_position((pos[0]+0.5*(palpmw/totalplasma)+0.05,pos[1]-0.1)) if t == diagrams[1].texts[0]: # H&CD power t.set_horizontalalignment('right') t.set_position((pos[0]-0.5*((pinjht+pinjmw)/totalplasma)-0.05,pos[1])) @@ -476,10 +454,10 @@ def plot_sankey(mfilename="MFILE.DAT"): # Plot simplified power flow Sankey Dia m_file = MFile(mfilename) # Used in [PLASMA] - fusion_power = m_file.data["fusion_power"].get_scan(-1) # Fusion Power (MW) + powfmw = m_file.data["powfmw"].get_scan(-1) # Fusion Power (MW) pinjmw = m_file.data["pinjmw"].get_scan(-1) # Total auxiliary injected Power (MW) pohmmw = m_file.data["pohmmw"].get_scan(-1) # Ohmic heating Power (MW) - totalplasma = fusion_power + pinjmw + pohmmw # Total Power in plasma (MW) + totalplasma = powfmw + pinjmw + pohmmw # Total Power in plasma (MW) # Used in [DEPOSITION] pradmw = m_file.data["pradmw"].get_scan(-1) # Total radiation Power (MW) @@ -516,15 +494,11 @@ def plot_sankey(mfilename="MFILE.DAT"): # Plot simplified power flow Sankey Dia -1 ) # nuclear heating in the CP shield (MW) emultmw = m_file.data["emultmw"].get_scan(-1) # Blanket energy multiplication (MW) - alpha_power_total = m_file.data["alpha_power_total"].get_scan( - -1 - ) # Alpha power (MW) - f_alpha_plasma = m_file.data["f_alpha_plasma"].get_scan( + palpmw = m_file.data["palpmw"].get_scan(-1) # Alpha power (MW) + falpha = m_file.data["falpha"].get_scan( -1 ) # Fraction of alpha power deposited in plasma - palpfwmw = alpha_power_total * ( - 1 - f_alpha_plasma - ) # Alpha power hitting 1st wall (MW) + palpfwmw = palpmw * (1 - falpha) # Alpha power hitting 1st wall (MW) itart = m_file.data["itart"].get_scan( -1 ) # switch for spherical tokamak (ST) models @@ -598,7 +572,7 @@ def plot_sankey(mfilename="MFILE.DAT"): # Plot simplified power flow Sankey Dia # --------------------------------------- PLASMA - 0 -------------------------------------- # Fusion power, Injected power + ohmic power, - total plasma power - PLASMA = [fusion_power, pinjmw + pohmmw, -totalplasma] + PLASMA = [powfmw, pinjmw + pohmmw, -totalplasma] sankey.add( flows=PLASMA, orientations=[0, -1, 0], # [right(in), down(in), right(out)] @@ -749,7 +723,7 @@ def plot_sankey(mfilename="MFILE.DAT"): # Plot simplified power flow Sankey Dia if t == diagrams[0].texts[0]: # Fusion Power t.set_horizontalalignment("left") t.set_position( - (pos[0] - 0.35, pos[1] + 0.5 * (fusion_power / totalplasma) + 0.2) + (pos[0] - 0.35, pos[1] + 0.5 * (powfmw / totalplasma) + 0.2) ) if t == diagrams[0].texts[2]: # Plasma t.set_horizontalalignment("right") diff --git a/process/io/variable_metadata.py b/process/io/variable_metadata.py index a5aded41..116ffbf9 100644 --- a/process/io/variable_metadata.py +++ b/process/io/variable_metadata.py @@ -28,7 +28,7 @@ class VariableMetadata: description="TF coil thickness", units="m", ), - "fusion_power": VariableMetadata( + "powfmw": VariableMetadata( latex=r"$P_\mathrm{fus}$ [$MW$]", description="Fusion power", units="MW" ), "pinjemw": VariableMetadata( diff --git a/process/io/write_new_in_dat.py b/process/io/write_new_in_dat.py index 81a77d4a..13cf8991 100644 --- a/process/io/write_new_in_dat.py +++ b/process/io/write_new_in_dat.py @@ -98,13 +98,11 @@ def replace_iteration_variables(iteration_vars, in_data): """ for variable_name, variable_value in iteration_vars.items(): - + if (match := re.search(r"([a-zA-Z0-9_]+)\(([0-9]+)\)", variable_name)) is None: in_data.add_parameter(variable_name.lower(), variable_value) else: - in_data.change_array( - match.group(1), int(match.group(2)) - 1, variable_value - ) + in_data.change_array(match.group(1), int(match.group(2))-1, variable_value) return in_data diff --git a/process/main.py b/process/main.py index 284bea95..67e5bb77 100644 --- a/process/main.py +++ b/process/main.py @@ -74,7 +74,6 @@ from process.impurity_radiation import initialise_imprad from process.caller import write_output_files -import process from pathlib import Path import os @@ -192,11 +191,6 @@ def parse_args(self, args): action="store_true", help="Produce a filled json from --mfile arg in working dir", ) - parser.add_argument( - "--version", - action="store_true", - help="Print the version of PROCESS to the terminal", - ) # If args is not None, then parse the supplied arguments. This is likely # to come from the test suite when testing command-line arguments; the @@ -208,9 +202,6 @@ def parse_args(self, args): def run_mode(self): """Determine how to run Process.""" - if self.args.version: - print(process.__version__) - return # Store run object: useful for testing if self.args.varyiterparams: self.run = VaryRun(self.args.varyiterparamsconfig, self.args.solver) diff --git a/process/physics.py b/process/physics.py index 9afa7f19..fb794f35 100644 --- a/process/physics.py +++ b/process/physics.py @@ -611,13 +611,7 @@ def _nevins_integral( """ # Compute average electron beta - betae = ( - dene - * te - * 1.0e3 - * constants.electron_charge - / (bt**2 / (2.0 * constants.rmu0)) - ) + betae = dene * te * 1.0e3 * constants.echarge / (bt**2 / (2.0 * constants.rmu0)) nabla = rminor * np.sqrt(y) / rmajor x = (1.46 * np.sqrt(nabla) + 2.4 * nabla) / (1.0 - nabla) ** 1.5 @@ -1660,7 +1654,7 @@ def physics(self): physics_variables.q95, physics_variables.q0, physics_variables.rmajor, - physics_variables.plasma_volume, + physics_variables.vol, ) ) # Calculate the toroidal beta for the Nevins scaling @@ -1690,9 +1684,7 @@ def physics(self): # Wilson scaling uses thermal poloidal beta, not total betpth = ( - physics_variables.beta - - physics_variables.betaft - - physics_variables.beta_beam + physics_variables.beta - physics_variables.betaft - physics_variables.betanb ) * (physics_variables.btot / physics_variables.bp) ** 2 current_drive_variables.bscf_wilson = ( current_drive_variables.cboot @@ -1808,118 +1800,91 @@ def physics(self): if current_drive_variables.irfcd != 0: self.current_drive.cudriv(False) - # ***************************** # - # FUSION REACTIONS # - # ***************************** # - # Calculate fusion power + components - fusion_reactions = physics_funcs.FusionReactionRate(self.plasma_profile) - fusion_reactions.deuterium_branching(physics_variables.ti) - fusion_reactions.calculate_fusion_rates() - fusion_reactions.set_physics_variables() + fusion_rate = physics_funcs.FusionReactionRate(self.plasma_profile) + fusion_rate.calculate_fusion_rates() + fusion_rate.set_physics_variables() - # This neglects the power from the beam - physics_variables.dt_power_plasma = ( - physics_module.dt_power_density_plasma * physics_variables.plasma_volume - ) - physics_variables.dhe3_power = ( - physics_module.dhe3_power_density * physics_variables.plasma_volume - ) - physics_variables.dd_power = ( - physics_module.dd_power_density * physics_variables.plasma_volume - ) + # + physics_variables.pdt = physics_module.pdtpv * physics_variables.vol + physics_variables.pdhe3 = physics_module.pdhe3pv * physics_variables.vol + physics_variables.pdd = physics_module.pddpv * physics_variables.vol # Calculate neutral beam slowing down effects # If ignited, then ignore beam fusion effects - if (current_drive_variables.beam_current != 0.0e0) and ( + if (current_drive_variables.cnbeam != 0.0e0) and ( physics_variables.ignite == 0 ): ( - physics_variables.beta_beam, - physics_variables.beam_density_out, - physics_variables.alpha_power_beams, - ) = physics_funcs.beam_fusion( + physics_variables.betanb, + physics_variables.dnbeam2, + physics_variables.palpnb, + ) = physics_funcs.beamfus( physics_variables.beamfus0, physics_variables.betbm0, physics_variables.bp, physics_variables.bt, - current_drive_variables.beam_current, + current_drive_variables.cnbeam, physics_variables.dene, physics_variables.deni, physics_variables.dlamie, - current_drive_variables.beam_energy, - physics_variables.f_deuterium, - physics_variables.f_tritium, - current_drive_variables.f_tritium_beam, - physics_module.sigmav_dt_average, + physics_variables.ealphadt, + current_drive_variables.enbeam, + physics_variables.fdeut, + physics_variables.ftrit, + current_drive_variables.ftritbm, + physics_module.sigvdt, physics_variables.ten, physics_variables.tin, - physics_variables.plasma_volume, + physics_variables.vol, physics_variables.zeffai, ) - physics_variables.fusion_rate_density_total = ( - physics_variables.fusion_rate_density_plasma + physics_variables.fusionrate = ( + physics_variables.fusionrate + 1.0e6 - * physics_variables.alpha_power_beams - / (constants.dt_alpha_energy) - / physics_variables.plasma_volume + * physics_variables.palpnb + / (1.0e3 * physics_variables.ealphadt * constants.echarge) + / physics_variables.vol ) - physics_variables.alpha_rate_density_total = ( - physics_variables.alpha_rate_density_plasma + physics_variables.alpharate = ( + physics_variables.alpharate + 1.0e6 - * physics_variables.alpha_power_beams - / (constants.dt_alpha_energy) - / physics_variables.plasma_volume - ) - physics_variables.dt_power_total = ( - physics_variables.dt_power_plasma - + 5.0e0 * physics_variables.alpha_power_beams - ) - else: - # If no beams present then the total alpha rates and power are the same as the plasma values - physics_variables.fusion_rate_density_total = ( - physics_variables.fusion_rate_density_plasma + * physics_variables.palpnb + / (1.0e3 * physics_variables.ealphadt * constants.echarge) + / physics_variables.vol ) - physics_variables.alpha_rate_density_total = ( - physics_variables.alpha_rate_density_plasma - ) - physics_variables.dt_power_total = physics_variables.dt_power_plasma + + physics_variables.pdt = physics_variables.pdt + 5.0e0 * physics_variables.palpnb # Create some derived values and add beam contribution to fusion power ( - physics_variables.neutron_power_density_total, - physics_variables.alpha_power_plasma, - physics_variables.alpha_power_total, - physics_variables.neutron_power_plasma, - physics_variables.neutron_power_total, - physics_variables.non_alpha_charged_power, - physics_variables.alpha_power_density_total, - physics_variables.alpha_power_electron_density, - physics_variables.alpha_power_ions_density, - physics_variables.charged_particle_power, - physics_variables.fusion_power, - ) = physics_funcs.set_fusion_powers( - physics_variables.f_alpha_electron, - physics_variables.f_alpha_ion, - physics_variables.alpha_power_beams, - physics_variables.charged_power_density, - physics_variables.neutron_power_density_plasma, - physics_variables.plasma_volume, - physics_variables.alpha_power_density_plasma, - ) - - physics_variables.betaft = physics_funcs.fast_alpha_beta( + physics_variables.pneutpv, + physics_variables.palpmw, + physics_variables.pneutmw, + physics_variables.pchargemw, + physics_variables.betaft, + physics_variables.palppv, + physics_variables.palpipv, + physics_variables.palpepv, + physics_variables.pfuscmw, + physics_variables.powfmw, + ) = physics_funcs.palph2( physics_variables.bp, physics_variables.bt, physics_variables.dene, physics_variables.deni, physics_variables.dnitot, + physics_variables.falpe, + physics_variables.falpi, + physics_variables.palpnb, + physics_variables.pchargepv, + physics_variables.pneutpv, physics_variables.ten, physics_variables.tin, - physics_variables.alpha_power_density_total, - physics_variables.alpha_power_density_plasma, + physics_variables.vol, + physics_variables.palppv, physics_variables.ifalphap, ) @@ -1928,7 +1893,7 @@ def physics(self): if physics_variables.iwalld == 1: physics_variables.wallmw = ( physics_variables.ffwal - * physics_variables.neutron_power_total + * physics_variables.pneutmw / physics_variables.sarea ) else: @@ -1936,14 +1901,14 @@ def physics(self): # Double null configuration physics_variables.wallmw = ( (1.0e0 - fwbs_variables.fhcd - 2.0e0 * fwbs_variables.fdiv) - * physics_variables.neutron_power_total + * physics_variables.pneutmw / build_variables.fwarea ) else: # Single null Configuration physics_variables.wallmw = ( (1.0e0 - fwbs_variables.fhcd - fwbs_variables.fdiv) - * physics_variables.neutron_power_total + * physics_variables.pneutmw / build_variables.fwarea ) @@ -1968,14 +1933,12 @@ def physics(self): physics_variables.pradpv = radpwrdata.pradpv physics_variables.pinnerzoneradmw = ( - physics_variables.pcoreradpv * physics_variables.plasma_volume + physics_variables.pcoreradpv * physics_variables.vol ) physics_variables.pouterzoneradmw = ( - physics_variables.pedgeradpv * physics_variables.plasma_volume - ) - physics_variables.pradmw = ( - physics_variables.pradpv * physics_variables.plasma_volume + physics_variables.pedgeradpv * physics_variables.vol ) + physics_variables.pradmw = physics_variables.pradpv * physics_variables.vol # Calculate ohmic power ( @@ -1990,7 +1953,7 @@ def physics(self): physics_variables.rmajor, physics_variables.rminor, physics_variables.ten, - physics_variables.plasma_volume, + physics_variables.vol, physics_variables.zeff, ) @@ -2022,8 +1985,8 @@ def physics(self): pinj = 0.0e0 physics_variables.pdivt = ( - physics_variables.f_alpha_plasma * physics_variables.alpha_power_total - + physics_variables.non_alpha_charged_power + physics_variables.falpha * physics_variables.palpmw + + physics_variables.pchargemw + pinj + physics_variables.pohmmw - physics_variables.pradmw @@ -2051,8 +2014,8 @@ def physics(self): ) # Power transported to the first wall by escaped alpha particles - physics_variables.palpfwmw = physics_variables.alpha_power_total * ( - 1.0e0 - physics_variables.f_alpha_plasma + physics_variables.palpfwmw = physics_variables.palpmw * ( + 1.0e0 - physics_variables.falpha ) # Density limit @@ -2082,7 +2045,7 @@ def physics(self): physics_variables.powerht, ) = self.pcond( physics_variables.afuel, - physics_variables.alpha_power_total, + physics_variables.palpmw, physics_variables.aspect, physics_variables.bt, physics_variables.dnitot, @@ -2095,7 +2058,7 @@ def physics(self): physics_variables.ignite, physics_variables.kappa, physics_variables.kappa95, - physics_variables.non_alpha_charged_power, + physics_variables.pchargemw, current_drive_variables.pinjmw, physics_variables.plasma_current, physics_variables.pcoreradpv, @@ -2106,17 +2069,13 @@ def physics(self): physics_variables.tin, physics_variables.q95, physics_variables.qstar, - physics_variables.plasma_volume, + physics_variables.vol, physics_variables.xarea, physics_variables.zeff, ) - physics_variables.ptremw = ( - physics_variables.ptrepv * physics_variables.plasma_volume - ) - physics_variables.ptrimw = ( - physics_variables.ptripv * physics_variables.plasma_volume - ) + physics_variables.ptremw = physics_variables.ptrepv * physics_variables.vol + physics_variables.ptrimw = physics_variables.ptripv * physics_variables.vol # Total transport power from scaling law (MW) # pscalingmw = physics_variables.ptremw + physics_variables.ptrimw #KE - why is this commented? @@ -2157,17 +2116,17 @@ def physics(self): physics_variables.aspect, physics_variables.dene, physics_variables.deni, - physics_variables.fusion_rate_density_total, - physics_variables.alpha_rate_density_total, + physics_variables.fusionrate, + physics_variables.alpharate, physics_variables.plasma_current, sbar, physics_variables.dnalp, physics_variables.taueff, - physics_variables.plasma_volume, + physics_variables.vol, ) - # ptremw = physics_variables.ptrepv*physics_variables.plasma_volume - # ptrimw = physics_variables.ptripv*physics_variables.plasma_volume + # ptremw = physics_variables.ptrepv*physics_variables.vol + # ptrimw = physics_variables.ptripv*physics_variables.vol # Total transport power from scaling law (MW) physics_variables.pscalingmw = ( physics_variables.ptremw + physics_variables.ptrimw @@ -2302,8 +2261,8 @@ def physics(self): # Calculate some derived quantities that may not have been defined earlier physics_module.total_loss_power = 1e6 * ( - physics_variables.f_alpha_plasma * physics_variables.alpha_power_total - + physics_variables.non_alpha_charged_power + physics_variables.falpha * physics_variables.palpmw + + physics_variables.pchargemw + physics_variables.pohmmw + current_drive_variables.pinjmw ) @@ -2324,7 +2283,7 @@ def physics(self): * physics_variables.btot * physics_variables.btot / (2.0e0 * constants.rmu0) - * physics_variables.plasma_volume + * physics_variables.vol ) physics_module.total_energy_conf_time = ( @@ -2482,17 +2441,17 @@ def plasma_composition(): # production rates are evaluated later in the calling sequence # Issue #557 Allow protium impurity to be specified: 'protium' # This will override the calculated value which is a minimum. - if physics_variables.alpha_rate_density_total < 1.0e-6: # not calculated yet... + if physics_variables.alpharate < 1.0e-6: # not calculated yet... physics_variables.dnprot = max( physics_variables.protium * physics_variables.dene, - physics_variables.dnalp * (physics_variables.f_helium3 + 1.0e-3), + physics_variables.dnalp * (physics_variables.fhe3 + 1.0e-3), ) # rough estimate else: physics_variables.dnprot = max( physics_variables.protium * physics_variables.dene, physics_variables.dnalp - * physics_variables.proton_rate_density - / physics_variables.alpha_rate_density_total, + * physics_variables.protonrate + / physics_variables.alpharate, ) # Beam hot ion component @@ -2525,8 +2484,8 @@ def plasma_composition(): # Fuel ion density, deni # For D-T-He3 mix, deni = nD + nT + nHe3, while znfuel = nD + nT + 2*nHe3 - # So deni = znfuel - nHe3 = znfuel - f_helium3*deni - physics_variables.deni = znfuel / (1.0 + physics_variables.f_helium3) + # So deni = znfuel - nHe3 = znfuel - fhe3*deni + physics_variables.deni = znfuel / (1.0 + physics_variables.fhe3) # Set hydrogen and helium impurity fractions for # radiation calculations @@ -2534,7 +2493,7 @@ def plasma_composition(): impurity_radiation_module.element2index("H_") - 1 ] = ( physics_variables.dnprot - + (physics_variables.f_deuterium + physics_variables.f_tritium) + + (physics_variables.fdeut + physics_variables.ftrit) * physics_variables.deni + physics_variables.dnbeam ) / physics_variables.dene @@ -2542,9 +2501,7 @@ def plasma_composition(): impurity_radiation_module.impurity_arr_frac[ impurity_radiation_module.element2index("He") - 1 ] = ( - physics_variables.f_helium3 - * physics_variables.deni - / physics_variables.dene + physics_variables.fhe3 * physics_variables.deni / physics_variables.dene + physics_variables.ralpne ) @@ -2610,7 +2567,7 @@ def plasma_composition(): # Fraction of alpha energy to ions and electrons # From Max Fenstermacher # (used with electron and ion power balance equations only) - # No consideration of charged_power_density here... + # No consideration of pchargepv here... # pcoef now calculated in plasma_profiles, after the very first # call of plasma_composition; use old parabolic profile estimate @@ -2625,20 +2582,18 @@ def plasma_composition(): else: pc = physics_variables.pcoef - physics_variables.f_alpha_electron = 0.88155 * np.exp( - -physics_variables.te * pc / 67.4036 - ) - physics_variables.f_alpha_ion = 1.0 - physics_variables.f_alpha_electron + physics_variables.falpe = 0.88155 * np.exp(-physics_variables.te * pc / 67.4036) + physics_variables.falpi = 1.0 - physics_variables.falpe # Average atomic masses physics_variables.afuel = ( - 2.0 * physics_variables.f_deuterium - + 3.0 * physics_variables.f_tritium - + 3.0 * physics_variables.f_helium3 + 2.0 * physics_variables.fdeut + + 3.0 * physics_variables.ftrit + + 3.0 * physics_variables.fhe3 ) physics_variables.abeam = ( - 2.0 * (1.0 - current_drive_variables.f_tritium_beam) - + 3.0 * current_drive_variables.f_tritium_beam + 2.0 * (1.0 - current_drive_variables.ftritbm) + + 3.0 * current_drive_variables.ftritbm ) # Density weighted mass @@ -2660,15 +2615,13 @@ def plasma_composition(): # Mass weighted plasma effective charge physics_variables.zeffai = ( - physics_variables.f_deuterium * physics_variables.deni / 2.0 - + physics_variables.f_tritium * physics_variables.deni / 3.0 - + 4.0 * physics_variables.f_helium3 * physics_variables.deni / 3.0 + physics_variables.fdeut * physics_variables.deni / 2.0 + + physics_variables.ftrit * physics_variables.deni / 3.0 + + 4.0 * physics_variables.fhe3 * physics_variables.deni / 3.0 + physics_variables.dnalp + physics_variables.dnprot - + (1.0 - current_drive_variables.f_tritium_beam) - * physics_variables.dnbeam - / 2.0 - + current_drive_variables.f_tritium_beam * physics_variables.dnbeam / 3.0 + + (1.0 - current_drive_variables.ftritbm) * physics_variables.dnbeam / 2.0 + + current_drive_variables.ftritbm * physics_variables.dnbeam / 3.0 ) / physics_variables.dene for imp in range(impurity_radiation_module.nimp): if impurity_radiation_module.impurity_arr_z[imp] > 2: @@ -2684,13 +2637,13 @@ def phyaux( aspect, dene, deni, - fusion_rate_density_total, - alpha_rate_density_total, + fusionrate, + alpharate, plasma_current, sbar, dnalp, taueff, - plasma_volume, + vol, ): """Auxiliary physics quantities author: P J Knight, CCFE, Culham Science Centre @@ -2698,12 +2651,12 @@ def phyaux( dene : input real : electron density (/m3) deni : input real : fuel ion density (/m3) dnalp : input real : alpha ash density (/m3) - fusion_rate_density_total : input real : fusion reaction rate from plasma and beams (/m3/s) - alpha_rate_density_total : input real : alpha particle production rate (/m3/s) + fusionrate : input real : fusion reaction rate (/m3/s) + alpharate : input real : alpha particle production rate (/m3/s) plasma_current: input real : plasma current (A) sbar : input real : exponent for aspect ratio (normally 1) taueff : input real : global energy confinement time (s) - plasma_volume : input real : plasma volume (m3) + vol : input real : plasma volume (m3) burnup : output real : fractional plasma burnup dntau : output real : plasma average n-tau (s/m3) figmer : output real : physics figure of merit @@ -2721,13 +2674,13 @@ def phyaux( # Fusion reactions per second - fusrat = fusion_rate_density_total * plasma_volume + fusrat = fusionrate * vol # Alpha particle confinement time (s) # Number of alphas / alpha production rate - if alpha_rate_density_total != 0.0: - taup = dnalp / alpha_rate_density_total + if alpharate != 0.0: + taup = dnalp / alpharate else: # only likely if DD is only active fusion reaction taup = 0.0 @@ -2765,7 +2718,7 @@ def pohm( rmajor, rminor, ten, - plasma_volume, + vol, zeff, ): # Density weighted electron temperature in 10 keV units @@ -2800,17 +2753,11 @@ def pohm( # Ohmic heating power per unit volume # Corrected from: pohmpv = (inductive_current_fraction*plasma_current)**2 * ... - pohmpv = ( - inductive_current_fraction - * plasma_current**2 - * rplas - * 1.0e-6 - / plasma_volume - ) + pohmpv = inductive_current_fraction * plasma_current**2 * rplas * 1.0e-6 / vol # Total ohmic heating power - pohmmw = pohmpv * plasma_volume + pohmmw = pohmpv * vol return pohmpv, pohmmw, rpfac, rplas @@ -3059,9 +3006,9 @@ def outplas(self): physics_module.nu_star = ( 1 / constants.rmu0 - * (15.0e0 * constants.electron_charge**4 * physics_variables.dlamie) + * (15.0e0 * constants.echarge**4 * physics_variables.dlamie) / (4.0e0 * np.pi**1.5e0 * constants.epsilon0**2) - * physics_variables.plasma_volume**2 + * physics_variables.vol**2 * physics_variables.rmajor**2 * physics_variables.bt * np.sqrt(physics_variables.eps) @@ -3075,12 +3022,12 @@ def outplas(self): physics_module.rho_star = np.sqrt( 2.0e0 - * constants.proton_mass + * constants.mproton * physics_variables.aion * physics_module.total_plasma_internal_energy - / (3.0e0 * physics_variables.plasma_volume * physics_variables.dnla) + / (3.0e0 * physics_variables.vol * physics_variables.dnla) ) / ( - constants.electron_charge + constants.echarge * physics_variables.bt * physics_variables.eps * physics_variables.rmajor @@ -3091,7 +3038,7 @@ def outplas(self): / 3.0e0 * constants.rmu0 * physics_module.total_plasma_internal_energy - / (physics_variables.plasma_volume * physics_variables.bt**2) + / (physics_variables.vol * physics_variables.bt**2) ) po.oheadr(self.outfile, "Plasma") @@ -3299,8 +3246,8 @@ def outplas(self): po.ovarre( self.outfile, "Plasma volume (m3)", - "(plasma_volume)", - physics_variables.plasma_volume, + "(vol)", + physics_variables.vol, "OP ", ) @@ -3432,11 +3379,9 @@ def outplas(self): po.osubhd(self.outfile, "Beta Information :") betath = ( - physics_variables.beta - - physics_variables.betaft - - physics_variables.beta_beam + physics_variables.beta - physics_variables.betaft - physics_variables.betanb ) - gammaft = (physics_variables.betaft + physics_variables.beta_beam) / betath + gammaft = (physics_variables.betaft + physics_variables.betanb) / betath po.ovarre(self.outfile, "Total plasma beta", "(beta)", physics_variables.beta) po.ovarre( @@ -3458,11 +3403,7 @@ def outplas(self): self.outfile, "Fast alpha beta", "(betaft)", physics_variables.betaft, "OP " ) po.ovarre( - self.outfile, - "Beam ion beta", - "(beta_beam)", - physics_variables.beta_beam, - "OP ", + self.outfile, "Beam ion beta", "(betanb)", physics_variables.betanb, "OP " ) po.ovarre( self.outfile, @@ -3585,7 +3526,7 @@ def outplas(self): * physics_variables.btot * physics_variables.btot / (2.0e0 * constants.rmu0) - * physics_variables.plasma_volume, + * physics_variables.vol, "OP ", ) @@ -3946,205 +3887,76 @@ def outplas(self): po.osubhd(self.outfile, "Fuel Constituents :") po.ovarrf( - self.outfile, - "Deuterium fuel fraction", - "(f_deuterium)", - physics_variables.f_deuterium, + self.outfile, "Deuterium fuel fraction", "(fdeut)", physics_variables.fdeut ) po.ovarrf( - self.outfile, - "Tritium fuel fraction", - "(f_tritium)", - physics_variables.f_tritium, + self.outfile, "Tritium fuel fraction", "(ftrit)", physics_variables.ftrit ) - if physics_variables.f_helium3 > 1.0e-3: + if physics_variables.fhe3 > 1.0e-3: po.ovarrf( - self.outfile, - "3-Helium fuel fraction", - "(f_helium3)", - physics_variables.f_helium3, + self.outfile, "3-Helium fuel fraction", "(fhe3)", physics_variables.fhe3 ) - po.osubhd(self.outfile, "Fusion Powers :") - po.ocmmnt( - self.outfile, - "Fusion power totals from the main plasma and beam-plasma interactions (if present)\n", - ) - + po.osubhd(self.outfile, "Fusion Power :") po.ovarre( self.outfile, "Total fusion power (MW)", - "(fusion_power)", - physics_variables.fusion_power, - "OP ", - ) - po.ovarre( - self.outfile, - "Fusion rate density: total (particles/m3/sec)", - "(fusion_rate_density_total)", - physics_variables.fusion_rate_density_total, - "OP ", - ) - po.ovarre( - self.outfile, - "Fusion rate density: plasma (particles/m3/sec)", - "(fusion_rate_density_plasma)", - physics_variables.fusion_rate_density_total, - "OP ", - ) - po.ovarre( - self.outfile, - "D-T fusion power: total (MW)", - "(dt_power_total)", - physics_variables.dt_power_total, + "(powfmw)", + physics_variables.powfmw, "OP ", ) po.ovarre( self.outfile, - "D-T fusion power: plasma (MW)", - "(dt_power_plasma)", - physics_variables.dt_power_plasma, + " = D-T fusion power (MW)", + "(pdt)", + physics_variables.pdt, "OP ", ) po.ovarre( self.outfile, - "D-D fusion power (MW)", - "(dd_power)", - physics_variables.dd_power, + " + D-D fusion power (MW)", + "(pdd)", + physics_variables.pdd, "OP ", ) po.ovarre( self.outfile, - "D-D branching ratio for tritium producing reactions", - "(f_dd_branching_trit)", - physics_variables.f_dd_branching_trit, - "OP ", - ) - po.ovarre( - self.outfile, - "D-He3 fusion power (MW)", - "(dhe3_power)", - physics_variables.dhe3_power, - "OP ", - ) - po.osubhd(self.outfile, "Alpha Powers :") - po.ovarre( - self.outfile, - "Alpha rate density: total (particles/m3/sec)", - "(alpha_rate_density_total)", - physics_variables.alpha_rate_density_total, - "OP ", - ) - po.ovarre( - self.outfile, - "Alpha rate density: plasma (particles/m3/sec)", - "(alpha_rate_density_plasma)", - physics_variables.alpha_rate_density_plasma, + " + D-He3 fusion power (MW)", + "(pdhe3)", + physics_variables.pdhe3, "OP ", ) po.ovarre( self.outfile, "Alpha power: total (MW)", - "(alpha_power_total)", - physics_variables.alpha_power_total, - "OP ", - ) - po.ovarre( - self.outfile, - "Alpha power density: total (MW/m^3)", - "(alpha_power_density_total)", - physics_variables.alpha_power_density_total, - "OP ", - ) - po.ovarre( - self.outfile, - "Alpha power: plasma only (MW)", - "(alpha_power_plasma)", - physics_variables.alpha_power_plasma, - "OP ", - ) - po.ovarre( - self.outfile, - "Alpha power density: plasma (MW/m^3)", - "(alpha_power_density_plasma)", - physics_variables.alpha_power_density_plasma, + "(palpmw)", + physics_variables.palpmw, "OP ", ) po.ovarre( self.outfile, "Alpha power: beam-plasma (MW)", - "(alpha_power_beams)", - physics_variables.alpha_power_beams, + "(palpnb)", + physics_variables.palpnb, "OP ", ) po.ovarre( self.outfile, - "Alpha power per unit volume transferred to electrons (MW/m3)", - "(alpha_power_electron_density)", - physics_variables.alpha_power_electron_density, + "Neutron power (MW)", + "(pneutmw)", + physics_variables.pneutmw, "OP ", ) - po.ovarre( - self.outfile, - "Alpha power per unit volume transferred to ions (MW/m3)", - "(alpha_power_ions_density)", - physics_variables.alpha_power_ions_density, - "OP ", - ) - po.osubhd(self.outfile, "Neutron Powers :") - po.ovarre( - self.outfile, - "Neutron power: total (MW)", - "(neutron_power_total)", - physics_variables.neutron_power_total, - "OP ", - ) - po.ovarre( - self.outfile, - "Neutron power density: total (MW/m^3)", - "(neutron_power_density_total)", - physics_variables.neutron_power_density_total, - "OP ", - ) - po.ovarre( - self.outfile, - "Neutron power: plasma only (MW)", - "(neutron_power_plasma)", - physics_variables.neutron_power_plasma, - "OP ", - ) - po.ovarre( - self.outfile, - "Neutron power density: plasma (MW/m^3)", - "(neutron_power_density_plasma)", - physics_variables.neutron_power_density_plasma, - "OP ", - ) - po.ovarre( - self.outfile, - "Neutron power: beam-plasma (MW)", - "(neutron_power_beams)", - physics_variables.alpha_power_beams * 4.0e0, - "OP ", - ) - po.osubhd(self.outfile, "Charged Particle Powers :") po.ovarre( self.outfile, "Charged particle power (excluding alphas) (MW)", - "(non_alpha_charged_power)", - physics_variables.non_alpha_charged_power, - "OP ", - ) - po.ovarre( - self.outfile, - "Total charged particle power (including alphas) (MW)", - "(charged_particle_power)", - physics_variables.charged_particle_power, + "(pchargemw)", + physics_variables.pchargemw, "OP ", ) tot_power_plasma = ( - physics_variables.f_alpha_plasma * physics_variables.alpha_power_total - + physics_variables.non_alpha_charged_power + physics_variables.falpha * physics_variables.palpmw + + physics_variables.pchargemw + physics_variables.pohmmw + current_drive_variables.pinjmw ) @@ -4155,13 +3967,14 @@ def outplas(self): tot_power_plasma, "OP ", ) + # po.ovarre(self.outfile,'Total power deposited in plasma (MW)','()',falpha*palpmw+pchargemw+pohmmw+pinjmw, 'OP ') po.osubhd(self.outfile, "Radiation Power (excluding SOL):") po.ovarre( self.outfile, "Synchrotron radiation power (MW)", - "(psyncpv*plasma_volume)", - physics_variables.psyncpv * physics_variables.plasma_volume, + "(psyncpv*vol)", + physics_variables.psyncpv * physics_variables.vol, "OP ", ) po.ovarrf( @@ -4373,22 +4186,22 @@ def outplas(self): po.ovarrf( self.outfile, "Fraction of alpha power deposited in plasma", - "(f_alpha_plasma)", - physics_variables.f_alpha_plasma, + "(falpha)", + physics_variables.falpha, "IP", ) po.ovarrf( self.outfile, "Fraction of alpha power to electrons", - "(f_alpha_electron)", - physics_variables.f_alpha_electron, + "(falpe)", + physics_variables.falpe, "OP ", ) po.ovarrf( self.outfile, "Fraction of alpha power to ions", - "(f_alpha_ion)", - physics_variables.f_alpha_ion, + "(falpi)", + physics_variables.falpi, "OP ", ) po.ovarre( @@ -4866,7 +4679,7 @@ def outplas(self): physics_variables.powerht / ( physics_variables.powerht - + physics_variables.pradpv * physics_variables.plasma_volume + + physics_variables.pradpv * physics_variables.vol ) ) ** 0.31, @@ -5258,7 +5071,7 @@ def igmarcal(self): powerhtz, ) = self.pcond( physics_variables.afuel, - physics_variables.alpha_power_total, + physics_variables.palpmw, physics_variables.aspect, physics_variables.bt, physics_variables.dnitot, @@ -5271,7 +5084,7 @@ def igmarcal(self): physics_variables.ignite, physics_variables.kappa, physics_variables.kappa95, - physics_variables.non_alpha_charged_power, + physics_variables.pchargemw, current_drive_variables.pinjmw, physics_variables.plasma_current, physics_variables.pcoreradpv, @@ -5282,7 +5095,7 @@ def igmarcal(self): physics_variables.tin, physics_variables.q, physics_variables.qstar, - physics_variables.plasma_volume, + physics_variables.vol, physics_variables.xarea, physics_variables.zeff, ) @@ -5304,7 +5117,7 @@ def bootstrap_fraction_iter89( q95: float, q0: float, rmajor: float, - plasma_volume: float, + vol: float, ) -> float: """ Calculate the bootstrap-driven fraction of the plasma current. @@ -5317,7 +5130,7 @@ def bootstrap_fraction_iter89( q95 (float): Safety factor at 95% surface. q0 (float): Central safety factor. rmajor (float): Plasma major radius (m). - plasma_volume (float): Plasma volume (m3). + vol (float): Plasma volume (m3). Returns: float: The bootstrap-driven fraction of the plasma current. @@ -5333,7 +5146,7 @@ def bootstrap_fraction_iter89( c_bs = 1.32 - 0.235 * (q95 / q0) + 0.0185 * (q95 / q0) ** 2 # Calculate the average minor radius - average_a = np.sqrt(plasma_volume / (2 * np.pi**2 * rmajor)) + average_a = np.sqrt(vol / (2 * np.pi**2 * rmajor)) b_pa = (plasma_current / 1e6) / (5 * average_a) @@ -5517,7 +5330,7 @@ def bootstrap_fraction_nevins( physics_variables.ne0 * physics_variables.te0 * 1.0e3 - * constants.electron_charge + * constants.echarge / (bt**2 / (2.0 * constants.rmu0)) ) @@ -5605,7 +5418,7 @@ def bootstrap_fraction_sauter(plasma_profile: float) -> float: amain = np.full_like(inverse_q, physics_variables.afuel) # Create new array of average main ion charge - zmain = np.full_like(inverse_q, 1.0 + physics_variables.f_helium3) + zmain = np.full_like(inverse_q, 1.0 + physics_variables.fhe3) # Prevent division by zero if ne[NR - 1] == 0.0: @@ -5784,7 +5597,7 @@ def fhz(self, hhh): powerhtz, ) = self.pcond( physics_variables.afuel, - physics_variables.alpha_power_total, + physics_variables.palpmw, physics_variables.aspect, physics_variables.bt, physics_variables.dnitot, @@ -5797,7 +5610,7 @@ def fhz(self, hhh): physics_variables.ignite, physics_variables.kappa, physics_variables.kappa95, - physics_variables.non_alpha_charged_power, + physics_variables.pchargemw, current_drive_variables.pinjmw, physics_variables.plasma_current, physics_variables.pcoreradpv, @@ -5808,7 +5621,7 @@ def fhz(self, hhh): physics_variables.tin, physics_variables.q, physics_variables.qstar, - physics_variables.plasma_volume, + physics_variables.vol, physics_variables.xarea, physics_variables.zeff, ) @@ -5818,9 +5631,8 @@ def fhz(self, hhh): fhz = ( ptrez + ptriz - - physics_variables.f_alpha_plasma - * physics_variables.alpha_power_density_total - - physics_variables.charged_power_density + - physics_variables.falpha * physics_variables.palppv + - physics_variables.pchargepv - physics_variables.pohmpv ) @@ -5828,7 +5640,7 @@ def fhz(self, hhh): # calculation (i.e. whether device is ignited) if physics_variables.ignite == 0: - fhz -= current_drive_variables.pinjmw / physics_variables.plasma_volume + fhz -= current_drive_variables.pinjmw / physics_variables.vol # Include the radiation power if requested @@ -5842,7 +5654,7 @@ def fhz(self, hhh): @staticmethod def pcond( afuel, - alpha_power_total, + palpmw, aspect, bt, dnitot, @@ -5855,7 +5667,7 @@ def pcond( ignite, kappa, kappa95, - non_alpha_charged_power, + pchargemw, pinjmw, plasma_current, pcoreradpv, @@ -5866,7 +5678,7 @@ def pcond( tin, q, qstar, - plasma_volume, + vol, xarea, zeff, ): @@ -5874,7 +5686,7 @@ def pcond( the transport power loss terms. author: P J Knight, CCFE, Culham Science Centre afuel : input real : average mass of fuel (amu) - alpha_power_total : input real : alpha particle power (MW) + palpmw : input real : alpha particle power (MW) aspect : input real : aspect ratio bt : input real : toroidal field on axis (T) dene : input real : volume averaged electron density (/m3) @@ -5888,7 +5700,7 @@ def pcond( kappa : input real : plasma elongation kappa95 : input real : plasma elongation at 95% surface kappaa : output real : plasma elongation calculated using area ratio - non_alpha_charged_power : input real : non-alpha charged particle fusion power (MW) + pchargemw : input real : non-alpha charged particle fusion power (MW) pinjmw : input real : auxiliary power to ions and electrons (MW) plasma_current : input real : plasma current (A) pcoreradpv: input real : total core radiation power (MW/m3) @@ -5900,7 +5712,7 @@ def pcond( te : input real : average electron temperature (keV) ten : input real : density weighted average electron temp. (keV) tin : input real : density weighted average ion temperature (keV) - plasma_volume : input real : plasma volume (m3) + vol : input real : plasma volume (m3) xarea : input real : plasma cross-sectional area (m2) zeff : input real : plasma effective charge ptrepv : output real : electron transport power (MW/m3) @@ -5944,9 +5756,7 @@ def pcond( # Calculate heating power (MW) powerht = ( - physics_variables.f_alpha_plasma * alpha_power_total - + non_alpha_charged_power - + physics_variables.pohmmw + physics_variables.falpha * palpmw + pchargemw + physics_variables.pohmmw ) # If the device is not ignited, add the injected auxiliary power @@ -5955,11 +5765,11 @@ def pcond( # Include the radiation as a loss term if requested if physics_variables.iradloss == 0: - powerht = powerht - physics_variables.pradpv * plasma_volume + powerht = powerht - physics_variables.pradpv * vol elif physics_variables.iradloss == 1: powerht = ( - powerht - pcoreradpv * plasma_volume - ) # shouldn't this be vol_core instead of plasma_volume? + powerht - pcoreradpv * vol + ) # shouldn't this be vol_core instead of vol? # else do not adjust powerht for radiation # Ensure heating power is positive (shouldn't be necessary) @@ -5979,7 +5789,7 @@ def pcond( kappaa = xarea / (np.pi * rminor * rminor) # Separatrix kappa defined with plasma volume for IPB scalings - physics_variables.kappaa_ipb = plasma_volume / ( + physics_variables.kappaa_ipb = vol / ( 2.0e0 * np.pi**2 * rminor * rminor * rmajor ) @@ -6833,7 +6643,7 @@ def res_diff_time(rmajor, rplas, kappa95): return 2 * constants.rmu0 * rmajor / (rplas * kappa95) -def pthresh(dene, dnla, bt, rmajor, rminor, kappa, sarea, aion, aspect, plasma_current): +def pthresh(dene, dnla, bt, rmajor, rminor, kappa, sarea, aion, aspect, plascur): """L-mode to H-mode power threshold calculation Author: P J Knight, CCFE, Culham Science Centre @@ -6856,7 +6666,7 @@ def pthresh(dene, dnla, bt, rmajor, rminor, kappa, sarea, aion, aspect, plasma_c :param sarea: plasma surface area (m2) :param aion: average mass of all ions (amu) :param aspect: aspect ratio - :param plasma_current: plasma current (A) + :param plascur: plasma current (A) :returns: array of power thresholds (18 different scalings) """ @@ -6930,9 +6740,9 @@ def pthresh(dene, dnla, bt, rmajor, rminor, kappa, sarea, aion, aspect, plasma_c ) # Hubbard et al. 2012 L-I threshold scaling - hubbard_2012 = 2.11 * (plasma_current / 1e6) ** 0.94 * dnla20**0.65 - hubbard_2012_lb = 2.11 * (plasma_current / 1e6) ** 0.70 * dnla20**0.47 - hubbard_2012_ub = 2.11 * (plasma_current / 1e6) ** 1.18 * dnla20**0.83 + hubbard_2012 = 2.11 * (plascur / 1e6) ** 0.94 * dnla20**0.65 + hubbard_2012_lb = 2.11 * (plascur / 1e6) ** 0.70 * dnla20**0.47 + hubbard_2012_ub = 2.11 * (plascur / 1e6) ** 1.18 * dnla20**0.83 # Hubbard et al. 2017 L-I threshold scaling hubbard_2017 = 0.162 * dnla20 * sarea * (bt) ** 0.26 diff --git a/process/physics_functions.py b/process/physics_functions.py index 960a9ac9..a832f7a9 100644 --- a/process/physics_functions.py +++ b/process/physics_functions.py @@ -1,19 +1,15 @@ import logging -import numpy as np +import numpy from scipy import integrate from dataclasses import dataclass from process.fortran import physics_variables, physics_module, constants -from process.plasma_profiles import PlasmaProfile import process.impurity_radiation as impurity logger = logging.getLogger(__name__) -# https://physics.nist.gov/cgi-bin/cuu/Value?mdu|search_for=deuteron -ATOMIC_MASS_DEUTERIUM = 2.013553212544 - -# https://physics.nist.gov/cgi-bin/cuu/Value?mtu|search_for=triton -ATOMIC_MASS_TRITIUM = 3.01550071597 +ATOMIC_MASS_DEUTERIUM = 2.0 +ATOMIC_MASS_TRITIUM = 3.0 REACTION_CONSTANTS_DT = dict( bg=34.3827, @@ -65,489 +61,182 @@ class FusionReactionRate: - """ - Calculate the fusion reaction rate for each reaction case (DT, DHE3, DD1, DD2). - - This class provides methods to numerically integrate over the plasma cross-section - to find the core plasma fusion power for different fusion reactions. The reactions - considered are: - - Deuterium-Tritium (D-T) - - Deuterium-Helium-3 (D-3He) - - Deuterium-Deuterium (D-D) first branch - - Deuterium-Deuterium (D-D) second branch - - The class uses the Bosch-Hale parametrization to compute the volumetric fusion reaction - rate and integrates over the plasma cross-section to find the core plasma - fusion power. - - Attributes: - plasma_profile (PlasmaProfile): The parameterized temperature and density profiles of the plasma. - sigmav_dt_average (float): Average fusion reaction rate for D-T. - dhe3_power_density (float): Fusion power density produced by the D-3He reaction. - dd_power_density (float): Fusion power density produced by the D-D reactions. - dt_power_density (float): Fusion power density produced by the D-T reaction. - alpha_power_density (float): Power density of alpha particles produced. - charged_power_density (float): Power density of charged particles produced. - neutron_power_density (float): Power density of neutrons produced. - fusion_rate_density (float): Fusion reaction rate density. - alpha_rate_density (float): Alpha particle production rate density. - proton_rate_density (float): Proton production rate density. - f_dd_branching_trit (float): The rate of tritium producing D-D reactions to 3He ones. - - Methods: - deuterium_branching(ion_temperature: float) -> float: - Calculate the relative rate of tritium producing D-D reactions to 3He ones based on the volume averaged ion temperature. - - dt_reaction() -> None: - Calculate the fusion reaction rate and power density for the deuterium-tritium (D-T) fusion reaction. - - dhe3_reaction() -> None: - Calculate the fusion reaction rate and power density for the deuterium-helium-3 (D-3He) fusion reaction. - - dd_helion_reaction() -> None: - Calculate the fusion reaction rate and power density for the deuterium-deuterium (D-D) fusion reaction, specifically the branch that produces helium-3 (3He) and a neutron (n). - - dd_triton_reaction() -> None: - Calculate the fusion reaction rate and power density for the deuterium-deuterium (D-D) fusion reaction, specifically the branch that produces tritium (T) and a proton (p). - - sum_fusion_rates(alpha_power_add: float, charged_power_add: float, neutron_power_add: float, fusion_rate_add: float, alpha_rate_add: float, proton_rate_add: float) -> None: - Sum the fusion rate at the end of each reaction. - - calculate_fusion_rates() -> None: - Initiate all the fusion rate calculations. - - set_physics_variables() -> None: - Set the required physics variables in the physics_variables and physics_module modules. - + """Calculate the fusion reaction rate for each reaction case (DT,DHE3,DD1,DD2). + This subroutine numerically integrates over plasma cross-section to + find the core plasma fusion power. References: - - H.-S. Bosch and G. M. Hale, “Improved formulas for fusion cross-sections and thermal reactivities,” - Nuclear Fusion, vol. 32, no. 4, pp. 611–631, Apr. 1992, - doi: https://doi.org/10.1088/0029-5515/32/4/i07. - + T & M/PKNIGHT/LOGBOOK24, p.6 + Author: + P J Knight, CCFE, Culham Science Centre + G Turkington (UKAEA) """ - def __init__(self, plasma_profile: PlasmaProfile) -> None: - """ - Initialize the FusionReactionRate class with the given plasma profile. - - Parameters: - plasma_profile (PlasmaProfile): The parameterized temperature and density profiles of the plasma. - - Attributes: - plasma_profile (PlasmaProfile): The parameterized temperature and density profiles of the plasma. - sigmav_dt_average (float): Average fusion reaction rate for D-T. - dhe3_power_density (float): Fusion power density produced by the D-3He reaction. - dd_power_density (float): Fusion power density produced by the D-D reactions. - dt_power_density (float): Fusion power density produced by the D-T reaction. - alpha_power_density (float): Power density of alpha particles produced. - charged_power_density (float): Power density of charged particles produced. - neutron_power_density (float): Power density of neutrons produced. - fusion_rate_density (float): Fusion reaction rate density. - alpha_rate_density (float): Alpha particle production rate density. - proton_rate_density (float): Proton production rate density. - f_dd_branching_trit (float): The rate of tritium producing D-D reactions to 3He ones. - """ + def __init__(self, plasma_profile): self.plasma_profile = plasma_profile - self.sigmav_dt_average = 0.0 - self.dhe3_power_density = 0.0 - self.dd_power_density = 0.0 - self.dt_power_density = 0.0 - self.alpha_power_density = 0.0 - self.charged_power_density = 0.0 - self.neutron_power_density = 0.0 - self.fusion_rate_density = 0.0 - self.alpha_rate_density = 0.0 - self.proton_rate_density = 0.0 - self.f_dd_branching_trit = 0.0 - - def deuterium_branching(self, ion_temperature: float) -> float: - """ - Calculate the relative rate of tritium producing D-D reactions to 3He ones based on the volume averaged ion temperature - - Parameters: - ion_temperature (float): Volume averaged ion temperature in keV - - The method updates the following attributes: - -f_dd_branching_trit: The rate of tritium producing D-D reactions to 3He ones - - Notes: - - For ion temperatures between 0.5 keV and 200 keV. - - The deviation of the fit from the R-matrix branching ratio is always smaller than 0.5%. - - References: - - H.-S. Bosch and G. M. Hale, “Improved formulas for fusion cross-sections and thermal reactivities,” - Nuclear Fusion, vol. 32, no. 4, pp. 611–631, Apr. 1992, - doi: https://doi.org/10.1088/0029-5515/32/4/i07. - ‌ - """ - # Divide by 2 to get the branching ratio for the D-D reaction that produces tritium as the output - # is just the ratio of the two normalized cross sections - self.f_dd_branching_trit = ( - 1.02934 - - 8.3264e-3 * ion_temperature - + 1.7631e-4 * ion_temperature**2 - - 1.8201e-6 * ion_temperature**3 - + 6.9855e-9 * ion_temperature**4 - ) / 2.0 - - def dt_reaction(self) -> None: - """D + T --> 4He + n reaction - - This method calculates the fusion reaction rate and power density for the - deuterium-tritium (D-T) fusion reaction. It uses the Bosch-Hale parametrization - to compute the volumetric fusion reaction rate and integrates over - the plasma cross-section to find the core plasma fusion power. - - The method updates the following attributes: - - self.sigmav_dt_average: Average fusion reaction rate for D-T. - - self.dt_power_density: Fusion power density produced by the D-T reaction. - - self.alpha_power_density: Power density of alpha particles produced. - - self.charged_power_density: Power density of charged particles produced. - - self.neutron_power_density: Power density of neutrons produced. - - self.fusion_rate_density: Fusion reaction rate density. - - self.alpha_rate_density: Alpha particle production rate density. - - self.proton_rate_density: Proton production rate density. - - Returns: - None - """ - # Initialize Bosch-Hale constants for the D-T reaction + self.sigvdt = 0.0 + self.pdhe3pv = 0.0 + self.pddpv = 0.0 + self.pdtpv = 0.0 + self.palppv = 0.0 + self.pchargepv = 0.0 + self.pneutpv = 0.0 + self.fusionrate = 0.0 + self.alpharate = 0.0 + self.protonrate = 0.0 + + def dt(self): + """D + T --> 4He + n reaction""" dt = BoschHaleConstants(**REACTION_CONSTANTS_DT) - - # Calculate the fusion reaction rate integral using Simpson's rule sigmav = integrate.simpson( - fusion_rate_integral(self.plasma_profile, dt), + fint(self.plasma_profile, dt), x=self.plasma_profile.neprofile.profile_x, dx=self.plasma_profile.neprofile.profile_dx, ) - - # Store the average fusion reaction rate - self.sigmav_dt_average = sigmav - - # Reaction energy in MegaJoules [MJ] - reaction_energy = constants.d_t_energy / 1.0e6 - - # Calculate the fusion power density produced [MW/m^3] - fusion_power_density = ( - sigmav - * reaction_energy - * (physics_variables.f_deuterium * physics_variables.deni) - * (physics_variables.f_tritium * physics_variables.deni) - ) - - # Power densities for different particles [MW/m^3] - # Alpha particle gets approximately 20% of the fusion power - alpha_power_density = ( - 1.0 - constants.dt_neutron_energy_fraction - ) * fusion_power_density - charged_power_density = 0.0 - neutron_power_density = ( - constants.dt_neutron_energy_fraction * fusion_power_density - ) - - # Calculate the fusion rate density [reactions/m^3/second] - fusion_rate_density = fusion_power_density / reaction_energy - alpha_rate_density = fusion_rate_density - proton_rate_density = 0.0 - - # Update the cumulative D-T power density - self.dt_power_density = fusion_power_density - - # Sum the fusion rates for all particles - self.sum_fusion_rates( - alpha_power_density, - charged_power_density, - neutron_power_density, - fusion_rate_density, - alpha_rate_density, - proton_rate_density, - ) - - def dhe3_reaction(self) -> None: - """D + 3He --> 4He + p reaction - - This method calculates the fusion reaction rate and power density for the - deuterium-helium-3 (D-3He) fusion reaction. It uses the Bosch-Hale parametrization - to compute the volumetric fusion reaction rate and integrates over - the plasma cross-section to find the core plasma fusion power. - - The method updates the following attributes: - - self.dhe3_power_density: Fusion power density produced by the D-3He reaction. - - self.alpha_power_density: Power density of alpha particles produced. - - self.charged_power_density: Power density of charged particles produced. - - self.neutron_power_density: Power density of neutrons produced. - - self.fusion_rate_density: Fusion reaction rate density. - - self.alpha_rate_density: Alpha particle production rate density. - - self.proton_rate_density: Proton production rate density. - - Returns: - None - """ - # Initialize Bosch-Hale constants for the D-3He reaction + self.sigvdt = sigmav + etot = 17.59 * constants.echarge # MJ + fpow = ( + 1.0 + * sigmav + * etot + * physics_variables.fdeut + * physics_variables.ftrit + * physics_variables.deni + * physics_variables.deni + ) # MW/m3 + pa = 0.2 * fpow + pc = 0.0 + pn = 0.8 * fpow + frate = fpow / etot # reactions/m3/second + arate = frate + prate = 0.0 + self.pdtpv = fpow + self.sum_fusion_rates(pa, pc, pn, frate, arate, prate) + + def dhe3(self): + """D + 3He --> 4He + p reaction""" dhe3 = BoschHaleConstants(**REACTION_CONSTANTS_DHE3) - - # Calculate the fusion reaction rate integral using Simpson's rule sigmav = integrate.simpson( - fusion_rate_integral(self.plasma_profile, dhe3), + fint(self.plasma_profile, dhe3), x=self.plasma_profile.neprofile.profile_x, dx=self.plasma_profile.neprofile.profile_dx, ) - - # Reaction energy in MegaJoules [MJ] - reaction_energy = constants.d_helium_energy / 1.0e6 - - # Calculate the fusion power density produced [MW/m^3] - fusion_power_density = ( - sigmav - * reaction_energy - * (physics_variables.f_deuterium * physics_variables.deni) - * (physics_variables.f_helium3 * physics_variables.deni) - ) - - # Power densities for different particles [MW/m^3] - # Alpha particle gets approximately 20% of the fusion power - alpha_power_density = ( - 1.0 - constants.dhelium_proton_energy_fraction - ) * fusion_power_density - charged_power_density = ( - constants.dhelium_proton_energy_fraction * fusion_power_density - ) - neutron_power_density = 0.0 - - # Calculate the fusion rate density [reactions/m^3/second] - fusion_rate_density = fusion_power_density / reaction_energy - alpha_rate_density = fusion_rate_density - proton_rate_density = fusion_rate_density # Proton production rate [m^3/second] - - # Update the cumulative D-3He power density - self.dhe3_power_density = fusion_power_density - - # Sum the fusion rates for all particles - self.sum_fusion_rates( - alpha_power_density, - charged_power_density, - neutron_power_density, - fusion_rate_density, - alpha_rate_density, - proton_rate_density, - ) - - def dd_helion_reaction(self) -> None: - """D + D --> 3He + n reaction - - This method calculates the fusion reaction rate and power density for the - deuterium-deuterium (D-D) fusion reaction, specifically the branch that produces - helium-3 (3He) and a neutron (n). It uses the Bosch-Hale parametrization - to compute the volumetric fusion reaction rate and integrates over - the plasma cross-section to find the core plasma fusion power. - - The method updates the following attributes: - - self.dd_power_density: Fusion power density produced by the D-D reaction. - - self.alpha_power_density: Power density of alpha particles produced. - - self.charged_power_density: Power density of charged particles produced. - - self.neutron_power_density: Power density of neutrons produced. - - self.fusion_rate_density: Fusion reaction rate density. - - self.alpha_rate_density: Alpha particle production rate density. - - self.proton_rate_density: Proton production rate density. - - Returns: - None - """ - # Initialize Bosch-Hale constants for the D-D reaction + etot = 18.35 * constants.echarge # MJ + fpow = ( + 1.0 + * sigmav + * etot + * physics_variables.fdeut + * physics_variables.fhe3 + * physics_variables.deni + * physics_variables.deni + ) # MW/m3 + pa = 0.2 * fpow + pc = 0.8 * fpow + pn = 0.0 + frate = fpow / etot # reactions/m3/second + arate = frate + prate = frate # proton production /m3/second + self.pdhe3pv = fpow + self.sum_fusion_rates(pa, pc, pn, frate, arate, prate) + + def dd1(self): + """D + D --> 3He + n reaction""" dd1 = BoschHaleConstants(**REACTION_CONSTANTS_DD1) - - # Calculate the fusion reaction rate integral using Simpson's rule sigmav = integrate.simpson( - fusion_rate_integral(self.plasma_profile, dd1), + fint(self.plasma_profile, dd1), x=self.plasma_profile.neprofile.profile_x, dx=self.plasma_profile.neprofile.profile_dx, ) - - # Reaction energy in MegaJoules [MJ] - reaction_energy = constants.dd_helium_energy / 1.0e6 - - # Calculate the fusion power density produced [MW/m^3] - # The power density is scaled by the branching ratio to simulate the different - # product pathways - fusion_power_density = ( - sigmav - * reaction_energy - * (1.0 - self.f_dd_branching_trit) - * (physics_variables.f_deuterium * physics_variables.deni) - * (physics_variables.f_deuterium * physics_variables.deni) - ) - - # Power densities for different particles [MW/m^3] - # Neutron particle gets approximately 75% of the fusion power - alpha_power_density = 0.0 - charged_power_density = ( - 1.0 - constants.dd_neutron_energy_fraction - ) * fusion_power_density - neutron_power_density = ( - constants.dd_neutron_energy_fraction * fusion_power_density - ) - - # Calculate the fusion rate density [reactions/m^3/second] - fusion_rate_density = fusion_power_density / reaction_energy - alpha_rate_density = 0.0 - proton_rate_density = 0.0 - - # Update the cumulative D-D power density - self.dd_power_density += fusion_power_density - - # Sum the fusion rates for all particles - self.sum_fusion_rates( - alpha_power_density, - charged_power_density, - neutron_power_density, - fusion_rate_density, - alpha_rate_density, - proton_rate_density, - ) - - def dd_triton_reaction(self) -> None: - """D + D --> T + p reaction - - This method calculates the fusion reaction rate and power density for the - deuterium-deuterium (D-D) fusion reaction, specifically the branch that produces - tritium (T) and a proton (p). It uses the Bosch-Hale parametrization - to compute the volumetric fusion reaction rate and integrates over - the plasma cross-section to find the core plasma fusion power. - - The method updates the following attributes: - - self.dd_power_density: Fusion power density produced by the D-D reaction. - - self.alpha_power_density: Power density of alpha particles produced. - - self.charged_power_density: Power density of charged particles produced. - - self.neutron_power_density: Power density of neutrons produced. - - self.fusion_rate_density: Fusion reaction rate density. - - self.alpha_rate_density: Alpha particle production rate density. - - self.proton_rate_density: Proton production rate density. - - Returns: - None - """ - # Initialize Bosch-Hale constants for the D-D reaction + etot = 3.27 * constants.echarge # MJ + fpow = ( + 1.0 + * sigmav + * etot + * 0.5 + * physics_variables.fdeut + * physics_variables.fdeut + * physics_variables.deni + * physics_variables.deni + ) # MW/m3 + pa = 0.0 + pc = 0.25 * fpow + pn = 0.75 * fpow + frate = fpow / etot # reactions/m3/second + arate = 0.0 + prate = 0.0 + self.pddpv = self.pddpv + fpow + self.sum_fusion_rates(pa, pc, pn, frate, arate, prate) + + def dd2(self): + """D + D --> T + p reaction""" dd2 = BoschHaleConstants(**REACTION_CONSTANTS_DD2) - - # Calculate the fusion reaction rate integral using Simpson's rule sigmav = integrate.simpson( - fusion_rate_integral(self.plasma_profile, dd2), + fint(self.plasma_profile, dd2), x=self.plasma_profile.neprofile.profile_x, dx=self.plasma_profile.neprofile.profile_dx, ) - - # Reaction energy in MegaJoules [MJ] - reaction_energy = constants.dd_triton_energy / 1.0e6 - - # Calculate the fusion power density produced [MW/m^3] - # The power density is scaled by the branching ratio to simulate the different - # product pathways - fusion_power_density = ( - sigmav - * reaction_energy - * self.f_dd_branching_trit - * (physics_variables.f_deuterium * physics_variables.deni) - * (physics_variables.f_deuterium * physics_variables.deni) - ) - - # Power densities for different particles [MW/m^3] - alpha_power_density = 0.0 - charged_power_density = fusion_power_density - neutron_power_density = 0.0 - - # Calculate the fusion rate density [reactions/m^3/second] - fusion_rate_density = fusion_power_density / reaction_energy - alpha_rate_density = 0.0 - proton_rate_density = fusion_rate_density # Proton production rate [m^3/second] - - # Update the cumulative D-D power density - self.dd_power_density += fusion_power_density - - # Sum the fusion rates for all particles - self.sum_fusion_rates( - alpha_power_density, - charged_power_density, - neutron_power_density, - fusion_rate_density, - alpha_rate_density, - proton_rate_density, - ) - - def sum_fusion_rates( - self, - alpha_power_add: float, - charged_power_add: float, - neutron_power_add: float, - fusion_rate_add: float, - alpha_rate_add: float, - proton_rate_add: float, - ) -> None: + etot = 4.03 * constants.echarge # MJ + fpow = ( + 1.0 + * sigmav + * etot + * 0.5 + * physics_variables.fdeut + * physics_variables.fdeut + * physics_variables.deni + * physics_variables.deni + ) # MW/m3 + pa = 0.0 + pc = fpow + pn = 0.0 + frate = fpow / etot # reactions/m3/second + arate = 0.0 + prate = frate # proton production /m3/second + self.pddpv = self.pddpv + fpow + self.sum_fusion_rates(pa, pc, pn, frate, arate, prate) + + def sum_fusion_rates(self, pa, pc, pn, frate, arate, prate): """Sum the fusion rate at the end of each reaction. - This method updates the cumulative fusion power densities and reaction rates - for alpha particles, charged particles, neutrons, and protons. - - Parameters: - alpha_power_add (float): Alpha particle fusion power per unit volume [MW/m3]. - charged_power_add (float): Other charged particle fusion power per unit volume [MW/m3]. - neutron_power_add (float): Neutron fusion power per unit volume [MW/m3]. - fusion_rate_add (float): Fusion reaction rate per unit volume [reactions/m3/s]. - alpha_rate_add (float): Alpha particle production rate per unit volume [/m3/s]. - proton_rate_add (float): Proton production rate per unit volume [/m3/s]. - - Returns: - None - """ - self.alpha_power_density += alpha_power_add - self.charged_power_density += charged_power_add - self.neutron_power_density += neutron_power_add - self.fusion_rate_density += fusion_rate_add - self.alpha_rate_density += alpha_rate_add - self.proton_rate_density += proton_rate_add - - def calculate_fusion_rates(self) -> None: + :param pa: palppv alpha particle production rate (/m3/s) + :type pa: float + :param pc: pchargepv other charged particle fusion power/volume (MW/m3) + :type pc: float + :param pn: pneutpv neutron fusion power per volume (MW/m3) + :type pn: float + :param frate: fusionrate fusion reaction rate (reactions/m3/s) + :type frate: float + :param arate: alpharate alpha particle fusion power per volume (MW/m3) + :type arate: float + :param prate: protonrate proton production rate (/m3/s) + :type prate: float """ - Initiate all the fusion rate calculations. - - This method sequentially calculates the fusion reaction rates and power densities - for the following reactions: - - Deuterium-Tritium (D-T) - - Deuterium-Helium-3 (D-3He) - - Deuterium-Deuterium (D-D) first branch - - Deuterium-Deuterium (D-D) second branch - - It updates the instance attributes for the cumulative power densities and reaction rates - for alpha particles, charged particles, neutrons, and protons. - - Returns: - None - """ - self.dt_reaction() - self.dhe3_reaction() - self.dd_helion_reaction() - self.dd_triton_reaction() - - def set_physics_variables(self) -> None: - """ - Set the required physics variables in the physics_variables and physics_module modules. - - This method updates the global physics variables and module variables with the - current instance's fusion power densities and reaction rates. - - Returns: - None - """ - physics_variables.alpha_power_density_plasma = self.alpha_power_density - physics_variables.charged_power_density = self.charged_power_density - physics_variables.neutron_power_density_plasma = self.neutron_power_density - physics_variables.fusion_rate_density_plasma = self.fusion_rate_density - physics_variables.alpha_rate_density_plasma = self.alpha_rate_density - physics_variables.proton_rate_density = self.proton_rate_density - physics_module.sigmav_dt_average = self.sigmav_dt_average - physics_module.dt_power_density_plasma = self.dt_power_density - physics_module.dhe3_power_density = self.dhe3_power_density - physics_module.dd_power_density = self.dd_power_density - physics_variables.f_dd_branching_trit = self.f_dd_branching_trit + self.palppv = self.palppv + pa + self.pchargepv = self.pchargepv + pc + self.pneutpv = self.pneutpv + pn + self.fusionrate = self.fusionrate + frate + self.alpharate = self.alpharate + arate + self.protonrate = self.protonrate + prate + + def calculate_fusion_rates(self): + """Initiate all the fusion rate calculations.""" + self.dt() + self.dhe3() + self.dd1() + self.dd2() + + def set_physics_variables(self): + """Set the required physics variables.""" + physics_variables.palppv = self.palppv + physics_variables.pchargepv = self.pchargepv + physics_variables.pneutpv = self.pneutpv + physics_variables.fusionrate = self.fusionrate + physics_variables.alpharate = self.alpharate + physics_variables.protonrate = self.protonrate + physics_module.sigvdt = self.sigvdt + physics_module.pdtpv = self.pdtpv + physics_module.pdhe3pv = self.pdhe3pv + physics_module.pddpv = self.pddpv def radpwr(plasma_profile): @@ -566,15 +255,12 @@ def radpwr(plasma_profile): pedgeradpv = imp_rad.radtot - imp_rad.radcore - # Synchrotron radiation power/volume; assumed to be from core only. # Synchrotron radiation power/volume; assumed to be from core only. psyncpv = psync_albajar_fidone() - # Total core radiation power/volume. # Total core radiation power/volume. pcoreradpv = imp_rad.radcore + psyncpv - # Total radiation power/volume. # Total radiation power/volume. pradpv = imp_rad.radtot + psyncpv @@ -610,8 +296,8 @@ def psync_albajar_fidone(): psync = 0.0 psyncpv = 0.0 - kap = physics_variables.plasma_volume / ( - 2.0e0 * np.pi**2 * physics_variables.rmajor * physics_variables.rminor**2 + kap = physics_variables.vol / ( + 2.0e0 * numpy.pi**2 * physics_variables.rmajor * physics_variables.rminor**2 ) # No account is taken of pedestal profiles here, other than use of @@ -621,7 +307,8 @@ def psync_albajar_fidone(): pao = 6.04e3 * (physics_variables.rminor * de2o) / physics_variables.bt gfun = 0.93e0 * ( 1.0e0 - + 0.85e0 * np.exp(-0.82e0 * physics_variables.rmajor / physics_variables.rminor) + + 0.85e0 + * numpy.exp(-0.82e0 * physics_variables.rmajor / physics_variables.rminor) ) kfun = (physics_variables.alphan + 3.87e0 * physics_variables.alphat + 1.46e0) ** ( -0.79e0 @@ -659,150 +346,124 @@ def psync_albajar_fidone(): # psyncpv should be per unit volume; Albajar gives it as total - psyncpv = psync / physics_variables.plasma_volume + psyncpv = psync / physics_variables.vol return psyncpv -@dataclass -class BoschHaleConstants: - """DataClass which holds the constants required for the Bosch Hale calculation - for a given fusion reaction. - """ - - bg: float - mrc2: float - cc1: float - cc2: float - cc3: float - cc4: float - cc5: float - cc6: float - cc7: float - +def fint(plasma_profile, reactionconstants): + """This function evaluates the integrand for the fusion power + integration. + Authors: + P J Knight, CCFE, Culham Science Centre + G Turkington (UKAEA) + References: -def fusion_rate_integral( - plasma_profile: PlasmaProfile, reaction_constants: BoschHaleConstants -) -> np.ndarray: + :param plasma_profile: Parameterised temperature and density profiles + :type plasma_profile: PlasmaProfile + :param reactionconstants: BoschHale reaction constants + :type reactionconstants: DataClass + :return: fint Integrand for the fusion power + :rtype: numpy.array """ - Evaluate the integrand for the fusion power integration. - - Parameters: - plasma_profile (PlasmaProfile): Parameterised temperature and density profiles. - reactionconstants (BoschHaleConstants): Bosch-Hale reaction constants. - Returns: - np.ndarray: Integrand for the fusion power. - - References: - - H.-S. Bosch and G. M. Hale, “Improved formulas for fusion cross-sections and thermal reactivities,” - Nuclear Fusion, vol. 32, no. 4, pp. 611–631, Apr. 1992, - doi: https://doi.org/10.1088/0029-5515/32/4/i07. - """ + # Local ion temperature (keV) at r/a = rho + sigv = numpy.zeros( + plasma_profile.teprofile.profile_size, + ) - # Since the electron temperature profile is only calculated directly, we scale the ion temperature - # profile by the ratio of the volume averaged ion to electron temperature - ion_temperature_profile = ( - physics_variables.ti / physics_variables.te - ) * plasma_profile.teprofile.profile_y + tiofr = ( + physics_variables.ti / physics_variables.te * plasma_profile.teprofile.profile_y + ) - # Number of fusion reactions per unit volume per particle volume density (m^3/s) - sigv = bosch_hale_reactivity(ion_temperature_profile, reaction_constants) + # Fusion reaction rate (m3/s) + sigv = bosch_hale(tiofr, reactionconstants) # Integrand for the volume averaged fusion reaction rate sigmav: # sigmav = integral(2 rho (sigv(rho) ni(rho)^2) drho), # divided by the square of the volume-averaged ion density - # to retain the dimensions m^3/s (this is multiplied back in later) - - # Set each point in the desnity profile as a fraction of the volume averaged desnity - density_profile_normalised = ( - 1.0 / physics_variables.dene - ) * plasma_profile.neprofile.profile_y + # to retain the dimensions m3/s (thbosch_haleis is multiplied back in later) - # Calculate a volume averaged fusion reaction integral that allows for fusion power to be scaled with - # just the volume averged ion density. - fusion_integral = ( - 2.0 - * plasma_profile.teprofile.profile_x - * sigv - * density_profile_normalised**2 - ) + nprof = 1.0 / physics_variables.dene * plasma_profile.neprofile.profile_y + nprofsq = nprof * nprof + fint = 2.0 * plasma_profile.teprofile.profile_x * sigv * nprofsq - return fusion_integral + return fint -def bosch_hale_reactivity( - ion_temperature_profile: np.ndarray, reaction_constants: BoschHaleConstants -) -> np.ndarray: - """ - Calculate the volumetric fusion reaction rate (m^3/s) for one of four nuclear reactions using +def bosch_hale(t, reactionconstants): + """This routine calculates the volumetric fusion reaction rate + sigmavgt (m3/s) for one of four nuclear reactions using the Bosch-Hale parametrization. - - The valid range of the fit is 0.2 keV < t < 100 keV except for D-3He where it is 0.5 keV < t < 190 keV. - - Reactions: - 1. D-T reaction - 2. D-3He reaction - 3. D-D 1st reaction - 4. D-D 2nd reaction - - Parameters: - ion_temperature_profile (np.ndarray): Plasma ion temperature profile in keV. - reaction_constants (BoschHaleConstants): Bosch-Hale reaction constants. - - Returns: - np.ndarray: Volumetric fusion reaction rate in m^3/s for each point in the ion temperature profile. - + The valid range of the fit is 0.2 keV < t < 100 keV + 1 : D-T reaction + 2 : D-3He reaction + 3 : D-D 1st reaction (50% probability) + 4 : D-D 2nd reaction (50% probability) + Authors: + R Kemp, CCFE, Culham Science Centre + P J Knight, CCFE, Culham Science Centre References: - - H.-S. Bosch and G. M. Hale, “Improved formulas for fusion cross-sections and thermal reactivities,” - Nuclear Fusion, vol. 32, no. 4, pp. 611–631, Apr. 1992, - doi: https://doi.org/10.1088/0029-5515/32/4/i07. + Bosch and Hale, Nuclear Fusion 32 (1992) 611-631 + + :param t: Plasma temperature profile + :type t: numpy.array + :param reactionconstants: BoschHale reaction constants + :type reactionconstants: BoschHaleConstants + :return: sigmav Volumetric fusion reaction rate + :rtype: (numpy.array) """ theta1 = ( - ion_temperature_profile + t * ( - reaction_constants.cc2 - + ion_temperature_profile - * ( - reaction_constants.cc4 - + ion_temperature_profile * reaction_constants.cc6 - ) + reactionconstants.cc2 + + t * (reactionconstants.cc4 + t * reactionconstants.cc6) ) / ( 1.0 - + ion_temperature_profile + + t * ( - reaction_constants.cc3 - + ion_temperature_profile - * ( - reaction_constants.cc5 - + ion_temperature_profile * reaction_constants.cc7 - ) + reactionconstants.cc3 + + t * (reactionconstants.cc5 + t * reactionconstants.cc7) ) ) ) - theta = ion_temperature_profile / (1.0 - theta1) + theta = t / (1.0 - theta1) - xi = ((reaction_constants.bg**2) / (4.0 * theta)) ** (1 / 3) + xi = ((reactionconstants.bg**2) / (4.0 * theta)) ** 0.3333333333 - # Volumetric reaction rate / reactivity (m^3/s) - # Original form is in [cm^3/s], so multiply by 1.0e-6 to convert to [m^3/s] + # Volumetric reaction rate (m3/s) sigmav = ( 1.0e-6 - * reaction_constants.cc1 + * reactionconstants.cc1 * theta - * np.sqrt(xi / (reaction_constants.mrc2 * ion_temperature_profile**3)) - * np.exp(-3.0 * xi) + * numpy.sqrt(xi / (reactionconstants.mrc2 * t**3)) + * numpy.exp(-3.0 * xi) ) - # if t = 0, sigmav = 0. Use this mask to set sigmav to zero. - t_mask = ion_temperature_profile == 0.0 + t_mask = t == 0.0 sigmav[t_mask] = 0.0 - # Return np.ndarray of sigmav for each point in the ion temperature profile return sigmav +@dataclass +class BoschHaleConstants: + """DataClass which holds the constants required for the Bosch Hale calculation + for a given fusion reaction. + """ + + bg: float + mrc2: float + cc1: float + cc2: float + cc3: float + cc4: float + cc5: float + cc6: float + cc7: float + + @dataclass class RadpwrData: """DataClass which holds the output of the function radpwr""" @@ -813,157 +474,86 @@ class RadpwrData: pradpv: float -def set_fusion_powers( - f_alpha_electron: float, - f_alpha_ion: float, - alpha_power_beams: float, - charged_power_density: float, - neutron_power_density_plasma: float, - plasma_volume: float, - alpha_power_density_plasma: float, -) -> tuple: +def palph2( + bp, + bt, + dene, + deni, + dnitot, + falpe, + falpi, + palpnb, + pchargepv, + pneutpv, + ten, + tin, + vol, + palppv, + ifalphap, +): """ - - This function computes various fusion power metrics based on the provided plasma parameters. - - Parameters: - f_alpha_electron (float): Fraction of alpha energy to electrons. - f_alpha_ion (float): Fraction of alpha energy to ions. - alpha_power_beams (float): Alpha power from hot neutral beam ions (MW). - charged_power_density (float): Other charged particle fusion power per unit volume (MW/m^3). - neutron_power_density_plasma (float): Neutron fusion power per unit volume just from plasma (MW/m^3). - plasma_volume (float): Plasma volume (m^3). - alpha_power_density_plasma (float): Alpha power per unit volume just from plasma (MW/m^3). - - Returns: - tuple: A tuple containing the following elements: - - neutron_power_density_total (float): Neutron fusion power per unit volume from plasma and beams [MW/m^3]. - - alpha_power_plasma (float): Alpha fusion power from only the plasma [MW]. - - alpha_power_total (float): Total alpha fusion power from plasma and beams [MW]. - - neutron_power_plasma (float): Neutron fusion power from only the plasma [MW]. - - neutron_power_total (float): Total neutron fusion power from plasma and beams [MW]. - - non_alpha_charged_power (float): Other total charged particle fusion power [MW]. - - alpha_power_density_total (float): Alpha power per unit volume, from beams and plasma [MW/m^3]. - - alpha_power_electron_density (float): Alpha power per unit volume to electrons [MW/m^3]. - - alpha_power_ions_density (float): Alpha power per unit volume to ions [MW/m^3]. - - charged_particle_power (float): Charged particle fusion power [MW]. - - fusion_power (float): Total fusion power [MW]. - - References: - - N.A. Uckan and ITER Physics Group, 'ITER Physics Design Guidelines: 1989' - - ITER Documentation Series No.10, IAEA/ITER/DS/10, IAEA, Vienna, 1990 - + Fusion power and fast alpha pressure calculations. + ITER Physics Design Guidelines: 1989 [IPDG89], N. A. Uckan et al, + ITER Documentation Series No.10, IAEA/ITER/DS/10, IAEA, Vienna, 1990 + D J Ward, UKAEA Fusion: F/PL/PJK/PROCESS/CODE/050 + + :param bp: poloidal field (T) + :param bt: totoidal field on axis (T) + :param dene: electron density (m^-3) + :param deni: fuel ion density (m^-3) + :param dnitot: total ion density (m^-3) + :param falpe: fraction of alpha energy to electrons + :param falpi: fraction of alpha energy to ions + :param palpnb: alpha power from hot neutral beam ions (MW) + :param pchargepv: other charged particle fusion power/volume (MW/m3) + :param pneutpv: neutron fusion power per volume (MW/m3) + :param ten: density-weighted electron temperature (keV) + :param tin: density-weighted ion temperature (keV) + :param vol: plasma volume (m3) + :param palppv: alpha power per volume (MW/m3) + :param ifalphap: switch for fast alpha pressure method + + :return: neutron fusion power per volume (MW/m3), alpha power (MW), + neutron fusion power (MW), other charged particle fusion power (MW), + fast alpha beta component, alpha power per volume (MW/m3), + alpha power per volume to electrons (MW/m3), alpha power per volume to ions (MW/m3), + charged particle fusion power (MW), fusion power (MW) """ - # Alpha power - - # Calculate alpha power produced just by the plasma - alpha_power_plasma = alpha_power_density_plasma * plasma_volume # Add neutral beam alpha power / volume - alpha_power_density_total = alpha_power_density_plasma + ( - alpha_power_beams / plasma_volume - ) - - # Total alpha power - alpha_power_total = alpha_power_density_total * plasma_volume + palppv_out = palppv + palpnb / vol - # Neutron Power + # Add extra neutron power + pneutpv_out = pneutpv + 4.0 * palpnb / vol - # Calculate neutron power produced just by the plasma - neutron_power_plasma = neutron_power_density_plasma * plasma_volume + # Total alpha power + palpmw = palppv_out * vol - # Add extra neutron power from beams - neutron_power_density_total = neutron_power_density_plasma + ( - ( - ( - constants.dt_neutron_energy_fraction - / (1.0 - constants.dt_neutron_energy_fraction) - ) - * alpha_power_beams - ) - / plasma_volume - ) + # Total non-alpha charged particle power + pchargemw = pchargepv * vol # Total neutron power - neutron_power_total = neutron_power_density_total * plasma_volume + pneutmw = pneutpv_out * vol - # Charged particle power - - # Total non-alpha charged particle power - non_alpha_charged_power = charged_power_density * plasma_volume + # Total fusion power + powfmw = palpmw + pneutmw + pchargemw # Charged particle fusion power - charged_particle_power = alpha_power_total + non_alpha_charged_power - - # Total fusion power - fusion_power = alpha_power_total + neutron_power_total + non_alpha_charged_power + pfuscmw = palpmw + pchargemw # Alpha power to electrons and ions (used with electron # and ion power balance equations only) - # No consideration of charged_power_density here. - alpha_power_ions_density = ( - physics_variables.f_alpha_plasma * alpha_power_density_total * f_alpha_ion - ) - alpha_power_electron_density = ( - physics_variables.f_alpha_plasma * alpha_power_density_total * f_alpha_electron - ) - - return ( - neutron_power_density_total, - alpha_power_plasma, - alpha_power_total, - neutron_power_plasma, - neutron_power_total, - non_alpha_charged_power, - alpha_power_density_total, - alpha_power_electron_density, - alpha_power_ions_density, - charged_particle_power, - fusion_power, - ) - - -def fast_alpha_beta( - bp: float, - bt: float, - dene: float, - deni: float, - dnitot: float, - ten: float, - tin: float, - alpha_power_density_total: float, - alpha_power_density_plasma: float, - ifalphap: int, -) -> float: - """ - Calculate the fast alpha beta component. - - This function computes the fast alpha beta contribution based on the provided plasma parameters. - - Parameters: - bp (float): Poloidal field (T). - bt (float): Toroidal field on axis (T). - dene (float): Electron density (m^-3). - deni (float): Fuel ion density (m^-3). - dnitot (float): Total ion density (m^-3). - ten (float): Density-weighted electron temperature (keV). - tin (float): Density-weighted ion temperature (keV). - alpha_power_density_total (float): Alpha power per unit volume, from beams and plasma (MW/m^3). - alpha_power_density_plasma (float): Alpha power per unit volume just from plasma (MW/m^3). - ifalphap (int): Switch for fast alpha pressure method. - - Returns: - float: Fast alpha beta component. - """ - # Determine average fast alpha density + # No consideration of pchargepv here... + palpipv = physics_variables.falpha * palppv_out * falpi + palpepv = physics_variables.falpha * palppv_out * falpe # Determine average fast alpha density - if physics_variables.f_deuterium < 1.0: + if physics_variables.fdeut < 1.0: betath = ( 2.0e3 * constants.rmu0 - * constants.electron_charge + * constants.echarge * (dene * ten + dnitot * tin) / (bt**2 + bp**2) ) @@ -979,557 +569,308 @@ def fast_alpha_beta( 0.30, 0.26 * (deni / dene) ** 2 - * np.sqrt(max(0.0, ((ten + tin) / 20.0 - 0.65))), + * numpy.sqrt(max(0.0, ((ten + tin) / 20.0 - 0.65))), ) fact = max(fact, 0.0) - fact2 = alpha_power_density_total / alpha_power_density_plasma + fact2 = palppv_out / palppv betaft = betath * fact * fact2 - else: # negligible alpha production, alpha_power_density = alpha_power_beams = 0 + else: # negligible alpha production, palppv = palpnb = 0 betaft = 0.0 - return betaft - - -def beam_fusion( - beamfus0: float, - betbm0: float, - bp: float, - bt: float, - beam_current: float, - dene: float, - deni: float, - ion_electron_coulomb_log: float, - beam_energy: float, - f_deuterium_plasma: float, - f_tritium_plasma: float, - f_tritium_beam: float, - sigmav_dt_average: float, - ten: float, - tin: float, - plasma_volume: float, - zeffai: float, -) -> tuple: - """ - Routine to calculate beam slowing down properties. - - This function computes the neutral beam beta component, hot beam ion density, - and alpha power from hot neutral beam ions based on the provided plasma parameters. - - Parameters: - beamfus0 (float): Multiplier for beam-background fusion calculation. - betbm0 (float): Leading coefficient for neutral beam beta fraction. - bp (float): Poloidal field (T). - bt (float): Toroidal field on axis (T). - beam_current (float): Neutral beam current (A). - dene (float): Electron density (m^-3). - deni (float): Fuel ion density (m^-3). - ion_electron_coulomb_log (float): Ion-electron coulomb logarithm. - beam_energy (float): Neutral beam energy (keV). - f_deuterium_plasma (float): Deuterium fraction of main plasma. - f_tritium_plasma (float): Tritium fraction of main plasma. - f_tritium_beam (float): Tritium fraction of neutral beam. - sigmav_dt_average (float): Profile averaged for D-T (m^3/s). - ten (float): Density-weighted electron temperature (keV). - tin (float): Density-weighted ion temperature (keV). - plasma_volume (float): Plasma volume (m^3). - zeffai (float): Mass weighted plasma effective charge. - - Returns: - tuple: A tuple containing the following elements: - - beta_beam (float): Neutral beam beta component. - - beam_density_out (float): Hot beam ion density (m^-3). - - alpha_power_beams (float): Alpha power from hot neutral beam ions (MW). - - Notes: - - The function uses the Bosch-Hale parametrization to compute the reactivity. - - The critical energy for electron/ion slowing down of the beam ion is calculated - for both deuterium and tritium neutral beams. - - The function integrates the hot beam fusion reaction rate integrand over the - range of beam velocities up to the critical velocity. - - References: - - H.-S. Bosch and G. M. Hale, “Improved formulas for fusion cross-sections and thermal reactivities,” - Nuclear Fusion, vol. 32, no. 4, pp. 611–631, Apr. 1992, - doi: https://doi.org/10.1088/0029-5515/32/4/i07. - - - J. W. Sheffield, “The physics of magnetic fusion reactors,” vol. 66, no. 3, pp. 1015–1103, - Jul. 1994, doi: https://doi.org/10.1103/revmodphys.66.1015. - - - Deng Baiquan and G. A. Emmert, “Fast ion pressure in fusion plasma,” Nuclear Fusion and Plasma Physics, - vol. 9, no. 3, pp. 136–141, 2022, Available: https://fti.neep.wisc.edu/fti.neep.wisc.edu/pdf/fdm718.pdf - ‌ + return ( + pneutpv_out, + palpmw, + pneutmw, + pchargemw, + betaft, + palppv_out, + palpepv, + palpipv, + pfuscmw, + powfmw, + ) + + +def beamfus( + beamfus0, + betbm0, + bp, + bt, + cnbeam, + dene, + deni, + dlamie, + ealphadt, + enbeam, + fdeut, + ftrit, + ftritbm, + sigvdt, + ten, + tin, + vol, + zeffai, +): + """Routine to calculate beam slowing down properties + author: P J Knight, CCFE, Culham Science Centre + + :param beamfus0: multiplier for beam-background fusion calculation + :param betbm0: leading coefficient for neutral beam beta fraction + :param bp: poloidal field (T) + :param bt: toroidal field on axis (T) + :param cnbeam: neutral beam current (A) + :param dene: electron density (m^-3) + :param deni: fuel ion density (m^-3) + :param dlamie: ion-electron coulomb logarithm + :param ealphadt: alpha particle birth energy (D-T) (keV) + :param enbeam: neutral beam energy (keV) + :param fdeut: deuterium fraction of main plasma + :param ftrit: tritium fraction of main plasma + :param ftritbm: tritium fraction of neutral beam + :param sigvdt: profile averaged for D-T (m3/s) + :param ten: density-weighted electron temperature (keV) + :param tin: density-weighted ion temperature (keV) + :param vol: plasma volume (m3) + :param zeffai: mass weighted plasma effective charge + + :returns: neutral beam beta component, hot beam ion density (m^-3), + alpha power from hot neutral beam ions (MW) """ - # Beam ion slowing down time given by Deng Baiquan and G. A. Emmert 1987 - beam_slow_time = ( + tausl = ( 1.99e19 - * ( - ATOMIC_MASS_DEUTERIUM * (1.0 - f_tritium_beam) - + (ATOMIC_MASS_TRITIUM * f_tritium_beam) - ) + * (2.0 * (1.0 - ftritbm) + (3.0 * ftritbm)) * (ten**1.5 / dene) - / ion_electron_coulomb_log + / dlamie ) # Critical energy for electron/ion slowing down of the beam ion # (deuterium and tritium neutral beams, respectively) (keV) - # Taken from J.W Sheffield, “The physics of magnetic fusion reactors,” - critical_energy_deuterium = ( - 14.8 - * ATOMIC_MASS_DEUTERIUM - * ten - * zeffai ** (2 / 3) - * (ion_electron_coulomb_log + 4.0) - / ion_electron_coulomb_log - ) - critical_energy_tritium = critical_energy_deuterium * ( - ATOMIC_MASS_TRITIUM / ATOMIC_MASS_DEUTERIUM - ) + + ecritd = 14.8 * ten * 2.0 * zeffai**0.6666 * (dlamie + 4.0) / dlamie + ecritt = ecritd * 1.5 # Deuterium and tritium ion densities - deuterium_density = deni * f_deuterium_plasma - tritium_density = deni * f_tritium_plasma - - ( - deuterium_beam_alpha_power, - tritium_beam_alpha_power, - hot_beam_density, - beam_deposited_energy, - ) = beamcalc( - deuterium_density, - tritium_density, - beam_energy, - critical_energy_deuterium, - critical_energy_tritium, - beam_slow_time, - f_tritium_beam, - beam_current, + + denid = deni * fdeut + denit = deni * ftrit + + palpdb, palptb, dnbeam2, ehotnb = beamcalc( + denid, + denit, + ealphadt, + enbeam, + ecritd, + ecritt, + tausl, + ftritbm, + cnbeam, tin, - plasma_volume, - sigmav_dt_average, + vol, + sigvdt, ) # Neutral beam alpha power - alpha_power_beams = beamfus0 * ( - deuterium_beam_alpha_power + tritium_beam_alpha_power - ) - - # Neutral beam beta - beta_beam = ( - betbm0 - * 4.03e-22 - * (2 / 3) - * hot_beam_density - * beam_deposited_energy - / (bt**2 + bp**2) - ) - - return beta_beam, hot_beam_density, alpha_power_beams + palpnb = beamfus0 * (palpdb + palptb) -def beamcalc( - nd: float, - nt: float, - beam_energy: float, - critical_energy_deuterium: float, - critical_energy_tritium: float, - beam_slow_time: float, - f_tritium_beam: float, - beam_current: float, - ti: float, - plasma_volume: float, - svdt: float, -) -> tuple[float, float, float, float]: - """ - Calculate neutral beam alpha power and ion energy. - - This function computes the alpha power generated from the interaction between - hot beam ions and thermal ions in the plasma, as well as the hot beam ion density - and average hot beam ion energy. - - Parameters: - nd (float): Thermal deuterium density (m^-3). - nt (float): Thermal tritium density (m^-3). - beam_energy (float): Beam energy (keV). - critical_energy_deuterium (float): Critical energy for electron/ion slowing down of the beam ion (deuterium neutral beam) (keV). - critical_energy_tritium (float): Critical energy for beam slowing down (tritium neutral beam) (keV). - beam_slow_time (float): Beam ion slowing down time on electrons (s). - f_tritium_beam (float): Beam tritium fraction (0.0 = deuterium beam). - beam_current (float): Beam current (A). - ti (float): Thermal ion temperature (keV). - plasma_volume (float): Plasma volume (m^3). - svdt (float): Profile averaged for D-T (m^3/s). - - Returns: - tuple[float, float, float, float]: A tuple containing the following elements: - - Alpha power from deuterium beam-background fusion (MW). - - Alpha power from tritium beam-background fusion (MW). - - Hot beam ion density (m^-3). - - Average hot beam ion energy (keV). - - Notes: - - The function uses the Bosch-Hale parametrization to compute the reactivity. - - The critical energy for electron/ion slowing down of the beam ion is calculated - for both deuterium and tritium neutral beams. - - The function integrates the hot beam fusion reaction rate integrand over the - range of beam velocities up to the critical velocity. - - References: - - H.-S. Bosch and G. M. Hale, “Improved formulas for fusion cross-sections and thermal reactivities,” - Nuclear Fusion, vol. 32, no. 4, pp. 611–631, Apr. 1992, - doi: https://doi.org/10.1088/0029-5515/32/4/i07. + # Neutral beam beta - - Deng Baiquan and G. A. Emmert, “Fast ion pressure in fusion plasma,” Nuclear Fusion and Plasma Physics, - vol. 9, no. 3, pp. 136–141, 2022, Available: https://fti.neep.wisc.edu/fti.neep.wisc.edu/pdf/fdm718.pdf + betanb = betbm0 * 4.03e-22 * 0.66666 * dnbeam2 * ehotnb / (bt**2 + bp**2) - - Wesson, J. (2011) Tokamaks. 4th Edition, 2011 Oxford Science Publications, - International Series of Monographs on Physics, Volume 149. + return betanb, dnbeam2, palpnb - - J. W. Sheffield, “The physics of magnetic fusion reactors,” vol. 66, no. 3, pp. 1015–1103, - Jul. 1994, doi: https://doi.org/10.1103/revmodphys.66.1015. +def beamcalc( + nd, nt, ealphadt, ebeam, ecritd, ecritt, tausbme, ftritbm, ibeam, ti, vol, svdt +): + """Neutral beam alpha power and ion energy + author: P J Knight, CCFE, Culham Science Centre + + :param nd: thermal deuterium density (/m3) + :param nt: thermal tritium density (/m3) + :param ealphadt: alpha particle birth energy (D-T) (keV) + :param ebeam: beam energy (keV) + :param ecritd: critical energy for electron/ion slowing down of + the beam ion (deuterium neutral beam) (keV) + :param ecritt: critical energy for beam slowing down (tritium neutral beam) (keV) + :param ftritbm: beam tritium fraction (0.0 = deuterium beam) + :param ibeam: beam current (A) + :param svdt: profile averaged for D-T (m3/s) + :param tausbme: beam ion slowing down time on electrons (s) + :param ti: thermal ion temperature (keV) + :param vol: plasma volume (m3) (95% flux surface) + + :returns: alpha power from deut. beam-background fusion (MW), + alpha power from trit. beam-background fusion (MW), hot beam ion density (m^-3), + average hot beam ion energy (keV) """ # D and T beam current fractions - beam_current_deuterium = beam_current * (1.0 - f_tritium_beam) - beam_current_tritium = beam_current * f_tritium_beam - - # At a critical energy the rate of loss to the ions becomes equal to that to the electrons, - # and at lower energies the loss to the ions predominates. - - # Ratio of beam energy to critical energy for deuterium - beam_energy_ratio_deuterium = beam_energy / critical_energy_deuterium + ifbmd = ibeam * (1.0 - ftritbm) + ifbmt = ibeam * ftritbm - # Calculate the characterstic time for the deuterium ions to slow down to the thermal energy, eg E = 0. - characteristic_deuterium_beam_slow_time = ( - beam_slow_time / 3.0 * np.log(1.0 + (beam_energy_ratio_deuterium) ** 1.5) - ) - - deuterium_beam_density = ( - beam_current_deuterium - * characteristic_deuterium_beam_slow_time - / (constants.electron_charge * plasma_volume) - ) - - # Ratio of beam energy to critical energy for tritium - beam_energy_ratio_tritium = beam_energy / critical_energy_tritium - - # Calculate the characterstic time for the tritium to slow down to the thermal energy, eg E = 0. - # Wesson, J. (2011) Tokamaks. - characteristic_tritium_beam_slow_time = ( - beam_slow_time / 3.0 * np.log(1.0 + (beam_energy_ratio_tritium) ** 1.5) - ) - - tritium_beam_density = ( - beam_current_tritium - * characteristic_tritium_beam_slow_time - / (constants.electron_charge * plasma_volume) - ) - - hot_beam_density = deuterium_beam_density + tritium_beam_density - - # Find the speed of the deuterium particle when it has the critical energy. - # Re-arrange kinetic energy equation to find speed. Non-relativistic. - deuterium_critical_energy_speed = np.sqrt( + ebmratd = ebeam / ecritd + vcritd = numpy.sqrt( 2.0 - * constants.kiloelectron_volt - * critical_energy_deuterium - / (constants.atomic_mass_unit * ATOMIC_MASS_DEUTERIUM) + * constants.echarge + * 1000.0 + * ecritd + / (constants.mproton * ATOMIC_MASS_DEUTERIUM) ) + tauseffd = tausbme / 3.0 * numpy.log(1.0 + (ebmratd) ** 1.5) + nhotmsd = (1.0 - ftritbm) * ibeam * tauseffd / (constants.echarge * vol) - # Find the speed of the tritium particle when it has the critical energy. - # Re-arrange kinetic energy equation to find speed. Non-relativistic. - tritium_critical_energy_speed = np.sqrt( + ebmratt = ebeam / ecritt + vcritt = numpy.sqrt( 2.0 - * constants.kiloelectron_volt - * critical_energy_tritium - / (constants.atomic_mass_unit * ATOMIC_MASS_TRITIUM) + * constants.echarge + * 1000.0 + * ecritt + / (constants.mproton * ATOMIC_MASS_TRITIUM) ) + tausefft = tausbme / 3.0 * numpy.log(1.0 + (ebmratt) ** 1.5) + nhotmst = ftritbm * ibeam * tausefft / (constants.echarge * vol) - # Source term representing the number of ions born per unit time per unit volume. - # D.Baiquan et.al. “Fast ion pressure in fusion plasma,” Nuclear Fusion and Plasma Physics, - # vol. 9, no. 3, pp. 136–141, 2022, Available: https://fti.neep.wisc.edu/fti.neep.wisc.edu/pdf/fdm718.pdf + nhot = nhotmsd + nhotmst + ndhot = nhotmsd + nthot = nhotmst - source_deuterium = beam_current_deuterium / ( - constants.electron_charge * plasma_volume - ) + # Average hot ion energy from Deng & Emmert, UWFDM-718, Jan 87 + vcds = 2.0 * ecritd * constants.echarge * 1000.0 / (2.0 * constants.mproton) + vcts = 2.0 * ecritt * constants.echarge * 1000.0 / (3.0 * constants.mproton) - source_tritium = beam_current_tritium / (constants.electron_charge * plasma_volume) + s0d = ifbmd / (constants.echarge * vol) + s0t = ifbmt / (constants.echarge * vol) - pressure_coeff_deuterium = ( + xcoefd = ( ATOMIC_MASS_DEUTERIUM - * constants.atomic_mass_unit - * beam_slow_time - * deuterium_critical_energy_speed**2 - * source_deuterium - / (constants.kiloelectron_volt * 3.0) + * constants.mproton + * tausbme + * vcds + * s0d + / (constants.echarge * 1000.0 * 3.0) ) - pressure_coeff_tritium = ( + xcoeft = ( ATOMIC_MASS_TRITIUM - * constants.atomic_mass_unit - * beam_slow_time - * tritium_critical_energy_speed**2 - * source_tritium - / (constants.kiloelectron_volt * 3.0) - ) - - # Fast Ion Pressure - # This is the same form as the ideal gas law pressure, P=1/3 * nmv^2 - deuterium_pressure = pressure_coeff_deuterium * _fast_ion_pressure_integral( - beam_energy, critical_energy_deuterium - ) - tritium_pressure = pressure_coeff_tritium * _fast_ion_pressure_integral( - beam_energy, critical_energy_tritium - ) - - # Beam deposited energy - # Find the energy from the ideal gas pressure, P=1/3 * nmv^2 = 2/3 * n - deuterium_deposited_energy = 1.5 * deuterium_pressure / deuterium_beam_density - tritium_deposited_energy = 1.5 * tritium_pressure / tritium_beam_density - - total_depsoited_energy = ( - (deuterium_beam_density * deuterium_deposited_energy) - + (tritium_beam_density * tritium_deposited_energy) - ) / hot_beam_density - - hot_deuterium_rate = 1e-4 * beam_reaction_rate( - ATOMIC_MASS_DEUTERIUM, deuterium_critical_energy_speed, beam_energy + * constants.mproton + * tausbme + * vcts + * s0t + / (constants.echarge * 1000.0 * 3.0) ) - hot_tritium_rate = 1e-4 * beam_reaction_rate( - ATOMIC_MASS_TRITIUM, tritium_critical_energy_speed, beam_energy - ) - - deuterium_beam_alpha_power = alpha_power_beam( - deuterium_beam_density, nt, hot_deuterium_rate, plasma_volume, ti, svdt - ) - tritium_beam_alpha_power = alpha_power_beam( - tritium_beam_density, nd, hot_tritium_rate, plasma_volume, ti, svdt - ) + presd = xcoefd * xbrak(ebeam, ecritd) + prest = xcoeft * xbrak(ebeam, ecritt) - return ( - deuterium_beam_alpha_power, - tritium_beam_alpha_power, - hot_beam_density, - total_depsoited_energy, - ) + ehotd = 1.5 * presd / ndhot + ehott = 1.5 * prest / nthot + ehot = (ndhot * ehotd + nthot * ehott) / nhot + iabm = 2 + svdhotn = 1e-4 * sgvhot(iabm, vcritd, ebeam) + iabm = 3 + svthotn = 1e-4 * sgvhot(iabm, vcritt, ebeam) -def _fast_ion_pressure_integral(beam_energy: float, critical_energy: float) -> float: - """ - Calculate the fraction of initial beam energy given to the ions. - - This function computes the fraction of initial beam energy given to the ions. based on the neutral beam energy - and the critical energy for electron/ion slowing down of the beam ion. + palfdb = palphabm(ealphadt, ndhot, nt, svdhotn, vol, ti, svdt) + palftb = palphabm(ealphadt, nthot, nd, svthotn, vol, ti, svdt) - Parameters: - beam_energy (float): Neutral beam energy (keV). - critical_energy (float): Critical energy for electron/ion slowing down of the beam ion (keV). + return palfdb, palftb, nhot, ehot - Returns: - float: Fraction of initial beam energy given to the ions. - Notes: - - The function uses the ratio of the beam energy to the critical energy to compute - the hot ion energy parameter. - - The calculation involves logarithmic and arctangent functions to account for - the energy distribution of the hot ions. +def xbrak(e0, ec): + """Hot ion energy parameter + author: P J Knight, CCFE, Culham Science Centre - References: - - Deng Baiquan and G. A. Emmert, “Fast ion pressure in fusion plasma,” Nuclear Fusion and Plasma Physics, - vol. 9, no. 3, pp. 136–141, 2022, Available: https://fti.neep.wisc.edu/fti.neep.wisc.edu/pdf/fdm718.pdf - - - W.A Houlberg, “Thermalization of an Energetic Heavy Ion in a Multi-species Plasma,” University of Wisconsin Fusion Technology Institute, - Report UWFDM-103 1974, Available: https://fti.neep.wisc.edu/fti.neep.wisc.edu/pdf/fdm103.pdf + :param e0: neutral beam energy (keV) + :param ec: critical energy for electron/ion slowing down of the beam ion (keV) """ - - xcs = beam_energy / critical_energy - xc = np.sqrt(xcs) + xcs = e0 / ec + xc = numpy.sqrt(xcs) t1 = xcs / 2.0 - t2 = np.log((xcs + 2.0 * xc + 1.0) / (xcs - xc + 1.0)) / 6.0 + t2 = (numpy.log((xcs + 2.0 * xc + 1.0) / (xcs - xc + 1.0))) / 6.0 - xarg = (2.0 * xc - 1.0) / np.sqrt(3.0) - t3 = np.arctan(xarg) / np.sqrt(3.0) - t4 = (1 / np.sqrt(3.0)) * np.arctan(1 / np.sqrt(3.0)) + xarg = (2.0 * xc - 1.0) / numpy.sqrt(3.0) + t3 = (numpy.arctan(xarg)) / numpy.sqrt(3.0) + t4 = 0.3022999 return t1 + t2 - t3 - t4 -def alpha_power_beam( - beam_ion_desnity: float, - plasma_ion_desnity: float, - sigv: float, - plasma_volume: float, - ti: float, - sigmav_dt: float, -) -> float: - """ - Calculate alpha power from beam-background fusion. - - This function computes the alpha power generated from the interaction between - hot beam ions and thermal ions in the plasma. - - Parameters: - beam_ion_desnity (float): Hot beam ion density (m^-3). - plasma_ion_desnity (float): Thermal ion density (m^-3). - sigv (float): Hot beam fusion reaction rate (m^3/s). - plasma_volume (float): Plasma volume (m^3). - ti (float): Thermal ion temperature (keV). - sigmav_dt (float): Profile averaged for D-T (m^3/s). - - Returns: - float: Alpha power from beam-background fusion (MW). +def palphabm(ealphadt, nbm, nblk, sigv, vol, ti, svdt): + """Alpha power from beam-background fusion + author: P J Knight, CCFE, Culham Science Centre - Notes: - - The function uses the Bosch-Hale parametrization to compute the reactivity. - - The ratio of the profile-averaged to the reactivity at the given - thermal ion temperature is used to scale the alpha power. - - References: - - H.-S. Bosch and G. M. Hale, “Improved formulas for fusion cross-sections and thermal reactivities,” - Nuclear Fusion, vol. 32, no. 4, pp. 611–631, Apr. 1992, - doi: https://doi.org/10.1088/0029-5515/32/4/i07. + :param ealphadt: alpha particle birth energy (D-T) (keV) + :param nblk: thermal ion density (/m3) + :param nbm: hot beam ion density (/m3) + :param sigv: hot beam fusion reaction rate (m3/s) + :param vol: plasma volume (m3) + :param ti: thermal ion temperature (keV) + :param svdt: profile averaged for D-T (m3/s) """ - # Calculate the reactivity ratio - ratio = ( - sigmav_dt - / bosch_hale_reactivity( - np.array([ti]), BoschHaleConstants(**REACTION_CONSTANTS_DT) - ).item() - ) - # Calculate and return the alpha power + # [ti] because bosch_hale expects temperature profile + # so we pass it a profile of length 1 + ratio = svdt / bosch_hale( + numpy.array([ti]), BoschHaleConstants(**REACTION_CONSTANTS_DT) + ) return ( - beam_ion_desnity - * plasma_ion_desnity - * sigv - * (constants.dt_alpha_energy / 1e6) - * plasma_volume - * ratio + constants.echarge / 1000.0 * nbm * nblk * sigv * ealphadt * vol * ratio.item() ) -def beam_reaction_rate( - relative_mass_ion: float, critical_velocity: float, beam_energy_keV: float -) -> float: - """ - Calculate the hot beam fusion reaction rate. - - This function computes the fusion reaction rate for hot beam ions - using the critical velocity for electron/ion slowing down and the - neutral beam energy. - - Parameters: - relative_mass_ion (float): Relative atomic mass of the ion (e.g., approx 2.0 for D, 3.0 for T). - critical_velocity (float): Critical velocity for electron/ion slowing down of the beam ion [m/s]. - beam_energy_keV(float): Neutral beam energy [keV]. - - Returns: - float: Hot beam fusion reaction rate (m^3/s). +def sgvhot(rmass_ion, vcrx, ebeam): + """Hot beam fusion reaction rate + author: P J Knight, CCFE, Culham Science Centre - Notes: - - The function integrates the hot beam fusion reaction rate integrand - over the range of beam velocities up to the critical velocity. - - The integration is performed using the quad function from scipy.integrate. - - References: - - P J Knight, CCFE, Culham Science Centre + :param rmass_ion: relative atomic mass of the ion (of D or T) + :param vcrx: critical velocity for electron/ion slowing down of the beam ion (m/s) + :param ebeam: neutral beam energy (keV) """ + # Beam velocity - # Find the speed of the beam particle when it has the critical energy. - # Re-arrange kinetic energy equation to find speed. Non-relativistic. - beam_velocity = np.sqrt( - ( - (beam_energy_keV * constants.kiloelectron_volt) - * 2.0 - / (relative_mass_ion * constants.atomic_mass_unit) - ) - ) + vbeams = ebeam * constants.echarge * 1000.0 * 2.0 / (rmass_ion * constants.mproton) + vbeam = numpy.sqrt(vbeams) - relative_velocity = beam_velocity / critical_velocity - integral_coefficient = ( - 3.0 * critical_velocity / np.log(1.0 + (relative_velocity**3)) - ) + xv = vbeam / vcrx + t1 = 3.0 * vcrx / numpy.log(1.0 + (xv**3)) - fusion_integral = integrate.quad( - _hot_beam_fusion_reaction_rate_integrand, - 0.0, - relative_velocity, - args=(critical_velocity,), + svint = integrate.quad( + _hot_beam_fusion_reaction_rate_integrand, 0.0, xv, args=(vcrx,) )[0] - return integral_coefficient * fusion_integral - + return t1 * svint -def _hot_beam_fusion_reaction_rate_integrand( - velocity_ratio: float, critical_velocity: float -) -> float: - """ - Integrand function for the hot beam fusion reaction rate. - This function computes the integrand for the hot beam fusion reaction rate - based on the ratio of beam velocity to the critical velocity and the critical - velocity for electron/ion slowing down of the beam ion. +def _hot_beam_fusion_reaction_rate_integrand(u, vcritx): + """Integrand function for the hot beam fusion reaction rate + author: P J Knight, CCFE, Culham Science Centre - Parameters: - velocity_ratio (float): Ratio of beam velocity to the critical velocity. - critical_velocity (float): Critical velocity for electron/ion slowing down of the beam ion (m/s). - - Returns: - float: Value of the integrand for the hot beam fusion reaction rate. - - Notes: - - The function uses the ratio of the beam velocity to the critical velocity - to compute the integrand. - - The integrand involves the fusion reaction cross-section and the critical - velocity for electron/ion slowing down of the beam ion. - - References: - - P J Knight, CCFE, Culham Science Centre + :param u: ratio of beam velocity to the critical velocity """ - intgeral_term = (velocity_ratio**3) / (1.0 + velocity_ratio**3) - - # critical_velocity : critical velocity for electron/ion slowing down of beam ion (m/s) - beam_velcoity = critical_velocity * velocity_ratio - - # Calculate the beam kinetic energy per amu and normalise to keV - xvcs = ( - beam_velcoity**2 * constants.atomic_mass_unit / (constants.kiloelectron_volt) - ) + t1 = (u**3) / (1.0 + u**3) - # Calculate the fusion reaction cross-section from beam kinetic energy - cross_section = _beam_fusion_cross_section(xvcs) + # vcritx : critical velocity for electron/ion slowing down of beam ion (m/s) + xvc = vcritx * u + xvcs = xvc * xvc * constants.mproton / (constants.echarge * 1000.0) + t2 = _sigbmfus(xvcs) - return intgeral_term * cross_section + return t1 * t2 -def _beam_fusion_cross_section(vrelsq: float) -> float: - """ - Calculate the fusion reaction cross-section. - - This function computes the fusion reaction cross-section based on the - square of the speed of the beam ion (keV/amu). The functional form of - the cross-section is in terms of the equivalent deuterium energy, i.e., - for a tritium beam at 500 keV the energy used in the cross-section - function is 333 keV. - - Parameters: - vrelsq (float): Square of the speed of the beam ion (keV/amu). - - Returns: - float: Fusion reaction cross-section (cm^2). +def _sigbmfus(vrelsq): + """Fusion reaction cross-section + author: P J Knight, CCFE, Culham Science Centre - Notes: - - The cross-section is limited at low and high beam energies. - - For beam kinetic energy less than 10 keV, the cross-section is set to 1.0e-27 cm^2. - - For beam kinetic energy greater than 10,000 keV, the cross-section is set to 8.0e-26 cm^2. - - The cross-section is calculated using a functional form with parameters a1 to a5. + The functional form of the cross-section is in terms of the equivalent + deuterium energy, i.e. for a tritium beam at 500 keV the energy + used in the cross-section function is 333 keV. - References: - - None + :param vrelsq: square of the speed of the beam ion (keV/amu) """ a1 = 45.95 a2 = 5.02e4 @@ -1538,14 +879,16 @@ def _beam_fusion_cross_section(vrelsq: float) -> float: a5 = 4.09e2 # Beam kinetic energy - beam_energy = 0.5 * ATOMIC_MASS_DEUTERIUM * vrelsq + + ebm = 0.5 * ATOMIC_MASS_DEUTERIUM * vrelsq # Set limits on cross-section at low and high beam energies - if beam_energy < 10.0: + + if ebm < 10.0: return 1.0e-27 - elif beam_energy > 1.0e4: + elif ebm > 1.0e4: return 8.0e-26 else: - t1 = a2 / (1.0 + (a3 * beam_energy - a4) ** 2) + a5 - t2 = beam_energy * (np.exp(a1 / np.sqrt(beam_energy)) - 1.0) + t1 = a2 / (1.0e0 + (a3 * ebm - a4) ** 2) + a5 + t2 = ebm * (numpy.exp(a1 / numpy.sqrt(ebm)) - 1.0) return 1.0e-24 * t1 / t2 diff --git a/process/plasma_geometry.py b/process/plasma_geometry.py index db5b6b8e..4bb9bb10 100644 --- a/process/plasma_geometry.py +++ b/process/plasma_geometry.py @@ -240,7 +240,7 @@ def geomty(self): physics_variables.sf, physics_variables.sarea, physics_variables.xarea, - physics_variables.plasma_volume, + physics_variables.vol, ) = self.Sauter_geometry( physics_variables.rminor, physics_variables.rmajor, @@ -257,7 +257,7 @@ def geomty(self): ) # Volume - physics_variables.plasma_volume = physics_variables.cvol * self.xvol( + physics_variables.vol = physics_variables.cvol * self.xvol( physics_variables.rmajor, physics_variables.rminor, xi, @@ -579,6 +579,6 @@ def sauter_geometry(self, a, r0, kap, tri): xarea = numpy.pi * a**2 * kap * (1 + 0.52 * (w07 - 1)) # Volume - plasma_volume = 2.0e0 * numpy.pi * r0 * (1 - 0.25 * tri * eps) * xarea + vol = 2.0e0 * numpy.pi * r0 * (1 - 0.25 * tri * eps) * xarea - return pperim, sf, sarea, xarea, plasma_volume + return pperim, sf, sarea, xarea, vol diff --git a/process/plasma_profiles.py b/process/plasma_profiles.py index a24ec353..ea804c24 100644 --- a/process/plasma_profiles.py +++ b/process/plasma_profiles.py @@ -254,7 +254,7 @@ def calculate_profile_factors(self) -> None: + physics_variables.ni0 * physics_variables.ti0 ) * 1.0e3 - * constants.electron_charge + * constants.echarge ) # Pressure profile index (N.B. no pedestal effects included here) diff --git a/process/power.py b/process/power.py index b3162b64..5e0da7e1 100644 --- a/process/power.py +++ b/process/power.py @@ -1638,15 +1638,15 @@ def power2(self, output: bool): po.ovarrf( self.outfile, "Alpha power deposited in plasma (MW)", - "(f_alpha_plasma*alpha_power_total)", - physics_variables.f_alpha_plasma * physics_variables.alpha_power_total, + "(falpha*palpmw)", + physics_variables.falpha * physics_variables.palpmw, "OP ", ) po.ovarrf( self.outfile, "Power from charged products of DD and/or D-He3 fusion (MW)", - "(non_alpha_charged_power.)", - physics_variables.non_alpha_charged_power, + "(pchargemw.)", + physics_variables.pchargemw, "OP ", ) po.ovarrf( @@ -1657,9 +1657,9 @@ def power2(self, output: bool): "OP ", ) # if (physics_variables.ignite == 1) : - # po.ovarrf(self.outfile,'Total (MW)','',f_alpha_plasma*physics_variables.alpha_power_total+physics_variables.non_alpha_charged_power+pohmmw, 'OP ') + # po.ovarrf(self.outfile,'Total (MW)','',falpha*physics_variables.palpmw+physics_variables.pchargemw+pohmmw, 'OP ') # po.oblnkl(self.outfile) - # if (abs(sum - (physics_variables.f_alpha_plasma*physics_variables.alpha_power_total+physics_variables.non_alpha_charged_power+physics_variables.pohmmw)) > 5.0e0) : + # if (abs(sum - (physics_variables.falpha*physics_variables.palpmw+physics_variables.pchargemw+physics_variables.pohmmw)) > 5.0e0) : # write(*,*) 'WARNING: Power balance across separatrix is in error by more than 5 MW.' # po.ocmmnt(self.outfile,'WARNING: Power balance across separatrix is in error by more than 5 MW.') # @@ -1675,8 +1675,8 @@ def power2(self, output: bool): self.outfile, "Total (MW)", "", - physics_variables.f_alpha_plasma * physics_variables.alpha_power_total - + physics_variables.non_alpha_charged_power + physics_variables.falpha * physics_variables.palpmw + + physics_variables.pchargemw + physics_variables.pohmmw + pinj, "OP ", @@ -1686,9 +1686,8 @@ def power2(self, output: bool): abs( sum - ( - physics_variables.f_alpha_plasma - * physics_variables.alpha_power_total - + physics_variables.non_alpha_charged_power + physics_variables.falpha * physics_variables.palpmw + + physics_variables.pchargemw + physics_variables.pohmmw + pinj ) @@ -1710,8 +1709,8 @@ def power2(self, output: bool): po.ovarrf( self.outfile, "Fusion power (MW)", - "(fusion_power)", - physics_variables.fusion_power, + "(powfmw)", + physics_variables.powfmw, "OP ", ) po.ovarrf( @@ -1737,7 +1736,7 @@ def power2(self, output: bool): "OP ", ) sum = ( - physics_variables.fusion_power + physics_variables.powfmw + fwbs_variables.emultmw + pinj + self.htpmw_mech @@ -1937,8 +1936,8 @@ def power2(self, output: bool): po.ovarrf( self.outfile, "Fusion power (MW)", - "(fusion_power)", - physics_variables.fusion_power, + "(powfmw)", + physics_variables.powfmw, "OP ", ) po.ovarrf( @@ -1948,7 +1947,7 @@ def power2(self, output: bool): fwbs_variables.emultmw, "OP ", ) - sum = physics_variables.fusion_power + fwbs_variables.emultmw + sum = physics_variables.powfmw + fwbs_variables.emultmw po.ovarrf(self.outfile, "Total (MW)", "", sum, "OP ") po.oblnkl(self.outfile) po.ovarrf( @@ -2005,19 +2004,17 @@ def power2(self, output: bool): po.ovarrf( self.outfile, "Net electric power / total nuclear power (%)", - "(pnetelmw/(fusion_power+emultmw)", + "(pnetelmw/(powfmw+emultmw)", 100.0e0 * heat_transport_variables.pnetelmw - / (physics_variables.fusion_power + fwbs_variables.emultmw), + / (physics_variables.powfmw + fwbs_variables.emultmw), "OP ", ) po.ovarrf( self.outfile, "Net electric power / total fusion power (%)", - "(pnetelmw/fusion_power)", - 100.0e0 - * heat_transport_variables.pnetelmw - / physics_variables.fusion_power, + "(pnetelmw/powfmw)", + 100.0e0 * heat_transport_variables.pnetelmw / physics_variables.powfmw, "OP ", ) po.ovarrf( diff --git a/process/stellarator.py b/process/stellarator.py index c11f7863..34c233ab 100644 --- a/process/stellarator.py +++ b/process/stellarator.py @@ -205,7 +205,7 @@ def stigma(self): physics_variables.powerht, ) = self.physics.pcond( physics_variables.afuel, - physics_variables.alpha_power_total, + physics_variables.palpmw, physics_variables.aspect, physics_variables.bt, physics_variables.dnitot, @@ -218,7 +218,7 @@ def stigma(self): physics_variables.ignite, physics_variables.kappa, physics_variables.kappa95, - physics_variables.non_alpha_charged_power, + physics_variables.pchargemw, current_drive_variables.pinjmw, physics_variables.plasma_current, physics_variables.pcoreradpv, @@ -229,7 +229,7 @@ def stigma(self): physics_variables.tin, physics_variables.q, physics_variables.qstar, - physics_variables.plasma_volume, + physics_variables.vol, physics_variables.xarea, physics_variables.zeff, ) @@ -302,7 +302,7 @@ def stgeom(self): Fourierkoeffizienten' ('Representation of nested, closed surfaces with Fourier coefficients') """ - physics_variables.plasma_volume = ( + physics_variables.vol = ( st.f_r * st.f_a**2 * stellarator_configuration.stella_config_plasma_volume ) @@ -868,7 +868,7 @@ def stdiv(self, output: bool): # Scrape-off temperature in Joules - E = T_scrape * constants.electron_charge + E = T_scrape * constants.echarge # Sound speed of particles (m/s) @@ -1187,9 +1187,7 @@ def stfwbs(self, output: bool): # Neutron power lost through holes in first wall (eventually absorbed by # shield) - fwbs_variables.pnucloss = ( - physics_variables.neutron_power_total * fwbs_variables.fhole - ) + fwbs_variables.pnucloss = physics_variables.pneutmw * fwbs_variables.fhole # The peaking factor, obtained as precalculated parameter fwbs_variables.wallpf = ( @@ -1201,14 +1199,10 @@ def stfwbs(self, output: bool): self.blanket_neutronics() if heat_transport_variables.ipowerflow == 1: - fwbs_variables.pnucdiv = ( - physics_variables.neutron_power_total * fwbs_variables.fdiv - ) - fwbs_variables.pnuchcd = ( - physics_variables.neutron_power_total * fwbs_variables.fhcd - ) + fwbs_variables.pnucdiv = physics_variables.pneutmw * fwbs_variables.fdiv + fwbs_variables.pnuchcd = physics_variables.pneutmw * fwbs_variables.fhcd fwbs_variables.pnucfw = ( - physics_variables.neutron_power_total + physics_variables.pneutmw - fwbs_variables.pnucdiv - fwbs_variables.pnucloss - fwbs_variables.pnuchcd @@ -1264,13 +1258,13 @@ def stfwbs(self, output: bool): # Energy-multiplied neutron power pneut2 = ( - physics_variables.neutron_power_total + physics_variables.pneutmw - fwbs_variables.pnucloss - fwbs_variables.pnuc_cp ) * fwbs_variables.emult fwbs_variables.emultmw = pneut2 - ( - physics_variables.neutron_power_total + physics_variables.pneutmw - fwbs_variables.pnucloss - fwbs_variables.pnuc_cp ) @@ -1308,20 +1302,16 @@ def stfwbs(self, output: bool): else: # heat_transport_variables.ipowerflow == 1 # Neutron power incident on divertor (MW) - fwbs_variables.pnucdiv = ( - physics_variables.neutron_power_total * fwbs_variables.fdiv - ) + fwbs_variables.pnucdiv = physics_variables.pneutmw * fwbs_variables.fdiv # Neutron power incident on HCD apparatus (MW) - fwbs_variables.pnuchcd = ( - physics_variables.neutron_power_total * fwbs_variables.fhcd - ) + fwbs_variables.pnuchcd = physics_variables.pneutmw * fwbs_variables.fhcd # Neutron power deposited in first wall, blanket and shield (MW) pnucfwbs = ( - physics_variables.neutron_power_total + physics_variables.pneutmw - fwbs_variables.pnucdiv - fwbs_variables.pnucloss - fwbs_variables.pnuc_cp @@ -3891,10 +3881,10 @@ def stphys(self, output): # This replaces constraint equation 1 as it is just an equality. physics_variables.beta = ( physics_variables.betaft - + physics_variables.beta_beam + + physics_variables.betanb + 2.0e3 * constants.rmu0 - * constants.electron_charge + * constants.echarge * ( physics_variables.dene * physics_variables.ten + physics_variables.dnitot * physics_variables.tin @@ -3907,17 +3897,17 @@ def stphys(self, output): * physics_variables.btot * physics_variables.btot / (2.0e0 * constants.rmu0) - * physics_variables.plasma_volume + * physics_variables.vol ) physics_module.rho_star = np.sqrt( 2.0e0 - * constants.proton_mass + * constants.mproton * physics_variables.aion * physics_module.total_plasma_internal_energy - / (3.0e0 * physics_variables.plasma_volume * physics_variables.dnla) + / (3.0e0 * physics_variables.vol * physics_variables.dnla) ) / ( - constants.electron_charge + constants.echarge * physics_variables.bt * physics_variables.eps * physics_variables.rmajor @@ -3943,21 +3933,13 @@ def stphys(self, output): # Calculate fusion power - fusion_reactions = physics_funcs.FusionReactionRate(self.plasma_profile) - fusion_reactions.deuterium_branching(physics_variables.ti) - fusion_reactions.calculate_fusion_rates() - fusion_reactions.set_physics_variables() + fusion_rate = physics_funcs.FusionReactionRate(self.plasma_profile) + fusion_rate.calculate_fusion_rates() + fusion_rate.set_physics_variables() - # D-T power density is named differently to differentiate it from the beam given component - physics_variables.dt_power_plasma = ( - physics_module.dt_power_density_plasma * physics_variables.plasma_volume - ) - physics_variables.dhe3_power = ( - physics_module.dhe3_power_density * physics_variables.plasma_volume - ) - physics_variables.dd_power = ( - physics_module.dd_power_density * physics_variables.plasma_volume - ) + physics_variables.pdt = physics_module.pdtpv * physics_variables.vol + physics_variables.pdhe3 = physics_module.pdhe3pv * physics_variables.vol + physics_variables.pdd = physics_module.pddpv * physics_variables.vol # Calculate neutral beam slowing down effects # If ignited, then ignore beam fusion effects @@ -3966,89 +3948,72 @@ def stphys(self, output): physics_variables.ignite == 0 ): ( - physics_variables.beta_beam, - physics_variables.beam_density_out, - physics_variables.alpha_power_beams, - ) = physics_funcs.beam_fusion( + physics_variables.betanb, + physics_variables.dnbeam2, + physics_variables.palpnb, + ) = physics_funcs.beamfus( physics_variables.beamfus0, physics_variables.betbm0, physics_variables.bp, physics_variables.bt, - current_drive_variables.beam_current, + current_drive_variables.cnbeam, physics_variables.dene, physics_variables.deni, physics_variables.dlamie, - current_drive_variables.beam_energy, - physics_variables.f_deuterium, - physics_variables.f_tritium, - current_drive_variables.f_tritium_beam, - physics_module.sigmav_dt_average, + physics_variables.ealphadt, + current_drive_variables.enbeam, + physics_variables.fdeut, + physics_variables.ftrit, + current_drive_variables.ftritbm, + physics_module.sigvdt, physics_variables.ten, physics_variables.tin, - physics_variables.plasma_volume, + physics_variables.vol, physics_variables.zeffai, ) - physics_variables.fusion_rate_density_total = ( - physics_variables.fusion_rate_density_plasma + physics_variables.fusionrate = ( + physics_variables.fusionrate + 1.0e6 - * physics_variables.alpha_power_beams - / (constants.dt_alpha_energy) - / physics_variables.plasma_volume + * physics_variables.palpnb + / (1.0e3 * physics_variables.ealphadt * constants.echarge) + / physics_variables.vol ) - physics_variables.alpha_rate_density_total = ( - physics_variables.alpha_rate_density_plasma + physics_variables.alpharate = ( + physics_variables.alpharate + 1.0e6 - * physics_variables.alpha_power_beams - / (constants.dt_alpha_energy) - / physics_variables.plasma_volume - ) - physics_variables.dt_power_total = ( - physics_variables.dt_power_plasma - + 5.0e0 * physics_variables.alpha_power_beams + * physics_variables.palpnb + / (1.0e3 * physics_variables.ealphadt * constants.echarge) + / physics_variables.vol ) - else: - # If no beams present then the total alpha rates and power are the same as the plasma values - physics_variables.fusion_rate_density_total = ( - physics_variables.fusion_rate_density_plasma - ) - physics_variables.alpha_rate_density_total = ( - physics_variables.alpha_rate_density_plasma - ) - physics_variables.dt_power_total = physics_variables.dt_power_plasma - # Create some derived values and add beam contribution to fusion power + physics_variables.pdt = physics_variables.pdt + 5.0e0 * physics_variables.palpnb + ( - physics_variables.neutron_power_density_total, - physics_variables.alpha_power_plasma, - physics_variables.alpha_power_total, - physics_variables.neutron_power_plasma, - physics_variables.neutron_power_total, - physics_variables.non_alpha_charged_power, - physics_variables.alpha_power_density_total, - physics_variables.alpha_power_electron_density, - physics_variables.alpha_power_ions_density, - physics_variables.charged_particle_power, - physics_variables.fusion_power, - ) = physics_funcs.set_fusion_powers( - physics_variables.f_alpha_electron, - physics_variables.f_alpha_ion, - physics_variables.alpha_power_beams, - physics_variables.charged_power_density, - physics_variables.neutron_power_density_plasma, - physics_variables.plasma_volume, - physics_variables.alpha_power_density_plasma, - ) - - physics_variables.betaft = physics_funcs.fast_alpha_beta( + physics_variables.pneutpv, + physics_variables.palpmw, + physics_variables.pneutmw, + physics_variables.pchargemw, + physics_variables.betaft, + physics_variables.palppv, + physics_variables.palpipv, + physics_variables.palpepv, + physics_variables.pfuscmw, + physics_variables.powfmw, + ) = physics_funcs.palph2( physics_variables.bp, physics_variables.bt, physics_variables.dene, physics_variables.deni, physics_variables.dnitot, + physics_variables.falpe, + physics_variables.falpi, + physics_variables.palpnb, + physics_variables.pchargepv, + physics_variables.pneutpv, physics_variables.ten, physics_variables.tin, - physics_variables.alpha_power_density_total, - physics_variables.alpha_power_density_plasma, + physics_variables.vol, + physics_variables.palppv, physics_variables.ifalphap, ) @@ -4057,14 +4022,14 @@ def stphys(self, output): if physics_variables.iwalld == 1: physics_variables.wallmw = ( physics_variables.ffwal - * physics_variables.neutron_power_total + * physics_variables.pneutmw / physics_variables.sarea ) else: if heat_transport_variables.ipowerflow == 0: physics_variables.wallmw = ( (1.0e0 - fwbs_variables.fhole) - * physics_variables.neutron_power_total + * physics_variables.pneutmw / build_variables.fwarea ) else: @@ -4075,7 +4040,7 @@ def stphys(self, output): - fwbs_variables.fhcd - fwbs_variables.fdiv ) - * physics_variables.neutron_power_total + * physics_variables.pneutmw / build_variables.fwarea ) @@ -4102,25 +4067,23 @@ def stphys(self, output): physics_variables.pedgeradpv = max(physics_variables.pedgeradpv, 0.0e0) physics_variables.pinnerzoneradmw = ( - physics_variables.pcoreradpv * physics_variables.plasma_volume + physics_variables.pcoreradpv * physics_variables.vol ) # Should probably be vol_core physics_variables.pouterzoneradmw = ( - physics_variables.pedgeradpv * physics_variables.plasma_volume + physics_variables.pedgeradpv * physics_variables.vol ) - physics_variables.pradmw = ( - physics_variables.pradpv * physics_variables.plasma_volume - ) + physics_variables.pradmw = physics_variables.pradpv * physics_variables.vol # Heating power to plasma (= Psol in divertor model) # Ohmic power is zero in a stellarator # physics_variables.pradmw here is core + edge (no SOL) powht = ( - physics_variables.f_alpha_plasma * physics_variables.alpha_power_total - + physics_variables.non_alpha_charged_power + physics_variables.falpha * physics_variables.palpmw + + physics_variables.pchargemw + physics_variables.pohmmw - - physics_variables.pradpv * physics_variables.plasma_volume + - physics_variables.pradpv * physics_variables.vol ) powht = max( 0.00001e0, powht @@ -4145,7 +4108,7 @@ def stphys(self, output): physics_variables.pradmw = ( physics_variables.pradmw + physics_variables.psolradmw ) - # pradpv = physics_variables.pradmw / physics_variables.plasma_volume # this line OVERWRITES the original definition of pradpv, probably shouldn't be defined like that as the core does not lose SOL power. + # pradpv = physics_variables.pradmw / physics_variables.vol # this line OVERWRITES the original definition of pradpv, probably shouldn't be defined like that as the core does not lose SOL power. # The following line is unphysical, but prevents -ve sqrt argument # Should be obsolete if constraint eqn 17 is turned on (but beware - @@ -4154,8 +4117,8 @@ def stphys(self, output): # Power transported to the first wall by escaped alpha particles - physics_variables.palpfwmw = physics_variables.alpha_power_total * ( - 1.0e0 - physics_variables.f_alpha_plasma + physics_variables.palpfwmw = physics_variables.palpmw * ( + 1.0e0 - physics_variables.falpha ) # Nominal mean photon wall load @@ -4189,8 +4152,8 @@ def stphys(self, output): ) physics_variables.rad_fraction_total = physics_variables.pradmw / ( - physics_variables.f_alpha_plasma * physics_variables.alpha_power_total - + physics_variables.non_alpha_charged_power + physics_variables.falpha * physics_variables.palpmw + + physics_variables.pchargemw + physics_variables.pohmmw + current_drive_variables.pinjmw ) @@ -4209,7 +4172,7 @@ def stphys(self, output): physics_variables.powerht, ) = self.physics.pcond( physics_variables.afuel, - physics_variables.alpha_power_total, + physics_variables.palpmw, physics_variables.aspect, physics_variables.bt, physics_variables.dnitot, @@ -4222,7 +4185,7 @@ def stphys(self, output): physics_variables.ignite, physics_variables.kappa, physics_variables.kappa95, - physics_variables.non_alpha_charged_power, + physics_variables.pchargemw, current_drive_variables.pinjmw, physics_variables.plasma_current, physics_variables.pcoreradpv, @@ -4233,17 +4196,13 @@ def stphys(self, output): physics_variables.tin, stellarator_variables.iotabar, physics_variables.qstar, - physics_variables.plasma_volume, + physics_variables.vol, physics_variables.xarea, physics_variables.zeff, ) - physics_variables.ptremw = ( - physics_variables.ptrepv * physics_variables.plasma_volume - ) - physics_variables.ptrimw = ( - physics_variables.ptripv * physics_variables.plasma_volume - ) + physics_variables.ptremw = physics_variables.ptrepv * physics_variables.vol + physics_variables.ptrimw = physics_variables.ptripv * physics_variables.vol physics_variables.pscalingmw = ( physics_variables.ptremw + physics_variables.ptrimw @@ -4265,13 +4224,13 @@ def stphys(self, output): physics_variables.aspect, physics_variables.dene, physics_variables.deni, - physics_variables.fusion_rate_density_total, - physics_variables.alpha_rate_density_total, + physics_variables.fusionrate, + physics_variables.alpharate, physics_variables.plasma_current, sbar, physics_variables.dnalp, physics_variables.taueff, - physics_variables.plasma_volume, + physics_variables.vol, ) # Calculate physics_variables.beta limit. Does nothing atm so commented out @@ -4480,21 +4439,19 @@ def calc_neoclassics(self): q_PROCESS = ( ( - physics_variables.f_alpha_plasma - * physics_variables.alpha_power_density_total + physics_variables.falpha * physics_variables.palppv - physics_variables.pcoreradpv ) - * physics_variables.plasma_volume + * physics_variables.vol / physics_variables.sarea * impurity_radiation_module.coreradius ) q_PROCESS_r1 = ( ( - physics_variables.f_alpha_plasma - * physics_variables.alpha_power_density_total + physics_variables.falpha * physics_variables.palppv - physics_variables.pcoreradpv ) - * physics_variables.plasma_volume + * physics_variables.vol / physics_variables.sarea ) @@ -4548,7 +4505,7 @@ def calc_neoclassics(self): * impurity_radiation_module.coreradius ) dmdt_neo_fuel = ( - dndt_neo_fuel * physics_variables.afuel * constants.proton_mass * 1.0e6 + dndt_neo_fuel * physics_variables.afuel * constants.mproton * 1.0e6 ) # mg dmdt_neo_fuel_from_e = ( 4 @@ -4556,7 +4513,7 @@ def calc_neoclassics(self): * physics_variables.sarea * impurity_radiation_module.coreradius * physics_variables.afuel - * constants.proton_mass + * constants.mproton * 1.0e6 ) # kg @@ -4607,7 +4564,7 @@ def calc_neoclassics(self): def st_calc_eff_chi(self): volscaling = ( - physics_variables.plasma_volume + physics_variables.vol * st.f_r * ( impurity_radiation_module.coreradius @@ -4627,8 +4584,7 @@ def st_calc_eff_chi(self): ) nominator = ( - physics_variables.f_alpha_plasma - * physics_variables.alpha_power_density_total + physics_variables.falpha * physics_variables.palppv - physics_variables.pcoreradpv ) * volscaling @@ -4640,7 +4596,7 @@ def st_calc_eff_chi(self): ( 3 * physics_variables.ne0 - * constants.electron_charge + * constants.echarge * physics_variables.te0 * 1e3 * physics_variables.alphat @@ -4713,13 +4669,13 @@ def stheat(self, output: bool): # Calculate neutral beam current if abs(current_drive_variables.pnbeam) > 1e-8: - current_drive_variables.beam_current = ( + current_drive_variables.cnbeam = ( 1e-3 * (current_drive_variables.pnbeam * 1e6) - / current_drive_variables.beam_energy + / current_drive_variables.enbeam ) else: - current_drive_variables.beam_current = 0 + current_drive_variables.cnbeam = 0 # Ratio of fusion to input (injection+ohmic) power @@ -4733,7 +4689,7 @@ def stheat(self, output: bool): ): current_drive_variables.bigq = 1e18 else: - current_drive_variables.bigq = physics_variables.fusion_power / ( + current_drive_variables.bigq = physics_variables.powfmw / ( current_drive_variables.pinjmw + current_drive_variables.porbitlossmw + physics_variables.pohmmw @@ -4774,14 +4730,14 @@ def stheat(self, output: bool): po.ovarre( self.outfile, "Neutral beam energy (keV)", - "(beam_energy)", - current_drive_variables.beam_energy, + "(enbeam)", + current_drive_variables.enbeam, ) po.ovarre( self.outfile, "Neutral beam current (A)", - "(beam_current)", - current_drive_variables.beam_current, + "(cnbeam)", + current_drive_variables.cnbeam, ) po.ovarre( self.outfile, "Fraction of beam energy to ions", "(fpion)", fpion diff --git a/process/vacuum.py b/process/vacuum.py index 77da8101..f425d486 100644 --- a/process/vacuum.py +++ b/process/vacuum.py @@ -52,12 +52,12 @@ def run(self, output: bool) -> None: # as this is what f2py returns if self.vacuum_model == "old": pumpn, vacv.nvduct, vacv.dlscal, vacv.vacdshm, vacv.vcdimax = self.vacuum( - pv.fusion_power, + pv.powfmw, pv.rmajor, pv.rminor, 0.5e0 * (buv.scrapli + buv.scraplo), pv.sarea, - pv.plasma_volume, + pv.vol, buv.shldoth, buv.shldith, buv.tfcth, @@ -449,7 +449,7 @@ def vacuum( break else: - eh.fdiags[0] = pv.fusion_power + eh.fdiags[0] = pv.powfmw eh.fdiags[1] = pv.te eh.report_error(124) diff --git a/scripts/create_dicts_config.py b/scripts/create_dicts_config.py index f279424c..2a621b6b 100644 --- a/scripts/create_dicts_config.py +++ b/scripts/create_dicts_config.py @@ -7,7 +7,7 @@ "aspect", "rminor", "bt", - "fusion_power", + "powfmw", "pnetelmw", "te", "pdivt", diff --git a/source/fortran/const_and_precisions.f90 b/source/fortran/const_and_precisions.f90 index 39d0889c..88e15b2e 100644 --- a/source/fortran/const_and_precisions.f90 +++ b/source/fortran/const_and_precisions.f90 @@ -65,9 +65,9 @@ MODULE const_and_precisions !======================================================================== ! Physical constants (SI) !======================================================================== - REAL(wp_), PARAMETER :: e_ = 1.602176634d-19 ! [C] - REAL(wp_), PARAMETER :: me_ = 9.1093837139d-31 ! [kg] - REAL(wp_), PARAMETER :: mp_ = 1.67262192595d-27 ! [kg] + REAL(wp_), PARAMETER :: e_ = 1.601917d-19 ! [C] + REAL(wp_), PARAMETER :: me_ = 9.109558d-31 ! [kg] + REAL(wp_), PARAMETER :: mp_ = 1.672614d-27 ! [kg] REAL(wp_), PARAMETER :: rmpe_ = mp_/me_ REAL(wp_), PARAMETER :: c_ = 2.997925d+08 ! [m/s] REAL(wp_), PARAMETER :: eps0_ = 8.854188d-12 ! [F/m] diff --git a/source/fortran/constants.f90 b/source/fortran/constants.f90 index da629e98..68a18929 100644 --- a/source/fortran/constants.f90 +++ b/source/fortran/constants.f90 @@ -14,182 +14,78 @@ module constants public - ! Standard output unit identifier + ! File output indexes integer, parameter :: iotty = 6 + !! Standard output unit identifier - ! Output file unit identifier integer, parameter :: nout = 11 + !! Output file unit identifier - ! Plot data file unit identifier integer, parameter :: nplot = 12 + !! Plot data file unit identifier - ! Machine-optimised output file unit integer, parameter :: mfile = 13 + !! Machine-optimised output file unit - ! Verbose diagnostics file integer, parameter :: vfile = 14 + !! Verbose diagnostics file - ! Optimisation information output file number integer, parameter :: opt_file = 15 + !! Optimisation information output file number - ! TF inboard stress radial distributions file number integer, parameter :: sig_file = 16 + !! TF inboard stress radial distributions file number - ! degrees to radians, = pi/180 real(dp), parameter :: degrad = 0.01745329251D0 + !! degrees to radians, = pi/180 + + real(dp), parameter :: echarge = 1.60217733D-19 + !! electron charge [C] + + real(dp), parameter :: emass = 9.10938370D-31 + !! electron mass [kg] + + real(dp), parameter :: mproton = 1.6726231D-27 + !! proton mass [kg] - ! Electron / elementary charge [C] - ! Reference: National Institute of Standards and Technology (NIST) - ! https://physics.nist.gov/cgi-bin/cuu/Value?e|search_for=electron+charge - real(dp), parameter :: electron_charge = 1.602176634D-19 - - ! While the electron charge is a fundamental constant, the electron volt is a derived unit and - ! is added here for convenience. This allows better syntax and is more readable than using the electron - ! charge constant directly when working with units of energy. - - ! Electron volt [J] - ! Reference: National Institute of Standards and Technology (NIST) - ! https://physics.nist.gov/cgi-bin/cuu/Value?evj|search_for=electron+volt - real(dp), parameter :: electron_volt = 1.602176634D-19 - - ! Kiloelectron volt [J] - ! Reference: National Institute of Standards and Technology (NIST) - ! https://physics.nist.gov/cgi-bin/cuu/Value?evj|search_for=electron+volt - real(dp), parameter :: kiloelectron_volt = 1.602176634D-16 - - ! Unified atomic mass unit [kg] - ! Reference: National Institute of Standards and Technology (NIST) - ! https://physics.nist.gov/cgi-bin/cuu/Value?u|search_for=atomic+mass+constant - real(dp), parameter :: atomic_mass_unit = 1.66053906892D-27 - - ! Electron mass [kg] - ! Reference: National Institute of Standards and Technology (NIST) - ! https://physics.nist.gov/cgi-bin/cuu/Value?me|search_for=ELECTRON+MASS - real(dp), parameter :: electron_mass = 9.1093837139D-31 - - ! Proton mass [kg] - ! Reference: National Institute of Standards and Technology (NIST) - ! https://physics.nist.gov/cgi-bin/cuu/Value?mp|search_for=PROTON+MASS - real(dp), parameter :: proton_mass = 1.67262192595D-27 - - ! Deuteron mass [kg] - ! Reference: National Institute of Standards and Technology (NIST) - ! https://physics.nist.gov/cgi-bin/cuu/Value?md|search_for=DEUTERON+MASS - real(dp), parameter :: deuteron_mass = 3.3435837768D-27 - - ! Triton mass [kg] - ! Reference: National Institute of Standards and Technology (NIST) - ! https://physics.nist.gov/cgi-bin/cuu/Value?mt|search_for=TRITON+MASS - real(dp), parameter :: triton_mass = 5.0073567512D-27 - - ! Neutron mass [kg] - ! Reference: National Institute of Standards and Technology (NIST) - ! https://physics.nist.gov/cgi-bin/cuu/Value?mn|search_for=NEUTRON+MASS - real(dp), parameter :: neutron_mass = 1.67492750056D-27 - - ! Alpha particle mass [kg] - ! Reference: National Institute of Standards and Technology (NIST) - ! https://physics.nist.gov/cgi-bin/cuu/Value?mal|search_for=alpha+mass - real(dp), parameter :: alpha_mass = 6.6446573450D-27 - - ! Helion (3He) mass [kg] - ! Reference: National Institute of Standards and Technology (NIST) - ! https://physics.nist.gov/cgi-bin/cuu/Value?mh|search_for=HELION - real(dp), parameter :: helion_mass = 5.0064127862D-27 - - ! Speed of light in vacuum (c) [m/s] - ! Reference: National Institute of Standards and Technology (NIST) - ! https://physics.nist.gov/cgi-bin/cuu/Value?c|search_for=light - real(dp), parameter :: speed_light = 299792458D0 - - ! Deuterium - Tritium reaction energy [J] - ! Find the mass difference in the reactancts and products of the D-T reaction - ! Multiply by the speed of light squared to get the energy released - real(dp), parameter :: d_t_energy = (((deuteron_mass+triton_mass)-(alpha_mass+neutron_mass))*speed_light**2) - - ! Deuterium - Helion (3He) reaction energy [J] - ! Find the mass difference in the reactancts and products of the D-3He reaction - ! Multiply by the speed of light squared to get the energy released - real(dp), parameter :: d_helium_energy = (((deuteron_mass+helion_mass)-(alpha_mass+proton_mass))*speed_light**2) - - ! Deuterium - Deuterium (3He producing) reaction energy [J] - ! Find the mass difference in the reactancts and products of the D-D reaction - ! Multiply by the speed of light squared to get the energy released - real(dp), parameter :: dd_helium_energy = (((deuteron_mass+deuteron_mass)-(helion_mass+neutron_mass))*speed_light**2) - - ! Deuterium - Deuterium (Triton producing) reaction energy [J] - ! Find the mass difference in the reactancts and products of the D-D reaction - ! Multiply by the speed of light squared to get the energy released - real(dp), parameter :: dd_triton_energy = (((deuteron_mass+deuteron_mass)-(triton_mass+proton_mass))*speed_light**2) - - ! Deuterium - Tritium reaction energy fraction carried by neutron - ! Assuming centre of mass frame as the momenta of the fusion products exceed - ! those of the fusion reagents by many orders of magnitude. Assumed to be non-relativistic. - ! Roughly 79.867% of the energy is carried by the neutron - real(dp), parameter :: dt_neutron_energy_fraction = (alpha_mass/(neutron_mass+alpha_mass)) - - ! Deuterium - Tritium reaction energy carried by alpha particle neutron [J] - ! Assuming centre of mass frame as the momenta of the fusion products exceed - ! those of the fusion reagents by many orders of magnitude. Assumed to be non-relativistic. - ! Roughly 3.5 MeV of the energy is carried by the alpha particle - real(dp), parameter :: dt_alpha_energy = (1.0D0-dt_neutron_energy_fraction)*d_t_energy - - ! Deuterium - Deuterium (3He producing) reaction energy fraction carried by neutron - ! Assuming centre of mass frame as the momenta of the fusion products exceed - ! those of the fusion reagents by many orders of magnitude. Assumed to be non-relativistic. - ! Roughly 74.935% of the energy is carried by the neutron - real(dp), parameter :: dd_neutron_energy_fraction = (helion_mass/(neutron_mass+helion_mass)) - - ! Deuterium - Deuterium (Triton producing) reaction energy fraction carried by proton - ! Assuming centre of mass frame as the momenta of the fusion products exceed - ! those of the fusion reagents by many orders of magnitude. Assumed to be non-relativistic. - ! Roughly 74.960% of the energy is carried by the proton - real(dp), parameter :: dd_proton_energy_fraction = (triton_mass/(proton_mass+triton_mass)) - - ! Deuterium - Helion (3He) reaction energy fraction carried by proton - ! Assuming centre of mass frame as the momenta of the fusion products exceed - ! those of the fusion reagents by many orders of magnitude. Assumed to be non-relativistic. - ! Roughly 79.889% of the energy is carried by the proton - real(dp), parameter :: dhelium_proton_energy_fraction = (alpha_mass/(proton_mass+alpha_mass)) - - ! pi real(dp), parameter :: pi = 3.1415926535897932D0 + !! pi - ! permeability of free space [H/m] real(dp), parameter :: rmu0 = 1.256637062D-6 + !! permeability of free space [H/m] - ! 2 pi real(dp), parameter :: twopi = 6.2831853071795862D0 + !! 2 pi - ! unified atomic mass unit [kg] real(dp), parameter :: umass = 1.660538921D-27 + !! unified atomic mass unit [kg - ! permittivity of free space [Farad/m] real(dp), parameter :: epsilon0 = 8.85418781D-12 + !! permittivity of free space [Farad/m] - ! specific heat capacity of water (J/kg/K) real(dp), parameter :: cph2o = 4180.0D0 + !! specific heat capacity of water (J/kg/K) - ! density of copper (kg/m3) real(dp) :: dcopper + !! density of copper (kg/m3) - ! density of aluminium (kg/m3) real(dp) :: dalu + !! density of aluminium (kg/m3) - ! density of water (kg/m3) real(dp), parameter :: denh2o = 985.0D0 + !! density of water (kg/m3) - ! Copper thermal conductivity (W/m/K) real(dp), parameter :: k_copper = 330.0D0 + !! Copper thermal conductivity (W/m/K) - ! thermal conductivity of water (W/m/K) real(dp), parameter :: kh2o = 0.651D0 + !! thermal conductivity of water (W/m/K) - ! water dynamic viscosity (kg/m/s) real(dp), parameter :: muh2o = 4.71D-4 + !! water dynamic viscosity (kg/m/s) - ! Average number of days in a year real(dp), parameter :: n_day_year = 365.2425D0 + !! Average number of days in a year contains diff --git a/source/fortran/constraint_equations.f90 b/source/fortran/constraint_equations.f90 index 8860d4a1..533e8a5c 100755 --- a/source/fortran/constraint_equations.f90 +++ b/source/fortran/constraint_equations.f90 @@ -342,9 +342,9 @@ end subroutine constraint_eqns subroutine constraint_err_001() !! Error in: Relationship between beta, temperature (keV) and density (consistency equation) !! author: P B Lloyd, CCFE, Culham Science Centre - use physics_variables, only: betaft, beta_beam, dene, ten, dnitot, tin, btot, beta + use physics_variables, only: betaft, betanb, dene, ten, dnitot, tin, btot, beta write(*,*) 'betaft = ', betaft - write(*,*) 'beta_beam = ', beta_beam + write(*,*) 'betanb = ', betanb write(*,*) 'dene = ', dene write(*,*) 'ten = ', ten write(*,*) 'dnitot = ', dnitot @@ -408,8 +408,8 @@ subroutine constraint_eqn_001(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) !! - \( T_i \) -- density weighted average ion temperature [keV] !! - \( B_{tot} \) -- total toroidal + poloidal field [T] - use physics_variables, only: betaft, beta_beam, dene, ten, dnitot, tin, btot, beta - use constants, only: electron_charge,rmu0 + use physics_variables, only: betaft, betanb, dene, ten, dnitot, tin, btot, beta + use constants, only: echarge,rmu0 implicit none @@ -422,8 +422,8 @@ subroutine constraint_eqn_001(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) !! constraint derived type - tmp_cc = 1.0D0 - (betaft + beta_beam + & - 2.0D3*rmu0*electron_charge * (dene*ten + dnitot*tin)/btot**2 )/beta + tmp_cc = 1.0D0 - (betaft + betanb + & + 2.0D3*rmu0*echarge * (dene*ten + dnitot*tin)/btot**2 )/beta tmp_con = beta * (1.0D0 - tmp_cc) tmp_err = beta * tmp_cc tmp_symbol = '=' @@ -452,16 +452,16 @@ subroutine constraint_eqn_002(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) !! ptripv : input real : ion transport power per volume (MW/m3) !! pradpv : input real : total radiation power per volume (MW/m3) !! pcoreradpv : input real : total core radiation power per volume (MW/m3) - !! f_alpha_plasma : input real : fraction of alpha power deposited in plasma - !! alpha_power_density_total : input real : alpha power per volume (MW/m3) - !! charged_power_density : input real : non-alpha charged particle fusion power per volume (MW/m3) + !! falpha : input real : fraction of alpha power deposited in plasma + !! palppv : input real : alpha power per volume (MW/m3) + !! pchargepv : input real : non-alpha charged particle fusion power per volume (MW/m3) !! pohmpv : input real : ohmic heating power per volume (MW/m3) !! pinjmw : input real : total auxiliary injected power (MW) - !! plasma_volume : input real : plasma volume (m3) + !! vol : input real : plasma volume (m3) use physics_variables, only: iradloss, ignite, ptrepv, ptripv, pradpv, & - pcoreradpv, f_alpha_plasma, alpha_power_density_total, charged_power_density, & - pohmpv, plasma_volume + pcoreradpv, falpha, palppv, pchargepv, & + pohmpv, vol use current_drive_variables, only: pinjmw implicit none @@ -488,10 +488,10 @@ subroutine constraint_eqn_002(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) ! if plasma not ignited include injected power if (ignite == 0) then - pdenom = f_alpha_plasma*alpha_power_density_total + charged_power_density + pohmpv + pinjmw/plasma_volume + pdenom = falpha*palppv + pchargepv + pohmpv + pinjmw/vol else ! if plasma ignited - pdenom = f_alpha_plasma*alpha_power_density_total + charged_power_density + pohmpv + pdenom = falpha*palppv + pchargepv + pohmpv end if tmp_cc = 1.0D0 - pnumerator / pdenom @@ -517,11 +517,11 @@ subroutine constraint_eqn_003(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) !!
  • = 1 assume ignited (but include auxiliary power in costs) !! ptripv : input real : ion transport power per volume (MW/m3) !! piepv : input real : ion/electron equilibration power per volume (MW/m3) - !! f_alpha_plasma : input real : fraction of alpha power deposited in plasma - !! alpha_power_ions_density : input real : alpha power per volume to ions (MW/m3) + !! falpha : input real : fraction of alpha power deposited in plasma + !! palpipv : input real : alpha power per volume to ions (MW/m3) !! pinjimw : input real : auxiliary injected power to ions (MW) - !! plasma_volume : input real : plasma volume (m3) - use physics_variables, only: ignite, ptripv, piepv, f_alpha_plasma, alpha_power_ions_density, plasma_volume + !! vol : input real : plasma volume (m3) + use physics_variables, only: ignite, ptripv, piepv, falpha, palpipv, vol use current_drive_variables, only: pinjimw implicit none real(dp), intent(out) :: tmp_cc @@ -532,16 +532,16 @@ subroutine constraint_eqn_003(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) ! No assume plasma ignition: if (ignite == 0) then - tmp_cc = 1.0D0 - (ptripv + piepv) / (f_alpha_plasma*alpha_power_ions_density + pinjimw/plasma_volume) - tmp_con = (f_alpha_plasma*alpha_power_ions_density + pinjimw/plasma_volume) * (1.0D0 - tmp_cc) - tmp_err = (f_alpha_plasma*alpha_power_ions_density + pinjimw/plasma_volume) * tmp_cc + tmp_cc = 1.0D0 - (ptripv + piepv) / (falpha*palpipv + pinjimw/vol) + tmp_con = (falpha*palpipv + pinjimw/vol) * (1.0D0 - tmp_cc) + tmp_err = (falpha*palpipv + pinjimw/vol) * tmp_cc tmp_symbol = '=' tmp_units = 'MW/m3' ! Plasma ignited: else - tmp_cc = 1.0D0 - (ptripv+piepv) / (f_alpha_plasma*alpha_power_ions_density) - tmp_con = (f_alpha_plasma*alpha_power_ions_density) * (1.0D0 - tmp_cc) - tmp_err = (f_alpha_plasma*alpha_power_ions_density) * tmp_cc + tmp_cc = 1.0D0 - (ptripv+piepv) / (falpha*palpipv) + tmp_con = (falpha*palpipv) * (1.0D0 - tmp_cc) + tmp_err = (falpha*palpipv) * tmp_cc tmp_symbol = '=' tmp_units = 'MW/m3' end if @@ -571,13 +571,13 @@ subroutine constraint_eqn_004(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) !! ptrepv : input real : electron transport power per volume (MW/m3) !! pradpv : input real : total radiation power per volume (MW/m3) !! pcoreradpv : input real : total core radiation power per volume (MW/m3) - !! f_alpha_plasma : input real : fraction of alpha power deposited in plasma - !! alpha_power_electron_density : input real : alpha power per volume to electrons (MW/m3) + !! falpha : input real : fraction of alpha power deposited in plasma + !! palpepv : input real : alpha power per volume to electrons (MW/m3) !! piepv : input real : ion/electron equilibration power per volume (MW/m3) !! pinjemw : input real : auxiliary injected power to electrons (MW) - !! plasma_volume : input real : plasma volume (m3) - use physics_variables, only: iradloss, ignite, ptrepv, pcoreradpv, f_alpha_plasma, & - alpha_power_electron_density, piepv, plasma_volume, pradpv + !! vol : input real : plasma volume (m3) + use physics_variables, only: iradloss, ignite, ptrepv, pcoreradpv, falpha, & + palpepv, piepv, vol, pradpv use current_drive_variables, only: pinjemw implicit none real(dp), intent(out) :: tmp_cc @@ -601,10 +601,10 @@ subroutine constraint_eqn_004(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) ! if plasma not ignited include injected power if (ignite == 0) then - pdenom = f_alpha_plasma*alpha_power_electron_density + piepv + pinjemw/plasma_volume + pdenom = falpha*palpepv + piepv + pinjemw/vol else ! if plasma ignited - pdenom = f_alpha_plasma*alpha_power_electron_density + piepv + pdenom = falpha*palpepv + piepv end if tmp_cc = 1.0D0 - pnumerator / pdenom @@ -711,9 +711,9 @@ subroutine constraint_eqn_007(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) !! If ignite=1, any auxiliary power is assumed to be used only !! during plasma start-up, and is excluded from all steady-state !! power balance calculations. - !! beam_density_out : input real : hot beam ion density from calculation (/m3) + !! dnbeam2 : input real : hot beam ion density from calculation (/m3) !! dnbeam : input real : hot beam ion density, variable (/m3) - use physics_variables, only: ignite, beam_density_out, dnbeam + use physics_variables, only: ignite, dnbeam2, dnbeam implicit none real(dp), intent(out) :: tmp_cc real(dp), intent(out) :: tmp_con @@ -723,7 +723,7 @@ subroutine constraint_eqn_007(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) ! Do not assume plasma ignition: if (ignite == 0) then - tmp_cc = 1.0D0 - beam_density_out/dnbeam + tmp_cc = 1.0D0 - dnbeam2/dnbeam tmp_con = dnbeam * (1.0D0 - tmp_cc) tmp_err = dnbeam * tmp_cc tmp_symbol = '=' @@ -781,9 +781,9 @@ subroutine constraint_eqn_009(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) !! Logic change during pre-factoring: err, symbol, units will be assigned only if present. !! ffuspow : input real : f-value for maximum fusion power !! powfmax : input real : maximum fusion power (MW) - !! fusion_power : input real : fusion power (MW) + !! powfmw : input real : fusion power (MW) use constraint_variables, only: ffuspow, powfmax - use physics_variables, only: fusion_power + use physics_variables, only: powfmw implicit none real(dp), intent(out) :: tmp_cc real(dp), intent(out) :: tmp_con @@ -791,9 +791,9 @@ subroutine constraint_eqn_009(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) character(len=1), intent(out) :: tmp_symbol character(len=10), intent(out) :: tmp_units - tmp_cc = 1.0D0 - ffuspow * powfmax/fusion_power + tmp_cc = 1.0D0 - ffuspow * powfmax/powfmw tmp_con = powfmax * (1.0D0 - tmp_cc) - tmp_err = fusion_power * tmp_cc + tmp_err = powfmw * tmp_cc tmp_symbol = '<' tmp_units = 'MW' @@ -1027,15 +1027,15 @@ subroutine constraint_eqn_017(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) !! #=#=# fradpwr, pradmaxpv !! and hence also optional here. !! Logic change during pre-factoring: err, symbol, units will be assigned only if present. - !! f_alpha_plasma : input real : fraction of alpha power deposited in plasma + !! falpha : input real : fraction of alpha power deposited in plasma !! pinjmw : input real : total auxiliary injected power (MW) - !! plasma_volume : input real : plasma volume (m3) - !! alpha_power_density_total : input real : alpha power per volume (MW/m3) - !! charged_power_density : input real : non-alpha charged particle fusion power per volume (MW/m3) + !! vol : input real : plasma volume (m3) + !! palppv : input real : alpha power per volume (MW/m3) + !! pchargepv : input real : non-alpha charged particle fusion power per volume (MW/m3) !! pohmpv : input real : ohmic heating power per volume (MW/m3) !! fradpwr : input real : f-value for core radiation power limit !! pradpv : input real : total radiation power per volume (MW/m3) - use physics_variables, only: f_alpha_plasma, plasma_volume, alpha_power_density_total, charged_power_density, pohmpv, pradpv + use physics_variables, only: falpha, vol, palppv, pchargepv, pohmpv, pradpv use current_drive_variables, only: pinjmw use constraint_variables, only: fradpwr implicit none @@ -1046,9 +1046,9 @@ subroutine constraint_eqn_017(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) character(len=10), intent(out) :: tmp_units real(dp) :: pradmaxpv - !! Maximum possible power/plasma_volume that can be radiated (local) + !! Maximum possible power/vol that can be radiated (local) - pradmaxpv = pinjmw/plasma_volume + alpha_power_density_total*f_alpha_plasma + charged_power_density + pohmpv + pradmaxpv = pinjmw/vol + palppv*falpha + pchargepv + pohmpv tmp_cc = 1.0D0 - fradpwr * pradmaxpv / pradpv tmp_con = pradmaxpv * (1.0D0 - tmp_cc) tmp_err = pradpv * tmp_cc @@ -1271,10 +1271,10 @@ subroutine constraint_eqn_024(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) !! betalim : input real : allowable beta !! beta : input real : total plasma beta (calculated if ipedestal =3) !! betaft : input real : fast alpha beta component - !! beta_beam : input real : neutral beam beta component + !! betanb : input real : neutral beam beta component !! bt : input real : toroidal field !! btot : input real : total field - use physics_variables, only: iculbl, betalim, beta, beta_beam, betaft, bt, btot + use physics_variables, only: iculbl, betalim, beta, betanb, betaft, bt, btot use stellarator_variables, only: istell use constraint_variables, only: fbetatry implicit none @@ -1293,9 +1293,9 @@ subroutine constraint_eqn_024(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units) tmp_units = '' ! Here, the beta limit applies to only the thermal component, not the fast alpha or neutral beam parts else if (iculbl == 1) then - tmp_cc = 1.0D0 - fbetatry * betalim/(beta-betaft-beta_beam) + tmp_cc = 1.0D0 - fbetatry * betalim/(beta-betaft-betanb) tmp_con = betalim - tmp_err = betalim - (beta-betaft-beta_beam) / fbetatry + tmp_err = betalim - (beta-betaft-betanb) / fbetatry tmp_symbol = '<' tmp_units = '' ! Beta limit applies to thermal + neutral beam: components of the total beta, i.e. excludes alphas diff --git a/source/fortran/current_drive_variables.f90 b/source/fortran/current_drive_variables.f90 index f3132169..d68e097d 100644 --- a/source/fortran/current_drive_variables.f90 +++ b/source/fortran/current_drive_variables.f90 @@ -48,7 +48,7 @@ module current_drive_variables real(dp) :: cboot !! bootstrap current fraction multiplier (`i_bootstrap_current=1`) - real(dp) :: beam_current + real(dp) :: cnbeam !! neutral beam current (A) real(dp) :: diacf_hender @@ -78,7 +78,7 @@ module current_drive_variables !! - =0 O-mode !! - =1 X-mode - real(dp) :: beam_energy + real(dp) :: enbeam !! neutral beam energy (keV) (`iteration variable 19`) real(dp) :: etacd @@ -118,7 +118,7 @@ module current_drive_variables real(dp) :: frbeam !! R_tangential / R_major for neutral beam injection - real(dp) :: f_tritium_beam + real(dp) :: ftritbm !! fraction of beam that is tritium real(dp) :: gamcd @@ -244,7 +244,7 @@ subroutine init_current_drive_variables bscf_sauter = 0.0D0 bscf_wilson = 0.0D0 cboot = 1.0D0 - beam_current = 0.0D0 + cnbeam = 0.0D0 diacf_hender = 0.0D0 diacf_scene = 0.0D0 diamagnetic_current_fraction = 0.0D0 @@ -253,7 +253,7 @@ subroutine init_current_drive_variables effcd = 0.0D0 harnum = 2.0 wave_mode = 0 - beam_energy = 1.0D3 + enbeam = 1.0D3 etacd = 0.0D0 etacdfix = 0.0D0 etaech = 0.3D0 @@ -266,7 +266,7 @@ subroutine init_current_drive_variables feffcd = 1.0D0 forbitloss = 0.0D0 frbeam = 1.05D0 - f_tritium_beam = 1.0D-6 + ftritbm = 1.0D-6 gamcd = 0.0D0 gamma_ecrh = 0.35D0 xi_ebw = 0.8D0 diff --git a/source/fortran/evaluators.f90 b/source/fortran/evaluators.f90 index d814544f..5086acc9 100644 --- a/source/fortran/evaluators.f90 +++ b/source/fortran/evaluators.f90 @@ -100,7 +100,7 @@ subroutine funfom(fc) use error_handling, only: idiags, fdiags, errors_on, report_error use heat_transport_variables, only: pnetelmw use numerics, only: minmax - use physics_variables, only: fusion_power, bt, rmajor, wallmw, aspect, pohmmw + use physics_variables, only: powfmw, bt, rmajor, wallmw, aspect, pohmmw use pf_power_variables, only: srcktpm use process_output, only: int_to_string3 use tfcoil_variables, only: tfcmw @@ -134,7 +134,7 @@ subroutine funfom(fc) write(*,*) 'Figure of merit 2 (fusion power / input power) is not used.' write(*,*) 'Figure of merit 5 (fusion gain Q) is available.' stop 1 - ! fc = sgn * fusion_power / (pinjmw + porbitlossmw + tfcpmw + ppump/1.0D6) + ! fc = sgn * powfmw / (pinjmw + porbitlossmw + tfcpmw + ppump/1.0D6) case (3) ! neutron wall load fc = sgn * wallmw @@ -143,8 +143,8 @@ subroutine funfom(fc) fc = sgn * (tfcmw + 1.0D-3*srcktpm)/10.0D0 case (5) ! Q = fusion gain Issue #540 - fc = sgn * fusion_power / (pinjmw + porbitlossmw + pohmmw) - !fc = sgn * fusion_power / pinjmw + fc = sgn * powfmw / (pinjmw + porbitlossmw + pohmmw) + !fc = sgn * powfmw / pinjmw case (6) ! cost of electricity fc = sgn * coe/100.0D0 diff --git a/source/fortran/ife.f90 b/source/fortran/ife.f90 index e9dc23aa..96ad849e 100644 --- a/source/fortran/ife.f90 +++ b/source/fortran/ife.f90 @@ -36,7 +36,7 @@ subroutine ifephy(outfile,iprint) use process_output, only: oheadr, oblnkl, ocmmnt, ovarre use ife_variables, only: ifedrv, edrive, gainve, etave, gain, etadrv, tgain, & drveff, reprat, pdrive, rrin, pfusife, ifetyp, zl1, r1, zu1, flirad - use physics_variables, only: fusion_power, wallmw + use physics_variables, only: powfmw, wallmw use constants, only: pi implicit none @@ -104,15 +104,15 @@ subroutine ifephy(outfile,iprint) ! Repetition rate (Hz) reprat = pdrive / edrive ! Fusion power (MW) - fusion_power = 1.0D-6 * pdrive * gain + powfmw = 1.0D-6 * pdrive * gain else ! Driver Power reprat = rrin pdrive = reprat * edrive ! Gain - fusion_power = pfusife - gain = fusion_power / (1.0D-6 * pdrive) + powfmw = pfusife + gain = powfmw / (1.0D-6 * pdrive) end if ! Wall load (assume total fusion power applies) @@ -123,7 +123,7 @@ subroutine ifephy(outfile,iprint) phi = 0.5D0*pi + atan(zl1/r1) sang = 1.0D0 - cos(phi) - wallmw = fusion_power * 0.5D0*sang / fwarea + wallmw = powfmw * 0.5D0*sang / fwarea else if (ifetyp == 4) then @@ -134,10 +134,10 @@ subroutine ifephy(outfile,iprint) sang = 1.0D0 - cos(phi) phi = atan(flirad/zu1) sang = sang - (1.0D0 - cos(phi)) - wallmw = fusion_power * 0.5D0*sang / fwarea + wallmw = powfmw * 0.5D0*sang / fwarea else - wallmw = fusion_power / fwarea + wallmw = powfmw / fwarea end if if (iprint == 0) return @@ -163,7 +163,7 @@ subroutine ifephy(outfile,iprint) pdrive) call ovarre(outfile,'Driver repetition rate (Hz)','(reprat)',reprat) call ovarre(outfile,'Target gain','(gain)',gain) - call ovarre(outfile,'Fusion power (MW)','(fusion_power)',fusion_power) + call ovarre(outfile,'Fusion power (MW)','(powfmw)',powfmw) call ovarre(outfile,'Neutron wall load (MW/m2)','(wallmw)',wallmw) end subroutine ifephy @@ -204,7 +204,7 @@ subroutine iondrv(aaion,bmax,dpp,dtheta,edrive,emitt,etai,lf, & !! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - use constants, only: electron_charge, proton_mass, degrad, pi + use constants, only: echarge, mproton, degrad, pi implicit none ! Arguments @@ -235,7 +235,7 @@ subroutine iondrv(aaion,bmax,dpp,dtheta,edrive,emitt,etai,lf, & ! Electron charge / (proton mass * c**2) - eomc2 = electron_charge / (proton_mass*c2) + eomc2 = echarge / (mproton*c2) ! Degrees to radians @@ -292,8 +292,8 @@ subroutine iondrv(aaion,bmax,dpp,dtheta,edrive,emitt,etai,lf, & ! Transport beam radius (m) tbrad = ( (emitt**2 * sig0 * c2)/(sig**2 * bmax/1.5D0 * etai * & - sqrt(vi)) )**(0.333333D0) * sqrt(2.0D0 * aaion * proton_mass / & - (qion * electron_charge)) + sqrt(vi)) )**(0.333333D0) * sqrt(2.0D0 * aaion * mproton / & + (qion * echarge)) ! Extractor voltage (V) @@ -318,7 +318,7 @@ subroutine iondrv(aaion,bmax,dpp,dtheta,edrive,emitt,etai,lf, & ! Pulse length at injection (m) - lpi = taui * sqrt( 2.0D0 * qion * electron_charge * vi / (aaion * proton_mass) ) + lpi = taui * sqrt( 2.0D0 * qion * echarge * vi / (aaion * mproton) ) ! Initial voltage gradient (V/m) @@ -349,8 +349,8 @@ subroutine iondrv(aaion,bmax,dpp,dtheta,edrive,emitt,etai,lf, & ! Pulse length (m) - lpfo = taui * vi / vfo * sqrt( 2.0D0 * qion * electron_charge * vfo / & - (aaion * proton_mass) ) + lpfo = taui * vi / vfo * sqrt( 2.0D0 * qion * echarge * vfo / & + (aaion * mproton) ) ! Length of the low energy transport stage (m) ! (rearrangement of integral of PHI(V).dl) @@ -360,7 +360,7 @@ subroutine iondrv(aaion,bmax,dpp,dtheta,edrive,emitt,etai,lf, & ! End of Pulse Compression Stage: ! Pulse length = final pulse length (m) - lpf = tauf * sqrt( 2.0D0 * qion * electron_charge * vf / (aaion * proton_mass) ) + lpf = tauf * sqrt( 2.0D0 * qion * echarge * vf / (aaion * mproton) ) lppc = lpf ! Length of the pulse compression region (m) @@ -459,7 +459,7 @@ subroutine iondrv(aaion,bmax,dpp,dtheta,edrive,emitt,etai,lf, & lq = ( emitt * etai * sig0**2 * sqrt(c2*vi) / & (sig*(bmax/1.5D0)**2) )**(0.333333D0) * & - sqrt(2.0D0*aaion*proton_mass/(qion*electron_charge)) + sqrt(2.0D0*aaion*mproton/(qion*echarge)) write(*,*) ' lq = ',lq @@ -636,7 +636,7 @@ function betgam(aaion,qion,v) ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - betgam = sqrt( 2.0D0*qion*electron_charge*v / (aaion*proton_mass*c2) ) + betgam = sqrt( 2.0D0*qion*echarge*v / (aaion*mproton*c2) ) end function betgam @@ -1864,7 +1864,7 @@ subroutine ifepw1 use heat_transport_variables, only: priheat, pthermmw, pfwdiv, nphx, pinjwp, & pinjht, crypmw, helpow use ife_variables, only: pdrive, ifetyp, etadrv, pifecr - use physics_variables, only: fusion_power + use physics_variables, only: powfmw implicit none @@ -1881,7 +1881,7 @@ subroutine ifepw1 ! Primary nuclear heating (MW) ! Total thermal power removed from fusion core - priheat = emult * fusion_power + priheat = emult * powfmw ! Useful (high-grade) thermal power (MW) diff --git a/source/fortran/init_module.f90 b/source/fortran/init_module.f90 index f33cc770..b18ca215 100644 --- a/source/fortran/init_module.f90 +++ b/source/fortran/init_module.f90 @@ -161,7 +161,7 @@ subroutine init 'been an escape from a failed line search.' write(vfile,'(a80)') 'odd/even is a convenient plotting bit.' write(vfile,'(100a13)') 'nviter','escape', 'odd/even', 'te','coe','rmajor', & - 'fusion_power','bt','tburn','sqsumsq', (lablxc(ixc(i)),i=1,nvar) + 'powfmw','bt','tburn','sqsumsq', (lablxc(ixc(i)),i=1,nvar) end if end subroutine init diff --git a/source/fortran/initial.f90 b/source/fortran/initial.f90 index 8b75f5f7..0e281ea3 100755 --- a/source/fortran/initial.f90 +++ b/source/fortran/initial.f90 @@ -251,8 +251,8 @@ subroutine check use numerics, only: ixc, icc, ioptimz, neqns, nineqns, nvar, boundl, & boundu use pfcoil_variables, only: ipfres, ngrp, pfclres, ipfloc, ncls, isumatoh - use physics_variables, only: aspect, f_deuterium, fgwped, f_helium3, & - fgwsep, f_tritium, i_bootstrap_current, i_single_null, i_plasma_current, idivrt, ishape, & + use physics_variables, only: aspect, fdeut, fgwped, fhe3, & + fgwsep, ftrit, i_bootstrap_current, i_single_null, i_plasma_current, idivrt, ishape, & iradloss, isc, ipedestal, ilhthresh, itart, nesep, rhopedn, rhopedt, & rnbeam, neped, te, tauee_in, tesep, teped, itartpf, ftar, i_diamagnetic_current use pulse_variables, only: lpulse @@ -331,12 +331,12 @@ subroutine check end if ! Fuel ion fractions must add up to 1.0 - if (abs(1.0D0 - f_deuterium - f_tritium - f_helium3) > 1.0D-6) then - fdiags(1) = f_deuterium; fdiags(2) = f_tritium ; fdiags(3) = f_helium3 + if (abs(1.0D0 - fdeut - ftrit - fhe3) > 1.0D-6) then + fdiags(1) = fdeut; fdiags(2) = ftrit ; fdiags(3) = fhe3 call report_error(36) end if - if (f_tritium < 1.0D-3) then ! tritium fraction is negligible + if (ftrit < 1.0D-3) then ! tritium fraction is negligible triv = 0.0D0 trithtmw = 0.0D0 end if diff --git a/source/fortran/input.f90 b/source/fortran/input.f90 index 35cdb77b..7f884432 100644 --- a/source/fortran/input.f90 +++ b/source/fortran/input.f90 @@ -258,7 +258,7 @@ subroutine parse_input_file(in_file,out_file,show_changes) ucpens, cland, ucwindpf, i_cp_lifetime, cplife_input, & startupratio, tmain, u_unplanned_cp, supercond_cost_model use current_drive_variables, only: pinjfixmw, etaech, pinjalw, etanbi, & - f_tritium_beam, gamma_ecrh, pheat, beamwd, beam_energy, pheatfix, bootstrap_current_fraction_max, & + ftritbm, gamma_ecrh, pheat, beamwd, enbeam, pheatfix, bootstrap_current_fraction_max, & forbitloss, nbshield, tbeamin, feffcd, iefrf, iefrffix, irfcd, cboot, & etalh, frbeam, harnum, xi_ebw, wave_mode use divertor_variables, only: fdfs, anginc, divdens, divclfr, c4div, & @@ -304,13 +304,13 @@ subroutine parse_input_file(in_file,out_file,show_changes) ncls, nfixmx, cptdin, ipfloc, i_sup_pf_shape, rref, i_pf_current, & ccl0_ma, ccls_ma, ld_ratio_cst use physics_variables, only: ipedestal, taumax, i_single_null, fvsbrnni, & - rhopedt, cvol, f_deuterium, ffwal, iculbl, itartpf, ilhthresh, & + rhopedt, cvol, fdeut, ffwal, iculbl, itartpf, ilhthresh, & fpdivlim, epbetmax, isc, kappa95, aspect, cwrmax, nesep, c_beta, csawth, dene, & ftar, plasma_res_factor, ssync, rnbeam, beta, neped, hfact, dnbeta, & - fgwsep, rhopedn, tratio, q0, ishape, fne0, ignite, f_tritium, & + fgwsep, rhopedn, tratio, q0, ishape, fne0, ignite, ftrit, & ifalphap, tauee_in, alphaj, alphat, i_plasma_current, q, ti, tesep, rli, triang, & itart, ralpne, iprofile, triang95, rad_fraction_sol, betbm0, protium, & - teped, f_helium3, iwalld, gamma, f_alpha_plasma, fgwped, tbeta, i_bootstrap_current, & + teped, fhe3, iwalld, gamma, falpha, fgwped, tbeta, i_bootstrap_current, & iradloss, te, alphan, rmajor, kappa, iinvqd, fkzohm, beamfus0, & tauratio, idensl, bt, iscrp, ipnlaws, betalim, betalim_lower, & i_diamagnetic_current, i_pfirsch_schluter_current, m_s_limit, burnup_in @@ -572,14 +572,14 @@ subroutine parse_input_file(in_file,out_file,show_changes) case ('epbetmax') call parse_real_variable('epbetmax', epbetmax, 0.01D0, 10.0D0, & 'Max epsilon*beta value') - case ('f_alpha_plasma') - call parse_real_variable('f_alpha_plasma', f_alpha_plasma, 0.0D0, 1.0D0, & + case ('falpha') + call parse_real_variable('falpha', falpha, 0.0D0, 1.0D0, & 'Fraction of alpha power deposited to plasma') case ('ftar') call parse_real_variable('ftar', ftar, 0.0D0, 1.0D0, & 'Fraction of power to divertor with lower divertor in double null') - case ('f_deuterium') - call parse_real_variable('f_deuterium', f_deuterium, 0.0D0, 1.0D0, & + case ('fdeut') + call parse_real_variable('fdeut', fdeut, 0.0D0, 1.0D0, & 'Deuterium fuel fraction') case ('ffwal') call parse_real_variable('ffwal', ffwal, 0.0D0, 10.0D0, & @@ -590,8 +590,8 @@ subroutine parse_input_file(in_file,out_file,show_changes) case ('fgwsep') call parse_real_variable('fgwsep', fgwsep, -1.0D0, 1.0D0, & 'Fraction of n_G at separatrix') - case ('f_helium3') - call parse_real_variable('f_helium3', f_helium3, 0.0D0, 1.0D0, & + case ('fhe3') + call parse_real_variable('fhe3', fhe3, 0.0D0, 1.0D0, & 'Helium-3 fuel fraction') case ('fimp') call parse_real_array('fimp', fimp, isub1, nimp, & @@ -605,8 +605,8 @@ subroutine parse_input_file(in_file,out_file,show_changes) case ('ftaulimit') call parse_real_variable('ftaulimit', ftaulimit, 0.001D0, 1.0D0, & 'f-value for lower limit on taup/taueff the ratio of alpha particle to energy confinement times') - case ('f_tritium') - call parse_real_variable('f_tritium', f_tritium, 0.0D0, 1.0D0, & + case ('ftrit') + call parse_real_variable('ftrit', ftrit, 0.0D0, 1.0D0, & 'Tritium fuel fraction') case ('fvsbrnni') call parse_real_variable('fvsbrnni', fvsbrnni, 0.0D0, 1.0D0, & @@ -1046,8 +1046,8 @@ subroutine parse_input_file(in_file,out_file,show_changes) case ('cboot') call parse_real_variable('cboot', cboot, 0.0D0, 10.0D0, & 'Bootstrap current fraction multiplier') - case ('beam_energy') - call parse_real_variable('beam_energy', beam_energy, 1.0D0, 1.0D6, & + case ('enbeam') + call parse_real_variable('enbeam', enbeam, 1.0D0, 1.0D6, & 'Neutral beam energy (keV)') case ('etalh') call parse_real_variable('etalh', etalh, 0.0D0, 1.0D0, & @@ -1067,8 +1067,8 @@ subroutine parse_input_file(in_file,out_file,show_changes) case ('frbeam') call parse_real_variable('frbeam', frbeam, 0.5D0, 2.0D0, & 'R_tan / R_major for NBI') - case ('f_tritium_beam') - call parse_real_variable('f_tritium_beam', f_tritium_beam, 0.0D0, 1.0D0, & + case ('ftritbm') + call parse_real_variable('ftritbm', ftritbm, 0.0D0, 1.0D0, & 'Tritium fraction of beam') case ('gamma_ecrh') call parse_real_variable('gamma_ecrh', gamma_ecrh, 0.0D0, 1.0D0, & diff --git a/source/fortran/iteration_variables.f90 b/source/fortran/iteration_variables.f90 index 83424619..8c5859a0 100755 --- a/source/fortran/iteration_variables.f90 +++ b/source/fortran/iteration_variables.f90 @@ -461,25 +461,25 @@ end subroutine set_itv_18 !--------------------------------- subroutine init_itv_19 - !!
  • (19) beam_energy + !!
  • (19) enbeam use numerics, only: lablxc, boundl, boundu implicit none - lablxc(19) = 'beam_energy ' + lablxc(19) = 'enbeam ' boundl(19) = 1.000D0 boundu(19) = 1.000D6 end subroutine init_itv_19 real(kind(1.d0)) function itv_19() - use current_drive_variables, only: beam_energy + use current_drive_variables, only: enbeam implicit none - itv_19 = beam_energy + itv_19 = enbeam end function itv_19 subroutine set_itv_19(ratio) - use current_drive_variables, only: beam_energy + use current_drive_variables, only: enbeam implicit none real(kind(1.d0)) :: ratio - beam_energy = ratio + enbeam = ratio end subroutine !--------------------------------- diff --git a/source/fortran/main_module.f90 b/source/fortran/main_module.f90 index 839f422c..96b27b9e 100644 --- a/source/fortran/main_module.f90 +++ b/source/fortran/main_module.f90 @@ -331,7 +331,7 @@ end subroutine run_summary ! icc, lablcc, eqsolv ! use process_output, only: ovarin, oblnkl, ocmmnt, oheadr, osubhd, & ! ovarre, int_to_string3 -! use physics_variables, only: bt, aspect, rmajor, fusion_power, wallmw +! use physics_variables, only: bt, aspect, rmajor, powfmw, wallmw ! use define_iteration_variables, only: loadxc ! implicit none diff --git a/source/fortran/neoclassics_module.f90 b/source/fortran/neoclassics_module.f90 index fefc5946..94d341ca 100644 --- a/source/fortran/neoclassics_module.f90 +++ b/source/fortran/neoclassics_module.f90 @@ -338,7 +338,7 @@ function neoclassics_calc_nu_star_fromT(iota) ! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! use const_and_precisions, only: pi, me_, mp_, eps0_,e_, keV_ - use physics_variables, only: rmajor, te,ti, dene,deni, dnalp, f_deuterium + use physics_variables, only: rmajor, te,ti, dene,deni, dnalp, fdeut real(dp),dimension(4) :: neoclassics_calc_nu_star_fromT real(dp) :: t,erfn,phixmgx,expxk,xk, lnlambda,x,v @@ -348,7 +348,7 @@ function neoclassics_calc_nu_star_fromT(iota) integer :: jj,kk temp = (/te,ti,ti,ti /) * keV_ - density = (/dene,deni * f_deuterium,deni*(1-f_deuterium),dnalp /) + density = (/dene,deni * fdeut,deni*(1-fdeut),dnalp /) ! e D T a (He) mass = (/me_,mp_*2.0d0,mp_*3.0d0,mp_*4.0d0/) @@ -503,7 +503,7 @@ subroutine init_profile_values_from_PROCESS(rho, densities, temperatures, dr_den ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! use physics_variables, only: ne0,te0,alphan,& - alphat,ti0,ni0,f_deuterium, dnalp, rminor + alphat,ti0,ni0,fdeut, dnalp, rminor use const_and_precisions, only: keV_ real(dp), intent(in) :: rho @@ -526,8 +526,8 @@ subroutine init_profile_values_from_PROCESS(rho, densities, temperatures, dr_den tempa = ti0 * (1-rho**2)**alphat * keV_ dense = ne0 * (1-rho**2)**alphan - densT = (1-f_deuterium) * ni0 * (1-rho**2)**alphan - densD = f_deuterium *ni0 * (1-rho**2)**alphan + densT = (1-fdeut) * ni0 * (1-rho**2)**alphan + densD = fdeut *ni0 * (1-rho**2)**alphan densa = dnalp*(1+alphan) * (1-rho**2)**alphan ! Derivatives in real space @@ -537,8 +537,8 @@ subroutine init_profile_values_from_PROCESS(rho, densities, temperatures, dr_den dr_tempa = -2.0d0 * 1.0d0/rminor * ti0 * rho * (1.0d0-rho**2)**(alphat-1.0d0) * alphat * keV_ dr_dense = -2.0d0 * 1.0d0/rminor * rho * ne0 * (1.0d0-rho**2)**(alphan-1.0d0) * alphan - dr_densT = -2.0d0 * 1.0d0/rminor * rho * (1-f_deuterium) * ni0 * (1.0d0-rho**2)**(alphan-1.0d0) * alphan - dr_densD = -2.0d0 * 1.0d0/rminor * rho * f_deuterium *ni0 * (1.0d0-rho**2)**(alphan-1.0d0) * alphan + dr_densT = -2.0d0 * 1.0d0/rminor * rho * (1-fdeut) * ni0 * (1.0d0-rho**2)**(alphan-1.0d0) * alphan + dr_densD = -2.0d0 * 1.0d0/rminor * rho * fdeut *ni0 * (1.0d0-rho**2)**(alphan-1.0d0) * alphan dr_densa = -2.0d0 * 1.0d0/rminor * rho * dnalp*(1+alphan)* (1.0d0-rho**2)**(alphan-1.0d0) * alphan dens(1) = dense diff --git a/source/fortran/numerics.f90 b/source/fortran/numerics.f90 index ce82d81d..dbfdf79d 100755 --- a/source/fortran/numerics.f90 +++ b/source/fortran/numerics.f90 @@ -220,7 +220,7 @@ module numerics !!
  • (16) ohcth !!
  • (17) tdwell !!
  • (18) q - !!
  • (19) beam_energy + !!
  • (19) enbeam !!
  • (20) tcpav !!
  • (21) ftburn (f-value for equation 13) !!
  • (22) NOT USED diff --git a/source/fortran/output.f90 b/source/fortran/output.f90 index 5e5200db..a476e975 100755 --- a/source/fortran/output.f90 +++ b/source/fortran/output.f90 @@ -350,7 +350,7 @@ subroutine ovarrf(file,descr,varnam,value,output_flag) use numerics, only: name_xc use global_variables, only: verbose - use constants, only: pi, mfile, nplot, electron_charge + use constants, only: pi, mfile, nplot, echarge implicit none ! Arguments @@ -666,7 +666,7 @@ subroutine obuild(file,descr,thick,total,variable_name) ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! use numerics, only: boundl, boundu - use constants, only: electron_charge + use constants, only: echarge use maths_library, only: variable_error implicit none @@ -714,7 +714,7 @@ subroutine underscore(string) ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! use numerics, only: active_constraints, boundu, boundl - use constants, only: electron_charge + use constants, only: echarge implicit none ! Arguments diff --git a/source/fortran/physics_variables.f90 b/source/fortran/physics_variables.f90 index 3d2c2988..fdc06965 100644 --- a/source/fortran/physics_variables.f90 +++ b/source/fortran/physics_variables.f90 @@ -35,11 +35,8 @@ module physics_variables real(dp) :: alphap !! pressure profile index - real(dp) :: alpha_rate_density_total - !! Alpha particle production rate per unit volume, from plasma and beams [particles/m3/sec] - - real(dp) :: alpha_rate_density_plasma - !! Alpha particle production rate per unit volume, just from plasma [particles/m3/sec] + real(dp) :: alpharate + !! alpha particle production rate (particles/m3/sec) real(dp) :: alphat !! temperature profile index @@ -62,7 +59,7 @@ module physics_variables real(dp) :: betalim_lower !! allowable lower beta - real(dp) :: beta_beam + real(dp) :: betanb !! neutral beam beta component real(dp) :: betap @@ -126,7 +123,7 @@ module physics_variables real(dp) :: dnbeam !! hot beam ion density, variable (/m3) - real(dp) :: beam_density_out + real(dp) :: dnbeam2 !! hot beam ion density from calculation (/m3) real(dp) :: dnbeta @@ -156,6 +153,9 @@ module physics_variables real(dp) :: gradient_length_te !! Max. normalized gradient length in el. temperature (ipedestal==0 only) + real(dp), parameter :: ealphadt = 3520.0D0 + !! alpha birth energy in D-T reaction (keV) + real(dp) :: epbetmax !! maximum (eps*beta_poloidal) (`constraint equation 6`). Note: revised issue #346 !! "Operation at the tokamak equilibrium poloidal beta-limit in TFTR", 1992 Nucl. Fusion 32 1468 @@ -169,16 +169,16 @@ module physics_variables real(dp) :: inductive_current_fraction !! fraction of plasma current produced inductively - real(dp) :: f_alpha_electron + real(dp) :: falpe !! fraction of alpha energy to electrons - real(dp) :: f_alpha_plasma - !! Fraction of alpha power deposited in plasma. Default of 0.95 taken from https://doi.org/10.1088/0029-5515/39/12/305. + real(dp) :: falpha + !! fraction of alpha power deposited in plasma (Physics of Energetic Ions, p.2489) - real(dp) :: f_alpha_ion + real(dp) :: falpi !! fraction of alpha power to ions - real(dp) :: f_deuterium + real(dp) :: fdeut !! deuterium fuel fraction real(dp) :: ftar @@ -199,7 +199,7 @@ module physics_variables !! density set manually using nesep (`ipedestal==1`). !! (`iteration variable 152`) - real(dp) :: f_helium3 + real(dp) :: fhe3 !! helium-3 fuel fraction real(dp) :: figmer @@ -218,14 +218,11 @@ module physics_variables !! f-value for the constraint ne(0) > ne(ped) (`constraint equation 81`) !! (`Iteration variable 154`) - real(dp) :: f_tritium + real(dp) :: ftrit !! tritium fuel fraction - real(dp) :: fusion_rate_density_total - !! fusion reaction rate, from beams and plasma (reactions/m3/sec) - - real(dp) :: fusion_rate_density_plasma - !! fusion reaction rate, just from plasma (reactions/m3/sec) + real(dp) :: fusionrate + !! fusion reaction rate (reactions/m3/sec) real(dp) :: fvsbrnni !! fraction of the plasma current produced by non-inductive means (`iteration variable 44`) @@ -553,41 +550,29 @@ module physics_variables real(dp) :: p0 !! central total plasma pressure (Pa) - real(dp) :: f_dd_branching_trit - !! branching ratio for DD -> T + real(dp) :: palppv + !! alpha power per volume (MW/m3) - real(dp) :: alpha_power_density_plasma - !! Alpha power per volume just from plasma [MW/m3] - - real(dp) :: alpha_power_density_total - !! Alpha power per volume from plasma and beams [MW/m3] - - real(dp) :: alpha_power_electron_density - !! Alpha power per volume to electrons [MW/m3] + real(dp) :: palpepv + !! alpha power per volume to electrons (MW/m3) real(dp) :: palpfwmw !! alpha power escaping plasma and reaching first wall (MW) - real(dp) :: alpha_power_ions_density + real(dp) :: palpipv !! alpha power per volume to ions (MW/m3) - real(dp) :: alpha_power_plasma - !! Alpha power from only the plasma (MW) - - real(dp) :: alpha_power_total - !! Total alpha power from plasma and beams (MW) + real(dp) :: palpmw + !! alpha power (MW) - real(dp) :: alpha_power_beams + real(dp) :: palpnb !! alpha power from hot neutral beam ions (MW) - real(dp) :: non_alpha_charged_power + real(dp) :: pchargemw !! non-alpha charged particle fusion power (MW) - real(dp) :: charged_particle_power - !! Total charged particle fusion power [MW] - - real(dp) :: charged_power_density - !! Non-alpha charged particle fusion power per volume [MW/m3] + real(dp) :: pchargepv + !! non-alpha charged particle fusion power per volume (MW/m3) real(dp) :: pcoef !! profile factor (= n-weighted T / average T) @@ -598,10 +583,10 @@ module physics_variables real(dp) :: pcoreradpv !! total core radiation power per volume (MW/m3) - real(dp) :: dd_power + real(dp) :: pdd !! deuterium-deuterium fusion power (MW) - real(dp) :: dhe3_power + real(dp) :: pdhe3 !! deuterium-helium3 fusion power (MW) real(dp) :: pdivt @@ -616,11 +601,8 @@ module physics_variables real(dp) :: pdivmax !! power conducted to the divertor with most load (calculated if `i_single_null = 0`) (MW) - real(dp) :: dt_power_total - !! Total deuterium-tritium fusion power, from plasma and beams [MW] - - real(dp) :: dt_power_plasma - !! Deuterium-tritium fusion power, just from plasma [MW] + real(dp) :: pdt + !! deuterium-tritium fusion power (MW) real(dp) :: pouterzoneradmw !! radiation power from outer zone (MW) @@ -628,6 +610,9 @@ module physics_variables real(dp) :: pedgeradpv !! edge radiation power per volume (MW/m3) + real(dp) :: pfuscmw + !! charged particle fusion power (MW) + real(dp) :: phiint !! internal plasma V-s @@ -640,17 +625,11 @@ module physics_variables real(dp) :: plasma_current !! plasma current (A) - real(dp) :: neutron_power_plasma - !! Neutron fusion power from just the plasma [MW] - - real(dp) :: neutron_power_total - !! Total neutron fusion power from plasma and beams [MW] - - real(dp) :: neutron_power_density_total - !! neutron fusion power per volume from beams and plasma (MW/m3) + real(dp) :: pneutmw + !! neutron fusion power (MW) - real(dp) :: neutron_power_density_plasma - !! neutron fusion power per volume just from plasma (MW/m3) + real(dp) :: pneutpv + !! neutron fusion power per volume (MW/m3) real(dp) :: pohmmw !! ohmic heating power (MW) @@ -661,7 +640,7 @@ module physics_variables real(dp) :: powerht !! heating power (= transport loss power) (MW) used in confinement time calculation - real(dp) :: fusion_power + real(dp) :: powfmw !! fusion power (MW) real(dp) :: pperim @@ -676,8 +655,8 @@ module physics_variables real(dp) :: pradsolmw !! radiation power from SoL (MW) - real(dp) :: proton_rate_density - !! Proton production rate [particles/m3/sec] + real(dp) :: protonrate + !! proton production rate (particles/m3/sec) real(dp) :: psolradmw !! SOL radiation power (MW) (`stellarator only`) @@ -862,7 +841,7 @@ module physics_variables real(dp) :: triang95 !! plasma triangularity at 95% surface (calculated if `ishape = 0-2, 6, 8 or 9`) - real(dp) :: plasma_volume + real(dp) :: vol !! plasma volume (m3) real(dp) :: vsbrn @@ -907,8 +886,7 @@ subroutine init_physics_variables alphaj = 1.0D0 alphan = 0.25D0 alphap = 0.0D0 - alpha_rate_density_total = 0.0D0 - alpha_rate_density_plasma = 0.0D0 + alpharate = 0.0D0 alphat = 0.5D0 aspect = 2.907D0 beamfus0 = 1.0D0 @@ -916,7 +894,7 @@ subroutine init_physics_variables betaft = 0.0D0 betalim = 0.0D0 betalim_lower = 0.0D0 - beta_beam = 0.0D0 + betanb = 0.0D0 betap = 0.0D0 normalised_total_beta = 0.0D0 betbm0 = 1.5D0 @@ -937,7 +915,7 @@ subroutine init_physics_variables dlimit = 0.0D0 dnalp = 0.0D0 dnbeam = 0.0D0 - beam_density_out = 0.0D0 + dnbeam2 = 0.0D0 dnbeta = 3.5D0 dnelimt = 0.0D0 dnitot = 0.0D0 @@ -949,23 +927,22 @@ subroutine init_physics_variables eps = 0.34399724802D0 aux_current_fraction = 0.0D0 inductive_current_fraction = 0.0D0 - f_alpha_electron = 0.0D0 - f_alpha_plasma = 0.95D0 - f_alpha_ion = 0.0D0 - f_deuterium = 0.5D0 + falpe = 0.0D0 + falpha = 0.95D0 + falpi = 0.0D0 + fdeut = 0.5D0 ftar = 1.0D0 ffwal = 0.92D0 fgwped = 0.85D0 fgwsep = 0.50D0 - f_helium3 = 0.0D0 + fhe3 = 0.0D0 figmer = 0.0D0 fkzohm = 1.0D0 fplhsep = 1.0D0 fpdivlim = 1.0D0 fne0 = 1.0D0 - f_tritium = 0.5D0 - fusion_rate_density_total = 0.0D0 - fusion_rate_density_plasma = 0.0D0 + ftrit = 0.5D0 + fusionrate = 0.0D0 fvsbrnni = 1.0D0 gamma = 0.4D0 gammaft = 0.0D0 @@ -1009,48 +986,42 @@ subroutine init_physics_variables ni0 = 0.0D0 m_s_limit = 0.3D0 p0 = 0.0D0 - f_dd_branching_trit = 0.0D0 - alpha_power_density_plasma = 0.0D0 - alpha_power_density_total = 0.0D0 - alpha_power_electron_density = 0.0D0 + palppv = 0.0D0 + palpepv = 0.0D0 palpfwmw = 0.0D0 - alpha_power_ions_density = 0.0D0 - alpha_power_total = 0.0D0 - alpha_power_plasma = 0.0D0 - alpha_power_beams = 0.0D0 - non_alpha_charged_power = 0.0D0 - charged_power_density = 0.0D0 + palpipv = 0.0D0 + palpmw = 0.0D0 + palpnb = 0.0D0 + pchargemw = 0.0D0 + pchargepv = 0.0D0 pcoef = 0.0D0 pinnerzoneradmw = 0.0D0 pcoreradpv = 0.0D0 - dd_power = 0.0D0 - dhe3_power = 0.0D0 + pdd = 0.0D0 + pdhe3 = 0.0D0 pdivt = 0.0D0 pdivl = 0.0D0 pdivu = 0.0D0 pdivmax = 0.0D0 - dt_power_total = 0.0D0 - dt_power_plasma = 0.0D0 + pdt = 0.0D0 pouterzoneradmw = 0.0D0 pedgeradpv = 0.0D0 - charged_particle_power = 0.0D0 + pfuscmw = 0.0D0 phiint = 0.0D0 photon_wall = 0.0D0 piepv = 0.0D0 plasma_current = 0.0D0 - neutron_power_plasma = 0.0D0 - neutron_power_total = 0.0D0 - neutron_power_density_total = 0.0D0 - neutron_power_density_plasma = 0.0D0 + pneutmw = 0.0D0 + pneutpv = 0.0D0 pohmmw = 0.0D0 pohmpv = 0.0D0 powerht = 0.0D0 - fusion_power = 0.0D0 + powfmw = 0.0D0 pperim = 0.0D0 pradmw = 0.0D0 pradpv = 0.0D0 pradsolmw = 0.0D0 - proton_rate_density = 0.0D0 + protonrate = 0.0D0 psolradmw = 0.0D0 psyncpv = 0.0D0 ilhthresh = 19 @@ -1103,7 +1074,7 @@ subroutine init_physics_variables tratio = 1.0D0 triang = 0.36D0 triang95 = 0.24D0 - plasma_volume = 0.0D0 + vol = 0.0D0 vsbrn = 0.0D0 vshift = 0.0D0 vsind = 0.0D0 diff --git a/source/fortran/scan.f90 b/source/fortran/scan.f90 index 66829d01..4e82bd87 100644 --- a/source/fortran/scan.f90 +++ b/source/fortran/scan.f90 @@ -182,7 +182,7 @@ subroutine scan_1d_store_output(iscan, ifail, noutvars_, ipnscns_, outvar) use constraint_variables, only: taulimit use cost_variables, only: cdirt, coe, coeoam, coefuelt, c222, ireactor, & capcost, coecap, c221 - use current_drive_variables, only: pheat, pinjmw, bootstrap_current_fraction, beam_energy, bigq + use current_drive_variables, only: pheat, pinjmw, bootstrap_current_fraction, enbeam, bigq use divertor_variables, only: hldiv use error_handling, only: errors_on use heat_transport_variables, only: pgrossmw, pinjwp, pnetelmw @@ -195,8 +195,8 @@ subroutine scan_1d_store_output(iscan, ifail, noutvars_, ipnscns_, outvar) tfcpmw, fcutfsu, acond, fcoolcp, rcool, whttf, ppump, vcool, wwp1, n_tf, & dr_tf_wp, b_crit_upper_nbti use fwbs_variables, only: tpeak - use physics_variables, only: q, aspect, pradmw, dene, fusion_power, btot, tesep, & - pdivt, ralpne, ten, betap, hfac, teped, alpha_power_beams, qlim, rmajor, wallmw, & + use physics_variables, only: q, aspect, pradmw, dene, powfmw, btot, tesep, & + pdivt, ralpne, ten, betap, hfac, teped, palpnb, qlim, rmajor, wallmw, & beta, betalim, bt, plasma_current use global_variables, only: verbose, maxcal, runtitle, run_tests use constants, only: nout @@ -235,8 +235,8 @@ subroutine scan_1d_store_output(iscan, ifail, noutvars_, ipnscns_, outvar) outvar(21,iscan) = dene/1.0D20 outvar(22,iscan) = hfac(6) outvar(23,iscan) = hfac(7) - outvar(24,iscan) = fusion_power - outvar(25,iscan) = alpha_power_beams * 5.0D0 + outvar(24,iscan) = powfmw + outvar(25,iscan) = palpnb * 5.0D0 outvar(26,iscan) = wallmw outvar(27,iscan) = pinjmw outvar(28,iscan) = pinjwp @@ -244,7 +244,7 @@ subroutine scan_1d_store_output(iscan, ifail, noutvars_, ipnscns_, outvar) outvar(30,iscan) = pinjmw - pheat outvar(31,iscan) = bigq outvar(32,iscan) = bootstrap_current_fraction - outvar(33,iscan) = beam_energy/1.0D3 + outvar(33,iscan) = enbeam/1.0D3 outvar(34,iscan) = hldiv outvar(35,iscan) = tfcmw outvar(36,iscan) = whttf diff --git a/tests/integration/data/large_tokamak_1_MFILE.DAT b/tests/integration/data/large_tokamak_1_MFILE.DAT index 490056a5..c453d628 100644 --- a/tests/integration/data/large_tokamak_1_MFILE.DAT +++ b/tests/integration/data/large_tokamak_1_MFILE.DAT @@ -415,7 +415,7 @@ Greenwald_model_________________________________________________________ (dlimit(7))___________________ 7.4445E+19 OP Deuterium_fuel_fraction_________________________________________________ (fdeut)_______________________ 5.0000E-01 Tritium_fuel_fraction___________________________________________________ (ftrit)_______________________ 5.0000E-01 - Total_fusion_power_(MW)_________________________________________________ (fusion_power)______________________ 1.6202E+03 OP + Total_fusion_power_(MW)_________________________________________________ (powfmw)______________________ 1.6202E+03 OP _=____D-T_fusion_power_(MW)_____________________________________________ (pdt)_________________________ 1.6182E+03 OP __+___D-D_fusion_power_(MW)_____________________________________________ (pdd)_________________________ 1.9494E+00 OP __+_D-He3_fusion_power_(MW)_____________________________________________ (pdhe3)_______________________ 0.0000E+00 OP @@ -935,7 +935,7 @@ Blanket_line_density_(tonne/m2)_________________________________________ (x_blanket)___________________ 2.2911E+00 Unit_nuclear_heating_in_TF_coil_(W/GW)__________________________________ (tfc_nuc_heating)_____________ 1.4866E+04 Total_nuclear_heating_in_TF_coil_(MW)___________________________________ (ptfnuc.)_____________________ 2.4085E-02 - fusion_power__________________________________________________________________ (fusion_power.)_____________________ 1.6202E+03 + powfmw__________________________________________________________________ (powfmw.)_____________________ 1.6202E+03 total_mass_of_the_TF_coils_(kg)_________________________________________ (whttf)_______________________ 1.1424E+07 # Pumping for primary coolant (helium) # Pressure_drop_in_FW_and_blanket_coolant_incl._hx_and_pipes_(Pa)_________ (dp_he)_______________________ 5.5000E+05 @@ -1138,7 +1138,7 @@ Ohmic_heating_(MW)______________________________________________________ (pohmmw.)_____________________ 6.2284E-01 Injected_power_deposited_in_plasma_(MW)_________________________________ (pinjmw)______________________ 8.0143E+01 Total_(MW)______________________________________________________________ ______________________________ 3.8950E+02 - Fusion_power_(MW)_______________________________________________________ (fusion_power)______________________ 1.6202E+03 + Fusion_power_(MW)_______________________________________________________ (powfmw)______________________ 1.6202E+03 Power_from_energy_multiplication_in_blanket_and_shield_(MW)_____________ (emultmw)_____________________ 3.0836E+02 Injected_power_(MW)_____________________________________________________ (pinjmw.)_____________________ 8.0143E+01 Ohmic_power_(MW)________________________________________________________ (pohmmw.)_____________________ 6.2284E-01 @@ -1163,15 +1163,15 @@ Total_(MW)______________________________________________________________ (tot_plant_power)_____________ 8.7006E+02 Total_(MW)______________________________________________________________ ______________________________ 8.7006E+02 Gross_electrical_output*_(MW)___________________________________________ (pgrossmw)____________________ 8.7006E+02 - Fusion_power_(MW)_______________________________________________________ (fusion_power)______________________ 1.6202E+03 + Fusion_power_(MW)_______________________________________________________ (powfmw)______________________ 1.6202E+03 Power_from_energy_multiplication_in_blanket_and_shield_(MW)_____________ (emultmw)_____________________ 3.0836E+02 Total_(MW)______________________________________________________________ ______________________________ 1.9285E+03 Net_electrical_output_(MW) _____________________________________________ (pnetelmw)____________________ 4.0001E+02 Heat_rejected_by_main_power_conversion_circuit_(MW)_____________________ (rejected_main)_______________ 1.3051E+03 Heat_rejected_by_other_cooling_circuits_(MW)____________________________ (psechtmw)____________________ 2.2417E+02 Total_(MW)______________________________________________________________ ______________________________ 1.9293E+03 - Net_electric_power_/_total_nuclear_power_(%)____________________________ (pnetelmw/(fusion_power+emultmw)____ 2.0741E+01 - Net_electric_power_/_total_fusion_power_(%)_____________________________ (pnetelmw/fusion_power)_____________ 2.4689E+01 + Net_electric_power_/_total_nuclear_power_(%)____________________________ (pnetelmw/(powfmw+emultmw)____ 2.0741E+01 + Net_electric_power_/_total_fusion_power_(%)_____________________________ (pnetelmw/powfmw)_____________ 2.4689E+01 Gross_electric_power*_/_high_grade_heat_(%)_____________________________ (etath)_______________________ 4.0000E+01 Recirculating_power_fraction____________________________________________ (cirpowfr)____________________ 5.4025E-01 # Water usage during plant operation (secondary cooling) # diff --git a/tests/integration/data/large_tokamak_2_MFILE.DAT b/tests/integration/data/large_tokamak_2_MFILE.DAT index de5ea33c..ba1009d3 100644 --- a/tests/integration/data/large_tokamak_2_MFILE.DAT +++ b/tests/integration/data/large_tokamak_2_MFILE.DAT @@ -416,7 +416,7 @@ Greenwald_model_________________________________________________________ (dlimit(7))___________________ 7.4445E+19 OP Deuterium_fuel_fraction_________________________________________________ (fdeut)_______________________ 5.0000E-01 Tritium_fuel_fraction___________________________________________________ (ftrit)_______________________ 5.0000E-01 - Total_fusion_power_(MW)_________________________________________________ (fusion_power)______________________ 1.6202E+03 OP + Total_fusion_power_(MW)_________________________________________________ (powfmw)______________________ 1.6202E+03 OP _=____D-T_fusion_power_(MW)_____________________________________________ (pdt)_________________________ 1.6182E+03 OP __+___D-D_fusion_power_(MW)_____________________________________________ (pdd)_________________________ 1.9494E+00 OP __+_D-He3_fusion_power_(MW)_____________________________________________ (pdhe3)_______________________ 0.0000E+00 OP @@ -936,7 +936,7 @@ Blanket_line_density_(tonne/m2)_________________________________________ (x_blanket)___________________ 2.2911E+00 Unit_nuclear_heating_in_TF_coil_(W/GW)__________________________________ (tfc_nuc_heating)_____________ 1.4866E+04 Total_nuclear_heating_in_TF_coil_(MW)___________________________________ (ptfnuc.)_____________________ 2.4085E-02 - fusion_power__________________________________________________________________ (fusion_power.)_____________________ 1.6202E+03 + powfmw__________________________________________________________________ (powfmw.)_____________________ 1.6202E+03 total_mass_of_the_TF_coils_(kg)_________________________________________ (whttf)_______________________ 1.1424E+07 # Pumping for primary coolant (helium) # Pressure_drop_in_FW_and_blanket_coolant_incl._hx_and_pipes_(Pa)_________ (dp_he)_______________________ 5.5000E+05 @@ -1139,7 +1139,7 @@ Ohmic_heating_(MW)______________________________________________________ (pohmmw.)_____________________ 6.2284E-01 Injected_power_deposited_in_plasma_(MW)_________________________________ (pinjmw)______________________ 8.0143E+01 Total_(MW)______________________________________________________________ ______________________________ 3.8950E+02 - Fusion_power_(MW)_______________________________________________________ (fusion_power)______________________ 1.6202E+03 + Fusion_power_(MW)_______________________________________________________ (powfmw)______________________ 1.6202E+03 Power_from_energy_multiplication_in_blanket_and_shield_(MW)_____________ (emultmw)_____________________ 3.0836E+02 Injected_power_(MW)_____________________________________________________ (pinjmw.)_____________________ 8.0143E+01 Ohmic_power_(MW)________________________________________________________ (pohmmw.)_____________________ 6.2284E-01 @@ -1164,15 +1164,15 @@ Total_(MW)______________________________________________________________ (tot_plant_power)_____________ 8.7006E+02 Total_(MW)______________________________________________________________ ______________________________ 8.7006E+02 Gross_electrical_output*_(MW)___________________________________________ (pgrossmw)____________________ 8.7006E+02 - Fusion_power_(MW)_______________________________________________________ (fusion_power)______________________ 1.6202E+03 + Fusion_power_(MW)_______________________________________________________ (powfmw)______________________ 1.6202E+03 Power_from_energy_multiplication_in_blanket_and_shield_(MW)_____________ (emultmw)_____________________ 3.0836E+02 Total_(MW)______________________________________________________________ ______________________________ 1.9285E+03 Net_electrical_output_(MW) _____________________________________________ (pnetelmw)____________________ 4.0001E+02 Heat_rejected_by_main_power_conversion_circuit_(MW)_____________________ (rejected_main)_______________ 1.3051E+03 Heat_rejected_by_other_cooling_circuits_(MW)____________________________ (psechtmw)____________________ 2.2417E+02 Total_(MW)______________________________________________________________ ______________________________ 1.9293E+03 - Net_electric_power_/_total_nuclear_power_(%)____________________________ (pnetelmw/(fusion_power+emultmw)____ 2.0741E+01 - Net_electric_power_/_total_fusion_power_(%)_____________________________ (pnetelmw/fusion_power)_____________ 2.4689E+01 + Net_electric_power_/_total_nuclear_power_(%)____________________________ (pnetelmw/(powfmw+emultmw)____ 2.0741E+01 + Net_electric_power_/_total_fusion_power_(%)_____________________________ (pnetelmw/powfmw)_____________ 2.4689E+01 Gross_electric_power*_/_high_grade_heat_(%)_____________________________ (etath)_______________________ 4.0000E+01 Recirculating_power_fraction____________________________________________ (cirpowfr)____________________ 5.4025E-01 # Water usage during plant operation (secondary cooling) # diff --git a/tests/integration/data/large_tokamak_3_MFILE.DAT b/tests/integration/data/large_tokamak_3_MFILE.DAT index 7cbd8d7d..4e2a187e 100644 --- a/tests/integration/data/large_tokamak_3_MFILE.DAT +++ b/tests/integration/data/large_tokamak_3_MFILE.DAT @@ -416,7 +416,7 @@ Greenwald_model_________________________________________________________ (dlimit(7))___________________ 7.4445E+19 OP Deuterium_fuel_fraction_________________________________________________ (fdeut)_______________________ 5.0000E-01 Tritium_fuel_fraction___________________________________________________ (ftrit)_______________________ 5.0000E-01 - Total_fusion_power_(MW)_________________________________________________ (fusion_power)______________________ 1.6202E+03 OP + Total_fusion_power_(MW)_________________________________________________ (powfmw)______________________ 1.6202E+03 OP _=____D-T_fusion_power_(MW)_____________________________________________ (pdt)_________________________ 1.6182E+03 OP __+___D-D_fusion_power_(MW)_____________________________________________ (pdd)_________________________ 1.9494E+00 OP __+_D-He3_fusion_power_(MW)_____________________________________________ (pdhe3)_______________________ 0.0000E+00 OP @@ -936,7 +936,7 @@ Blanket_line_density_(tonne/m2)_________________________________________ (x_blanket)___________________ 2.2911E+00 Unit_nuclear_heating_in_TF_coil_(W/GW)__________________________________ (tfc_nuc_heating)_____________ 1.4866E+04 Total_nuclear_heating_in_TF_coil_(MW)___________________________________ (ptfnuc.)_____________________ 2.4085E-02 - fusion_power__________________________________________________________________ (fusion_power.)_____________________ 1.6202E+03 + powfmw__________________________________________________________________ (powfmw.)_____________________ 1.6202E+03 total_mass_of_the_TF_coils_(kg)_________________________________________ (whttf)_______________________ 1.1424E+07 # Pumping for primary coolant (helium) # Pressure_drop_in_FW_and_blanket_coolant_incl._hx_and_pipes_(Pa)_________ (dp_he)_______________________ 5.5000E+05 @@ -1139,7 +1139,7 @@ Ohmic_heating_(MW)______________________________________________________ (pohmmw.)_____________________ 6.2284E-01 Injected_power_deposited_in_plasma_(MW)_________________________________ (pinjmw)______________________ 8.0143E+01 Total_(MW)______________________________________________________________ ______________________________ 3.8950E+02 - Fusion_power_(MW)_______________________________________________________ (fusion_power)______________________ 1.6202E+03 + Fusion_power_(MW)_______________________________________________________ (powfmw)______________________ 1.6202E+03 Power_from_energy_multiplication_in_blanket_and_shield_(MW)_____________ (emultmw)_____________________ 3.0836E+02 Injected_power_(MW)_____________________________________________________ (pinjmw.)_____________________ 8.0143E+01 Ohmic_power_(MW)________________________________________________________ (pohmmw.)_____________________ 6.2284E-01 @@ -1164,15 +1164,15 @@ Total_(MW)______________________________________________________________ (tot_plant_power)_____________ 8.7006E+02 Total_(MW)______________________________________________________________ ______________________________ 8.7006E+02 Gross_electrical_output*_(MW)___________________________________________ (pgrossmw)____________________ 8.7006E+02 - Fusion_power_(MW)_______________________________________________________ (fusion_power)______________________ 1.6202E+03 + Fusion_power_(MW)_______________________________________________________ (powfmw)______________________ 1.6202E+03 Power_from_energy_multiplication_in_blanket_and_shield_(MW)_____________ (emultmw)_____________________ 3.0836E+02 Total_(MW)______________________________________________________________ ______________________________ 1.9285E+03 Net_electrical_output_(MW) _____________________________________________ (pnetelmw)____________________ 4.0001E+02 Heat_rejected_by_main_power_conversion_circuit_(MW)_____________________ (rejected_main)_______________ 1.3051E+03 Heat_rejected_by_other_cooling_circuits_(MW)____________________________ (psechtmw)____________________ 2.2417E+02 Total_(MW)______________________________________________________________ ______________________________ 1.9293E+03 - Net_electric_power_/_total_nuclear_power_(%)____________________________ (pnetelmw/(fusion_power+emultmw)____ 2.0741E+01 - Net_electric_power_/_total_fusion_power_(%)_____________________________ (pnetelmw/fusion_power)_____________ 2.4689E+01 + Net_electric_power_/_total_nuclear_power_(%)____________________________ (pnetelmw/(powfmw+emultmw)____ 2.0741E+01 + Net_electric_power_/_total_fusion_power_(%)_____________________________ (pnetelmw/powfmw)_____________ 2.4689E+01 Gross_electric_power*_/_high_grade_heat_(%)_____________________________ (etath)_______________________ 4.0000E+01 Recirculating_power_fraction____________________________________________ (cirpowfr)____________________ 5.4025E-01 # Water usage during plant operation (secondary cooling) # diff --git a/tests/integration/data/large_tokamak_4_MFILE.DAT b/tests/integration/data/large_tokamak_4_MFILE.DAT index 0696cb91..8b4faccc 100644 --- a/tests/integration/data/large_tokamak_4_MFILE.DAT +++ b/tests/integration/data/large_tokamak_4_MFILE.DAT @@ -416,7 +416,7 @@ Greenwald_model_________________________________________________________ (dlimit(7))___________________ 7.4445E+19 OP Deuterium_fuel_fraction_________________________________________________ (fdeut)_______________________ 5.0000E-01 Tritium_fuel_fraction___________________________________________________ (ftrit)_______________________ 5.0000E-01 - Total_fusion_power_(MW)_________________________________________________ (fusion_power)______________________ 1.6202E+03 OP + Total_fusion_power_(MW)_________________________________________________ (powfmw)______________________ 1.6202E+03 OP _=____D-T_fusion_power_(MW)_____________________________________________ (pdt)_________________________ 1.6182E+03 OP __+___D-D_fusion_power_(MW)_____________________________________________ (pdd)_________________________ 1.9494E+00 OP __+_D-He3_fusion_power_(MW)_____________________________________________ (pdhe3)_______________________ 0.0000E+00 OP @@ -936,7 +936,7 @@ Blanket_line_density_(tonne/m2)_________________________________________ (x_blanket)___________________ 2.2911E+00 Unit_nuclear_heating_in_TF_coil_(W/GW)__________________________________ (tfc_nuc_heating)_____________ 1.4866E+04 Total_nuclear_heating_in_TF_coil_(MW)___________________________________ (ptfnuc.)_____________________ 2.4085E-02 - fusion_power__________________________________________________________________ (fusion_power.)_____________________ 1.6202E+03 + powfmw__________________________________________________________________ (powfmw.)_____________________ 1.6202E+03 total_mass_of_the_TF_coils_(kg)_________________________________________ (whttf)_______________________ 1.1424E+07 # Pumping for primary coolant (helium) # Pressure_drop_in_FW_and_blanket_coolant_incl._hx_and_pipes_(Pa)_________ (dp_he)_______________________ 5.5000E+05 @@ -1139,7 +1139,7 @@ Ohmic_heating_(MW)______________________________________________________ (pohmmw.)_____________________ 6.2284E-01 Injected_power_deposited_in_plasma_(MW)_________________________________ (pinjmw)______________________ 8.0143E+01 Total_(MW)______________________________________________________________ ______________________________ 3.8950E+02 - Fusion_power_(MW)_______________________________________________________ (fusion_power)______________________ 1.6202E+03 + Fusion_power_(MW)_______________________________________________________ (powfmw)______________________ 1.6202E+03 Power_from_energy_multiplication_in_blanket_and_shield_(MW)_____________ (emultmw)_____________________ 3.0836E+02 Injected_power_(MW)_____________________________________________________ (pinjmw.)_____________________ 8.0143E+01 Ohmic_power_(MW)________________________________________________________ (pohmmw.)_____________________ 6.2284E-01 @@ -1164,15 +1164,15 @@ Total_(MW)______________________________________________________________ (tot_plant_power)_____________ 8.7006E+02 Total_(MW)______________________________________________________________ ______________________________ 8.7006E+02 Gross_electrical_output*_(MW)___________________________________________ (pgrossmw)____________________ 8.7006E+02 - Fusion_power_(MW)_______________________________________________________ (fusion_power)______________________ 1.6202E+03 + Fusion_power_(MW)_______________________________________________________ (powfmw)______________________ 1.6202E+03 Power_from_energy_multiplication_in_blanket_and_shield_(MW)_____________ (emultmw)_____________________ 3.0836E+02 Total_(MW)______________________________________________________________ ______________________________ 1.9285E+03 Net_electrical_output_(MW) _____________________________________________ (pnetelmw)____________________ 4.0001E+02 Heat_rejected_by_main_power_conversion_circuit_(MW)_____________________ (rejected_main)_______________ 1.3051E+03 Heat_rejected_by_other_cooling_circuits_(MW)____________________________ (psechtmw)____________________ 2.2417E+02 Total_(MW)______________________________________________________________ ______________________________ 1.9293E+03 - Net_electric_power_/_total_nuclear_power_(%)____________________________ (pnetelmw/(fusion_power+emultmw)____ 2.0741E+01 - Net_electric_power_/_total_fusion_power_(%)_____________________________ (pnetelmw/fusion_power)_____________ 2.4689E+01 + Net_electric_power_/_total_nuclear_power_(%)____________________________ (pnetelmw/(powfmw+emultmw)____ 2.0741E+01 + Net_electric_power_/_total_fusion_power_(%)_____________________________ (pnetelmw/powfmw)_____________ 2.4689E+01 Gross_electric_power*_/_high_grade_heat_(%)_____________________________ (etath)_______________________ 4.0000E+01 Recirculating_power_fraction____________________________________________ (cirpowfr)____________________ 5.4025E-01 # Water usage during plant operation (secondary cooling) # diff --git a/tests/integration/data/large_tokamak_MFILE.DAT b/tests/integration/data/large_tokamak_MFILE.DAT index 340bfe15..f991f86e 100644 --- a/tests/integration/data/large_tokamak_MFILE.DAT +++ b/tests/integration/data/large_tokamak_MFILE.DAT @@ -412,7 +412,7 @@ Greenwald_model_________________________________________________________ (dlimit(7))___________________ 7.3950E+19 OP Deuterium_fuel_fraction_________________________________________________ (fdeut)_______________________ 5.0000E-01 Tritium_fuel_fraction___________________________________________________ (ftrit)_______________________ 5.0000E-01 - Total_fusion_power_(MW)_________________________________________________ (fusion_power)______________________ 1.6176E+03 OP + Total_fusion_power_(MW)_________________________________________________ (powfmw)______________________ 1.6176E+03 OP _=____D-T_fusion_power_(MW)_____________________________________________ (pdt)_________________________ 1.6157E+03 OP __+___D-D_fusion_power_(MW)_____________________________________________ (pdd)_________________________ 1.9520E+00 OP __+_D-He3_fusion_power_(MW)_____________________________________________ (pdhe3)_______________________ 0.0000E+00 OP @@ -939,7 +939,7 @@ Blanket_line_density_(tonne/m2)_________________________________________ (x_blanket)___________________ 2.2911E+00 Unit_nuclear_heating_in_TF_coil_(W/GW)__________________________________ (tfc_nuc_heating)_____________ 1.5092E+04 Total_nuclear_heating_in_TF_coil_(MW)___________________________________ (ptfnuc.)_____________________ 2.4413E-02 - fusion_power__________________________________________________________________ (fusion_power.)_____________________ 1.6176E+03 + powfmw__________________________________________________________________ (powfmw.)_____________________ 1.6176E+03 total_mass_of_the_TF_coils_(kg)_________________________________________ (whttf)_______________________ 1.1598E+07 # Pumping for primary coolant (helium) # Pressure_drop_in_FW_and_blanket_coolant_incl._hx_and_pipes_(Pa)_________ (dp_he)_______________________ 5.5000E+05 @@ -1142,7 +1142,7 @@ Ohmic_heating_(MW)______________________________________________________ (pohmmw.)_____________________ 6.0733E-01 Injected_power_deposited_in_plasma_(MW)_________________________________ (pinjmw)______________________ 7.9710E+01 Total_(MW)______________________________________________________________ ______________________________ 3.8856E+02 - Fusion_power_(MW)_______________________________________________________ (fusion_power)______________________ 1.6176E+03 + Fusion_power_(MW)_______________________________________________________ (powfmw)______________________ 1.6176E+03 Power_from_energy_multiplication_in_blanket_and_shield_(MW)_____________ (emultmw)_____________________ 3.0787E+02 Injected_power_(MW)_____________________________________________________ (pinjmw.)_____________________ 7.9710E+01 Ohmic_power_(MW)________________________________________________________ (pohmmw.)_____________________ 6.0733E-01 @@ -1167,15 +1167,15 @@ Total_(MW)______________________________________________________________ (tot_plant_power)_____________ 8.6850E+02 Total_(MW)______________________________________________________________ ______________________________ 8.6850E+02 Gross_electrical_output*_(MW)___________________________________________ (pgrossmw)____________________ 8.6850E+02 - Fusion_power_(MW)_______________________________________________________ (fusion_power)______________________ 1.6176E+03 + Fusion_power_(MW)_______________________________________________________ (powfmw)______________________ 1.6176E+03 Power_from_energy_multiplication_in_blanket_and_shield_(MW)_____________ (emultmw)_____________________ 3.0787E+02 Total_(MW)______________________________________________________________ ______________________________ 1.9255E+03 Net_electrical_output_(MW) _____________________________________________ (pnetelmw)____________________ 4.0001E+02 Heat_rejected_by_main_power_conversion_circuit_(MW)_____________________ (rejected_main)_______________ 1.3028E+03 Heat_rejected_by_other_cooling_circuits_(MW)____________________________ (psechtmw)____________________ 2.2345E+02 Total_(MW)______________________________________________________________ ______________________________ 1.9262E+03 - Net_electric_power_/_total_nuclear_power_(%)____________________________ (pnetelmw/(fusion_power+emultmw)____ 2.0774E+01 - Net_electric_power_/_total_fusion_power_(%)_____________________________ (pnetelmw/fusion_power)_____________ 2.4728E+01 + Net_electric_power_/_total_nuclear_power_(%)____________________________ (pnetelmw/(powfmw+emultmw)____ 2.0774E+01 + Net_electric_power_/_total_fusion_power_(%)_____________________________ (pnetelmw/powfmw)_____________ 2.4728E+01 Gross_electric_power*_/_high_grade_heat_(%)_____________________________ (etath)_______________________ 4.0000E+01 Recirculating_power_fraction____________________________________________ (cirpowfr)____________________ 5.3943E-01 # Water usage during plant operation (secondary cooling) # diff --git a/tests/integration/ref_dicts.json b/tests/integration/ref_dicts.json index 948132a6..ffa54347 100644 --- a/tests/integration/ref_dicts.json +++ b/tests/integration/ref_dicts.json @@ -243,8 +243,7 @@ "alphaj": 1.0, "alphan": 0.25, "alphap": 0.0, - "alpha_rate_density_total": 0.0, - "alpha_rate_density_plasma": 0.0, + "alpharate": 0.0, "alphat": 0.5, "alstroh": 400000000.0, "amortization": 13.6, @@ -299,7 +298,7 @@ "betai": 1.0, "betalim": 0.0, "betalim_lower": 0.0, - "beta_beam": 0.0, + "betanb": 0.0, "betao": 1.0, "betap": 0.0, "betbm0": 1.5, @@ -1454,7 +1453,7 @@ "clh2": 15.0, "clhsf": 4.268, "cm": null, - "beam_current": 0.0, + "cnbeam": 0.0, "cnorm": null, "coe": 0.0, "coecap": 0.0, @@ -1662,7 +1661,7 @@ "dlscal": 0.0, "dnalp": 0.0, "dnbeam": 0.0, - "beam_density_out": 0.0, + "dnbeam2": 0.0, "dnbeta": 3.5, "dndrho_max": null, "dnelimt": 0.0, @@ -1720,10 +1719,11 @@ "dtstor": 300.0, "dwell_pump": 0.0, "dztop": 0.0, - "e_": 1.602176634e-19, + "e_": 1.601917e-19, "e_Li": 30.0, "e_Li_PPCS": 30.0, - "electron_charge": 1.602176634e-19, + "ealphadt": 3520.0, + "echarge": 1.60217733e-19, "echpwr": 0.0, "echwpow": 0.0, "edrive": 5000000.0, @@ -1743,11 +1743,11 @@ "elecstore_l": 100.0, "elecstore_w": 60.0, "elevol": 0.0, - "electron_mass": 9.1093837139e-31, + "emass": 9.1093837e-31, "emult": 1.269, "emult_all": 1.17, "emultmw": 0.0, - "beam_energy": 1000.0, + "enbeam": 1000.0, "end_of_file": -1.0, "end_of_record": -2.0, "energypervol": 0.0, @@ -1854,9 +1854,9 @@ "fachtmw": 0.0, "inductive_current_fraction": 0.0, "factor": 0.1, - "f_alpha_electron": 0.0, - "f_alpha_plasma": 0.95, - "f_alpha_ion": 0.0, + "falpe": 0.0, + "falpha": 0.95, + "falpi": 0.0, "fauxbop": 0.06, "fauxmn": 1.0, "favail": 1.0, @@ -1902,7 +1902,7 @@ "fcutfsu": 0.69, "fcwr": 1.0, "fdene": 1.0, - "f_deuterium": 0.5, + "fdeut": 0.5, "fdfs": 10.0, "fdiags": [ "FLT_DEFAULT", @@ -1933,7 +1933,7 @@ "fgwped": 0.85, "fgwsep": 0.5, "fhcd": 0.0, - "f_helium3": 0.0, + "fhe3": 0.0, "fhldiv": 1.0, "fhole": 0.0, "fhout": 0.0, @@ -2044,10 +2044,9 @@ "ftol": 0.0001, "ftoroidalgap": 1.0, "ftpeak": 1.0, - "f_tritium": 0.5, - "f_tritium_beam": 1e-06, - "fusion_rate_density_total": 0.0, - "fusion_rate_density_plasma": 0.0, + "ftrit": 0.5, + "ftritbm": 1e-06, + "fusionrate": 0.0, "fvdump": 1.0, "fvoldw": 1.74, "fvolsi": 1.0, @@ -3286,7 +3285,7 @@ "mc_": "me_*c_", "mcdriv": 1.0, "mcon": null, - "me_": 9.1093837139e-31, + "me_": 9.109558e-31, "mean_electric_output": 0.0, "meq": null, "mfblkt": 0.0, @@ -3311,11 +3310,11 @@ "mode": null, "moneyint": 0.0, "mp1": null, - "mp_": 1.67262192595e-27, + "mp_": 1.672614e-27, "mpn": null, "mpnpp1": null, "mpnppn": null, - "proton_mass": 1.67262192595e-27, + "mproton": 1.6726231e-27, "muh2o": 0.000471, "mvalim": 40.0, "n": null, @@ -3467,23 +3466,21 @@ "p_": "real_8_", "p_he": 8000000.0, "pacpmw": 0.0, - "alpha_power_electron_density": 0.0, + "palpepv": 0.0, "palpfwmw": 0.0, - "alpha_power_ions_density": 0.0, - "alpha_power_total": 0.0, - "alpha_power_beams": 0.0, - "alpha_power_density_total": 0.0, - "f_dd_branching_trit": 0.0, - "alpha_power_density_plasma": 0.0, + "palpipv": 0.0, + "palpmw": 0.0, + "palpnb": 0.0, + "palppv": 0.0, "pbase": 0.0005, "pbrempv": 0.0, - "non_alpha_charged_power": 0.0, - "charged_power_density": 0.0, + "pchargemw": 0.0, + "pchargepv": 0.0, "pcoef": 0.0, "pcoreradpv": 0.0, "pcoresystems": 0.0, - "dd_power": 0.0, - "dhe3_power": 0.0, + "pdd": 0.0, + "pdhe3": 0.0, "pdivfraction": 0.0, "pdivl": 0.0, "pdivmax": 0.0, @@ -3491,8 +3488,7 @@ "pdivtlim": 150.0, "pdivu": 0.0, "pdrive": 23000000.0, - "dt_power_total": 0.0, - "dt_power_plasma": 0.0, + "pdt": 0.0, "peakfactrad": 3.33, "peaking_factor": 1.0, "peakmva": 0.0, @@ -3506,7 +3502,7 @@ "pfclres": 2.5e-08, "pfmmax": 0.0, "pfrmax": 0.0, - "charged_particle_power": 0.0, + "pfuscmw": 0.0, "pfusife": 1000.0, "pfwdiv": 0.0, "pfwpmw": 0.0, @@ -3551,9 +3547,8 @@ "pnbitot": 0.0, "pnetelin": 1000.0, "pnetelmw": 0.0, - "neutron_power_total": 0.0, - "neutron_power_density_total": 0.0, - "neutron_power_density_plasma": 0.0, + "pneutmw": 0.0, + "pneutpv": 0.0, "pnuc_bkt_ratio": 0.0, "pnuc_cp": 0.0, "pnuc_cp_sh": 0.0, @@ -3593,7 +3588,7 @@ "pouterzoneradmw": 0.0, "powerht": 0.0, "powfmax": 1500.0, - "fusion_power": 0.0, + "powfmw": 0.0, "powohres": 0.0, "powpfres": 0.0, "ppdivr": 0.0, @@ -3619,7 +3614,7 @@ "prn1": 0.285, "profcalc": null, "protium": 0.0, - "proton_rate_density": 0.0, + "protonrate": 0.0, "pscalingmw": 0.0, "pscf_scene": 0.0, "psecdiv": 0.0, @@ -7928,7 +7923,7 @@ "vlabel_2": "", "vlam": 0.0, "vmu": null, - "plasma_volume": 0.0, + "vol": 0.0, "vol_bz": 0.0, "vol_bz_ib": 0.0, "vol_bz_ob": 0.0, @@ -8810,8 +8805,7 @@ "alphaj": "current profile index (calculated from q_0, q if `iprofile=1`)", "alphan": "density profile index", "alphap": "pressure profile index", - "alpha_rate_density_total": "Alpha particle production rate per unit volume, from plasma and beams (particles/m3/sec)", - "alpha_rate_density_plasma": "Alpha particle production rate per unit volume, just from plasma [particles/m3/sec] (particles/m3/sec)", + "alpharate": "alpha particle production rate (particles/m3/sec)", "alphat": "temperature profile index", "alstroh": "allowable hoop stress in Central Solenoid structural material (Pa)", "amortization": "amortization factor (fixed charge factor) \"A\" (years)", @@ -8866,7 +8860,7 @@ "betai": "poloidal plane angle between divertor plate and leg, inboard (rad)", "betalim": "allowable beta", "betalim_lower": "allowable lower beta", - "beta_beam": "neutral beam beta component", + "betanb": "neutral beam beta component", "betao": "poloidal plane angle between divertor plate and leg, outboard (rad)", "betap": "poloidal beta", "betbm0": "leading coefficient for NB beta fraction", @@ -9114,7 +9108,7 @@ "clh2": "clearance beneath TF coil to foundation (including basement) (m)", "clhsf": "cryostat lid height scaling factor (tokamaks)", "cm": "", - "beam_current": "neutral beam current (A)", + "cnbeam": "neutral beam current (A)", "cnorm": "", "coe": "cost of electricity ($/MW-hr)", "coecap": "capital cost of electricity (m$/kW-hr)", @@ -9303,7 +9297,7 @@ "dlscal": "vacuum system duct length scaling", "dnalp": "thermal alpha density (/m3)", "dnbeam": "hot beam ion density, variable (/m3)", - "beam_density_out": "hot beam ion density from calculation (/m3)", + "dnbeam2": "hot beam ion density from calculation (/m3)", "dnbeta": "Troyon-like coefficient for beta scaling calculated\n as 4*rli if `iprofile=1` (see also gtscale option)", "dndrho_max": "Maximum density gradient wrt to normalized r (rho) (/m3)", "dnelimt": "density limit (/m3)", @@ -9359,7 +9353,8 @@ "e_": "", "e_Li": "Lithium 6 enrichment [%]", "e_Li_PPCS": "", - "electron_charge": "electron charge [C]", + "ealphadt": "alpha birth energy in D-T reaction (keV)", + "echarge": "electron charge [C]", "echpwr": "ECH power (MW)", "echwpow": "ECH wall plug power (MW)", "edrive": "IFE driver energy (J) (`iteration variable 81`)", @@ -9379,11 +9374,11 @@ "elecstore_l": "Energy Storage facilities length, width, height (m)", "elecstore_w": "Energy Storage facilities length, width, height (m)", "elevol": "volume of electrical equipment building (m3)", - "electron_mass": "electron mass [kg]", + "emass": "electron mass [kg]", "emult": "energy multiplication in blanket and shield", "emult_all": "", "emultmw": "power due to energy multiplication in blanket and shield [MW]", - "beam_energy": "neutral beam energy (keV) (`iteration variable 19`)", + "enbeam": "neutral beam energy (keV) (`iteration variable 19`)", "end_of_file": "", "end_of_record": "", "energypervol": "input waste (heat) energy cooled per evaporated volume (J/m3)", @@ -9467,9 +9462,9 @@ "fachtmw": "facility heat removal (MW)", "inductive_current_fraction": "fraction of plasma current produced inductively", "factor": "factor /0.1/ : used in HYBRD for first step size", - "f_alpha_electron": "fraction of alpha energy to electrons", - "f_alpha_plasma": "fraction of alpha power deposited in plasma (Physics of Energetic Ions, p.2489)", - "f_alpha_ion": "fraction of alpha power to ions", + "falpe": "fraction of alpha energy to electrons", + "falpha": "fraction of alpha power deposited in plasma (Physics of Energetic Ions, p.2489)", + "falpi": "fraction of alpha power to ions", "fauxbop": "fraction of gross electric power to balance-of-plant (IFE)", "fauxmn": "f-value for minimum auxiliary power (`constraint equation 40`, `iteration variable 64`)", "favail": "F-value for minimum availability (`constraint equation 61`)", @@ -9515,7 +9510,7 @@ "fcutfsu": "copper fraction of cable conductor (TF coils)\n (iteration variable 59)", "fcwr": "f-value for conducting wall radius / rminor limit\n (`constraint equation 23`, `iteration variable 104`)", "fdene": "f-value for density limit (`constraint equation 5`, `iteration variable 9`)\n (invalid if `ipedestal=3`)", - "f_deuterium": "deuterium fuel fraction", + "fdeut": "deuterium fuel fraction", "fdfs": "radial gradient ratio", "fdiags": "", "fdiv": "Solid angle fraction taken by one divertor", @@ -9537,7 +9532,7 @@ "fgwped": "fraction of Greenwald density to set as pedestal-top density. If `<0`, pedestal-top\n density set manually using neped (`ipedestal>=1`). Needs to be `>0` if `ipedestal = 3`.\n (`iteration variable 145`)", "fgwsep": "fraction of Greenwald density to set as separatrix density. If `<0`, separatrix\n density set manually using nesep (`ipedestal>=1`). Needs to be `>0` if `ipedestal = 3`.\n (`iteration variable 152`)", "fhcd": "area fraction covered by heating/current drive apparatus plus diagnostics", - "f_helium3": "helium-3 fuel fraction", + "fhe3": "helium-3 fuel fraction", "fhldiv": "f-value for divertor heat load (`constraint equation 18`, `iteration variable 27`)", "fhole": "area fraction taken up by other holes (IFE)", "fhout": "fraction of power to outboard divertor (for single null)", @@ -9633,10 +9628,9 @@ "ftol": "ftol /1.0e-4/ : error tolerance for HYBRD", "ftoroidalgap": "F-value for minimum tftort (`constraint equation 82`)", "ftpeak": "f-value for first wall peak temperature (`constraint equation 39`, `iteration variable 63`)", - "f_tritium": "tritium fuel fraction", - "f_tritium_beam": "fraction of beam that is tritium", - "fusion_rate_density_total": "fusion reaction rate, from plasma and beams (reactions/m3/sec)", - "fusion_rate_density_plasma": "fusion reaction rate, just from plasma (reactions/m3/sec)", + "ftrit": "tritium fuel fraction", + "ftritbm": "fraction of beam that is tritium", + "fusionrate": "fusion reaction rate (reactions/m3/sec)", "fvdump": "f-value for dump voltage (`constraint equation 34`, `iteration variable 51`)", "fvoldw": "area coverage factor for vacuum vessel volume", "fvolsi": "area coverage factor for inboard shield volume", @@ -9949,7 +9943,7 @@ "ksic": "power fraction for outboard double-null scrape-off plasma", "lablcc": "lablcc(ipeqns) : labels describing constraint equations (corresponding itvs)
      \n
      \n
    • ( 1) Beta (consistency equation) (itv 5)\n
    • ( 2) Global power balance (consistency equation) (itv 10,1,2,3,4,6,11)\n
    • ( 3) Ion power balance DEPRECATED (itv 10,1,2,3,4,6,11)\n
    • ( 4) Electron power balance DEPRECATED (itv 10,1,2,3,4,6,11)\n
    • ( 5) Density upper limit (itv 9,1,2,3,4,5,6)\n
    • ( 6) (Epsilon x beta poloidal) upper limit (itv 8,1,2,3,4,6)\n
    • ( 7) Beam ion density (NBI) (consistency equation) (itv 7)\n
    • ( 8) Neutron wall load upper limit (itv 14,1,2,3,4,6)\n
    • ( 9) Fusion power upper limit (itv 26,1,2,3,4,6)\n
    • (10) Toroidal field 1/R (consistency equation) (itv 12,1,2,3,13 )\n
    • (11) Radial build (consistency equation) (itv 3,1,13,16,29,42,61)\n
    • (12) Volt second lower limit (STEADY STATE) (itv 15,1,2,3)\n
    • (13) Burn time lower limit (PULSE) (itv 21,1,16,17,29,42,44,61)\n (itv 19,1,2,3,6)\n
    • (14) Neutral beam decay lengths to plasma centre (NBI) (consistency equation)\n
    • (15) LH power threshold limit (itv 103)\n
    • (16) Net electric power lower limit (itv 25,1,2,3)\n
    • (17) Radiation fraction upper limit (itv 28)\n
    • (18) Divertor heat load upper limit (itv 27)\n
    • (19) MVA upper limit (itv 30)\n
    • (20) Neutral beam tangency radius upper limit (NBI) (itv 33,31,3,13)\n
    • (21) Plasma minor radius lower limit (itv 32)\n
    • (22) Divertor collisionality upper limit (itv 34,43)\n
    • (23) Conducting shell to plasma minor radius ratio upper limit\n (itv 104,1,74)\n
    • (24) Beta upper limit (itv 36,1,2,3,4,6,18)\n
    • (25) Peak toroidal field upper limit (itv 35,3,13,29)\n
    • (26) Central solenoid EOF current density upper limit (ipfres=0)\n (itv 38,37,41,12)\n
    • (27) Central solenoid BOP current density upper limit (ipfres=0)\n (itv 39,37,41,12)\n
    • (28) Fusion gain Q lower limit (itv 45,47,40)\n
    • (29) Inboard radial build consistency (itv 3,1,13,16,29,42,61)\n
    • (30) Injection power upper limit (itv 46,47,11)\n
    • (31) TF coil case stress upper limit (SCTF) (itv 48,56,57,58,59,60,24)\n
    • (32) TF coil conduit stress upper limit (SCTF) (itv 49,56,57,58,59,60,24)\n
    • (33) I_op / I_critical (TF coil) (SCTF) (itv 50,56,57,58,59,60,24)\n
    • (34) Dump voltage upper limit (SCTF) (itv 51,52,56,57,58,59,60,24)\n
    • (35) J_winding pack/J_protection upper limit (SCTF) (itv 53,56,57,58,59,60,24)\n
    • (36) TF coil temperature margin lower limit (SCTF) (itv 54,55,56,57,58,59,60,24)\n
    • (37) Current drive gamma upper limit (itv 40,47)\n
    • (38) First wall coolant temperature rise upper limit (itv 62)\n
    • (39) First wall peak temperature upper limit (itv 63)\n
    • (40) Start-up injection power lower limit (PULSE) (itv 64)\n
    • (41) Plasma current ramp-up time lower limit (PULSE) (itv 66,65)\n
    • (42) Cycle time lower limit (PULSE) (itv 17,67,65)\n
    • (43) Average centrepost temperature\n (TART) (consistency equation) (itv 13,20,69,70)\n
    • (44) Peak centrepost temperature upper limit (TART) (itv 68,69,70)\n
    • (45) Edge safety factor lower limit (TART) (itv 71,1,2,3)\n
    • (46) Equation for Ip/Irod upper limit (TART) (itv 72,2,60)\n
    • (47) NOT USED\n
    • (48) Poloidal beta upper limit (itv 79,2,3,18)\n
    • (49) NOT USED\n
    • (50) IFE repetition rate upper limit (IFE)\n
    • (51) Startup volt-seconds consistency (PULSE) (itv 16,29,3,1)\n
    • (52) Tritium breeding ratio lower limit (itv 89,90,91)\n
    • (53) Neutron fluence on TF coil upper limit (itv 92,93,94)\n
    • (54) Peak TF coil nuclear heating upper limit (itv 95,93,94)\n
    • (55) Vacuum vessel helium concentration upper limit iblanket =2 (itv 96,93,94)\n
    • (56) Pseparatrix/Rmajor upper limit (itv 97,1,3)\n
    • (57) NOT USED\n
    • (58) NOT USED\n
    • (59) Neutral beam shine-through fraction upper limit (NBI) (itv 105,6,19,4 )\n
    • (60) Central solenoid temperature margin lower limit (SCTF) (itv 106)\n
    • (61) Minimum availability value (itv 107)\n
    • (62) taup/taueff the ratio of particle to energy confinement times (itv 110)\n
    • (63) The number of ITER-like vacuum pumps niterpump < tfno (itv 111)\n
    • (64) Zeff less than or equal to zeffmax (itv 112)\n
    • (65) Dump time set by VV loads (itv 56, 113)\n
    • (66) Limit on rate of change of energy in poloidal field\n (Use iteration variable 65(tohs), 115)\n
    • (67) Simple Radiation Wall load limit (itv 116, 4,6)\n
    • (68) Psep * Bt / qAR upper limit (itv 117)\n
    • (69) ensure separatrix power = the value from Kallenbach divertor (itv 118)\n
    • (70) ensure that teomp = separatrix temperature in the pedestal profile,\n (itv 119 (tesep))\n
    • (71) ensure that neomp = separatrix density (nesep) x neratio\n
    • (72) central solenoid shear stress limit (Tresca yield criterion) (itv 123 foh_stress)\n
    • (73) Psep >= Plh + Paux (itv 137 (fplhsep))\n
    • (74) TFC quench < tmax_croco (itv 141 (fcqt))\n
    • (75) TFC current/copper area < Maximum (itv 143 f_coppera_m2)\n
    • (76) Eich critical separatrix density\n
    • (77) TF coil current per turn upper limit\n
    • (78) Reinke criterion impurity fraction lower limit (itv 147 freinke)\n
    • (79) Peak CS field upper limit (itv 149 fbmaxcs)\n
    • (80) Divertor power lower limit pdivt (itv 153 fpdivlim)\n
    • (81) Ne(0) > ne(ped) constraint (itv 154 fne0)\n
    • (82) toroidalgap > tftort constraint (itv 171 ftoroidalgap)\n
    • (83) Radial build consistency for stellarators (itv 172 f_avspace)\n
    • (84) Lower limit for beta (itv 173 fbetatry_lower)\n
    • (85) Constraint for CP lifetime\n
    • (86) Constraint for TF coil turn dimension\n
    • (87) Constraint for cryogenic power\n
    • (88) Constraint for TF coil strain absolute value\n
    • (89) Constraint for CS coil quench protection\n
    • (90) Checking if the design point is ECRH ignitable (itv 164 fecrh_ignition)
    \n\n\n\n", "lablmm": "lablmm(ipnfoms) : labels describing figures of merit:
      \n
      \n
    • ( 1) major radius\n
    • ( 2) not used\n
    • ( 3) neutron wall load\n
    • ( 4) P_tf + P_pf\n
    • ( 5) fusion gain Q\n
    • ( 6) cost of electricity\n
    • ( 7) capital cost (direct cost if ireactor=0,\n constructed cost otherwise)\n
    • ( 8) aspect ratio\n
    • ( 9) divertor heat load\n
    • (10) toroidal field\n
    • (11) total injected power\n
    • (12) hydrogen plant capital cost OBSOLETE\n
    • (13) hydrogen production rate OBSOLETE\n
    • (14) pulse length\n
    • (15) plant availability factor (N.B. requires\n iavail=1 to be set)\n
    • (16) linear combination of major radius (minimised) and pulse length (maximised)\n note: FoM should be minimised only!\n
    • (17) net electrical output\n
    • (18) Null Figure of Merit\n
    • (19) linear combination of big Q and pulse length (maximised)\n note: FoM should be minimised only!
    \n\n\n", - "lablxc": "lablxc(ipnvars) : labels describing iteration variables
      \n
      \n
    • ( 1) aspect\n
    • ( 2) bt\n
    • ( 3) rmajor\n
    • ( 4) te\n
    • ( 5) beta\n
    • ( 6) dene\n
    • ( 7) rnbeam\n
    • ( 8) fbeta (f-value for equation 6)\n
    • ( 9) fdene (f-value for equation 5)\n
    • (10) hfact\n
    • (11) pheat\n
    • (12) oacdcp\n
    • (13) tfcth (NOT RECOMMENDED)\n
    • (14) fwalld (f-value for equation 8)\n
    • (15) fvs (f-value for equation 12)\n
    • (16) ohcth\n
    • (17) tdwell\n
    • (18) q\n
    • (19) beam_energy\n
    • (20) tcpav\n
    • (21) ftburn (f-value for equation 13)\n
    • (22) NOT USED\n
    • (23) fcoolcp\n
    • (24) NOT USED\n
    • (25) fpnetel (f-value for equation 16)\n
    • (26) ffuspow (f-value for equation 9)\n
    • (27) fhldiv (f-value for equation 18)\n
    • (28) fradpwr (f-value for equation 17), total radiation fraction\n
    • (29) bore\n
    • (30) fmva (f-value for equation 19)\n
    • (31) gapomin\n
    • (32) frminor (f-value for equation 21)\n
    • (33) fportsz (f-value for equation 20)\n
    • (34) fdivcol (f-value for equation 22)\n
    • (35) fpeakb (f-value for equation 25)\n
    • (36) fbetatry (f-value for equation 24)\n
    • (37) coheof\n
    • (38) fjohc (f-value for equation 26)\n
    • (39) fjohc0 (f-value for equation 27)\n
    • (40) fgamcd (f-value for equation 37)\n
    • (41) fcohbop\n
    • (42) gapoh\n
    • (43) NOT USED\n
    • (44) fvsbrnni\n
    • (45) fqval (f-value for equation 28)\n
    • (46) fpinj (f-value for equation 30)\n
    • (47) feffcd\n
    • (48) fstrcase (f-value for equation 31)\n
    • (49) fstrcond (f-value for equation 32)\n
    • (50) fiooic (f-value for equation 33)\n
    • (51) fvdump (f-value for equation 34)\n
    • (52) vdalw\n
    • (53) fjprot (f-value for equation 35)\n
    • (54) ftmargtf (f-value for equation 36)\n
    • (55) NOT USED\n
    • (56) tdmptf\n
    • (57) thkcas\n
    • (58) thwcndut\n
    • (59) fcutfsu\n
    • (60) cpttf\n
    • (61) gapds\n
    • (62) fdtmp (f-value for equation 38)\n
    • (63) ftpeak (f-value for equation 39)\n
    • (64) fauxmn (f-value for equation 40)\n
    • (65) tohs\n
    • (66) ftohs (f-value for equation 41)\n
    • (67) ftcycl (f-value for equation 42)\n
    • (68) fptemp (f-value for equation 44)\n
    • (69) rcool\n
    • (70) vcool\n
    • (71) fq (f-value for equation 45)\n
    • (72) fipir (f-value for equation 46)\n
    • (73) scrapli\n
    • (74) scraplo\n
    • (75) tfootfi\n
    • (76) NOT USED\n
    • (77) NOT USED\n
    • (78) NOT USED\n
    • (79) fbetap (f-value for equation 48)\n
    • (80) NOT USED\n
    • (81) edrive\n
    • (82) drveff\n
    • (83) tgain\n
    • (84) chrad\n
    • (85) pdrive\n
    • (86) frrmax (f-value for equation 50)\n
    • (87) NOT USED\n
    • (88) NOT USED\n
    • (89) ftbr (f-value for equation 52)\n
    • (90) blbuith\n
    • (91) blbuoth\n
    • (92) fflutf (f-value for equation 53)\n
    • (93) shldith\n
    • (94) shldoth\n
    • (95) fptfnuc (f-value for equation 54)\n
    • (96) fvvhe (f-value for equation 55)\n
    • (97) fpsepr (f-value for equation 56)\n
    • (98) li6enrich\n
    • (99) NOT USED\n
    • (100) NOT USED\n
    • (101) NOT USED\n
    • (102) fimpvar\n
    • (103) flhthresh (f-value for equation 15)\n
    • (104) fcwr (f-value for equation 23)\n
    • (105) fnbshinef (f-value for equation 59)\n
    • (106) ftmargoh (f-value for equation 60)\n
    • (107) favail (f-value for equation 61)\n
    • (108) breeder_f: Volume of Li4SiO4 / (Volume of Be12Ti + Li4SiO4)\n
    • (109) ralpne: thermal alpha density / electron density\n
    • (110) ftaulimit: Lower limit on taup/taueff the ratio of alpha\n
    • (111) fniterpump: f-value for constraint that number\n
    • (112) fzeffmax: f-value for max Zeff (f-value for equation 64)\n
    • (113) ftaucq: f-value for minimum quench time (f-value for equation 65)\n
    • (114) fw_channel_length: Length of a single first wall channel\n
    • (115) fpoloidalpower: f-value for max rate of change of\n
    • (116) fradwall: f-value for radiation wall load limit (eq. 67)\n
    • (117) fpsepbqar: f-value for Psep*Bt/qar upper limit (eq. 68)\n
    • (118) fpsep: f-value to ensure separatrix power is less than\n
    • (119) tesep: separatrix temperature calculated by the Kallenbach divertor model\n
    • (120) ttarget: Plasma temperature adjacent to divertor sheath [eV]\n
    • (121) neratio: ratio of mean SOL density at OMP to separatrix density at OMP\n
    • (122) oh_steel_frac : streel fraction of Central Solenoid\n
    • (123) foh_stress : f-value for CS coil Tresca yield criterion (f-value for eq. 72)\n
    • (124) qtargettotal : Power density on target including surface recombination [W/m2]\n
    • (125) fimp(3) : Beryllium density fraction relative to electron density\n
    • (126) fimp(4) : Carbon density fraction relative to electron density\n
    • (127) fimp(5) : Nitrogen fraction relative to electron density\n
    • (128) fimp(6) : Oxygen density fraction relative to electron density\n
    • (129) fimp(7) : Neon density fraction relative to electron density\n
    • (130) fimp(8) : Silicon density fraction relative to electron density\n
    • (131) fimp(9) : Argon density fraction relative to electron density\n
    • (132) fimp(10) : Iron density fraction relative to electron density\n
    • (133) fimp(11) : Nickel density fraction relative to electron density\n
    • (134) fimp(12) : Krypton density fraction relative to electron density\n
    • (135) fimp(13) : Xenon density fraction relative to electron density\n
    • (136) fimp(14) : Tungsten density fraction relative to electron density\n
    • (137) fplhsep (f-value for equation 73)\n
    • (138) rebco_thickness : thickness of REBCO layer in tape (m)\n
    • (139) copper_thick : thickness of copper layer in tape (m)\n
    • (140) dr_tf_wp : radial thickness of TFC winding pack (m)\n
    • (141) fcqt : TF coil quench temperature < tmax_croco (f-value for equation 74)\n
    • (142) nesep : electron density at separatrix [m-3]\n
    • (143) f_copperA_m2 : TF coil current / copper area < Maximum value\n
    • (144) fnesep : Eich critical electron density at separatrix\n
    • (145) fgwped : fraction of Greenwald density to set as pedestal-top density\n
    • (146) fcpttf : F-value for TF coil current per turn limit (constraint equation 77)\n
    • (147) freinke : F-value for Reinke detachment criterion (constraint equation 78)\n
    • (148) fzactual : fraction of impurity at SOL with Reinke detachment criterion\n
    • (149) fbmaxcs : F-value for max peak CS field (con. 79, itvar 149)\n
    • (152) fbmaxcs : Ratio of separatrix density to Greenwald density\n
    • (153) fpdivlim : F-value for minimum pdivt (con. 80)\n
    • (154) fne0 : F-value for ne(0) > ne(ped) (con. 81)\n
    • (155) pfusife : IFE input fusion power (MW) (ifedrv=3 only)\n
    • (156) rrin : Input IFE repetition rate (Hz) (ifedrv=3 only)\n
    • (157) fvssu : F-value for available to required start up flux (con. 51)\n
    • (158) croco_thick : Thickness of CroCo copper tube (m)\n
    • (159) ftoroidalgap : F-value for toroidalgap > tftort constraint (con. 82)\n
    • (160) f_avspace (f-value for equation 83)\n
    • (161) fbetatry_lower (f-value for equation 84)\n
    • (162) r_cp_top : Top outer radius of the centropost (ST only) (m)\n
    • (163) f_t_turn_tf : f-value for TF coils WP trurn squared dimension constraint\n
    • (164) f_crypmw : f-value for cryogenic plant power\n
    • (165) fstr_wp : f-value for TF coil strain absolute value\n
    • (166) f_copperaoh_m2 : CS coil current /copper area < Maximum value\n
    • (167) fecrh_ignition: f-value for equation 90\n
    • (168) EMPTY : Description\n
    • (169) EMPTY : Description\n
    • (170) EMPTY : Description\n
    • (171) EMPTY : Description\n
    • (172) EMPTY : Description\n
    • (173) EMPTY : Description\n
    • (174) EMPTY : Description\n
    • (175) EMPTY : Description\n\n\n\n", + "lablxc": "lablxc(ipnvars) : labels describing iteration variables
        \n
        \n
      • ( 1) aspect\n
      • ( 2) bt\n
      • ( 3) rmajor\n
      • ( 4) te\n
      • ( 5) beta\n
      • ( 6) dene\n
      • ( 7) rnbeam\n
      • ( 8) fbeta (f-value for equation 6)\n
      • ( 9) fdene (f-value for equation 5)\n
      • (10) hfact\n
      • (11) pheat\n
      • (12) oacdcp\n
      • (13) tfcth (NOT RECOMMENDED)\n
      • (14) fwalld (f-value for equation 8)\n
      • (15) fvs (f-value for equation 12)\n
      • (16) ohcth\n
      • (17) tdwell\n
      • (18) q\n
      • (19) enbeam\n
      • (20) tcpav\n
      • (21) ftburn (f-value for equation 13)\n
      • (22) NOT USED\n
      • (23) fcoolcp\n
      • (24) NOT USED\n
      • (25) fpnetel (f-value for equation 16)\n
      • (26) ffuspow (f-value for equation 9)\n
      • (27) fhldiv (f-value for equation 18)\n
      • (28) fradpwr (f-value for equation 17), total radiation fraction\n
      • (29) bore\n
      • (30) fmva (f-value for equation 19)\n
      • (31) gapomin\n
      • (32) frminor (f-value for equation 21)\n
      • (33) fportsz (f-value for equation 20)\n
      • (34) fdivcol (f-value for equation 22)\n
      • (35) fpeakb (f-value for equation 25)\n
      • (36) fbetatry (f-value for equation 24)\n
      • (37) coheof\n
      • (38) fjohc (f-value for equation 26)\n
      • (39) fjohc0 (f-value for equation 27)\n
      • (40) fgamcd (f-value for equation 37)\n
      • (41) fcohbop\n
      • (42) gapoh\n
      • (43) NOT USED\n
      • (44) fvsbrnni\n
      • (45) fqval (f-value for equation 28)\n
      • (46) fpinj (f-value for equation 30)\n
      • (47) feffcd\n
      • (48) fstrcase (f-value for equation 31)\n
      • (49) fstrcond (f-value for equation 32)\n
      • (50) fiooic (f-value for equation 33)\n
      • (51) fvdump (f-value for equation 34)\n
      • (52) vdalw\n
      • (53) fjprot (f-value for equation 35)\n
      • (54) ftmargtf (f-value for equation 36)\n
      • (55) NOT USED\n
      • (56) tdmptf\n
      • (57) thkcas\n
      • (58) thwcndut\n
      • (59) fcutfsu\n
      • (60) cpttf\n
      • (61) gapds\n
      • (62) fdtmp (f-value for equation 38)\n
      • (63) ftpeak (f-value for equation 39)\n
      • (64) fauxmn (f-value for equation 40)\n
      • (65) tohs\n
      • (66) ftohs (f-value for equation 41)\n
      • (67) ftcycl (f-value for equation 42)\n
      • (68) fptemp (f-value for equation 44)\n
      • (69) rcool\n
      • (70) vcool\n
      • (71) fq (f-value for equation 45)\n
      • (72) fipir (f-value for equation 46)\n
      • (73) scrapli\n
      • (74) scraplo\n
      • (75) tfootfi\n
      • (76) NOT USED\n
      • (77) NOT USED\n
      • (78) NOT USED\n
      • (79) fbetap (f-value for equation 48)\n
      • (80) NOT USED\n
      • (81) edrive\n
      • (82) drveff\n
      • (83) tgain\n
      • (84) chrad\n
      • (85) pdrive\n
      • (86) frrmax (f-value for equation 50)\n
      • (87) NOT USED\n
      • (88) NOT USED\n
      • (89) ftbr (f-value for equation 52)\n
      • (90) blbuith\n
      • (91) blbuoth\n
      • (92) fflutf (f-value for equation 53)\n
      • (93) shldith\n
      • (94) shldoth\n
      • (95) fptfnuc (f-value for equation 54)\n
      • (96) fvvhe (f-value for equation 55)\n
      • (97) fpsepr (f-value for equation 56)\n
      • (98) li6enrich\n
      • (99) NOT USED\n
      • (100) NOT USED\n
      • (101) NOT USED\n
      • (102) fimpvar\n
      • (103) flhthresh (f-value for equation 15)\n
      • (104) fcwr (f-value for equation 23)\n
      • (105) fnbshinef (f-value for equation 59)\n
      • (106) ftmargoh (f-value for equation 60)\n
      • (107) favail (f-value for equation 61)\n
      • (108) breeder_f: Volume of Li4SiO4 / (Volume of Be12Ti + Li4SiO4)\n
      • (109) ralpne: thermal alpha density / electron density\n
      • (110) ftaulimit: Lower limit on taup/taueff the ratio of alpha\n
      • (111) fniterpump: f-value for constraint that number\n
      • (112) fzeffmax: f-value for max Zeff (f-value for equation 64)\n
      • (113) ftaucq: f-value for minimum quench time (f-value for equation 65)\n
      • (114) fw_channel_length: Length of a single first wall channel\n
      • (115) fpoloidalpower: f-value for max rate of change of\n
      • (116) fradwall: f-value for radiation wall load limit (eq. 67)\n
      • (117) fpsepbqar: f-value for Psep*Bt/qar upper limit (eq. 68)\n
      • (118) fpsep: f-value to ensure separatrix power is less than\n
      • (119) tesep: separatrix temperature calculated by the Kallenbach divertor model\n
      • (120) ttarget: Plasma temperature adjacent to divertor sheath [eV]\n
      • (121) neratio: ratio of mean SOL density at OMP to separatrix density at OMP\n
      • (122) oh_steel_frac : streel fraction of Central Solenoid\n
      • (123) foh_stress : f-value for CS coil Tresca yield criterion (f-value for eq. 72)\n
      • (124) qtargettotal : Power density on target including surface recombination [W/m2]\n
      • (125) fimp(3) : Beryllium density fraction relative to electron density\n
      • (126) fimp(4) : Carbon density fraction relative to electron density\n
      • (127) fimp(5) : Nitrogen fraction relative to electron density\n
      • (128) fimp(6) : Oxygen density fraction relative to electron density\n
      • (129) fimp(7) : Neon density fraction relative to electron density\n
      • (130) fimp(8) : Silicon density fraction relative to electron density\n
      • (131) fimp(9) : Argon density fraction relative to electron density\n
      • (132) fimp(10) : Iron density fraction relative to electron density\n
      • (133) fimp(11) : Nickel density fraction relative to electron density\n
      • (134) fimp(12) : Krypton density fraction relative to electron density\n
      • (135) fimp(13) : Xenon density fraction relative to electron density\n
      • (136) fimp(14) : Tungsten density fraction relative to electron density\n
      • (137) fplhsep (f-value for equation 73)\n
      • (138) rebco_thickness : thickness of REBCO layer in tape (m)\n
      • (139) copper_thick : thickness of copper layer in tape (m)\n
      • (140) dr_tf_wp : radial thickness of TFC winding pack (m)\n
      • (141) fcqt : TF coil quench temperature < tmax_croco (f-value for equation 74)\n
      • (142) nesep : electron density at separatrix [m-3]\n
      • (143) f_copperA_m2 : TF coil current / copper area < Maximum value\n
      • (144) fnesep : Eich critical electron density at separatrix\n
      • (145) fgwped : fraction of Greenwald density to set as pedestal-top density\n
      • (146) fcpttf : F-value for TF coil current per turn limit (constraint equation 77)\n
      • (147) freinke : F-value for Reinke detachment criterion (constraint equation 78)\n
      • (148) fzactual : fraction of impurity at SOL with Reinke detachment criterion\n
      • (149) fbmaxcs : F-value for max peak CS field (con. 79, itvar 149)\n
      • (152) fbmaxcs : Ratio of separatrix density to Greenwald density\n
      • (153) fpdivlim : F-value for minimum pdivt (con. 80)\n
      • (154) fne0 : F-value for ne(0) > ne(ped) (con. 81)\n
      • (155) pfusife : IFE input fusion power (MW) (ifedrv=3 only)\n
      • (156) rrin : Input IFE repetition rate (Hz) (ifedrv=3 only)\n
      • (157) fvssu : F-value for available to required start up flux (con. 51)\n
      • (158) croco_thick : Thickness of CroCo copper tube (m)\n
      • (159) ftoroidalgap : F-value for toroidalgap > tftort constraint (con. 82)\n
      • (160) f_avspace (f-value for equation 83)\n
      • (161) fbetatry_lower (f-value for equation 84)\n
      • (162) r_cp_top : Top outer radius of the centropost (ST only) (m)\n
      • (163) f_t_turn_tf : f-value for TF coils WP trurn squared dimension constraint\n
      • (164) f_crypmw : f-value for cryogenic plant power\n
      • (165) fstr_wp : f-value for TF coil strain absolute value\n
      • (166) f_copperaoh_m2 : CS coil current /copper area < Maximum value\n
      • (167) fecrh_ignition: f-value for equation 90\n
      • (168) EMPTY : Description\n
      • (169) EMPTY : Description\n
      • (170) EMPTY : Description\n
      • (171) EMPTY : Description\n
      • (172) EMPTY : Description\n
      • (173) EMPTY : Description\n
      • (174) EMPTY : Description\n
      • (175) EMPTY : Description\n\n\n\n", "lambda_EU": "Decay length in EUROFER [cm]", "lambda_He_VV": "Decay length [cm]", "lambda_n_BZ_IB": "Decay length in IB BZ [cm]", @@ -10084,7 +10078,7 @@ "mpn": "", "mpnpp1": "", "mpnppn": "", - "proton_mass": "proton mass [kg]", + "mproton": "proton mass [kg]", "muh2o": "water dynamic viscosity (kg/m/s)", "mvalim": "maximum MVA limit (`constraint equation 19`)", "n": "", @@ -10222,23 +10216,21 @@ "p_": "", "p_he": "pressure in FW and blanket coolant at pump exit (`primary_pumping=3`) [Pa]", "pacpmw": "total pulsed power system load (MW)", - "alpha_power_electron_density": "alpha power per volume to electrons (MW/m3)", + "palpepv": "alpha power per volume to electrons (MW/m3)", "palpfwmw": "alpha power escaping plasma and reaching first wall (MW)", - "alpha_power_ions_density": "alpha power per volume to ions (MW/m3)", - "alpha_power_total": "alpha power (MW)", - "alpha_power_beams": "alpha power from hot neutral beam ions (MW)", - "alpha_power_density_total": "alpha power per volume from plasma and beams (MW/m3)", - "f_dd_branching_tritium": "fraction of D-D reactions that branches to producing tritium", - "alpha_power_density_plasma": "alpha power per volume just from plasma (MW/m3)", + "palpipv": "alpha power per volume to ions (MW/m3)", + "palpmw": "alpha power (MW)", + "palpnb": "alpha power from hot neutral beam ions (MW)", + "palppv": "alpha power per volume (MW/m3)", "pbase": "base pressure during dwell before gas pre-fill(Pa)", "pbrempv": "bremsstrahlung power per volume (MW/m3)", - "non_alpha_charged_power": "non-alpha charged particle fusion power (MW)", - "charged_power_density": "non-alpha charged particle fusion power per volume (MW/m3)", + "pchargemw": "non-alpha charged particle fusion power (MW)", + "pchargepv": "non-alpha charged particle fusion power per volume (MW/m3)", "pcoef": "profile factor (= n-weighted T / average T)", "pcoreradpv": "total core radiation power per volume (MW/m3)", "pcoresystems": "", - "dd_power": "deuterium-deuterium fusion power (MW)", - "dhe3_power": "deuterium-helium3 fusion power (MW)", + "pdd": "deuterium-deuterium fusion power (MW)", + "pdhe3": "deuterium-helium3 fusion power (MW)", "pdivfraction": "", "pdivl": "power conducted to the lower divertor region (calculated if `i_single_null = 0`) (MW)", "pdivmax": "power conducted to the divertor with most load (calculated if `i_single_null = 0`) (MW)", @@ -10246,8 +10238,7 @@ "pdivtlim": "Minimum pdivt [MW] (`constraint equation 80`)", "pdivu": "power conducted to the upper divertor region (calculated if `i_single_null = 0`) (MW)", "pdrive": "IFE driver power reaching target (W) (`iteration variable 85`)", - "dt_power_total": "deuterium-tritium fusion power, from plasma and beams (MW)", - "dt_power_plasma": "deuterium-tritium fusion power, just from plasma (MW)", + "pdt": "deuterium-tritium fusion power (MW)", "peakfactrad": "peaking factor for radiation wall load (`constraint equation 67`)", "peaking_factor": "peaking factor for first wall heat loads. (Applied separately to inboard and outboard loads.\n Applies to both neutron and surface loads. Only used to calculate peak temperature - not\n the coolant flow rate.)", "peakmva": "peak MVA requirement", @@ -10260,7 +10251,7 @@ "pfclres": "PF coil resistivity (if ipfres=1) (Ohm-m)", "pfmmax": "mass of heaviest PF coil (tonnes)", "pfrmax": "radius of largest PF coil (m)", - "charged_particle_power": "charged particle fusion power (MW)", + "pfuscmw": "charged particle fusion power (MW)", "pfusife": "IFE input fusion power (MW) (`ifedrv=3 only`; `itv 155`)", "pfwdiv": "heat removal from first wall/divertor (MW)", "pfwpmw": "Total mean wall plug power dissipated in PFC and CS power supplies (MW) (issue #713)", @@ -10305,9 +10296,8 @@ "pnbitot": "neutral beam power entering vacuum vessel", "pnetelin": "required net electric power (MW) (`constraint equation 16`)", "pnetelmw": "net electric power (MW)", - "neutron_power_total": "neutron fusion power (MW)", - "neutron_power_density_total": "neutron fusion power per volume from plasma and beams (MW/m3)", - "neutron_power_density_plasma": "neutron fusion power per volume just from plasma (MW/m3)", + "pneutmw": "neutron fusion power (MW)", + "pneutpv": "neutron fusion power per volume (MW/m3)", "pnuc_bkt_ratio": "", "pnuc_cp": "Total nuclear heating in the ST centrepost (MW)", "pnuc_cp_sh": "Neutronic shield nuclear heating in the ST centrepost (MW)", @@ -10341,7 +10331,7 @@ "pouterzoneradmw": "radiation power from outer zone (MW)", "powerht": "heating power (= transport loss power) (MW) used in confinement time calculation", "powfmax": "maximum fusion power (MW) (`constraint equation 9`)", - "fusion_power": "fusion power (MW)", + "powfmw": "fusion power (MW)", "powohres": "central solenoid resistive power during flattop (W)", "powpfres": "total PF coil resistive losses during flattop (W)", "ppdivr": "peak heat load at plate (with radiation) (MW/m2)", @@ -10367,7 +10357,7 @@ "prn1": "n-scrape-off / n-average plasma; (input for `ipedestal=0`, = nesep/dene if `ipedestal>=1`)", "profcalc": "", "protium": "Seeded protium density / electron density.", - "proton_rate_density": "proton production rate (particles/m3/sec)", + "protonrate": "proton production rate (particles/m3/sec)", "pscalingmw": "Total transport power from scaling law (MW)", "pscf_scene": "Pfirsch-Schl\u00fcter current fraction, SCENE fit", "psecdiv": "Low-grade heat lost in divertor (MW)", @@ -11033,7 +11023,7 @@ "vlabel_2": "scan value name label (2nd dimension)", "vlam": "", "vmu": "", - "plasma_volume": "plasma volume (m3)", + "vol": "plasma volume (m3)", "vol_bz": "", "vol_bz_ib": "", "vol_bz_ob": "", @@ -12322,7 +12312,7 @@ "lb": 1.0, "ub": 2.0 }, - "beam_energy": { + "enbeam": { "lb": 1.0, "ub": 1000000.0 }, @@ -12454,7 +12444,7 @@ "lb": 0.0, "ub": 10.0 }, - "f_alpha_plasma": { + "falpha": { "lb": 0.0, "ub": 1.0 }, @@ -12610,7 +12600,7 @@ "lb": 0.001, "ub": 10.0 }, - "f_deuterium": { + "fdeut": { "lb": 0.0, "ub": 1.0 }, @@ -12674,7 +12664,7 @@ "lb": 0.0, "ub": 1.0 }, - "f_helium3": { + "fhe3": { "lb": 0.0, "ub": 1.0 }, @@ -12942,11 +12932,11 @@ "lb": 0.001, "ub": 10.0 }, - "f_tritium": { + "ftrit": { "lb": 0.0, "ub": 1.0 }, - "f_tritium_beam": { + "ftritbm": { "lb": 0.0, "ub": 1.0 }, @@ -15167,7 +15157,7 @@ "lb": 100000.0, "ub": 50000000.0 }, - "beam_energy": { + "enbeam": { "lb": 1.0, "ub": 1000000.0 }, @@ -15730,7 +15720,7 @@ "dr_tf_wp": 0.0, "drveff": 0.28, "edrive": 5000000.0, - "beam_energy": 1000.0, + "enbeam": 1000.0, "f_avspace": 1.0, "f_coppera_m2": 1.0, "f_copperaoh_m2": 1.0, @@ -16263,7 +16253,7 @@ }, "19": { "lb": 1.0, - "name": "beam_energy", + "name": "enbeam", "ub": 1000000.0 }, "2": { @@ -16734,7 +16724,7 @@ "174": "DUMMY", "175": "DUMMY", "18": "q", - "19": "beam_energy", + "19": "enbeam", "2": "bt", "20": "tcpav", "21": "ftburn", @@ -16831,7 +16821,7 @@ "dr_tf_wp": "140", "drveff": "82", "edrive": "81", - "beam_energy": "19", + "enbeam": "19", "f_avspace": "160", "f_coppera_m2": "143", "f_copperaoh_m2": "166", @@ -17360,9 +17350,9 @@ "opt_file", "sig_file", "degrad", - "electron_charge", - "electron_mass", - "proton_mass", + "echarge", + "emass", + "mproton", "pi", "rmu0", "twopi", @@ -17773,7 +17763,7 @@ "bscf_sauter", "bscf_wilson", "cboot", - "beam_current", + "cnbeam", "diacf_hender", "diacf_scene", "diaipf", @@ -17781,7 +17771,7 @@ "echwpow", "effcd", "harnum", - "beam_energy", + "enbeam", "etacd", "etacdfix", "etaech", @@ -17794,7 +17784,7 @@ "feffcd", "forbitloss", "frbeam", - "f_tritium_beam", + "ftritbm", "gamcd", "gamma_ecrh", "xi_ebw", @@ -19047,8 +19037,7 @@ "alphaj", "alphan", "alphap", - "alpha_rate_density_total", - "alpha_rate_density_plasma", + "alpharate", "alphat", "aspect", "beamfus0", @@ -19056,7 +19045,7 @@ "betaft", "betalim", "betalim_lower", - "beta_beam", + "betanb", "betap", "normalised_total_beta", "betbm0", @@ -19075,7 +19064,7 @@ "dlimit", "dnalp", "dnbeam", - "beam_density_out", + "dnbeam2", "dnbeta", "dnelimt", "dnitot", @@ -19085,27 +19074,27 @@ "dnz", "dndrho_max", "dtdrho_max", + "ealphadt", "epbetmax", "eps", "aux_current_fraction", "inductive_current_fraction", - "f_alpha_electron", - "f_alpha_plasma", - "f_alpha_ion", - "f_deuterium", + "falpe", + "falpha", + "falpi", + "fdeut", "ftar", "ffwal", "fgwped", "fgwsep", - "f_helium3", + "fhe3", "figmer", "fkzohm", "fplhsep", "fpdivlim", "fne0", - "f_tritium", - "fusion_rate_density_total", - "fusion_rate_density_plasma", + "ftrit", + "fusionrate", "fvsbrnni", "gamma", "gammaft", @@ -19154,48 +19143,44 @@ "ni0", "m_s_limit", "p0", - "f_dd_branching_trit", - "alpha_power_density_total", - "alpha_power_density_plasma", - "alpha_power_electron_density", + "palppv", + "palpepv", "palpfwmw", - "alpha_power_ions_density", - "alpha_power_total", - "alpha_power_beams", + "palpipv", + "palpmw", + "palpnb", "pbrempv", - "non_alpha_charged_power", - "charged_power_density", + "pchargemw", + "pchargepv", "pcoef", "pinnerzoneradmw", "pcoreradpv", - "dd_power", - "dhe3_power", + "pdd", + "pdhe3", "pdivt", "pdivl", "pdivu", "pdivmax", - "dt_power_total", - "dt_power_plasma", + "pdt", "pouterzoneradmw", "pedgeradpv", - "charged_particle_power", + "pfuscmw", "phiint", "photon_wall", "piepv", "plasma_current", "plinepv", - "neutron_power_total", - "neutron_power_density_total", - "neutron_power_density_plasma", + "pneutmw", + "pneutpv", "pohmmw", "pohmpv", "powerht", - "fusion_power", + "powfmw", "pperim", "pradmw", "pradpv", "pradsolmw", - "proton_rate_density", + "protonrate", "psolradmw", "psyncpv", "ilhthresh", @@ -19248,7 +19233,7 @@ "tratio", "triang", "triang95", - "plasma_volume", + "vol", "vsbrn", "vshift", "vsind", @@ -20187,7 +20172,7 @@ "elecstore_l": "real_variable", "elecstore_w": "real_variable", "emult": "real_variable", - "beam_energy": "real_variable", + "enbeam": "real_variable", "epbetmax": "real_variable", "epsfcn": "real_variable", "epsvmc": "real_variable", @@ -20221,7 +20206,7 @@ "f_vforce_inboard": "real_variable", "f_w": "real_variable", "factor": "real_variable", - "f_alpha_plasma": "real_variable", + "falpha": "real_variable", "fauxbop": "real_variable", "fauxmn": "real_variable", "favail": "real_variable", @@ -20260,7 +20245,7 @@ "fcutfsu": "real_variable", "fcwr": "real_variable", "fdene": "real_variable", - "f_deuterium": "real_variable", + "fdeut": "real_variable", "fdfs": "real_variable", "fdiv": "real_variable", "fdiva": "real_variable", @@ -20276,7 +20261,7 @@ "fgwped": "real_variable", "fgwsep": "real_variable", "fhcd": "real_variable", - "f_helium3": "real_variable", + "fhe3": "real_variable", "fhldiv": "real_variable", "fhole": "real_variable", "fhts": "real_variable", @@ -20343,8 +20328,8 @@ "ftol": "real_variable", "ftoroidalgap": "real_variable", "ftpeak": "real_variable", - "f_tritium": "real_variable", - "f_tritium_beam": "real_variable", + "ftrit": "real_variable", + "ftritbm": "real_variable", "fvdump": "real_variable", "fvoldw": "real_variable", "fvolsi": "real_variable", @@ -20922,7 +20907,7 @@ "aspect", "rminor", "bt", - "fusion_power", + "powfmw", "pnetelmw", "te", "pdivt", diff --git a/tests/integration/test_solver.py b/tests/integration/test_solver.py index a2ccf0de..2ad4cd2b 100755 --- a/tests/integration/test_solver.py +++ b/tests/integration/test_solver.py @@ -128,7 +128,7 @@ def test_solver(temp_data): ind = -1 # last scan point # Obtain fusion power and injected power from MFILE.DAT - fusion_power = m_file.data["fusion_power"].get_scan(ind) + fusion_power = m_file.data["powfmw"].get_scan(ind) injected_power = m_file.data["pinjmw"].get_scan(ind) ratio_fus_inj_power = fusion_power / injected_power diff --git a/tests/regression/input_files/st_regression.IN.DAT b/tests/regression/input_files/st_regression.IN.DAT index ffb4ee1b..bb791388 100644 --- a/tests/regression/input_files/st_regression.IN.DAT +++ b/tests/regression/input_files/st_regression.IN.DAT @@ -102,7 +102,7 @@ bt = 3.0 icc = 9 * DESCRIPTION: Fusion Power Upper Limit Constraint * JUSTIFICATION: Working to target fusion -* VARIABLES: fusion_power (fusion power) calculated in-situ +* VARIABLES: powfmw (fusion power) calculated in-situ *ixc = 26 ffuspow = 1.0 @@ -626,19 +626,19 @@ boundu(28) = 1.0 * DESCRIPTION: Seeded protium density / electron density (default = 0.0) * JUSTIFICATION: Not used, no protium seeding. -*f_deuterium = +*fdeut = * DESCRIPTION: Deuterium fuel fraction * JUSTIFICATION: Using default = 0.5 -*f_tritium = +*ftrit = * DESCRIPTION: Tritium fuel fraction * JUSTIFICATION: Using default = 0.5 -*f_helium3 = +*fhe3 = * DESCRIPTION: Helium-3 fuel fraction * JUSTIFICATION: Using default = 0.0 -*f_alpha_plasma = +*falpha = * DESCRIPTION: Fraction of alpha power deposited to plasma * JUSTIFICATION: Using default = 0.95 @@ -2800,7 +2800,7 @@ feffcd = 1.0 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Neutral Beam Injection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ -*beam_energy = +*enbeam = * DESCRIPTION: Neutral beam energy (keV) * JUSTIFICATION: Not used as no NBI used @@ -2824,7 +2824,7 @@ feffcd = 1.0 * DESCRIPTION: R_tan / R_major for NBI * JUSTIFICATION: Not used as no NBI used -*f_tritium_beam +*ftritbm * DESCRIPTION: Tritium fraction of beam * JUSTIFICATION: Not used as no NBI used diff --git a/tests/regression/input_files/stellarator.IN.DAT b/tests/regression/input_files/stellarator.IN.DAT index abdfed6d..5c971899 100644 --- a/tests/regression/input_files/stellarator.IN.DAT +++ b/tests/regression/input_files/stellarator.IN.DAT @@ -89,7 +89,7 @@ f_avspace = 1. * f value for radial gap between coils and plasma ftoroidalgap = 1. * f value for toroidal gap between coils fbetatry = 1. * f value for beta limit ffuspow = 1.0 -f_alpha_plasma = 0.95 * fast particle fraction +falpha = 0.95 * fast particle fraction ralpne = 0.144 * thermal alpha density / electron density fradpwr = 1 * needed to control radiation power epsfcn = 0.0001 * convergence important to start with 10^-4, 10^-3 is NOT sufficient to match the constraint resonably well!! diff --git a/tests/unit/test_availability.py b/tests/unit/test_availability.py index cc739fd5..1be9df2d 100644 --- a/tests/unit/test_availability.py +++ b/tests/unit/test_availability.py @@ -39,7 +39,7 @@ def test_avail_0(monkeypatch, availability, fwlife, ibkt_life, bktlife_exp_param # Mock module vars monkeypatch.setattr(ifev, "ife", 0) - monkeypatch.setattr(pv, "fusion_power", 4.0e3) + monkeypatch.setattr(pv, "powfmw", 4.0e3) monkeypatch.setattr(fwbsv, "fwlife", fwlife) monkeypatch.setattr(cv, "ibkt_life", ibkt_life) monkeypatch.setattr(cv, "abktflnc", 4.0) diff --git a/tests/unit/test_ccfe_hcpb.py b/tests/unit/test_ccfe_hcpb.py index 8ddb83df..1ba332b2 100644 --- a/tests/unit/test_ccfe_hcpb.py +++ b/tests/unit/test_ccfe_hcpb.py @@ -73,7 +73,7 @@ class NuclearHeatingMagnetsParam(NamedTuple): vffwo: Any = None - fusion_power: Any = None + powfmw: Any = None itart: Any = None @@ -152,7 +152,7 @@ class NuclearHeatingMagnetsParam(NamedTuple): denw=19250, vffwi=0, vffwo=0, - fusion_power=1986.0623241661431, + powfmw=1986.0623241661431, itart=0, whttf=19649856.627845347, whttflgs=0, @@ -202,7 +202,7 @@ class NuclearHeatingMagnetsParam(NamedTuple): denw=19250, vffwi=0.31415926535897931, vffwo=0.31415926535897931, - fusion_power=1985.4423932312809, + powfmw=1985.4423932312809, itart=0, whttf=19662548.210142396, whttflgs=0, @@ -294,9 +294,7 @@ def test_nuclear_heating_magnets(nuclearheatingmagnetsparam, monkeypatch, ccfe_h monkeypatch.setattr(fwbs_variables, "vffwo", nuclearheatingmagnetsparam.vffwo) - monkeypatch.setattr( - physics_variables, "fusion_power", nuclearheatingmagnetsparam.fusion_power - ) + monkeypatch.setattr(physics_variables, "powfmw", nuclearheatingmagnetsparam.powfmw) monkeypatch.setattr(physics_variables, "itart", nuclearheatingmagnetsparam.itart) @@ -396,7 +394,7 @@ class NuclearHeatingFwParam(NamedTuple): fwmass: Any = None - fusion_power: Any = None + powfmw: Any = None fw_armour_u_nuc_heating: Any = None @@ -411,7 +409,7 @@ class NuclearHeatingFwParam(NamedTuple): NuclearHeatingFwParam( pnucfw=0, fwmass=224802.80270851994, - fusion_power=1986.0623241661431, + powfmw=1986.0623241661431, fw_armour_u_nuc_heating=0, expected_pnucfw=279.04523551646628, expected_fw_armour_u_nuc_heating=6.2500000000000005e-07, @@ -419,7 +417,7 @@ class NuclearHeatingFwParam(NamedTuple): NuclearHeatingFwParam( pnucfw=276.80690153753221, fwmass=182115.83467868491, - fusion_power=1985.4423932312809, + powfmw=1985.4423932312809, fw_armour_u_nuc_heating=6.2500000000000005e-07, expected_pnucfw=225.98781165610032, expected_fw_armour_u_nuc_heating=6.2500000000000005e-07, @@ -443,9 +441,7 @@ def test_nuclear_heating_fw(nuclearheatingfwparam, monkeypatch, ccfe_hcpb): monkeypatch.setattr(fwbs_variables, "fwmass", nuclearheatingfwparam.fwmass) - monkeypatch.setattr( - physics_variables, "fusion_power", nuclearheatingfwparam.fusion_power - ) + monkeypatch.setattr(physics_variables, "powfmw", nuclearheatingfwparam.powfmw) monkeypatch.setattr( ccfe_hcpb_module, @@ -467,7 +463,7 @@ class NuclearHeatingBlanketParam(NamedTuple): pnucblkt: Any = None - fusion_power: Any = None + powfmw: Any = None exp_blanket: Any = None @@ -482,7 +478,7 @@ class NuclearHeatingBlanketParam(NamedTuple): NuclearHeatingBlanketParam( whtblkt=3501027.3252278985, pnucblkt=0, - fusion_power=1986.0623241661431, + powfmw=1986.0623241661431, exp_blanket=0, expected_pnucblkt=1517.0907688379014, expected_exp_blanket=0.99982809071915879, @@ -490,7 +486,7 @@ class NuclearHeatingBlanketParam(NamedTuple): NuclearHeatingBlanketParam( whtblkt=3507503.3737008357, pnucblkt=1504.9215740808861, - fusion_power=1985.4423932312809, + powfmw=1985.4423932312809, exp_blanket=0.99982809071915879, expected_pnucblkt=1516.6213709741428, expected_exp_blanket=0.99983082524994527, @@ -514,9 +510,7 @@ def test_nuclear_heating_blanket(nuclearheatingblanketparam, monkeypatch, ccfe_h monkeypatch.setattr(fwbs_variables, "pnucblkt", nuclearheatingblanketparam.pnucblkt) - monkeypatch.setattr( - physics_variables, "fusion_power", nuclearheatingblanketparam.fusion_power - ) + monkeypatch.setattr(physics_variables, "powfmw", nuclearheatingblanketparam.powfmw) monkeypatch.setattr( ccfe_hcpb_module, "exp_blanket", nuclearheatingblanketparam.exp_blanket @@ -542,7 +536,7 @@ class NuclearHeatingShieldParam(NamedTuple): pnucshld: Any = None - fusion_power: Any = None + powfmw: Any = None itart: Any = None @@ -573,7 +567,7 @@ class NuclearHeatingShieldParam(NamedTuple): shldoth=0.80000000000000004, whtshld=2294873.8131476045, pnucshld=0, - fusion_power=1986.0623241661431, + powfmw=1986.0623241661431, itart=0, shield_density=3119.9999999999995, x_blanket=2.3374537748527975, @@ -590,7 +584,7 @@ class NuclearHeatingShieldParam(NamedTuple): shldoth=0.80000000000000004, whtshld=2297808.3935174854, pnucshld=1.3611259588044891, - fusion_power=1985.4423932312809, + powfmw=1985.4423932312809, itart=0, shield_density=3120, x_blanket=2.3374537748527979, @@ -625,9 +619,7 @@ def test_nuclear_heating_shield(nuclearheatingshieldparam, monkeypatch, ccfe_hcp monkeypatch.setattr(fwbs_variables, "pnucshld", nuclearheatingshieldparam.pnucshld) - monkeypatch.setattr( - physics_variables, "fusion_power", nuclearheatingshieldparam.fusion_power - ) + monkeypatch.setattr(physics_variables, "powfmw", nuclearheatingshieldparam.powfmw) monkeypatch.setattr(physics_variables, "itart", nuclearheatingshieldparam.itart) @@ -681,7 +673,7 @@ class NuclearHeatingDivertorParam(NamedTuple): idivrt: Any = None - fusion_power: Any = None + powfmw: Any = None ip: Any = None @@ -696,7 +688,7 @@ class NuclearHeatingDivertorParam(NamedTuple): pnucdiv=0, pnuchcd=0, idivrt=1, - fusion_power=1986.0623241661431, + powfmw=1986.0623241661431, ip=0, expected_pnucdiv=182.71773382328519, ), @@ -705,7 +697,7 @@ class NuclearHeatingDivertorParam(NamedTuple): pnucdiv=182.71773382328519, pnuchcd=0, idivrt=1, - fusion_power=1985.4423932312809, + powfmw=1985.4423932312809, ip=0, expected_pnucdiv=182.66070017727785, ), @@ -732,9 +724,7 @@ def test_nuclear_heating_divertor(nuclearheatingdivertorparam, monkeypatch, ccfe monkeypatch.setattr(physics_variables, "idivrt", nuclearheatingdivertorparam.idivrt) - monkeypatch.setattr( - physics_variables, "fusion_power", nuclearheatingdivertorparam.fusion_power - ) + monkeypatch.setattr(physics_variables, "powfmw", nuclearheatingdivertorparam.powfmw) monkeypatch.setattr(ccfe_hcpb_module, "ip", nuclearheatingdivertorparam.ip) @@ -1144,7 +1134,7 @@ def test_st_cp_angle_fraction(stcpanglefractionparam, ccfe_hcpb): class StTfCentrepostFastNeutFluxParam(NamedTuple): i_tf_sup: Any = None - neutron_power_total: Any = None + pneutmw: Any = None sh_width: Any = None @@ -1158,14 +1148,14 @@ class StTfCentrepostFastNeutFluxParam(NamedTuple): ( StTfCentrepostFastNeutFluxParam( i_tf_sup=1, - neutron_power_total=400.65875490746737, + pneutmw=400.65875490746737, sh_width=0.60000000000000009, rmajor=3, expected_neut_flux_cp=144701998710998.5, ), StTfCentrepostFastNeutFluxParam( i_tf_sup=1, - neutron_power_total=409.82485143909827, + pneutmw=409.82485143909827, sh_width=0.60000000000000009, rmajor=3, expected_neut_flux_cp=148012428028364.28, @@ -1192,7 +1182,7 @@ def test_st_tf_centrepost_fast_neut_flux( ) neut_flux_cp = ccfe_hcpb.st_tf_centrepost_fast_neut_flux( - neutron_power_total=sttfcentrepostfastneutfluxparam.neutron_power_total, + pneutmw=sttfcentrepostfastneutfluxparam.pneutmw, sh_width=sttfcentrepostfastneutfluxparam.sh_width, rmajor=sttfcentrepostfastneutfluxparam.rmajor, ) diff --git a/tests/unit/test_costs_1990.py b/tests/unit/test_costs_1990.py index 4f4f5fb1..50544566 100644 --- a/tests/unit/test_costs_1990.py +++ b/tests/unit/test_costs_1990.py @@ -198,7 +198,7 @@ def acc2273_param(**kwargs): """ # Default parameters defaults = { - "f_tritium": 0.0001, + "ftrit": 0.0001, "volrci": fortran.buildings_variables.volrci, "wsvol": fortran.buildings_variables.wsvol, "expected": approx(0.0, abs=0.00001), @@ -221,7 +221,7 @@ def acc2273_params(): params = [ acc2273_param(), acc2273_param( - f_tritium=0.5, + ftrit=0.5, volrci=1299783.4, wsvol=132304.1, expected=approx(74.12, abs=0.01), @@ -248,7 +248,7 @@ def acc2273_fix(request, monkeypatch, costs): # Some may be parameterised monkeypatch.setattr(fortran.buildings_variables, "wsvol", param["wsvol"]) monkeypatch.setattr(fortran.buildings_variables, "volrci", param["volrci"]) - monkeypatch.setattr(fortran.physics_variables, "f_tritium", param["f_tritium"]) + monkeypatch.setattr(fortran.physics_variables, "ftrit", param["ftrit"]) # Mock result var as negative, as an expected result is 0 # Otherwise could get false positive result @@ -612,7 +612,7 @@ def acc26_param(**kwargs): # Default parameters defaults = { "ireactor": 0, - "fusion_power": 2000.0, + "powfmw": 2000.0, "pinjwp": 250.0, "tfcmw": 50.0, "pthermmw": htv.pthermmw, @@ -638,7 +638,7 @@ def acc26_params(): acc26_param(), acc26_param( ireactor=1, - fusion_power=fortran.physics_variables.fusion_power, + powfmw=fortran.physics_variables.powfmw, pinjwp=htv.pinjwp, tfcmw=fortran.tfcoil_variables.tfcmw, pthermmw=3000.0, @@ -666,9 +666,7 @@ def acc26_fix(request, monkeypatch, costs): # Some may be parameterised monkeypatch.setattr(cost_variables, "lsa", 4) monkeypatch.setattr(cost_variables, "ireactor", param["ireactor"]) - monkeypatch.setattr( - fortran.physics_variables, "fusion_power", param["fusion_power"] - ) + monkeypatch.setattr(fortran.physics_variables, "powfmw", param["powfmw"]) monkeypatch.setattr(htv, "pinjwp", param["pinjwp"]) monkeypatch.setattr(fortran.tfcoil_variables, "tfcmw", param["tfcmw"]) monkeypatch.setattr(htv, "pthermmw", param["pthermmw"]) @@ -4393,7 +4391,7 @@ class Acc2273Param(NamedTuple): fkind: Any = None - f_tritium: Any = None + ftrit: Any = None c227: Any = None @@ -4411,7 +4409,7 @@ class Acc2273Param(NamedTuple): wsvol=130018.25667917728, volrci=1205439.8543893537, fkind=1, - f_tritium=0.5, + ftrit=0.5, c227=0, c2273=0, c22=0, @@ -4421,7 +4419,7 @@ class Acc2273Param(NamedTuple): wsvol=130255.93791329287, volrci=1206887.4047542624, fkind=1, - f_tritium=0.5, + ftrit=0.5, c227=284.96904049038437, c2273=69.115208498727412, c22=3474.7391916096453, @@ -4448,7 +4446,7 @@ def test_acc2273_rut(acc2273param, monkeypatch, costs): monkeypatch.setattr(cost_variables, "fkind", acc2273param.fkind) - monkeypatch.setattr(physics_variables, "f_tritium", acc2273param.f_tritium) + monkeypatch.setattr(physics_variables, "ftrit", acc2273param.ftrit) monkeypatch.setattr(costs, "c227", acc2273param.c227) @@ -5123,7 +5121,7 @@ class Acc26Param(NamedTuple): pgrossmw: Any = None - fusion_power: Any = None + powfmw: Any = None tfcmw: Any = None @@ -5142,7 +5140,7 @@ class Acc26Param(NamedTuple): pthermmw=2620.2218111502593, pinjwp=129.94611930107126, pgrossmw=982.58317918134742, - fusion_power=1985.785106643267, + powfmw=1985.785106643267, tfcmw=0, c26=0, expected_c26=56.327648771765475, @@ -5154,7 +5152,7 @@ class Acc26Param(NamedTuple): pthermmw=2619.4223856129224, pinjwp=129.94611930107126, pgrossmw=982.28339460484608, - fusion_power=1985.1653095257811, + powfmw=1985.1653095257811, tfcmw=0, c26=56.327648771765475, expected_c26=56.310463295064743, @@ -5186,7 +5184,7 @@ def test_acc26_rut(acc26param, monkeypatch, costs): monkeypatch.setattr(heat_transport_variables, "pgrossmw", acc26param.pgrossmw) - monkeypatch.setattr(physics_variables, "fusion_power", acc26param.fusion_power) + monkeypatch.setattr(physics_variables, "powfmw", acc26param.powfmw) monkeypatch.setattr(tfcoil_variables, "tfcmw", acc26param.tfcmw) @@ -5488,7 +5486,7 @@ class CoelcParam(NamedTuple): wtgpd: Any = None - f_helium3: Any = None + fhe3: Any = None tcycle: Any = None @@ -5585,7 +5583,7 @@ class CoelcParam(NamedTuple): pnetelmw=493.01760776192009, itart=0, wtgpd=507.88376577416528, - f_helium3=0, + fhe3=0, tcycle=10864.426139387357, tburn=0, outfile=11, @@ -5669,7 +5667,7 @@ class CoelcParam(NamedTuple): pnetelmw=422.4198205312706, itart=0, wtgpd=507.72524666099866, - f_helium3=0, + fhe3=0, tcycle=864.42613938735622, tburn=10230.533336387549, outfile=11, @@ -5783,7 +5781,7 @@ def test_coelc(coelcparam, monkeypatch, costs): monkeypatch.setattr(physics_variables, "wtgpd", coelcparam.wtgpd) - monkeypatch.setattr(physics_variables, "f_helium3", coelcparam.f_helium3) + monkeypatch.setattr(physics_variables, "fhe3", coelcparam.fhe3) monkeypatch.setattr(times_variables, "tcycle", coelcparam.tcycle) diff --git a/tests/unit/test_costs_2015.py b/tests/unit/test_costs_2015.py index 85c0bce6..9934b946 100644 --- a/tests/unit/test_costs_2015.py +++ b/tests/unit/test_costs_2015.py @@ -13712,7 +13712,7 @@ class CalcRemainingSubsystemsParam(NamedTuple): pdivt: Any = None - fusion_power: Any = None + powfmw: Any = None res_time: Any = None @@ -13763,7 +13763,7 @@ class CalcRemainingSubsystemsParam(NamedTuple): CalcRemainingSubsystemsParam( pinjmw=43.745615131519273, pdivt=94.203763268233445, - fusion_power=1726.9363495105574, + powfmw=1726.9363495105574, res_time=2562.1529343276788, itr_sum=687546826.85995734, ensxpfm=34911.529178721656, @@ -14859,7 +14859,7 @@ class CalcRemainingSubsystemsParam(NamedTuple): CalcRemainingSubsystemsParam( pinjmw=43.745615131519266, pdivt=94.062415557688894, - fusion_power=1726.1944723154274, + powfmw=1726.1944723154274, res_time=2562.1529343276788, itr_sum=1176301401.3409874, ensxpfm=34908.848681194133, @@ -15976,7 +15976,7 @@ def test_calc_remaining_subsystems( monkeypatch.setattr(physics_variables, "pdivt", calcremainingsubsystemsparam.pdivt) monkeypatch.setattr( - physics_variables, "fusion_power", calcremainingsubsystemsparam.fusion_power + physics_variables, "powfmw", calcremainingsubsystemsparam.powfmw ) monkeypatch.setattr( diff --git a/tests/unit/test_current_drive.py b/tests/unit/test_current_drive.py index ee4ea56e..9a88a102 100644 --- a/tests/unit/test_current_drive.py +++ b/tests/unit/test_current_drive.py @@ -33,7 +33,7 @@ class CudrivParam(NamedTuple): plhybd: Any = None - beam_current: Any = None + cnbeam: Any = None porbitlossmw: Any = None @@ -75,7 +75,7 @@ class CudrivParam(NamedTuple): etanbi: Any = None - beam_energy: Any = None + enbeam: Any = None effcd: Any = None @@ -169,7 +169,7 @@ class CudrivParam(NamedTuple): pohmmw: Any = None - fusion_power: Any = None + powfmw: Any = None inductive_current_fraction: Any = None @@ -209,7 +209,7 @@ class CudrivParam(NamedTuple): echpwr=0, pnbeam=0, plhybd=0, - beam_current=0, + cnbeam=0, porbitlossmw=0, iefrf=10, iefrffix=0, @@ -230,7 +230,7 @@ class CudrivParam(NamedTuple): pinjmw=0, pwpnb=0, etanbi=0.29999999999999999, - beam_energy=1000, + enbeam=1000, effcd=0, pwplh=0, echwpow=0, @@ -277,7 +277,7 @@ class CudrivParam(NamedTuple): aux_current_fraction=0.12364081253383186, ignite=0, pohmmw=0, - fusion_power=0, + powfmw=0, inductive_current_fraction=0.59999999999999998, fvsbrnni=0.40000000000000002, startupratio=1, @@ -299,7 +299,7 @@ class CudrivParam(NamedTuple): echpwr=120.49600019005746, pnbeam=0, plhybd=0, - beam_current=0, + cnbeam=0, porbitlossmw=0, iefrf=10, iefrffix=0, @@ -320,7 +320,7 @@ class CudrivParam(NamedTuple): pinjmw=120.49600019005746, pwpnb=0, etanbi=0.29999999999999999, - beam_energy=1000, + enbeam=1000, effcd=0.05000000000000001, pwplh=0, echwpow=240.99200038011492, @@ -367,7 +367,7 @@ class CudrivParam(NamedTuple): aux_current_fraction=0.12364081253383186, ignite=0, pohmmw=0.76707314489379119, - fusion_power=1051.6562748933977, + powfmw=1051.6562748933977, inductive_current_fraction=0.59999999999999998, fvsbrnni=0.40000000000000002, startupratio=1, @@ -408,9 +408,7 @@ def test_cudriv(cudrivparam, monkeypatch, current_drive): monkeypatch.setattr(current_drive_variables, "plhybd", cudrivparam.plhybd) - monkeypatch.setattr( - current_drive_variables, "beam_current", cudrivparam.beam_current - ) + monkeypatch.setattr(current_drive_variables, "cnbeam", cudrivparam.cnbeam) monkeypatch.setattr( current_drive_variables, "porbitlossmw", cudrivparam.porbitlossmw @@ -454,7 +452,7 @@ def test_cudriv(cudrivparam, monkeypatch, current_drive): monkeypatch.setattr(current_drive_variables, "etanbi", cudrivparam.etanbi) - monkeypatch.setattr(current_drive_variables, "beam_energy", cudrivparam.beam_energy) + monkeypatch.setattr(current_drive_variables, "enbeam", cudrivparam.enbeam) monkeypatch.setattr(current_drive_variables, "effcd", cudrivparam.effcd) @@ -568,7 +566,7 @@ def test_cudriv(cudrivparam, monkeypatch, current_drive): monkeypatch.setattr(physics_variables, "pohmmw", cudrivparam.pohmmw) - monkeypatch.setattr(physics_variables, "fusion_power", cudrivparam.fusion_power) + monkeypatch.setattr(physics_variables, "powfmw", cudrivparam.powfmw) monkeypatch.setattr( physics_variables, diff --git a/tests/unit/test_dcll.py b/tests/unit/test_dcll.py index 0ed48ef6..ef3aa325 100644 --- a/tests/unit/test_dcll.py +++ b/tests/unit/test_dcll.py @@ -66,7 +66,7 @@ class DcllNeutronicsAndPowerParam(NamedTuple): idivrt: Any = None - neutron_power_total: Any = None + pneutmw: Any = None pradmw: Any = None @@ -110,7 +110,7 @@ class DcllNeutronicsAndPowerParam(NamedTuple): emultmw=0, ptfnuc=0, idivrt=1, - neutron_power_total=1587.7386535917431, + pneutmw=1587.7386535917431, pradmw=287.44866938104849, palpfwmw=19.835845058655043, expected_praddiv=33.056596978820579, @@ -142,7 +142,7 @@ class DcllNeutronicsAndPowerParam(NamedTuple): emultmw=325.06710220789364, ptfnuc=0, idivrt=1, - neutron_power_total=1587.2430556964196, + pneutmw=1587.2430556964196, pradmw=287.44866938104849, palpfwmw=19.829653483586444, expected_praddiv=33.056596978820579, @@ -232,9 +232,7 @@ def test_dcll_neutronics_and_power(dcllneutronicsandpowerparam, monkeypatch, dcl monkeypatch.setattr(physics_variables, "idivrt", dcllneutronicsandpowerparam.idivrt) monkeypatch.setattr( - physics_variables, - "neutron_power_total", - dcllneutronicsandpowerparam.neutron_power_total, + physics_variables, "pneutmw", dcllneutronicsandpowerparam.pneutmw ) monkeypatch.setattr(physics_variables, "pradmw", dcllneutronicsandpowerparam.pradmw) diff --git a/tests/unit/test_main.py b/tests/unit/test_main.py index 858886cf..1b775f80 100644 --- a/tests/unit/test_main.py +++ b/tests/unit/test_main.py @@ -101,7 +101,6 @@ def test_run_mode(process_obj, monkeypatch): # Mock the args attributes for --varyiterparams and --varyiterparamsconfig monkeypatch.setattr(process_obj, "args", argparse.Namespace(), raising=False) monkeypatch.setattr(process_obj.args, "varyiterparams", True, raising=False) - monkeypatch.setattr(process_obj.args, "version", False, raising=False) monkeypatch.setattr( process_obj.args, "varyiterparamsconfig", "file.conf", raising=False ) diff --git a/tests/unit/test_physics.py b/tests/unit/test_physics.py index 81e69354..ca43a7cf 100644 --- a/tests/unit/test_physics.py +++ b/tests/unit/test_physics.py @@ -89,7 +89,7 @@ class BootstrapFractionIter89Param(NamedTuple): rmajor: Any = None - plasma_volume: Any = None + vol: Any = None expected_bootipf: Any = None @@ -105,7 +105,7 @@ class BootstrapFractionIter89Param(NamedTuple): q95=3.5, q0=1, rmajor=8, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, expected_bootipf=0.30255906256775245, ), ), @@ -131,7 +131,7 @@ def test_bootstrap_fraction_iter89(bootstrapfractioniter89param, physics): q95=bootstrapfractioniter89param.q95, q0=bootstrapfractioniter89param.q0, rmajor=bootstrapfractioniter89param.rmajor, - plasma_volume=bootstrapfractioniter89param.plasma_volume, + vol=bootstrapfractioniter89param.vol, ) assert bootstrap_current_fraction == pytest.approx( @@ -327,7 +327,7 @@ class BootstrapFractionSauterParam(NamedTuple): xarea: Any = None - f_helium3: Any = None + fhe3: Any = None teped: Any = None @@ -374,7 +374,7 @@ class BootstrapFractionSauterParam(NamedTuple): bt=5.326133750416047, plasma_current=16528278.760008096, xarea=38.39822223637151, - f_helium3=0, + fhe3=0, teped=5.5, dene=8.016748468651018e19, te=12.570861186498382, @@ -439,9 +439,7 @@ def test_bootstrap_fraction_sauter(bootstrapfractionsauterparam, monkeypatch, ph monkeypatch.setattr(physics_variables, "xarea", bootstrapfractionsauterparam.xarea) - monkeypatch.setattr( - physics_variables, "f_helium3", bootstrapfractionsauterparam.f_helium3 - ) + monkeypatch.setattr(physics_variables, "fhe3", bootstrapfractionsauterparam.fhe3) monkeypatch.setattr(physics_variables, "teped", bootstrapfractionsauterparam.teped) @@ -832,7 +830,7 @@ def test_conhas(): class PlasmaCompositionParam(NamedTuple): - f_tritium_beam: Any = None + ftritbm: Any = None impurity_arr_frac: Any = None @@ -844,11 +842,11 @@ class PlasmaCompositionParam(NamedTuple): ignite: Any = None - f_alpha_electron: Any = None + falpe: Any = None afuel: Any = None - f_tritium: Any = None + ftrit: Any = None deni: Any = None @@ -864,7 +862,7 @@ class PlasmaCompositionParam(NamedTuple): rnone: Any = None - f_alpha_ion: Any = None + falpi: Any = None ralpne: Any = None @@ -878,7 +876,7 @@ class PlasmaCompositionParam(NamedTuple): pcoef: Any = None - alpha_rate_density_total: Any = None + alpharate: Any = None rnfene: Any = None @@ -888,15 +886,15 @@ class PlasmaCompositionParam(NamedTuple): te: Any = None - proton_rate_density: Any = None + protonrate: Any = None - f_deuterium: Any = None + fdeut: Any = None alphan: Any = None dnbeam: Any = None - f_helium3: Any = None + fhe3: Any = None dnalp: Any = None @@ -930,7 +928,7 @@ class PlasmaCompositionParam(NamedTuple): expected_impurity_arr_frac: Any = None - expected_f_alpha_electron: Any = None + expected_falpe: Any = None expected_afuel: Any = None @@ -942,7 +940,7 @@ class PlasmaCompositionParam(NamedTuple): expected_zeffai: Any = None - expected_f_alpha_ion: Any = None + expected_falpi: Any = None expected_dlamee: Any = None @@ -965,7 +963,7 @@ class PlasmaCompositionParam(NamedTuple): "plasmacompositionparam", ( PlasmaCompositionParam( - f_tritium_beam=9.9999999999999995e-07, + ftritbm=9.9999999999999995e-07, impurity_arr_frac=[ 0.90000000000000002, 0.10000000000000001, @@ -1001,9 +999,9 @@ class PlasmaCompositionParam(NamedTuple): ], alphat=1.45, ignite=0, - f_alpha_electron=0, + falpe=0, afuel=0, - f_tritium=0.5, + ftrit=0.5, deni=0, aion=0, dnitot=0, @@ -1011,23 +1009,23 @@ class PlasmaCompositionParam(NamedTuple): zeffai=0, rncne=0, rnone=0, - f_alpha_ion=0, + falpi=0, ralpne=0.10000000000000001, dlamee=0, rnbeam=0, zeff=0, dnz=0, pcoef=0, - alpha_rate_density_total=0, + alpharate=0, rnfene=0, abeam=0, dlamie=0, te=12, - proton_rate_density=0, - f_deuterium=0.5, + protonrate=0, + fdeut=0.5, alphan=1, dnbeam=0, - f_helium3=0, + fhe3=0, dnalp=0, dene=7.5e19, dnprot=0, @@ -1059,13 +1057,13 @@ class PlasmaCompositionParam(NamedTuple): 0.00038000000000000008, 5.0000000000000021e-06, ], - expected_f_alpha_electron=0.6845930883190634, + expected_falpe=0.6845930883190634, expected_afuel=2.5, expected_deni=5.8589175702454272e19, expected_aion=2.7265017998473029, expected_dnitot=6.6125550702454276e19, expected_zeffai=0.43248858851447464, - expected_f_alpha_ion=0.3154069116809366, + expected_falpi=0.3154069116809366, expected_dlamee=17.510652035055571, expected_zeff=2.0909945616489103, expected_dnz=28875000000000004, @@ -1076,7 +1074,7 @@ class PlasmaCompositionParam(NamedTuple): expected_first_call=0, ), PlasmaCompositionParam( - f_tritium_beam=9.9999999999999995e-07, + ftritbm=9.9999999999999995e-07, impurity_arr_frac=( 0.78128900936605694, 0.10000000000000001, @@ -1123,9 +1121,9 @@ class PlasmaCompositionParam(NamedTuple): ).transpose(), alphat=1.45, ignite=0, - f_alpha_electron=0.6845930883190634, + falpe=0.6845930883190634, afuel=2.5, - f_tritium=0.5, + ftrit=0.5, deni=5.8589175702454272e19, aion=2.7265017998473029, dnitot=6.6125550702454276e19, @@ -1133,23 +1131,23 @@ class PlasmaCompositionParam(NamedTuple): zeffai=0.43248858851447464, rncne=0, rnone=0, - f_alpha_ion=0.3154069116809366, + falpi=0.3154069116809366, ralpne=0.10000000000000001, dlamee=17.510652035055571, rnbeam=0, zeff=2.0909945616489103, dnz=28875000000000004, pcoef=1.0521775929921553, - alpha_rate_density_total=1.973996644759543e17, + alpharate=1.973996644759543e17, rnfene=0, abeam=2.0000010000000001, dlamie=17.810652035055568, te=12, - proton_rate_density=540072280299564.38, - f_deuterium=0.5, + protonrate=540072280299564.38, + fdeut=0.5, alphan=1, dnbeam=0, - f_helium3=0, + fhe3=0, dnalp=7.5e18, dene=7.5e19, dnprot=7500000000000000, @@ -1181,13 +1179,13 @@ class PlasmaCompositionParam(NamedTuple): 0.00038000000000000008, 5.0000000000000021e-06, ), - expected_f_alpha_electron=0.73096121787894142, + expected_falpe=0.73096121787894142, expected_afuel=2.5, expected_deni=5.8576156204039725e19, expected_aion=2.7262064639685937, expected_dnitot=6.6125550702454276e19, expected_zeffai=0.43258985127992111, - expected_f_alpha_ion=0.26903878212105858, + expected_falpi=0.26903878212105858, expected_dlamee=17.510652035055571, expected_zeff=2.0909945616489103, expected_dnz=28875000000000004, @@ -1215,7 +1213,7 @@ def test_plasma_composition(plasmacompositionparam, monkeypatch, physics): initialise_imprad() monkeypatch.setattr( - current_drive_variables, "f_tritium_beam", plasmacompositionparam.f_tritium_beam + current_drive_variables, "ftritbm", plasmacompositionparam.ftritbm ) monkeypatch.setattr( @@ -1240,15 +1238,11 @@ def test_plasma_composition(plasmacompositionparam, monkeypatch, physics): monkeypatch.setattr(physics_variables, "ignite", plasmacompositionparam.ignite) - monkeypatch.setattr( - physics_variables, "f_alpha_electron", plasmacompositionparam.f_alpha_electron - ) + monkeypatch.setattr(physics_variables, "falpe", plasmacompositionparam.falpe) monkeypatch.setattr(physics_variables, "afuel", plasmacompositionparam.afuel) - monkeypatch.setattr( - physics_variables, "f_tritium", plasmacompositionparam.f_tritium - ) + monkeypatch.setattr(physics_variables, "ftrit", plasmacompositionparam.ftrit) monkeypatch.setattr(physics_variables, "deni", plasmacompositionparam.deni) @@ -1264,9 +1258,7 @@ def test_plasma_composition(plasmacompositionparam, monkeypatch, physics): monkeypatch.setattr(physics_variables, "rnone", plasmacompositionparam.rnone) - monkeypatch.setattr( - physics_variables, "f_alpha_ion", plasmacompositionparam.f_alpha_ion - ) + monkeypatch.setattr(physics_variables, "falpi", plasmacompositionparam.falpi) monkeypatch.setattr(physics_variables, "ralpne", plasmacompositionparam.ralpne) @@ -1281,9 +1273,7 @@ def test_plasma_composition(plasmacompositionparam, monkeypatch, physics): monkeypatch.setattr(physics_variables, "pcoef", plasmacompositionparam.pcoef) monkeypatch.setattr( - physics_variables, - "alpha_rate_density_total", - plasmacompositionparam.alpha_rate_density_total, + physics_variables, "alpharate", plasmacompositionparam.alpharate ) monkeypatch.setattr(physics_variables, "rnfene", plasmacompositionparam.rnfene) @@ -1295,22 +1285,16 @@ def test_plasma_composition(plasmacompositionparam, monkeypatch, physics): monkeypatch.setattr(physics_variables, "te", plasmacompositionparam.te) monkeypatch.setattr( - physics_variables, - "proton_rate_density", - plasmacompositionparam.proton_rate_density, + physics_variables, "protonrate", plasmacompositionparam.protonrate ) - monkeypatch.setattr( - physics_variables, "f_deuterium", plasmacompositionparam.f_deuterium - ) + monkeypatch.setattr(physics_variables, "fdeut", plasmacompositionparam.fdeut) monkeypatch.setattr(physics_variables, "alphan", plasmacompositionparam.alphan) monkeypatch.setattr(physics_variables, "dnbeam", plasmacompositionparam.dnbeam) - monkeypatch.setattr( - physics_variables, "f_helium3", plasmacompositionparam.f_helium3 - ) + monkeypatch.setattr(physics_variables, "fhe3", plasmacompositionparam.fhe3) monkeypatch.setattr(physics_variables, "dnalp", plasmacompositionparam.dnalp) @@ -1350,8 +1334,8 @@ def test_plasma_composition(plasmacompositionparam, monkeypatch, physics): plasmacompositionparam.expected_impurity_arr_frac ) - assert physics_variables.f_alpha_electron == pytest.approx( - plasmacompositionparam.expected_f_alpha_electron + assert physics_variables.falpe == pytest.approx( + plasmacompositionparam.expected_falpe ) assert physics_variables.afuel == pytest.approx( @@ -1370,8 +1354,8 @@ def test_plasma_composition(plasmacompositionparam, monkeypatch, physics): plasmacompositionparam.expected_zeffai ) - assert physics_variables.f_alpha_ion == pytest.approx( - plasmacompositionparam.expected_f_alpha_ion + assert physics_variables.falpi == pytest.approx( + plasmacompositionparam.expected_falpi ) assert physics_variables.dlamee == pytest.approx( @@ -1533,9 +1517,9 @@ class PhyauxParam(NamedTuple): dnalp: Any = None - fusion_rate_density_total: Any = None + fusionrate: Any = None - alpha_rate_density_total: Any = None + alpharate: Any = None plasma_current: Any = None @@ -1543,7 +1527,7 @@ class PhyauxParam(NamedTuple): taueff: Any = None - plasma_volume: Any = None + vol: Any = None expected_burnup: Any = None @@ -1570,12 +1554,12 @@ class PhyauxParam(NamedTuple): dene=7.5e19, deni=5.8589175702454272e19, dnalp=7.5e18, - fusion_rate_density_total=1.9852091609123786e17, - alpha_rate_density_total=1.973996644759543e17, + fusionrate=1.9852091609123786e17, + alpharate=1.973996644759543e17, plasma_current=18398455.678867526, sbar=1, taueff=3.401323521525641, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, expected_burnup=0.20383432558954095, expected_dntau=2.5509926411442307e20, expected_figmer=55.195367036602576, @@ -1591,12 +1575,12 @@ class PhyauxParam(NamedTuple): dene=7.5e19, deni=5.8576156204039725e19, dnalp=7.5e18, - fusion_rate_density_total=1.9843269653375773e17, - alpha_rate_density_total=1.9731194318497056e17, + fusionrate=1.9843269653375773e17, + alpharate=1.9731194318497056e17, plasma_current=18398455.678867526, sbar=1, taueff=3.402116961408892, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, expected_burnup=0.20387039462081086, expected_dntau=2.5515877210566689e20, expected_figmer=55.195367036602576, @@ -1629,12 +1613,12 @@ def test_phyaux(phyauxparam, monkeypatch, physics): dene=phyauxparam.dene, deni=phyauxparam.deni, dnalp=phyauxparam.dnalp, - fusion_rate_density_total=phyauxparam.fusion_rate_density_total, - alpha_rate_density_total=phyauxparam.alpha_rate_density_total, + fusionrate=phyauxparam.fusionrate, + alpharate=phyauxparam.alpharate, plasma_current=phyauxparam.plasma_current, sbar=phyauxparam.sbar, taueff=phyauxparam.taueff, - plasma_volume=phyauxparam.plasma_volume, + vol=phyauxparam.vol, ) assert burnup == pytest.approx(phyauxparam.expected_burnup) @@ -1675,7 +1659,7 @@ class PohmParam(NamedTuple): ten: Any = None - plasma_volume: Any = None + vol: Any = None zeff: Any = None @@ -1700,7 +1684,7 @@ class PohmParam(NamedTuple): rmajor=8, rminor=2.6666666666666665, ten=12.626131115905864, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, zeff=2.0909945616489103, expected_pohmpv=0.0004062519138005805, expected_pohmmw=0.7670731448937912, @@ -1735,7 +1719,7 @@ def test_pohm(pohmparam, monkeypatch, physics): rmajor=pohmparam.rmajor, rminor=pohmparam.rminor, ten=pohmparam.ten, - plasma_volume=pohmparam.plasma_volume, + vol=pohmparam.vol, zeff=pohmparam.zeff, ) @@ -1847,7 +1831,7 @@ class PcondParam(NamedTuple): pohmmw: Any = None - f_alpha_plasma: Any = None + falpha: Any = None iinvqd: Any = None @@ -1857,7 +1841,7 @@ class PcondParam(NamedTuple): afuel: Any = None - alpha_power_total: Any = None + palpmw: Any = None aspect: Any = None @@ -1877,7 +1861,7 @@ class PcondParam(NamedTuple): kappa95: Any = None - non_alpha_charged_power: Any = None + pchargemw: Any = None pinjmw: Any = None @@ -1899,7 +1883,7 @@ class PcondParam(NamedTuple): tin: Any = None - plasma_volume: Any = None + vol: Any = None xarea: Any = None @@ -1931,12 +1915,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=32, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -1946,7 +1930,7 @@ class PcondParam(NamedTuple): hfact=6.1946504123280199, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -1957,7 +1941,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -1975,12 +1959,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=33, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -1990,7 +1974,7 @@ class PcondParam(NamedTuple): hfact=0.96163409847948844, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2001,7 +1985,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2019,12 +2003,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=34, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2034,7 +2018,7 @@ class PcondParam(NamedTuple): hfact=1.1960655150953154, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2045,7 +2029,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2063,12 +2047,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=35, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2078,7 +2062,7 @@ class PcondParam(NamedTuple): hfact=0.78453691772934719, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2089,7 +2073,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2107,12 +2091,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=36, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2122,7 +2106,7 @@ class PcondParam(NamedTuple): hfact=1.1619079679077555, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2133,7 +2117,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2151,12 +2135,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=37, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2166,7 +2150,7 @@ class PcondParam(NamedTuple): hfact=1.7340642483550435, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2177,7 +2161,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2195,12 +2179,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=38, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2210,7 +2194,7 @@ class PcondParam(NamedTuple): hfact=1.1117392853827024, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2221,7 +2205,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2239,12 +2223,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=39, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2254,7 +2238,7 @@ class PcondParam(NamedTuple): hfact=0.84477227311274361, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2265,7 +2249,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2283,12 +2267,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=40, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2298,7 +2282,7 @@ class PcondParam(NamedTuple): hfact=1.6096667103064701, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2309,7 +2293,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2327,12 +2311,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=41, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2342,7 +2326,7 @@ class PcondParam(NamedTuple): hfact=0.67053301699102119, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2353,7 +2337,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2371,12 +2355,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=42, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2386,7 +2370,7 @@ class PcondParam(NamedTuple): hfact=2.1212580310552207, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2397,7 +2381,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2415,12 +2399,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=43, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2430,7 +2414,7 @@ class PcondParam(NamedTuple): hfact=50.095480115636271, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2441,7 +2425,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2459,12 +2443,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=44, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2474,7 +2458,7 @@ class PcondParam(NamedTuple): hfact=87.869318916638761, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2485,7 +2469,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2503,12 +2487,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=45, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2518,7 +2502,7 @@ class PcondParam(NamedTuple): hfact=28.562137619592285, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2529,7 +2513,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2547,12 +2531,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=46, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2562,7 +2546,7 @@ class PcondParam(NamedTuple): hfact=0.50082256309019457, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2573,7 +2557,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2591,12 +2575,12 @@ class PcondParam(NamedTuple): pradpv=0.11824275660100725, kappaa_ipb=1.68145080681586, pohmmw=0.63634001890069991, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, iinvqd=1, isc=47, ignite=0, afuel=2.5, - alpha_power_total=319.03020327154269, + palpmw=319.03020327154269, aspect=3, bt=5.2375830857646202, dene=8.0593948787884524e19, @@ -2606,7 +2590,7 @@ class PcondParam(NamedTuple): hfact=0.77961193402355955, kappa=1.8500000000000001, kappa95=1.6517857142857142, - non_alpha_charged_power=1.2453296074483358, + pchargemw=1.2453296074483358, pinjmw=75.397788712812741, plasma_current=16616203.759182997, pcoreradpv=0.047757569353246924, @@ -2617,7 +2601,7 @@ class PcondParam(NamedTuple): te=12.437097421317889, ten=13.745148298980761, tin=13.745148298980761, - plasma_volume=1888.1711539956691, + vol=1888.1711539956691, xarea=38.39822223637151, zeff=2.4987360098030775, expected_kappaa_ipb=1.68145080681586, @@ -2654,14 +2638,14 @@ def test_pcond(pcondparam, monkeypatch, physics): monkeypatch.setattr(physics_variables, "pohmmw", pcondparam.pohmmw) - monkeypatch.setattr(physics_variables, "f_alpha_plasma", pcondparam.f_alpha_plasma) + monkeypatch.setattr(physics_variables, "falpha", pcondparam.falpha) kappaa, ptrepv, ptripv, tauee, tauei, taueff, powerht = physics.pcond( iinvqd=pcondparam.iinvqd, isc=pcondparam.isc, ignite=pcondparam.ignite, afuel=pcondparam.afuel, - alpha_power_total=pcondparam.alpha_power_total, + palpmw=pcondparam.palpmw, aspect=pcondparam.aspect, bt=pcondparam.bt, dene=pcondparam.dene, @@ -2671,7 +2655,7 @@ def test_pcond(pcondparam, monkeypatch, physics): hfact=pcondparam.hfact, kappa=pcondparam.kappa, kappa95=pcondparam.kappa95, - non_alpha_charged_power=pcondparam.non_alpha_charged_power, + pchargemw=pcondparam.pchargemw, pinjmw=pcondparam.pinjmw, plasma_current=pcondparam.plasma_current, pcoreradpv=pcondparam.pcoreradpv, @@ -2682,7 +2666,7 @@ def test_pcond(pcondparam, monkeypatch, physics): te=pcondparam.te, ten=pcondparam.ten, tin=pcondparam.tin, - plasma_volume=pcondparam.plasma_volume, + vol=pcondparam.vol, xarea=pcondparam.xarea, zeff=pcondparam.zeff, ) diff --git a/tests/unit/test_physics_functions.py b/tests/unit/test_physics_functions.py index 9b1ba97d..c7c38433 100644 --- a/tests/unit/test_physics_functions.py +++ b/tests/unit/test_physics_functions.py @@ -1,6 +1,5 @@ """Unit tests for physics_functions.f90.""" - from typing import Any, NamedTuple from process.fortran import physics_variables as pv from process import physics_functions @@ -9,10 +8,10 @@ from pytest import approx -class SetFusionPowersParam(NamedTuple): - f_alpha_plasma: Any = None +class Palph2Param(NamedTuple): + falpha: Any = None - f_deuterium: Any = None + fdeut: Any = None ifalphap: Any = None @@ -26,192 +25,220 @@ class SetFusionPowersParam(NamedTuple): dnitot: Any = None - f_alpha_electron: Any = None + falpe: Any = None - f_alpha_ion: Any = None + falpi: Any = None - alpha_power_beams: Any = None + palpnb: Any = None - charged_power_density: Any = None + pchargepv: Any = None ten: Any = None tin: Any = None - plasma_volume: Any = None + vol: Any = None - alpha_power_density_plasma: Any = None + palppv: Any = None - neutron_power_density_plasma: Any = None + pneutpv: Any = None - expected_alpha_power_density: Any = None + expected_palppv: Any = None - expected_neutron_power_density: Any = None + expected_pneutpv: Any = None - expected_alpha_power_total: Any = None + expected_palpmw: Any = None - expected_neutron_power_total: Any = None + expected_pneutmw: Any = None - expected_non_alpha_charged_power: Any = None + expected_pchargemw: Any = None expected_betaft: Any = None - expected_alpha_power_electron_density: Any = None + expected_palpepv: Any = None - expected_alpha_power_ion_density: Any = None + expected_palpipv: Any = None - expected_charged_particle_power: Any = None + expected_pfuscmw: Any = None - expected_fusion_power: Any = None + expected_powfmw: Any = None @pytest.mark.parametrize( - "setfusionpowersparam", + "palph2param", ( - SetFusionPowersParam( - f_alpha_plasma=0.95, - f_deuterium=0.5, - f_alpha_electron=0.68, - f_alpha_ion=0.32, - alpha_power_beams=0, - charged_power_density=0.00066, - plasma_volume=2426.25, - alpha_power_density_plasma=0.163, - neutron_power_density_plasma=0.654, - expected_alpha_power_density=0.163, - expected_neutron_power_density=0.654, - expected_alpha_power_total=395.47875, - expected_neutron_power_total=1586.7675, - expected_non_alpha_charged_power=1.601325, - expected_alpha_power_ion_density=0.049552, - expected_alpha_power_electron_density=0.105298, - expected_charged_particle_power=397.080075, - expected_fusion_power=1983.847575, + Palph2Param( + falpha=0.95, + fdeut=0.5, + ifalphap=1, + bp=0.86, + bt=5.3292, + dene=7.432e19, + deni=6.226e19, + dnitot=6.743e19, + falpe=0.68, + falpi=0.32, + palpnb=0, + pchargepv=0.00066, + ten=13.84, + tin=13.84, + vol=2426.25, + palppv=0.163, + pneutpv=0.654, + expected_palppv=0.163, + expected_pneutpv=0.654, + expected_palpmw=395.47875, + expected_pneutmw=1586.7675, + expected_pchargemw=1.601325, + expected_betaft=0.00423788, + expected_palpipv=0.049552, + expected_palpepv=0.105298, + expected_pfuscmw=397.080075, + expected_powfmw=1983.847575, ), - SetFusionPowersParam( - f_alpha_plasma=0.95, - f_deuterium=0.5, - f_alpha_electron=0.68, - f_alpha_ion=0.32, - alpha_power_beams=100.5, - charged_power_density=0.00066, - plasma_volume=2426.25, - alpha_power_density_plasma=0.163, - neutron_power_density_plasma=0.654, - expected_alpha_power_density=0.20442195, - expected_neutron_power_density=0.8183263050336705, - expected_alpha_power_total=495.97875, - expected_neutron_power_total=1985.464197587943, - expected_non_alpha_charged_power=1.601325, - expected_alpha_power_ion_density=0.062144272, - expected_alpha_power_electron_density=0.132056578, - expected_charged_particle_power=497.580075, - expected_fusion_power=2483.04427258794345, + Palph2Param( + falpha=0.95, + fdeut=0.5, + ifalphap=1, + bp=0.86, + bt=5.3292, + dene=7.432e19, + deni=6.226e19, + dnitot=6.743e19, + falpe=0.68, + falpi=0.32, + palpnb=100.5, + pchargepv=0.00066, + ten=13.84, + tin=13.84, + vol=2426.25, + palppv=0.163, + pneutpv=0.654, + expected_palppv=0.20442195, + expected_pneutpv=0.81968779, + expected_palpmw=495.97875, + expected_pneutmw=1988.7675, + expected_pchargemw=1.601325, + expected_betaft=0.00531482, + expected_palpipv=0.062144272, + expected_palpepv=0.132056578, + expected_pfuscmw=497.580075, + expected_powfmw=2486.347575, ), - SetFusionPowersParam( - f_alpha_plasma=0.95, - f_deuterium=0.5, - f_alpha_electron=0.68, - f_alpha_ion=0.32, - alpha_power_beams=100.5, - charged_power_density=0.00066, - plasma_volume=2426.25, - alpha_power_density_plasma=0.163, - neutron_power_density_plasma=0.654, - expected_alpha_power_density=0.20442195, - expected_neutron_power_density=0.8183263050336705, - expected_alpha_power_total=495.97875, - expected_neutron_power_total=1985.464197587943, - expected_non_alpha_charged_power=1.601325, - expected_alpha_power_ion_density=0.062144272, - expected_alpha_power_electron_density=0.132056578, - expected_charged_particle_power=497.580075, - expected_fusion_power=2483.0442725879434, + Palph2Param( + falpha=0.95, + fdeut=0.5, + ifalphap=0, + bp=0.86, + bt=5.3292, + dene=7.432e19, + deni=6.226e19, + dnitot=6.743e19, + falpe=0.68, + falpi=0.32, + palpnb=100.5, + pchargepv=0.00066, + ten=13.84, + tin=13.84, + vol=2426.25, + palppv=0.163, + pneutpv=0.654, + expected_palppv=0.20442195, + expected_pneutpv=0.81968779, + expected_palpmw=495.97875, + expected_pneutmw=1988.7675, + expected_pchargemw=1.601325, + expected_betaft=0.00701622, + expected_palpipv=0.062144272, + expected_palpepv=0.132056578, + expected_pfuscmw=497.580075, + expected_powfmw=2486.347575, ), - SetFusionPowersParam( - f_alpha_plasma=0.95, - f_deuterium=2.5, - f_alpha_electron=0.68, - f_alpha_ion=0.32, - alpha_power_beams=100.5, - charged_power_density=0.00066, - plasma_volume=2426.25, - alpha_power_density_plasma=0.163, - neutron_power_density_plasma=0.654, - expected_alpha_power_density=0.20442195, - expected_neutron_power_density=0.8183263050336705, - expected_alpha_power_total=495.97875, - expected_neutron_power_total=1985.464197587943, - expected_non_alpha_charged_power=1.601325, - expected_alpha_power_ion_density=0.062144272, - expected_alpha_power_electron_density=0.132056578, - expected_charged_particle_power=497.580075, - expected_fusion_power=2483.0442725879434, + Palph2Param( + falpha=0.95, + fdeut=2.5, + ifalphap=0, + bp=0.86, + bt=5.3292, + dene=7.432e19, + deni=6.226e19, + dnitot=6.743e19, + falpe=0.68, + falpi=0.32, + palpnb=100.5, + pchargepv=0.00066, + ten=13.84, + tin=13.84, + vol=2426.25, + palppv=0.163, + pneutpv=0.654, + expected_palppv=0.20442195, + expected_pneutpv=0.81968779, + expected_palpmw=495.97875, + expected_pneutmw=1988.7675, + expected_pchargemw=1.601325, + expected_betaft=0.0, + expected_palpipv=0.062144272, + expected_palpepv=0.132056578, + expected_pfuscmw=497.580075, + expected_powfmw=2486.347575, ), ), ) -def test_set_fusion_powers(setfusionpowersparam, monkeypatch): +def test_palph2(palph2param, monkeypatch): """ - Automatically generated Regression Unit Test for set_fusion_powers(). + Automatically generated Regression Unit Test for palph2. This test was generated using data from tracking/baseline_2018/baseline_2018_IN.DAT. - :param setfusionpowersparam: the data used to mock and assert in this test. - :type setfusionpowersparam: setfusionpowersparam + :param palph2param: the data used to mock and assert in this test. + :type palph2param: palph2param :param monkeypatch: pytest fixture used to mock module/class variables :type monkeypatch: _pytest.monkeypatch.monkeypatch """ - monkeypatch.setattr(pv, "f_alpha_plasma", setfusionpowersparam.f_alpha_plasma) - monkeypatch.setattr(pv, "f_deuterium", setfusionpowersparam.f_deuterium) + monkeypatch.setattr(pv, "falpha", palph2param.falpha) + monkeypatch.setattr(pv, "fdeut", palph2param.fdeut) ( - neutron_power_density_total, - alpha_power_plasma, - alpha_power_total, - neutron_power_plasma, - neutron_power_total, - non_alpha_charged_power, - alpha_power_density_total, - alpha_power_electron_density, - alpha_power_ions_density, - charged_particle_power, - fusion_power, - ) = physics_functions.set_fusion_powers( - f_alpha_electron=setfusionpowersparam.f_alpha_electron, - f_alpha_ion=setfusionpowersparam.f_alpha_ion, - alpha_power_beams=setfusionpowersparam.alpha_power_beams, - charged_power_density=setfusionpowersparam.charged_power_density, - neutron_power_density_plasma=setfusionpowersparam.neutron_power_density_plasma, - plasma_volume=setfusionpowersparam.plasma_volume, - alpha_power_density_plasma=setfusionpowersparam.alpha_power_density_plasma, + pneutpv, + palpmw, + pneutmw, + pchargemw, + betaft, + palppv, + palpepv, + palpipv, + pfuscmw, + powfmw, + ) = physics_functions.palph2( + ifalphap=palph2param.ifalphap, + bp=palph2param.bp, + bt=palph2param.bt, + dene=palph2param.dene, + deni=palph2param.deni, + dnitot=palph2param.dnitot, + falpe=palph2param.falpe, + falpi=palph2param.falpi, + palpnb=palph2param.palpnb, + pchargepv=palph2param.pchargepv, + ten=palph2param.ten, + tin=palph2param.tin, + vol=palph2param.vol, + palppv=palph2param.palppv, + pneutpv=palph2param.pneutpv, ) - assert alpha_power_density_total == pytest.approx( - setfusionpowersparam.expected_alpha_power_density - ) - assert neutron_power_density_total == pytest.approx( - setfusionpowersparam.expected_neutron_power_density - ) - assert alpha_power_total == pytest.approx( - setfusionpowersparam.expected_alpha_power_total - ) - assert neutron_power_total == pytest.approx( - setfusionpowersparam.expected_neutron_power_total - ) - assert non_alpha_charged_power == pytest.approx( - setfusionpowersparam.expected_non_alpha_charged_power - ) - assert alpha_power_electron_density == pytest.approx( - setfusionpowersparam.expected_alpha_power_electron_density - ) - assert alpha_power_ions_density == pytest.approx( - setfusionpowersparam.expected_alpha_power_ion_density - ) - assert charged_particle_power == pytest.approx( - setfusionpowersparam.expected_charged_particle_power - ) - assert fusion_power == pytest.approx(setfusionpowersparam.expected_fusion_power) + assert palppv == pytest.approx(palph2param.expected_palppv) + assert pneutpv == pytest.approx(palph2param.expected_pneutpv) + assert palpmw == pytest.approx(palph2param.expected_palpmw) + assert pneutmw == pytest.approx(palph2param.expected_pneutmw) + assert pchargemw == pytest.approx(palph2param.expected_pchargemw) + assert betaft == pytest.approx(palph2param.expected_betaft) + assert palpepv == pytest.approx(palph2param.expected_palpepv) + assert palpipv == pytest.approx(palph2param.expected_palpipv) + assert pfuscmw == pytest.approx(palph2param.expected_pfuscmw) + assert powfmw == pytest.approx(palph2param.expected_powfmw) @pytest.mark.parametrize( @@ -235,15 +262,15 @@ def test_bosch_hale(t, reaction, expected_bosch_hale): :param expected_bosch_hale: expected return value from the bosch_hale function :type expected_bosch_hale: float """ - bosch_hale = physics_functions.bosch_hale_reactivity( + bosch_hale = physics_functions.bosch_hale( np.array([t]), physics_functions.BoschHaleConstants(**reaction) ) assert bosch_hale == approx(expected_bosch_hale, abs=1e-23) -def test_beam_fusion(): - beta_beam, beam_density_out, alpha_power_beams = physics_functions.beam_fusion( +def test_beamfus(): + betanb, dnbeam2, palpnb = physics_functions.beamfus( 1.0, 1.5, 0.85, @@ -252,6 +279,7 @@ def test_beam_fusion(): 7.8e19, 6.6e19, 17.8, + 3520.0, 1000.0, 0.5, 0.5, @@ -263,20 +291,16 @@ def test_beam_fusion(): 0.425, ) - assert beta_beam == pytest.approx(0.0026264022466211366) - assert beam_density_out == pytest.approx(4.2133504058678246e17) - assert alpha_power_beams == pytest.approx(11.593221085189192) + assert betanb == pytest.approx(0.002616169278788316) + assert dnbeam2 == pytest.approx(4.2028390908892986e17) + assert palpnb == pytest.approx(11.506114015489336) def test_beamcalc(): - ( - deuterium_beam_alpha_power, - tritium_beam_alpha_power, - hot_beam_density, - beam_deposited_energy, - ) = physics_functions.beamcalc( + palfdb, palftb, nhot, ehot = physics_functions.beamcalc( 3.3e19, 3.3e19, + 3520.0, 1000.0, 276.7, 415.0, @@ -288,29 +312,27 @@ def test_beamcalc(): 2.8e-22, ) - assert deuterium_beam_alpha_power == pytest.approx(11.561197668655383) - assert tritium_beam_alpha_power == pytest.approx(1.0434445041616093e-05) - assert hot_beam_density == pytest.approx(4.1968331737565126e17) - assert beam_deposited_energy == pytest.approx(445.05787301616635) + assert palfdb == pytest.approx(11.489365278680932) + assert palftb == pytest.approx(1.0379265294979434e-05) + assert nhot == pytest.approx(4.1968331737565126e17) + assert ehot == pytest.approx(445.05787301616635) -def test__fast_ion_pressure_integral(): - pressure_integral = physics_functions._fast_ion_pressure_integral(1000.0, 276.7) +def test_xbrak(): + xbrak = physics_functions.xbrak(1000.0, 276.7) - assert pressure_integral == pytest.approx(1.1061397270783706) + assert xbrak == pytest.approx(1.1061397270783706) -def test_alpha_power_beam(): - alpha_power_beam = physics_functions.alpha_power_beam( - 316000000000, 3.3e19, 7.5e-22, 1888.0, 13.5, 2.8e-22 +def test_palphabm(): + palphabm = physics_functions.palphabm( + 3520.0, 316000000000, 3.3e19, 7.5e-22, 1888.0, 13.5, 2.8e-22 ) - assert alpha_power_beam == pytest.approx(1.047572705194316e-05) + assert palphabm == pytest.approx(1.0413228502045627e-05) -def test_beam_reaction_rate(): - beam_reaction_rate = physics_functions.beam_reaction_rate( - 3.01550071597, 5140000.0, 1000.0 - ) +def test_sgvhot(): + sgvhot = physics_functions.sgvhot(3, 5140000.0, 1000.0) - assert beam_reaction_rate == pytest.approx(7.465047902975452e-18) + assert sgvhot == pytest.approx(7.465047902975452e-18) diff --git a/tests/unit/test_power.py b/tests/unit/test_power.py index 3db0fc69..0f237374 100644 --- a/tests/unit/test_power.py +++ b/tests/unit/test_power.py @@ -2117,7 +2117,7 @@ class Power2Param(NamedTuple): pfwpmw: Any = None - alpha_power_total: Any = None + palpmw: Any = None ignite: Any = None @@ -2137,13 +2137,13 @@ class Power2Param(NamedTuple): iradloss: Any = None - fusion_power: Any = None + powfmw: Any = None - non_alpha_charged_power: Any = None + pchargemw: Any = None pscalingmw: Any = None - f_alpha_plasma: Any = None + falpha: Any = None ppump: Any = None @@ -2266,7 +2266,7 @@ class Power2Param(NamedTuple): htpsecmw=30.457120415306122, helpow_cryal=0, pfwpmw=0.89998039031509891, - alpha_power_total=396.66154806848488, + palpmw=396.66154806848488, ignite=0, pinnerzoneradmw=113.53817859231452, pradmw=287.99550050743289, @@ -2276,10 +2276,10 @@ class Power2Param(NamedTuple): idivrt=1, pohmmw=0.61391840981850698, iradloss=1, - fusion_power=1985.785106643267, - non_alpha_charged_power=1.6064693283140403, + powfmw=1985.785106643267, + pchargemw=1.6064693283140403, pscalingmw=325.08626176539281, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, ppump=0, i_tf_sup=1, tfcmw=0, @@ -2368,7 +2368,7 @@ class Power2Param(NamedTuple): htpsecmw=30.448114159579291, helpow_cryal=0, pfwpmw=0.068213156646500808, - alpha_power_total=396.53774329057228, + palpmw=396.53774329057228, ignite=0, pinnerzoneradmw=113.53817859231452, pradmw=287.99550050743289, @@ -2378,10 +2378,10 @@ class Power2Param(NamedTuple): idivrt=1, pohmmw=0.61391840981850698, iradloss=1, - fusion_power=1985.1653095257811, - non_alpha_charged_power=1.6059679220663614, + powfmw=1985.1653095257811, + pchargemw=1.6059679220663614, pscalingmw=325.00280675287695, - f_alpha_plasma=0.94999999999999996, + falpha=0.94999999999999996, ppump=0, i_tf_sup=1, tfcmw=0, @@ -2542,9 +2542,7 @@ def test_power2(power2param, monkeypatch, power): monkeypatch.setattr(pfcoil_variables, "pfwpmw", power2param.pfwpmw) - monkeypatch.setattr( - physics_variables, "alpha_power_total", power2param.alpha_power_total - ) + monkeypatch.setattr(physics_variables, "palpmw", power2param.palpmw) monkeypatch.setattr(physics_variables, "ignite", power2param.ignite) @@ -2566,17 +2564,13 @@ def test_power2(power2param, monkeypatch, power): monkeypatch.setattr(physics_variables, "iradloss", power2param.iradloss) - monkeypatch.setattr(physics_variables, "fusion_power", power2param.fusion_power) + monkeypatch.setattr(physics_variables, "powfmw", power2param.powfmw) - monkeypatch.setattr( - physics_variables, - "non_alpha_charged_power", - power2param.non_alpha_charged_power, - ) + monkeypatch.setattr(physics_variables, "pchargemw", power2param.pchargemw) monkeypatch.setattr(physics_variables, "pscalingmw", power2param.pscalingmw) - monkeypatch.setattr(physics_variables, "f_alpha_plasma", power2param.f_alpha_plasma) + monkeypatch.setattr(physics_variables, "falpha", power2param.falpha) monkeypatch.setattr(tfcoil_variables, "ppump", power2param.ppump) diff --git a/tests/unit/test_stellarator.py b/tests/unit/test_stellarator.py index 2c644e59..207f58e2 100644 --- a/tests/unit/test_stellarator.py +++ b/tests/unit/test_stellarator.py @@ -58,7 +58,7 @@ class StgeomParam(NamedTuple): sareao: Any = None - plasma_volume: Any = None + vol: Any = None xarea: Any = None @@ -90,7 +90,7 @@ class StgeomParam(NamedTuple): rminor=1.7842660178426601, sarea=0, sareao=0, - plasma_volume=0, + vol=0, xarea=0, bt=5.5, stella_config_plasma_volume=1422.6300000000001, @@ -108,7 +108,7 @@ class StgeomParam(NamedTuple): rminor=1.7842660178426601, sarea=1925.3641313657533, sareao=962.68206568287667, - plasma_volume=1385.2745877380669, + vol=1385.2745877380669, xarea=10.001590778710231, bt=5.5, stella_config_plasma_volume=1422.6300000000001, @@ -145,7 +145,7 @@ def test_stgeom(stgeomparam, monkeypatch, stellarator): monkeypatch.setattr(physics_variables, "sareao", stgeomparam.sareao) - monkeypatch.setattr(physics_variables, "plasma_volume", stgeomparam.plasma_volume) + monkeypatch.setattr(physics_variables, "vol", stgeomparam.vol) monkeypatch.setattr(physics_variables, "xarea", stgeomparam.xarea) @@ -173,7 +173,7 @@ def test_stgeom(stgeomparam, monkeypatch, stellarator): assert physics_variables.sareao == pytest.approx(stgeomparam.expected_sareao) - assert physics_variables.plasma_volume == pytest.approx(stgeomparam.expected_vol) + assert physics_variables.vol == pytest.approx(stgeomparam.expected_vol) assert physics_variables.xarea == pytest.approx(stgeomparam.expected_xarea) @@ -2657,9 +2657,9 @@ class StCalcEffChiParam(NamedTuple): ne0: Any = None - f_alpha_plasma: Any = None + falpha: Any = None - alpha_power_density_total: Any = None + palppv: Any = None pcoreradpv: Any = None @@ -2667,7 +2667,7 @@ class StCalcEffChiParam(NamedTuple): alphat: Any = None - plasma_volume: Any = None + vol: Any = None sarea: Any = None @@ -2688,12 +2688,12 @@ class StCalcEffChiParam(NamedTuple): StCalcEffChiParam( te0=19.108573496973477, ne0=3.4479000000000007e20, - f_alpha_plasma=0.95000000000000007, - alpha_power_density_total=1.2629524018077414, + falpha=0.95000000000000007, + palppv=1.2629524018077414, pcoreradpv=0.10762698429338043, alphan=0.35000000000000003, alphat=1.2, - plasma_volume=1385.8142655379029, + vol=1385.8142655379029, sarea=1926.0551116585129, rminor=1.7863900994187722, coreradius=0.60000000000000009, @@ -2705,12 +2705,12 @@ class StCalcEffChiParam(NamedTuple): StCalcEffChiParam( te0=17.5, ne0=3.4479000000000007e20, - f_alpha_plasma=0.95000000000000007, - alpha_power_density_total=1.0570658694225301, + falpha=0.95000000000000007, + palppv=1.0570658694225301, pcoreradpv=0.1002475669217598, alphan=0.35000000000000003, alphat=1.2, - plasma_volume=1385.8142655379029, + vol=1385.8142655379029, sarea=1926.0551116585129, rminor=1.7863900994187722, coreradius=0.60000000000000009, @@ -2738,15 +2738,9 @@ def test_st_calc_eff_chi(stcalceffchiparam, monkeypatch, stellarator): monkeypatch.setattr(physics_variables, "ne0", stcalceffchiparam.ne0) - monkeypatch.setattr( - physics_variables, "f_alpha_plasma", stcalceffchiparam.f_alpha_plasma - ) + monkeypatch.setattr(physics_variables, "falpha", stcalceffchiparam.falpha) - monkeypatch.setattr( - physics_variables, - "alpha_power_density_total", - stcalceffchiparam.alpha_power_density_total, - ) + monkeypatch.setattr(physics_variables, "palppv", stcalceffchiparam.palppv) monkeypatch.setattr(physics_variables, "pcoreradpv", stcalceffchiparam.pcoreradpv) @@ -2754,9 +2748,7 @@ def test_st_calc_eff_chi(stcalceffchiparam, monkeypatch, stellarator): monkeypatch.setattr(physics_variables, "alphat", stcalceffchiparam.alphat) - monkeypatch.setattr( - physics_variables, "plasma_volume", stcalceffchiparam.plasma_volume - ) + monkeypatch.setattr(physics_variables, "vol", stcalceffchiparam.vol) monkeypatch.setattr(physics_variables, "sarea", stcalceffchiparam.sarea) diff --git a/tests/unit/test_vacuum.py b/tests/unit/test_vacuum.py index 0e0e72b4..e505b520 100644 --- a/tests/unit/test_vacuum.py +++ b/tests/unit/test_vacuum.py @@ -50,7 +50,7 @@ def test_old_model(self, monkeypatch, vacuum): Values taken from first calling of the model in G-L_Nb-Ti regression test. """ - monkeypatch.setattr(pv, "fusion_power", 2115.3899563651776) + monkeypatch.setattr(pv, "powfmw", 2115.3899563651776) monkeypatch.setattr(pv, "te", 15.872999999999999) monkeypatch.setattr(tv, "tramp", 30) monkeypatch.setattr(vacv, "dwell_pump", 0) diff --git a/tracking/tracking_data.py b/tracking/tracking_data.py index 380f53ef..ad2372f1 100644 --- a/tracking/tracking_data.py +++ b/tracking/tracking_data.py @@ -125,7 +125,7 @@ class ProcessTracker: "bt", "hfact", "kappa", - "fusion_power", + "powfmw", "teped", "powerht", "kappa95", @@ -139,7 +139,7 @@ class ProcessTracker: "te0", "pdivt", "nesep", - "plasma_volume", + "vol", "sarea", "pnetelmw", "etath",