Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
ff16482
refactor: Update Fusion Reactions navigation structure
chris-ashe Jul 26, 2024
148a518
Fix some variable names for clairty
chris-ashe Jul 26, 2024
343f91e
Convert physics functions to Python
timothy-nunn Aug 14, 2024
2632a3c
Merge branch 'main' into 3260-update-the-fusion-reactions-section-of-…
chris-ashe Oct 2, 2024
4b5935a
Merge branch '3282-convert-physics_functionsf90-to-python' into 3260-…
chris-ashe Oct 2, 2024
e279c6b
Add new duterium_branching() function from Bosch-Hale to calculate th…
chris-ashe Oct 4, 2024
8f889fc
Merge branch 'main' into 3260-update-the-fusion-reactions-section-of-…
chris-ashe Oct 9, 2024
47971c7
Update electron mass constant to use the more accurate value
chris-ashe Oct 9, 2024
3502393
Update proton mass constant to use the more accurate value
chris-ashe Oct 9, 2024
cee0928
Add new constants for the deuteron, triton, neutron, alpha particle a…
chris-ashe Oct 9, 2024
0bf5f51
Merge branch 'main' into 3260-update-the-fusion-reactions-section-of-…
chris-ashe Oct 9, 2024
d2072c3
Revert variable names back to lowercase due to parsing issue with f2py
chris-ashe Oct 9, 2024
0073b8d
Update electron mass constant to use the more accurate value. Add new…
chris-ashe Oct 9, 2024
e7c1d95
Add new constants for the speed of light, D-T reaction energy, D-3He …
chris-ashe Oct 9, 2024
e5fb999
Refactor bosch_hale function to use more descriptive name and update …
chris-ashe Oct 9, 2024
f9e663c
Add new constants for fusion reaction energy fractions
chris-ashe Oct 11, 2024
0c4c6e1
Refactor fint() into fusion_rate_integral() to be more descriptive an…
chris-ashe Oct 11, 2024
b9a0f3d
Refactor variable name palppv to alpha_power_density for clarity and …
chris-ashe Oct 11, 2024
e27ec6f
Refactor variable name palppv to alpha_power_density for clarity and …
chris-ashe Oct 11, 2024
1453f1a
Refactor variable name pneutpv to neutron_power_density for clarity a…
chris-ashe Oct 11, 2024
caaddaa
Refactor variable names for fusion reactions in physics calculations
chris-ashe Oct 11, 2024
d7ea3ab
Refactor variable names fusionrate to fusion_rate_density
chris-ashe Oct 11, 2024
dd92f29
Refactor variable names for alpha particle production rate
chris-ashe Oct 11, 2024
64af8f7
Refactor variable names for proton rate density in physics calculations
chris-ashe Oct 11, 2024
e2932e0
Refactor variable name pdd to dd_power_density for clarity and consis…
chris-ashe Oct 11, 2024
2697f88
Refactor variable name pdtpv to dt_power_density for clarity and cons…
chris-ashe Oct 11, 2024
cc96f52
Refactor variable names for helium-3 power density in physics calcula…
chris-ashe Oct 11, 2024
767847c
Refactor variable name sigvdt to sigmav_dt_average for clarity and co…
chris-ashe Oct 11, 2024
a4511e3
Refactor sum_fusion_rates() to be more explicit and pythonic
chris-ashe Oct 11, 2024
74e0031
Refactor set_physics_variables() to update global and module variable…
chris-ashe Oct 11, 2024
1efbdd0
Refactor the fusion reaction function. Docstring and type hints added…
chris-ashe Oct 11, 2024
e3a3362
Refactor the fusion reaction function. Docstring and type hints added…
chris-ashe Oct 11, 2024
0b6a1e1
Implement the new reaction energies and product particle fractions f…
chris-ashe Oct 11, 2024
54e9f9f
Rename pdt to dt_power to be more explicit
chris-ashe Oct 11, 2024
c1fb953
Rename pdhe3 to dhe3_power to be more descriptive
chris-ashe Oct 11, 2024
26d53b7
Rename pdd to dd_power for more clarity
chris-ashe Oct 11, 2024
3efd055
Rename "vol" to "plasma_volume" in multiple files to improve code rea…
chris-ashe Oct 11, 2024
2dc7053
Add type hints and expand docstring to palph2()
chris-ashe Oct 14, 2024
4ea7251
Add new variable alpha_power_plasma that represents the alpha power p…
chris-ashe Oct 14, 2024
f6f0686
Rename palpnb to alpha_power_beams for more clarity and consistency
chris-ashe Oct 14, 2024
14e4410
Rename "palpmw" to "alpha_power_total" for clarity and consistency
chris-ashe Oct 14, 2024
e716816
Add new variable neutron_power_plasma that represents the neutron pow…
chris-ashe Oct 14, 2024
7d6af61
Rename pneutmw to neutron_power_total for more clarity and consistency
chris-ashe Oct 14, 2024
45f0b43
Add new variable to output called neutron_power_beams to show the bre…
chris-ashe Oct 14, 2024
807a18f
Rename pchargemw to non_alpha_charged_power for clarity
chris-ashe Oct 15, 2024
d170b2d
Add charged_particle_power as a new physics variable and add it to th…
chris-ashe Oct 15, 2024
9fa0487
Rename powfmw to fusion_power for clarity
chris-ashe Oct 15, 2024
361bcce
Rename palpipv to alpha_power_ion_density for clarity
chris-ashe Oct 15, 2024
fb24ba0
Rename palpepv to alpha_power_electron_density for clarity
chris-ashe Oct 15, 2024
238ae24
Add alpha_power_electron_density and alpha_power_electron_density to …
chris-ashe Oct 15, 2024
30f0f3b
Add main bulk of FusionReaction class documentation descriptions
chris-ashe Oct 15, 2024
f9c066d
Merge branch 'main' into 3260-update-the-fusion-reactions-section-of-…
chris-ashe Oct 15, 2024
f3fa786
Update BoschHale docs section
chris-ashe Oct 15, 2024
e9d5e34
Update variable name for charged particle power in stellarator.py and…
chris-ashe Oct 16, 2024
d4dc0e7
Remove ealphadt variable for the alpha particle energy in D-T reactio…
chris-ashe Oct 16, 2024
7ffaa74
Update the variable name falpha to f_alpha_plasma for clarity and con…
chris-ashe Oct 16, 2024
f1de161
Add new atomic mass unit and kilo electron volt constant. Rename palp…
chris-ashe Oct 17, 2024
f88f846
Update atomic mass units for deuterium and tritium and change multipl…
chris-ashe Oct 17, 2024
a4ead31
Add NBI beam fusion sections to new beam_reactions.md file. Rename xb…
chris-ashe Oct 21, 2024
6f28bae
Update beam_reactions.md with NBI beam fusion sections and function n…
chris-ashe Oct 21, 2024
effa21e
Rename sgvhot() to beam_reaction_rate()
chris-ashe Oct 21, 2024
84b2bcc
Rename _sigbmfus() to _beam_fusion_cross_section() and add to docs
chris-ashe Oct 22, 2024
d0e97d8
Refactor the _hot_beam_fusion_reaction_rate_integrand() function to i…
chris-ashe Oct 22, 2024
311dba2
Refactor output.f90 format strings for improved spacing and readability
chris-ashe Oct 25, 2024
1e5c633
Refactor palph2() to set_fusion_powers() and update naming of variabl…
chris-ashe Oct 25, 2024
b0a2587
Rename beamfus() to beam_fusion() and re-arrange beam fusion docs page
chris-ashe Oct 25, 2024
f3ff018
Rename cnbeam to beam_current
chris-ashe Oct 25, 2024
d77b540
Rename enbeam to beam_energy
chris-ashe Oct 25, 2024
db5f11b
Rename ftritbm to f_tritium_beam
chris-ashe Oct 25, 2024
d98ab57
Rename beam_energy_to_ions() to _fast_ion_pressure_integral(). Add ab…
chris-ashe Oct 29, 2024
fe24c05
Updated references to `dnbeam2` to `beam_density_out` in relevant files
chris-ashe Oct 29, 2024
a304e30
Rename betanb to beta_beam for consistency
chris-ashe Oct 29, 2024
614e25f
Beam reactions doc page structure refactor
chris-ashe Oct 29, 2024
ea279ea
Rename falpe to f_alpha_electron and falpi to f_alpha_ion
chris-ashe Oct 30, 2024
a650926
Refactor variable names for fuel ion fractions
chris-ashe Oct 30, 2024
6b1f169
Remove the fast alpha beta contribution from set_fusion_powers() and …
chris-ashe Oct 30, 2024
ed3cb9b
Add image showing the deuterium branching ratio and add discussion ab…
chris-ashe Oct 30, 2024
61f1056
Refactor bosch hale reactivity and replace electron with ion density
chris-ashe Oct 31, 2024
eecc8de
Update the dt_power, alpha_rate_density, fusion_rate_density to now h…
chris-ashe Oct 31, 2024
6737b2f
Add variables to obsolete variables dictionary and fix unit tests
chris-ashe Oct 31, 2024
d7ac240
Add constraint equations to docs and tidy
chris-ashe Nov 4, 2024
d177bc6
Merge branch 'main' into 3260-update-the-fusion-reactions-section-of-…
chris-ashe Nov 4, 2024
cd1df65
Revoke new outfile spacing and append fusion_power to pass integratio…
chris-ashe Nov 4, 2024
a7b7587
pre-commit file fix
chris-ashe Nov 4, 2024
15c42a1
Update Bosch-Hale documentation for clarity and consistency
chris-ashe Nov 6, 2024
267d800
Revert deni to dene to prevent profile normalisation errors
chris-ashe Nov 6, 2024
01fa171
Add f_dd_branching_trit attribute and update fusion reaction calculat…
chris-ashe Nov 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions documentation/proc-pages/development/add-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
!! powfmw : input real : fusion power (MW)
!! fusion_power : input real : fusion power (MW)
use constraint_variables, only: ffuspow, powfmax
use physics_variables, only: powfmw
use physics_variables, only: fusion_power
implicit none
type (constraint_args_type), intent(out) :: args

args%cc = 1.0D0 - ffuspow * powfmax/powfmw
args%cc = 1.0D0 - ffuspow * powfmax/fusion_power
args%con = powfmax * (1.0D0 - args%cc)
args%err = powfmw * args%cc
args%err = fusion_power * args%cc
args%symbol = '<'
args%units = 'MW'

Expand Down
10 changes: 5 additions & 5 deletions documentation/proc-pages/development/standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)) :: alpharate = 0.0D0
real(kind(1.0D0)) :: alpha_rate_density = 0.0D0
!! Alpha particle production rate (particles/m3/sec)
```

Expand Down Expand Up @@ -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, betanb, dene, ten, dnitot, tin, btot, beta
use constants, only: echarge,rmu0
use physics_variables, only: betaft, beta_beam, dene, ten, dnitot, tin, btot, beta
use constants, only: electron_charge,rmu0

implicit none

type(constraint_args_type), intent(out) :: args
!! constraint derived type

args%cc = 1.0D0 - (betaft + betanb + &
2.0D3*rmu0*echarge * (dene*ten + dnitot*tin)/btot**2 )/beta
args%cc = 1.0D0 - (betaft + beta_beam + &
2.0D3*rmu0*electron_charge * (dene*ten + dnitot*tin)/btot**2 )/beta
args%con = beta * (1.0D0 - args%cc)
args%err = beta * args%cc
args%symbol = '='
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ $$
Deuterium and tritium beam densities

$$
\mathtt{dend} = n_{\text{ion}} \times (1-\mathtt{ftritbm})
\mathtt{dend} = n_{\text{ion}} \times (1-\mathtt{f_tritium_beam})
$$

$$
\mathtt{dent} = n_{\text{ion}} \times \mathtt{ftritbm}
\mathtt{dent} = n_{\text{ion}} \times \mathtt{f_tritium_beam}
$$

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}$
Expand All @@ -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{enbeam}$ | neutral beam energy $(\text{keV})$ |
| $\mathtt{beam_energy}$ | 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})$ |
Expand Down Expand Up @@ -114,7 +114,7 @@ $$
Beam energy in MeV

$$
\mathtt{ebmev} = \frac{\mathtt{enbeam}}{10^3}
\mathtt{ebmev} = \frac{\mathtt{beam_energy}}{10^3}
$$

x and y coefficients of function J0(x,y) (IPDG89)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ $$

Deuterium and tritium beam densities:
$$
n_D = n_i * (1.0 - \mathtt{ftritbm})
n_D = n_i * (1.0 - \mathtt{f_tritium_beam})
$$

$$
n_T = n_i * \mathtt{ftritbm}
n_T = n_i * \mathtt{f_tritium_beam}
$$

Power split to ions / electrons is calculated via the the `cfnbi` method described [here](nbi_overview.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The answer ECGAM is the normalised efficiency $n_{\text{e}}IR/P$ with $n_{\text{


$$
\mathtt{mcsq} = 9.1095\times10^{-31} \frac{c^2}{1 \text{keV}}
\mathtt{mcsq} = m_{\text{e}} \frac{c^2}{1 \text{keV}}
$$

$$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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-falpha` portion of
All of the charged particle transport power leaving the plasma (excluding the `1-f_alpha_plasma` 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.

Expand Down
26 changes: 13 additions & 13 deletions documentation/proc-pages/physics-models/error.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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{falpha}) within the plasma and
a fraction of which remain (c.f. \texttt{f_alpha_plasma}) 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.
Expand Down Expand Up @@ -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{fdeut}, \texttt{ftrit} and
\texttt{fhe3}, respectively:
controlled using the three variables \texttt{f_deuterium}, \texttt{f_tritium} and
\texttt{f_helium3}, 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}}
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}}
\end{aligned}\]

PROCESS checks that \(fdeut + ftrit + fhe3 = 1.0\), and stops with an
PROCESS checks that \(f_deuterium + f_tritium + f_helium3 = 1.0\), and stops with an
error message otherwise.

\subsection{Plasma Profiles}\label{plasma-profiles}
Expand Down Expand Up @@ -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{fdeut}, \texttt{ftrit} and
\texttt{fhe3}, and the alpha particle fraction \texttt{ralpne} which may
account the fuel ratios \texttt{f_deuterium}, \texttt{f_tritium} and
\texttt{f_helium3}, 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
Expand Down Expand Up @@ -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\ =\ falpha*palppv\ +\ pchargepv\ +\ pohmpv\ +\ pinjmw/vol}
\texttt{pscaling\ +\ pradpv\ =\ f_alpha_plasma*alpha_power_density\ +\ charged_power_density\ +\ pohmpv\ +\ pinjmw/plasma_volume}

\texttt{iradloss\ =\ 1} -- Total power lost is scaling power plus core
radiation only

\texttt{pscaling\ +\ pcoreradpv\ =\ falpha*palppv\ +\ pchargepv\ +\ pohmpv\ +\ pinjmw/vol}
\texttt{pscaling\ +\ pcoreradpv\ =\ f_alpha_plasma*alpha_power_density\ +\ charged_power_density\ +\ pohmpv\ +\ pinjmw/plasma_volume}

\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\ =\ falpha*palppv\ +\ pchargepv\ +\ pohmpv\ +\ pinjmw/vol}
\texttt{pscaling\ =\ f_alpha_plasma*alpha_power_density\ +\ charged_power_density\ +\ pohmpv\ +\ pinjmw/plasma_volume}

\subsection{Plasma Core Power Balance}\label{plasma-core-power-balance}

Expand All @@ -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{falpha} of the alpha
the surrounding material. A fraction \texttt{f_alpha_plasma} 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
Expand Down
Loading