Princeton Fusion Systems MATLAB Toolboxes
MATLAB toolboxes for fusion energy analysis
|
Fusion engine module functions. View the published FusionEngine Demos. More...
Directories | |
directory | Cryo |
Cryocooler sizing. | |
directory | Economics |
Cost modeling. | |
directory | FRC |
FRC relations. | |
directory | Magnets |
Magnet fields and masses. | |
directory | PlasmaPhysics |
Plasma physics functions. | |
directory | Reactor |
Fusion reactor modeling. | |
directory | RFSystem |
Inductor and amplifier modeling. | |
directory | Shielding |
Shielding attenuation. | |
directory | Tokamak |
Tokamak beta and point modeling. | |
directory | Transport |
Transport loss relations. | |
Functions | |
function | Cryocooler (in qC, in tC) |
Cryocooler mass, efficiency, and performance coefficients. More... | |
function | CryocoolerBrake (in qC, in tC) |
Mass, efficiency, and performance coefficients of low-power cryocoolers. More... | |
function | HeatCapacityAluminum (in T) |
Heat capacity and enthalpy of aluminum at a given temperature. More... | |
function | ThermalConductivityG10 (in T) |
Thermal conductivity of G-10 Cryo at a given temperature. More... | |
function | ThermalConductivityInconel (in T) |
Give the thermal conductivity of Inconel at a given temperature. More... | |
function | CapacityFactor (in type) |
Capacity factor for a variety of power sources. More... | |
function | CRF (in dR, in n) |
Computes the capital recovery factor. More... | |
function | FuelCost (in type) |
Fuel cost for various energy sources. More... | |
function | LCOE (in oCC, in fOM, in vOM, in dR, in n, in cF, in hR, in fC, in t, in dPV) |
Computes the levelized cost of electricity (LCOE) More... | |
function | LCOF (in oCC, in fOM, in vOM, in dR, in n, in cF, in tC, in fP, in pS) |
Computes the levelized cost of fuel production. More... | |
function | MachineCost (in p, in pF, in cF, in fun) |
Infer the cost of a machine size given a few sizes and costs. More... | |
function | OvernightCapitalCost (in type) |
Returns Overnight Capital Cost of power plants and other parameters. More... | |
function | BetaBarnes (in rS, in rFC) |
Compute average beta for an FRC using Barnes relation. More... | |
function | BVacuum (in rMagnet, in rSeparatrix, in B0) |
Vacuum field calculated from magnet and separatrix radii. More... | |
function | FRCFieldLines (in r, in z, in B0, in rs, in kappa) |
FRC equilibrium flux and field strength. More... | |
function | FRCInertia (in rX, in rY, in rZ, in n, in mI) |
Inertia and mass of an FRC plasma. More... | |
function | MagneticFieldCurrentLoop (in i, in a, in p, in q, in x, in doPlot) |
Computes fields for multiple current loops. More... | |
function | MagnetMass (in rhoM, in sigmaM, in bM, in rM, in beta) |
Compute the magnetic structural mass using a shell method. More... | |
function | MagnetMassVirial (in rhoM, in sigmaM, in bM, in v) |
Compute the magnetic structural mass using a Virial method. More... | |
function | MagnetStoredEnergy (in b, in v) |
Energy stored in a magnet from field and volume. More... | |
function | NozzleRadius (in bAx, in bN, in rInner, in tSOL) |
Compute the nozzle coil inner radius from flux conservation. More... | |
function | AlfvenSpeed (in b, in rho) |
Computes the Alfven speed. More... | |
function | AtomicNumber (in r) |
Returns the atomic number for common fusion fuels. More... | |
function | BremsstrahlungFrequency (in nu, in tE, in nI, in zI) |
Computes the bremsstrahlung radiation as a function of wavelength. More... | |
function | BremsstrahlungWavelength (in lambda, in tE, in nI, in zI) |
Computes the bremsstrahlung radiation as a function of wavelength. More... | |
function | BurnupTime (in ni, in Ti, in r1, in r2) |
Reactant burnup time. More... | |
function | CollisionTimes (in Te, in ni, in Ti, in Z, in mu) |
Ion collisions in two-component plasma. More... | |
function | CoulombLog (in ne, in Te, in Z) |
Coulomb log for electron-ion collisions. More... | |
function | CoulombLogIons (in n, in T, in Z, in mu) |
Coulomb log for ion-ion collisions. More... | |
function | CrosssectionClassical (in e, in rB, in vB) |
Classical crosssection. More... | |
function | CrossSectionFromRest (in r1, in r2, in E) |
Cross section assuming the second particle is at rest. More... | |
function | CyclotronFrequency (in b) |
Computes the cyclotron frequency. More... | |
function | DebyeLength (in tE, in n0) |
The Debye Length. More... | |
function | DHe3Reaction (in t) |
Computes the fraction of D going to each reaction. More... | |
function | EffectiveCharge (in nI, in zI) |
Compute the effective charge in a plasma. More... | |
function | FusionReaction (in r1, in r2) |
Finds products of fusion reactions. More... | |
function | FusionReactionDD (in r) |
Finds products of D+D fusion reactions. More... | |
function | GasPressure (in n, in kT, in V) |
Computes Gas pressure. More... | |
function | GyroRadius (in t, in b, in mu, in z) |
Computes gyroradius. More... | |
function | IonCyclotronFrequency (in b, in z, in m) |
Computes the ion cyclotron frequency. More... | |
function | IonizationEnergy (in r) |
Returns the ionization energy per nuclei. More... | |
function | IonizationEnergyPlasma (in r1, in r2, in n1, in n2) |
Returns the ionization power per nuclei. More... | |
function | MaxwellianV (in r1, in r2, in tK) |
Computes Maxwellian thermonuclear reaction rates. More... | |
function | NumberOfElectrons (in nI, in zI) |
Computes the number of electrons. More... | |
function | PhotonEnergy (in frequency) |
Computes the photon energy. More... | |
function | PlasmaConstant (in q) |
Constants useful in plasma physics. More... | |
function | PlasmaFrequency (in n, in m) |
Returns the plasma frequency. More... | |
function | PlasmaHeating (in n, in kT) |
Computes plasma heating per unit volume. More... | |
function | PlasmaPressure (in nI, in zI, in tI, in tE) |
Computes fusion plasma pressure. More... | |
function | PlasmaRadius (in pNet, in pD, in aR) |
Computes the Plasma Radius from the desired power and net power density. More... | |
function | PlasmaVolume (in pNet, in pD) |
Computes the plasma vadius from the desired power and net power density. More... | |
function | PowerIonsToElectrons (in nE, in zI, in nI, in aI, in tI, in tE) |
Power lost by the ions to the electrons, Dawson model (relativistic). More... | |
function | ReactionString (in r1, in r2) |
Create a string with a reaction. More... | |
function | SigmaV (in r1, in r2, in tK) |
Computes thermonuclear reaction reaction rates. More... | |
function | SynchrotronFrequency (in b, in v) |
Computes the synchrotron frequency. More... | |
function | Beta (in b, in p) |
Compute the ratio of magnetic field and pressure. More... | |
function | BField (in p, in beta) |
Computes the magnetic field from plasma pressure and beta. More... | |
function | Bremsstrahlung (in nI, in zI, in tE, in method) |
Computes 0-D Bremsstrahlung radiation, NRL or McNally models. More... | |
function | CentralPressure (in t, in nI, in zI) |
Computes the central plasma pressure from temperature. More... | |
function | CentralTemperature (in p, in nI, in zI) |
Computes the central temperature from plasma pressure. More... | |
function | DensityFromFusionPower (in p, in r1, in r2, in tK) |
Calculate the ion density for volumetric fusion power. More... | |
function | DivertorCLR (in nUp, in qPar, in L, in unitIndex) |
Computes temperature drop over a conduction-limited divertor. More... | |
function | DMassFromPower (in energy, in time) |
Deuterium Reactant mass flow. More... | |
function | FirstWallThermalPower (in pLoss, in rWall) |
Computes the first wall thermal power. More... | |
function | FusionPower (in n1, in n2, in r1, in r2, in tK) |
Fusion power per reactants. More... | |
function | FusionPowerDHe3 (in ni, in Ti) |
Compute volumetric power for a D-He3 reactor ignoring tritium. More... | |
function | He3MassFromPower (in energy, in time) |
Helium-3 (He3) and Deuterium Reactant mass flow. More... | |
function | MagneticPressure (in beta, in b) |
Computes the magnetic pressure from beta and field. More... | |
function | MagnetRadius (in mM, in rhoM, in sigmaM, in bM) |
Computes magnet radius from mass, density, stess, and magnetic field. More... | |
function | NetFusionPower (in nI, in zI, in tI, in tE, in rW, in L, in b, in r1, in r2) |
Computes net fusion power after Synchrotron and Bremsstrahlung. More... | |
function | NumberDensityFromBeta (in beta, in b, in kT) |
Compute number density from beta, b and kT. More... | |
function | PlasmaInternalEnergy (in n, in t, in v) |
Computes the plasma internal energy. More... | |
function | PointFusionReaction (in r1, in r2, in nI, in v, in beta, in tI, in pType) |
Computes the net power from a fusion reaction. More... | |
function | PowerDD (in d) |
Compute the power for a He3-catalyzed D-D reactor. More... | |
function | PowerDHe3 (in d) |
Compute the power for a D-He3 reactor including Bremsstrahlung. More... | |
function | PowerDT (in d) |
Compute the power for a D-T fusion reactor. More... | |
function | ReactorField (in d, in beta) |
Calculate magnetic field from plasma pressure and beta. More... | |
function | Synchrotron (in nI, in zI, in b, in tE, in L, in rW) |
Computes synchrotron radiation. More... | |
function | VolumeAveragedPressure (in t, in nI, in zI) |
Computes the volume averaged pressure. More... | |
function | ClassERFAmplifier (in f, in p, in vCE, in vCC, in qL, in l1, in r) |
Class E Amplifier design tool. More... | |
function | Inductor (in d, in n) |
Model an inductor. More... | |
function | InductorDesign (in d) |
Design an inductor (fmincon) More... | |
function | MacroCrossSection (in rho, in formula, in M, in sigma) |
Compute a macroscopic cross-section for a material. More... | |
function | NumberDensity (in rho, in formula, in M) |
Number density of a molecule from its constituents. More... | |
function | ShieldingThickness (in limit, in years, in flux, in Sigma) |
Shielding thickness from neutron attenuation model. More... | |
function | XRayMassAttenCoeff (in el, in e, in file) |
Computes the X-ray mass attenuation coefficient. More... | |
function | EdgeLocalizedModes (in tau1, in tau2, in k, in t) |
Disturbance in a Tokamak plasma due to edge localized modes (ELMs). More... | |
function | FusionReactorDesign (in d, in mode, in pmin, in pmax, in n) |
FUSION REACTOR DESIGN FUNCTION (tokamaks) More... | |
function | SteadyStateTokamak (in d) |
Generates a statespace model of a tokamak. More... | |
function | TokamakBeta (in aR) |
Computes the tokamak beta from aspect ratio. More... | |
function | TPVHRHS (in x, in t, in d) |
Simulates a model of the vertical position of a plasma in a Tokamak. More... | |
function | ClassicalConfinementTime (in ni, in Ti, in Z, in mu, in B, in r_s) |
Classical ion confinement time. More... | |
function | CollisionsTrubnikov (in E1, in T2, in n2, in m1, in m2, in Z1, in Z2) |
Collision rates calculated using the Trubnikov potentials. More... | |
function | IonElectronEquilibration (in Te, in ni, in Ti, in Z, in mu) |
Ion-electron collision rate with different temperatures. More... | |
function | IonIonCollisionRate (in n, in T, in Z, in mu) |
Ion-ion collision rate. More... | |
function | LawsonProduct (in Te, in ni, in Ti, in Z, in mu, in B, in rS) |
Compute triple product using classical confinement. More... | |
function | PowerIE (in zI, in nI, in aI, in Ti, in Te) |
Power from ions to electrons, NRL model. More... | |
function | TransportPower (in n, in T, in tau, in v) |
Compute transport power loss given confinement time. More... | |
Fusion engine module functions. View the published FusionEngine Demos.
function AlfvenSpeed | ( | in | b, |
in | rho | ||
) |
Computes the Alfven speed.
The Alfvén speed is the speed of the waves resulting from the mass of the ions and the restoring force of the magnetic field: The Alfvén speed is the speed at which hydromagnetic waves travel along a magnetic field line and is the characteristic speed at which perturbations of magnetic field lines travel.
Type AlfvenSpeed for a demo
v = AlfvenSpeed( b, rho )
b (1,:) Magnetic field (T) rho (1,1) Density (kg/m^3)
v (1,:) Velocity (m/s)
References and().
function AtomicNumber | ( | in | r | ) |
function Beta | ( | in | b, |
in | p | ||
) |
Compute the ratio of magnetic field and pressure.
Type Beta for a demo.
beta = Beta( b, p )
b (:) Magnetic field (T) pPlas (:) Pressure of plasma (N/m^2)
beta (:) Beta
References: Glasstone, S., and R. H. Lovberg, Controlled Thermonuclear
Reactions, Krieger, 1975, pp. 53
References and().
function BetaBarnes | ( | in | rS, |
in | rFC | ||
) |
Compute average beta for an FRC using Barnes relation.
The Barnes relation does not include plasma pressure or radial field beyond the X point, hence gives a lower limit on beta.
beta = BetaBarnes( rS, rFC )
rS (1,:) Separatrix radius rFC (1,:) Wall (flux conserving) radius
beta (:,:) Average beta
Reference:
W. T. Armstrong et al, "Field-reversed experiments (FRX) on compact toroids," The Physics of Fluids 24, 2068 (1981)
function BField | ( | in | p, |
in | beta | ||
) |
Computes the magnetic field from plasma pressure and beta.
Type BField for a demo.
bField = BField( p, beta )
p (1,:) Plasma Pressure (N/m^2) beta (1,1) Beta constant
b (1,:) Magnetic Field (T)
References: Schaffer, M.J., "Considerations for Steady-State FRC-Based Fusion Space Propulsion", GA-A23579, December 2000. General Atomics, San Diego, CA
References and().
function Bremsstrahlung | ( | in | nI, |
in | zI, | ||
in | tE, | ||
in | method | ||
) |
Computes 0-D Bremsstrahlung radiation, NRL or McNally models.
Includes e-e bremsstrahlung and relativistic effects. This is radiation lost by the electrons. This model is for hydrogen-like plasmas.
Type Bremsstrahlung for a demo.
p = Bremsstrahlung( nI, zI, tE, method )
nI (1,m) Ion densities (#/m^3) zI (1,m) Ion atomic numbers tE (1,n) Electron temperature (keV) method (1,1) 1 = NRL, 2 = McNally (relativistic terms)
p (1,n) Bremsstrahlung (MW/m^3)
References: 2016 NRL Plasma Formulary, Office of Naval Research;
McNally, Physics of Fusion Fuel Cycles, Nuclear Technology/Fusion, Vol. 2, Jan 1982
function BremsstrahlungFrequency | ( | in | nu, |
in | tE, | ||
in | nI, | ||
in | zI | ||
) |
Computes the bremsstrahlung radiation as a function of wavelength.
Calls BremsstrahlungWavelength. Type BremsstrahlungWavelength for a demo.
e = BremsstrahlungFrequency( nu, tE, nI, zI )
nu (1,:) Frequency (Hz) tE (1,1) Electron temperature (eV) nI (1,2) Number density of ions (cm^-3) zI (1,2) Ion charges
e (1,:) Bremsstrahlung (W/cm^3 nm)
function BremsstrahlungWavelength | ( | in | lambda, |
in | tE, | ||
in | nI, | ||
in | zI | ||
) |
Computes the bremsstrahlung radiation as a function of wavelength.
Type BremsstrahlungWavelength for a demo.
e = BremsstrahlungWavelength( lambda, tE, nI, zI )
lambda (1,:) Wavelength (nm) tE (1,1) Electron temperature (eV) nI (1,2) Number density of ions (cm^-3) zI (1,2) Ion charges
e (1,:) Bremsstrahlung (W/cm^3 nm)
Reference: Xianli Huang, Shigeru Morita, Tetsutarou Oishi, Motoshi
Goto and Hongming Zhang,"Evaluation of Zeff Profile in Low-Density and High-Ti Discharges with Carbon Pellet Injection based on Space-Resolved EUV Spectroscopy in LHD," Plasma and Fusion Research: Regular Articles, Volume 10, 3402036 (2015).
function BurnupTime | ( | in | ni, |
in | Ti, | ||
in | r1, | ||
in | r2 | ||
) |
Reactant burnup time.
This is a simple function of the fusion cross-section and ion density. Note that if the two species have different densities, the burnup rate for reactant 1 should use the reactant 2 density, and vice versa.
tau = BurnupTime( ni, Ti, r1, r2 )
ni (1,n) Particle density (/m3) Ti (1,m) Ion temperature (keV) r1 '' Reactant 1, default 'd' r2 '' Reactant 2, default 'he3'
tau (m,n) Burnup time, s
See also: MaxwellianV
References and().
function BVacuum | ( | in | rMagnet, |
in | rSeparatrix, | ||
in | B0 | ||
) |
Vacuum field calculated from magnet and separatrix radii.
[f,B] = BVacuum(rMagnet,rSeparatrix,B0)
References and().
function CapacityFactor | ( | in | type | ) |
Capacity factor for a variety of power sources.
Returns capacity factor. Coal and natural gas use the same factor as nuclear.
Types are not case sensitive. Numbers are from 2018.
Type CapacityFactor for a demo that will list all the types.
[cF,t] = CapacityFactor(type)
type (1,:) Type
cF (1,1) Capacity factor t {:} Type array if 'all' entered
Reference: EIA, "Electric Power Monthly," 2018. https://www.eia.gov/electricity/monthly/epm_table_grapher.php?t=epmt_6_07_b
References and().
function CentralPressure | ( | in | t, |
in | nI, | ||
in | zI | ||
) |
Computes the central plasma pressure from temperature.
Type CentralPressure for a demo.
pC = CentralPressure( t, nI, zI )
t (1,:) Temperature (keV) nI (1,n) Ion density per species (#/m^3) zI (1,n) Atomic number per species
pC (1,:) Central Plasma Pressure (Pa)
function CentralTemperature | ( | in | p, |
in | nI, | ||
in | zI | ||
) |
function ClassERFAmplifier | ( | in | f, |
in | p, | ||
in | vCE, | ||
in | vCC, | ||
in | qL, | ||
in | l1, | ||
in | r | ||
) |
Class E Amplifier design tool.
Produces the inductor and capacitor values for the circuit. qL is the quality. infinite quality means that the circuit is tuned exactly to the frequency f.
Type ClassERFAmplifier for a demo.
d = ClassERFAmplifier( f, p, vCE, vCC, qL, l1, r )
f (1,1) Frequency (kHz) p (1,1) Power (W) vCE (1,1) Collector to emitter voltage (V) vCC (1,1) Collector to ground voltage (V) qL (1,1) Quality l1 (1,1) Choke inductor (H) r (1,1) Use R if entered
d (.) Data structure output .c1 Capacitor 1 (F) .c2 Capacitor 2 (F) .l1 Inductor 1 (H) .l2 Inductor 2 (H) .r Load (Ohms) s {:,2} Latex array for latex documents
Reference: Nathan O. Sokal,"Class-E High-Efficiency RF/Microwave Power Amplifiers: Principles of Operation, Design Procedures, and Experimental Verification."
References and().
function ClassicalConfinementTime | ( | in | ni, |
in | Ti, | ||
in | Z, | ||
in | mu, | ||
in | B, | ||
in | r_s | ||
) |
Classical ion confinement time.
The collision rates must be summed over each species collision, for example: D-D, D-He3, He3-D, He3-He3. The confinement time is ti*S^2, where ti is the ion-ion collision time and S is the ratio of the plasma length to gyroradius. For an FRC, S = 0.3*rS/rho. Classical confinement considers only the collision rate, so tau = 1/nu, and not other forms of transport. tau scales inversely with Z^2.
[taui,ti,rho] = ClassicalConfinementTime( ni, Ti, Z, mu, B, r_s)
ni (1,2) Ion density /m3 Ti (1,2) Ion temperature(s) keV Z (1,2) Ion charges mu (1,2) Masses of ions in AMU B (1,1) Field strength (T) r_s (1,1) Separatrix radius (m)
taui (1,2) Ion confinement time (s) tii (1,2) Ion collision time (s) rho (1,2) Gyroradii (m)
Reference: NRL Plasma Formulary, 2016
See also: IonIonCollisionRate, GyroRadius
References and().
function CollisionsTrubnikov | ( | in | E1, |
in | T2, | ||
in | n2, | ||
in | m1, | ||
in | m2, | ||
in | Z1, | ||
in | Z2 | ||
) |
Collision rates calculated using the Trubnikov potentials.
Collision between a beam and a Maxwellian. Has a demo.
[nu0,nuS, nuPerp, nuPar, nuE] = CollisionsTrubnikov( E1, T2, n2, m1, m2, Z1, Z2)
E1 (1,1) Energy of test particle (eV) T2 (1,1) Temperature of field particle (eV) n2 (1,1) Number density of field particle (/cc) m1 (1,1) Mass of test particle (electron masses) m2 (1,1) Mass of field particle (electron masses) Z1 (1,1) Charge state of test particle (elementary charges) Z2 (1,1) Charge state of field particle (elementary charges)
nu0 (1,1) Base Lorentz collision rate (/s) nuS (1,1) Slowing down (self-velocity) collision rate (/s) nuPerp(1,1) Transverse diffusion collision rate (/s) nuPar (1,1) Parallel diffusion collision rate (/s) nuE (1,1) Energy loss collision rate (/s)
References: NRL Plasma Formulary 2016 p. 31
B. A. Trubnikov, "Particle Interactions in a Fully Ionized Plasma," Reviews of Plasma Physics, Vol 1 (Consultants Bureau, New York, 1965), p 105
References and().
function CollisionTimes | ( | in | Te, |
in | ni, | ||
in | Ti, | ||
in | Z, | ||
in | mu | ||
) |
Ion collisions in two-component plasma.
This is for a simple two-component plasma (electrons and singly charged ions).
Cohen adds a factor of Z^2 to the denominator for multiply charged target ions.
[tauE, tauI] = CollisionTimes( Te, ni, Ti, Z, mu )
Te (1,1) Electron temperature(s) keV ni (1,1) Ion density /m3 Ti (1,1) Ion temperature(s) keV Z (1,:) Ion charges mu (1,:) Masses of ions in AMU
tauE (1,1) Electron-electron collision time, sec tauI (1,1) Ion-ion collision time, sec
Reference: NRL Plasma Formulary 2016 p. 28, 33, 37
function CoulombLog | ( | in | ne, |
in | Te, | ||
in | Z | ||
) |
Coulomb log for electron-ion collisions.
For D and He, this is good for Te>40 keV:
Ti*me/mi < 10Z^2 eV < Te
Type CoulombLog for a demo.
lnL = CoulombLog( ne, Te, Z )
ne (1,:) Electron density (/m3) Te (1,:) Electron temperature (keV) Z (1,1) Ion charge
lnL (1,:) Coulomb log, ln(Lambda) == lambda
Reference: NRL plasma formulary, 2016, p. 34
References and().
function CoulombLogIons | ( | in | n, |
in | T, | ||
in | Z, | ||
in | mu | ||
) |
Coulomb log for ion-ion collisions.
This is the multi-species formulation for mixed collisions. Type CoulombLogIons for a demo.
lnL = CoulombLogIons(n, T, Z, mu)
n (1,1) or (1,2) Ion density (/m3) T (1,1) or (1,2) Ion temperature (keV) Z (1,2) Ion charges mu (1,2) Masses of ions in AMU
lnL (1,:) Coulomb log, ln(Lambda) == lambda
Reference: NRL plasma formulary, 2016, p. 34
function CRF | ( | in | dR, |
in | n | ||
) |
Computes the capital recovery factor.
Type CRF for a demo.
cRF = CRF(dR,n)
dR (1,1) Discount rate (fraction) n (1,1) Number of periods (years)
cRF (1,1) Capital recovery factor
Reference: NREL Energy Analysis https://www.nrel.gov/analysis/tech-lcoe-documentation.html
function CrosssectionClassical | ( | in | e, |
in | rB, | ||
in | vB | ||
) |
Classical crosssection.
Type CrosssectionClassical( for a demo.
igma = CrosssectionClassical(e,rB,vB)
e (1.:) Energy (in units of vB) rB (1,1) Distance of closest approach vB (1,1) Barrier height
sigma (1,:) Crosssection (in units or rB)
Reference: https://www.physicsforums.com/threads/fusion-cross-sections.805866/
function CrossSectionFromRest | ( | in | r1, |
in | r2, | ||
in | E | ||
) |
Cross section assuming the second particle is at rest.
Computes the total cross section as a function of the energy in keV of the incident particle with Duane coefficients.
sT = CrossSectionFromRest( r1, r2, E )
r1 (1,:) Reactant name ('D','T','He3') r2 (1,:) Reactant name ('D','T','He3') E (:) Kinetic temperature (keV)
sT (:) Cross section in barns (1e-24 cm^2)
References: J.D. Huba, NRL Plasma Formulary, p. 44 (2011) G. H Miley, Fusion Cross Sections and Reactivities, U. Illinois, Report COO-2218-17 (1974)
function Cryocooler | ( | in | qC, |
in | tC | ||
) |
Cryocooler mass, efficiency, and performance coefficients.
Returns cryocooler data from curve fits. This applies to single-stage Stirling cryocoolers in the range of 50K to 250K cold temperature. A heat sink temperature of 300 K is assumed for the Carnot efficiency,
COPcarnot = Tc/(Th - Tc)
Type Cryocooler for a demo
[m,etaFC,cOP] = Cryocooler( qC, tC )
qC (1,:) Cooling power (capacity) (W) tC (1,:) Cold temperature (K)
m (1,:) Mass (kg) etaFC (1,:) Efficiency (% of Carnot, COPcooler/COPcarnot) cOP (1,:) Coefficient of performance (Qc/Pin)
Reference: D. R. Ladner, "Performance and Mass vs. Operating Temperature for Pulse Tube and Stirling Cryocoolers," International Cryocoooler Conference (16), 2008.
References and().
function CryocoolerBrake | ( | in | qC, |
in | tC | ||
) |
Mass, efficiency, and performance coefficients of low-power cryocoolers.
Returns crycooler data from curve fits. This applies to GM, pulsed tube, and Stirling cryocoolers in the range of 4K to 80K cold temperature. A heat sink temperature of 300 K is assumed for the Carnot efficiency,
COPcarnot = Tc/(Th - Tc)
Note that while any power may be input, coolers at low temperature can only move a small amount of power. Typical ranges are:
Type CryocoolerBrake for a demo
[m,eta,cOP] = CryocoolerBrake( qC, tC )
qC (1,:) Cooling power (capacity) (W) tC (1,:) Cold temperature (K)
m (1,:) Mass (kg) eta (1,:) Efficiency (% of Carnot, COPcooler/COPcarnot) cOP (1,:) Coefficient of performance (Qc/Pin)
Reference: Low-power cryocooler survey, H.J.M. ter Brake, G.F.M Wiegerinck,
Cryogenics 42 (2002) 705-718.
References and().
function CyclotronFrequency | ( | in | b | ) |
function DebyeLength | ( | in | tE, |
in | n0 | ||
) |
function DensityFromFusionPower | ( | in | p, |
in | r1, | ||
in | r2, | ||
in | tK | ||
) |
Calculate the ion density for volumetric fusion power.
n = DensityFromFusionPower( p, r1, r2, tK )
p (1,1) Fusion power (MW/m^3) r1 (1,:) Reactant name ('D','T','He3','B11','Li6','He4') r2 (1,:) Reactant name ('D','T','He3','B11','Li6','He4') tK (:) Kinetic temperature (keV)
n (1,1) Ion density (#/m^3)
References: Dawson, J. M., "Advanced Fusion Reactors," Fusion,
Teller, E. Editor, Academic Press, 1981, pp. 457.
function DHe3Reaction | ( | in | t | ) |
Computes the fraction of D going to each reaction.
Type DHe3Reaction for a demo.
pR = DHe3Reaction( t )
t (1,:) Temperature
pR (3,:) [He3, Dp, Dn]
References: http://home.earthlink.net/~jimlux/nuc/reactions.htm
function DivertorCLR | ( | in | nUp, |
in | qPar, | ||
in | L, | ||
in | unitIndex | ||
) |
Computes temperature drop over a conduction-limited divertor.
Implements the two-point divertor model in the Conduction Limited Regime (CLR) of Stangeby. The solver is original. Assumes deuterium SOL.
Type DivertorCLR for a demo.
[Tu, Tt] = DivertorCLR( nUp, qPar, L, unitIndex )
nUp (1,1) Density upstream in the SOL (1/m^3) qPar (1,1) Energy flux down the divertor (W/m^2 or MW/m^2) L (1,1) Connection length of the divertor (m) unitIndex (1,1) (optional) Which set of units to use. 1: (default) eV, 1/m^3, W/m^2. 2: keV, 1/m^3, MW/m^2.
Tu (1,1) Temperature upstream in the SOL (eV or keV) Td (1,1) Temperature downstream in the divertor, just before the sheath (eV or keV) nt (1,1) Density downstream in the divertor, just before the sheath (1/m^3) LRec (1,1) Recommended connection length for large temperature drop, given your nUp and qPar. Original work. (m)
References: Stangeby, P. C. "The Plasma Boundary of Magnetic Fusion Devices." Taylor & Francis, 2000.
function DMassFromPower | ( | in | energy, |
in | time | ||
) |
Deuterium Reactant mass flow.
Compute the fuel mass required to produce a specific amount of power. This is for a D-D reactor. Both branches are considered and the product helium-3 is assumed to fuse. The T is assumed to be captured and put on the shelf; the energy it eventually releases as a He3 is NOT considered.
Type DMassFromPower for a demo of 1 to 10 MW for 10 years.
Form mass = DMassFromPower( energy ) mass = DMassFromPower( power, time )
energy (1,:) Total energy (Watt-s) -OR- power (1,:) Total power (W) time (1,:) Total energy (s)
mass (2,:) Mass deuterium (kg)
See also He3MassFromPower
References and().
function EdgeLocalizedModes | ( | in | tau1, |
in | tau2, | ||
in | k, | ||
in | t | ||
) |
Disturbance in a Tokamak plasma due to edge localized modes (ELMs).
These disturbances repeat. Thus, every tau3, set t = 0.
Type EdgeLocalizedModes for a demo.
eLM = EdgeLocalizedModes( tau1, tau2, k, t )
tau1 (1,1) Time constant 1 (s) tau2 (1,1) Time constant 2 (s) k (1,1) Gain t (1,:) Time (s)
d (1,:1) State derivative
Reference: Scibile, L. and B. Kouvaritakis (2001.) "A Discrete Adaptive Near-Time Optimum Control for the Plasma Vertical Position in a Tokamak.
References set().
function EffectiveCharge | ( | in | nI, |
in | zI | ||
) |
Compute the effective charge in a plasma.
Zeff = sum( ni*Zi^2 )/ne
Type EffectiveCharge for a demo.
zEff = EffectiveCharge( nI, zI )
nI (:) Ion densities (#/m^3) zI (:) Ion atomic numbers
zEff (1,1) Effective charge
References: Santarius, J.F. and B.G. Logan, "Generic Magnetic Fusion Rocket", UWFDM-914, University of Wisconsin, February 1998.
function FirstWallThermalPower | ( | in | pLoss, |
in | rWall | ||
) |
Computes the first wall thermal power.
Assumes a spherical shell for the wall.
Type FirstWallThermalPower for a demo.
pW = FirstWallThermalPower( pLoss, rWall )
pFus (1,:) Loss (MW) rW (1,1) Radius of the wall (m)
pW (1,:) Wall Power (MW/m^2)
References: Schaffer, M.J., "Considerations for Steady-State FRC-Based Fusion Space Propulsion", GA-A23579, December 2000. General Atomics, San Diego, CA.
function FRCFieldLines | ( | in | r, |
in | z, | ||
in | B0, | ||
in | rs, | ||
in | kappa | ||
) |
FRC equilibrium flux and field strength.
A Solov'ev model is used inside the elliptical separatrix. The O point is at r0 = rs/sqrt(2). The X-points are at +/- zs where zs = kappa*rs.
[psiIn,psiOut,B] = FRCFieldLines( r, z, B0, rs, kappa )
r (:,:) Radial position(s) z (:,:) Axial position (along elongation) B0 (1,1) Nominal field rs (1,1) Separatrix radius kappa (1,1) Elongation factor
psiIn (:,:) Magnetic flux inside the separatrix psiOut (:,:) Magnetic flux outside the separatrix B (:,:) Magnitude of the magnetic field inside the separatrix
References and().
function FRCInertia | ( | in | rX, |
in | rY, | ||
in | rZ, | ||
in | n, | ||
in | mI | ||
) |
Inertia and mass of an FRC plasma.
z is the long axis of the cylinder.
Type FRCInertia for a demo.
[inr, mass] = FRCInertia( rX, rY, rZ, n, mI )
aX (1,1) X-axis (m) aY (1,1) Y-axis (m) aZ (1,1) Z-axis (m) n (1,:) Number density /m^3 mI (1,:) Mass ion (kg)
inr (3,3) Inertia matrix (kg-m^2) mass (1,1) Mass (kg)
References: Yamada, M, H. Ji, R. Kulsrud, N. Pomphrey and H. Himura, "Studies of Global Stability of Field-Reversed Configuration Plasmas using a Rigid Body Model," April 22, 1998. Weisstein, E. W. "Moment of Inertia-Ellipsoid", http://scienceworld.wolfram.com/physics/ MomentofInertiaEllipsoid.html
References and().
function FuelCost | ( | in | type | ) |
Fuel cost for various energy sources.
Returns fuel cost. type is not case sensitive. Numbers are from 2018. Type FuelCost for a demo that will list all the types.
[fC,t] = FuelCost(type)
type (1,:) Type
fC (1,1) $/BTU t {:} Type array if 'all' entered
Reference: http://www.amsenergy.com/fuel-cost-calculator/
function FusionPower | ( | in | n1, |
in | n2, | ||
in | r1, | ||
in | r2, | ||
in | tK | ||
) |
Fusion power per reactants.
Calculate the fusion power for the given reactants assuming ion density and temperature. Returns ion and neutron power separately.
Type FusionPower for a demo of the D-T reaction.
[pI, pN] = FusionPower( n1, n2, r1, r2, tI )
n1 (1,1) Ion density of reactant 1 (#/m^3) n2 (1,1) Ion density of reactant 2 (#/m^3) r1 (1,:) Reactant 1 name ('D','T','He3','B11','Li6','He4') r2 (1,:) Reactant 2 name ('D','T','He3','B11','Li6','He4') tK (:) Kinetic temperature (keV)
pI (:) Ion power (MW/m^3) pN (:) Neutron power (MW/m^3)
References: Dawson, J. M., "Advanced Fusion Reactors," Fusion, Teller, E. Editor, Academic Press, 1981, pp. 457.
References and().
function FusionPowerDHe3 | ( | in | ni, |
in | Ti | ||
) |
Compute volumetric power for a D-He3 reactor ignoring tritium.
Computes the D-D and D-He3 reactions for the input density and temperature. Ignores tritium.
Type FusionPowerDHe3 for a demo.
[pF, pN] = FusionPowerDHe3( ni, Ti )
ni (1,2) [nD nHe3] Number densities (#/m3) Ti (2,:) [TD;THe3] Temperature (keV)
pF (1,1) Total fusion power (MW/m^3) pN (1,1) Neutron power (MW/m^3)
See also MaxwellianV, FusionReaction, AtomicNumber, PlasmaConstant
References and().
function FusionReaction | ( | in | r1, |
in | r2 | ||
) |
Finds products of fusion reactions.
D-D, D-T, p-B11 and D-He3 are included. For D-D, you must specify which reaction path you want with either 'D','Dp' for 2D->p+T or 'D','Dn' for 2D->n+He3
Type FusionReaction for a demo.
x = FusionReaction( r1, r2 )
r1 (1,:) Reactant name ('D','T','He3','B11','Li6','He4') r2 (1,:) Reactant name ('D','T','He3','B11','Li6','He4')
x (:) Data structure .product .particle (:,:) names of particles .energy (:,:) energies of particles (MeV) .mass (:,:) mass of each particle .totalEnergy (1,1) total energy released (MeV) .totalMass (1,1) total mass of the products .massNeutrons(1,1) total mass of the neutrons .charge (1,:) charge of each product .ions (1,:) index to the ions .neutrons (1,:) index to the neutrons .netEnergy (1,1) Energy - neutron energy .reactant .particle (:,:) names of particles .mass (:,:) mass of each particle .charge (1,:) charge of each product .totalMass (1,1) total mass of the reactants
References: 2016 NRL Plasma Formulary, Office of Naval Research;
McNally, Physics of Fusion Fuel Cycles, Nuclear Technology/Fusion, Vol. 2, Jan 1982
References and().
function FusionReactionDD | ( | in | r | ) |
Finds products of D+D fusion reactions.
Reactions are specified below:
'D-DTHe3': 6D -> 2n+2p+2He4 'D-DT': 5D -> 2n+p+He3+He4 'D-DHe3': 5D -> n+2p+He4+T 'D-Dnp': 4D -> n+p+He3+T 'D-Dn': 2D -> n+He3 'D-Dp': 2D -> p+T
The product 'thermal' indicates that primary products / secondary reactants have some energy even before they fuse.
Type FusionReactionDD for a demo.
x = FusionReactionDD( r1, r2 )
rS (1,:) Reaction name (See above, 'D-Dp','D-Dn','D-DT',etc)
x (:) Data structure .product .particle (:,:) names of particles .energy (:,:) energies of particles (MeV) .mass (:,:) mass of each particle .totalEnergy (1,1) total energy released (MeV) .totalMass (1,1) total mass of the products .massNeutrons(1,1) total mass of the neutrons .charge (1,:) charge of each product .ions (1,:) index to the ions .neutrons (1,:) index to the neutrons .netEnergy (1,1) Energy - neutron energy .reactant .particle (:,:) names of particles .mass (:,:) mass of each particle .charge (1,:) charge of each product .totalMass (1,1) total mass of the reactants
References: 2016 NRL Plasma Formulary, Office of Naval Research;
McNally, Physics of Fusion Fuel Cycles, Nuclear Technology/Fusion, Vol. 2, Jan 1982
function FusionReactorDesign | ( | in | d, |
in | mode, | ||
in | pmin, | ||
in | pmax, | ||
in | n | ||
) |
FUSION REACTOR DESIGN FUNCTION (tokamaks)
The function checks that the reactor satisfies key operational constraints for tokamaks. Selecting a mode ('a', 'H', B_max', 'P_E', or 'P_W') sets the corresponding variable as the dependent variable over which to perform a parameter sweep, also referred to as the parameter vector. Default mode is 'a'. Default vector is a = linspace(0.5,1.7,100).
Type FusionReactorDesign for a demo.
FusionReactorDesign; % run demo d = FusionReactorDesign; % default data d = FusionReactorDesign( d ) d = FusionReactorDesign( d , mode ) d = FusionReactorDesign( d , mode , pmin , pmax , n )
d (.) Input data structure .B_max (1,1) Maximum magnetic field at the coil [T] .H (1,1) H-mode enhancement factor .P_E (1,1) Electric power output [MW] .P_W (1,1) Maximum neutron wall loading [MW/m^2] .a (1,1) Minor radius of the plasma [m] mode '' 'a'*, 'H', 'B_max', 'P_E', 'P_W' * is default pmin (1,1) Minimum of parameter vector pmax (1,1) Maximum of parameter vector N (1,1) Number of elements in parameter vector
d (.) Data structure additions .xvec (1,n) Vector for selected dependent variable mode (x-axis) .n_nG (1,n) Ratio of plasma density to the Greenwald density limit .beta_betaT (1,n) Ratio of normalized plasma pressure to the Troyon beta limit .qK_qstar (1,n) Ratio of normalized inverse current to kink safety limit .fB_fNC (1,n) Ratio of required to achievable bootstrap current .parameters (22,2) Table listing the tokamak parameter outputs
Reference: Freidberg, Mangiarotti, and Minervini, "Designing a tokamak fusion reactor--How does plasma physics fit in?" Physics of Plasmas 22, 070901 (2015).
function GasPressure | ( | in | n, |
in | kT, | ||
in | V | ||
) |
function GyroRadius | ( | in | t, |
in | b, | ||
in | mu, | ||
in | z | ||
) |
Computes gyroradius.
If two arguments are entered it will compute the electron gyro radius.
Type GyroRadius for a demo.
r = GyroRadius( t, b, mu, z )
t (1,:) Temperature (kEV) b (1,1) Magnetic Field (T) mu (1,1) Ratio of mass to proton mass z (1,1) Charge
r (1,:) Gyro radius (m)
References: http://www.ipp.mpg.de/~dpc/nrl/28.html
NRL Plasma Formulary, 2011
function He3MassFromPower | ( | in | energy, |
in | time | ||
) |
Helium-3 (He3) and Deuterium Reactant mass flow.
Compute the fuel mass required to produce a specific amount of power. Also calculates the volume of 3He and D - as a liquid, for sizing tanks. The volume at STP is useful for cost estimations.
Type He3MassFromPower for a demo of 1 to 10 MW for 10 years.
Form [mass,volume,volSTP] = He3MassFromPower( energy ) [mass,volume,volSTP] = He3MassFromPower( power, time )
energy (1,:) Total energy (Watt-s) -OR- power (1,:) Total power (W) time (1,:) Total energy (s)
mass (2,:) Mass [3He;D] (kg) volume (2,:) Liquid volume [3He;D] (m^3) volSTP (2,:) Liters at STP [3He;D] (L)
function HeatCapacityAluminum | ( | in | T | ) |
Heat capacity and enthalpy of aluminum at a given temperature.
[cp,H] = HeatCapacityAluminum( T )
T (1,:) Temperature (K)
cp (1,:) Specific heat capacity (J/gK) H (1,:) Enthalpy (J/g). Integrates cp, so answer is only good to 1%
Reference: Buyco, Edgar H., and Fred E. Davis. "Specific Heat of Aluminum from Zero
to Its Melting Temperature and beyond. Equation for Representation of the
Specific Heat of Solids." Journal of Chemical & Engineering Data 15, no. 4 (October 1, 1970): 518?23. https://doi.org/10.1021/je60047a035.
References and().
function Inductor | ( | in | d, |
in | n | ||
) |
function InductorDesign | ( | in | d | ) |
Design an inductor (fmincon)
Has a built-in demo.
[m, p, l, a] = InductorDesign( d )
References and().
function IonCyclotronFrequency | ( | in | b, |
in | z, | ||
in | m | ||
) |
Computes the ion cyclotron frequency.
Type IonCyclotronFrequency for a demo of Helium-3.
omega = IonCyclotronFrequency( b, z, m )
b (1,:) Magnetic field (T) z (1,1) Number of electrons m (1,1) Ion mass (kg)
omega (1,:) Frequency (rad/s)
Reference: http://en.wikipedia.org/wiki/Ion_cyclotron_resonance
function IonElectronEquilibration | ( | in | Te, |
in | ni, | ||
in | Ti, | ||
in | Z, | ||
in | mu | ||
) |
Ion-electron collision rate with different temperatures.
Compute the collision rate. Include all species in the plasma for the correct computation of the electron density. The default ion is deuterium.
Type IonElectronEquilibration for a demo.
[nu,nuT] = IonElectronEquilibration( Te, ni, Ti, Z, mu )
Te (1,1) Electron temperature (keV) ni (1,:) Ion density (/m3) Ti (1,:) Ion temperature (keV) Z (1,:) Ion charge mu (1,:) Ion mass (amu)
nu (1,1) Equilibration coeffient e|i, /s nuT (1,1) Simplfied form, Te~Ti, /s
Reference: NRL Plasma Formulary, 2016 p. 34
function IonIonCollisionRate | ( | in | n, |
in | T, | ||
in | Z, | ||
in | mu | ||
) |
Ion-ion collision rate.
Compute the collision rate for a test particle with a target particle. This is for near-Maxwellian distributions. Any input may be scalar if it is the same for both species.
nu = IonIonCollisionRate( n, T, Z, mu )
n (1,2) [Test Target] particle density (/m3) T (1,2) [Test Target] particle temperature (keV) Z (1,2) [Test Target] particle charge mu (1,2) [Test Target] particle AMU
nu (1,1) Collision rate, /s
Reference: NRL Plasma Formulary, 2016 p. 28, 32/33
References scalar().
function IonizationEnergy | ( | in | r | ) |
function IonizationEnergyPlasma | ( | in | r1, |
in | r2, | ||
in | n1, | ||
in | n2 | ||
) |
Returns the ionization power per nuclei.
Type IonizationEnergyPlasma for a demo.
e = IonizationEnergyPlasma( r1, r2, n1, n2 )
r1 (1,1) Reactant name ('H', 'D','T','He3','B11','Li6') r2 (1,1) Reactant name ('H', 'D','T','He3','B11','Li6') n1 (1,1) Number density /m^3 n2 (1,1) Number density /m^3
e (1,1) Energy MJ/m^3
function LawsonProduct | ( | in | Te, |
in | ni, | ||
in | Ti, | ||
in | Z, | ||
in | mu, | ||
in | B, | ||
in | rS | ||
) |
Compute triple product using classical confinement.
nTt = LawsonProduct( Te, ni, Ti, Z, mu, B, rS )
Te Electron temperature, keV ni Ion density, /m3 Ti Ion temperature, keV Z Ion charge(s) mu Ion atomic weight(s) B Magnetic field (T) rS Separatrix radius (m)
nTt Triple product
See also IonIonCollisionRate, PlasmaInternalEnergy, ClassicalConfinementTime
function LCOE | ( | in | oCC, |
in | fOM, | ||
in | vOM, | ||
in | dR, | ||
in | n, | ||
in | cF, | ||
in | hR, | ||
in | fC, | ||
in | t, | ||
in | dPV | ||
) |
Computes the levelized cost of electricity (LCOE)
Type LCOE for a demo from the second reference. It matches the online calculator. The heating rate can have any units as long as fuel cost and heating rate units are consistent. This has additional inputs that that are optional.
O&M is Operations and Maintenance. n is number of years and dR is the interest per year.
See https://openei.org/apps/TCDB/levelized_cost_calculations.html for values of dPV.
[lCOE, lCF, lCI, lCVOM] = LCOE(oCC,fOM,vOM,dR,n,cF,hR,fC,t,dPV)
oCC (1,1) Overnight capital cost ($/kW, see OvernightCapitalCost.m) fOM (1,1) Fixed O&M ($/kW-yr, see OvernightCapitalCost.m) vOM (1,1) Variable O&M ($/kWh, see OvernightCapitalCost.m) dR (1,1) Discount rate (fraction/year) n (1,1) Number of periods (years) cF (1,1) Capacity factor (0 to 1, see CapacityFactor.m) hR (1,1) Heating rate (Btu/kWh, OvernightCapitalCost.m) fC (1,1) Fuel cost ($/Btu) t (1,1) Tax rate (0.397, optional) dPV (1,1) Present value of depreciation (optional)
lCOE (1,1) Levelized cost of electricity ($/kWh) lCF (1,1) Cost of fuel ($/kWh) lCI (1,1) Cost of the investment, including fixed O&M ($/kWh) lCVOM (1,1) Cost of the variable O&M, ($/kWh)
See also OvernightCapitalCost, CapacityFactor, CRF
Reference: NREL Energy Analysis https://www.nrel.gov/analysis/tech-lcoe-documentation.html https://www.nrel.gov/analysis/tech-lcoe.html https://openei.org/apps/TCDB/levelized_cost_calculations.html
References and().
function LCOF | ( | in | oCC, |
in | fOM, | ||
in | vOM, | ||
in | dR, | ||
in | n, | ||
in | cF, | ||
in | tC, | ||
in | fP, | ||
in | pS | ||
) |
Computes the levelized cost of fuel production.
Type LCOF for a demo
O&M is Operations and Maintenance. The number of periods needs to be in years and the discount rate in fraction/year.
lCOF = LCOF(oCC,fOM,vOM,dR,n,cF,hR,fC,fP,pS)
oCC (1,1) Overnight capital cost of fuel production plant ($) fOM (1,1) Fixed O&M ($/kg) vOM (1,1) Variable O&M ($/kg) dR (1,1) Discount rate (fraction/year) n (1,1) Number of periods (years) cF (1,1) Capacity factor tC (1,1) Transportation cost ($/kg) fP (1,1) Feedstock price ($/kg) pS (1,1) Production plant scale (kg/yr)
lCOE (1,1) Levelized cost of fuel ($/kg)
Reference: NREL Energy Analysis https://openei.org/apps/TCDB/levelized_cost_calculations.html
References and().
function MachineCost | ( | in | p, |
in | pF, | ||
in | cF, | ||
in | fun | ||
) |
Infer the cost of a machine size given a few sizes and costs.
Fits curve
The machine is modeled by the function
c = a1*fun(a2*p) + a3
where c is the cost and p is the size. The default fun is asinh. pF and cF are row vectors, at least 3 in length. The function uses fminsearch and a quadratic cost functional to find the a1, a2 and a3.
pF, cF and fun are optional. Type MachineCost for a demo.
The plot assumes that the size parameter is power in MW and cost is in units of $M.
mC = MachineCost(p,pF,cF,fun)
p (1,:) Size (ex: Power in MW) pF (1,:) Example size vector (ex: Power in MW) cF (1,:) Cost for whatever pFs are specified (ex: $M) fun (1,1) Pointer to your nonlinear function (optional)
mC (1,:) Machine cost (ex: $M)
References and().
function MacroCrossSection | ( | in | rho, |
in | formula, | ||
in | M, | ||
in | sigma | ||
) |
Compute a macroscopic cross-section for a material.
The macroscopic cross-section is the sum of the component microsections, scaled by their number density. The microscopic cross-sections must be for the same energy, for example fast or thermal neutrons.
The mean free path is 1/Sigma.
Sigma = MacroCrossSection( rho, formula, M, sigma )
rho (1,1) Material density, in g/cm3 formula (1,:) Chemical formula, i.e. [1 1] for LiH M (1,:) Atomic weight of constituents sigma (1,:) Microscopic cross-sections at energy of interest (barn)
Sigma (1,:) Macroscopic cross-section (1/cm)
function MagneticFieldCurrentLoop | ( | in | i, |
in | a, | ||
in | p, | ||
in | q, | ||
in | x, | ||
in | doPlot | ||
) |
Computes fields for multiple current loops.
The loops are nominally in the yz-plane. You rotate them with the quaternion q(:,k) and translate the rotated coils with p(:,k). Rotation is done first and then translation of the coil center.
If using this function to plot field lines you should arrange the coils so that the point [0;0;0] is in the center.
When plotting field lines the accuracy of the computation will cause the field lines not to close. If the computation is continued, the field lines will spiral.
Type MagneticFieldCurrentLoop for a demo. It will plot the field vectors for two coaxial coils of different radii and different x positions and also the field lines.
[b,l] = MagneticFieldCurrentLoop( i, a, p, q, x, doPlot )
i (1,:) Currents in each loop a (1,:) Loop radii p (3,:) Loop positions q (4,:) Loop quaternions from fixed to the loop frame x (3,:) Points at which to compute b or d (.) Data structure .xL (1,1) Initial points .nP (1,1) Number of points per line doPlot (1) Boolean to create plot
b (3,:) Field (T) l (1,:) Line handles
Reference: http://www.netdenizen.com/emagnettest/offaxis/?offaxisloop
References and(), close(), and quaternion().
function MagneticPressure | ( | in | beta, |
in | b | ||
) |
Computes the magnetic pressure from beta and field.
Type MagneticPressure for a demo.
p = MagneticPressure( beta, b )
beta (1,1) Beta b (1,:) Magnetic Field (T)
p (1,:) Pressure (Pa)
References and().
function MagnetMass | ( | in | rhoM, |
in | sigmaM, | ||
in | bM, | ||
in | rM, | ||
in | beta | ||
) |
Compute the magnetic structural mass using a shell method.
Computes the magnetic mass from density, stress, magnetic field, and radius of the magnet. Uses a spherical shell model. The mass scales with radius cubed and field strength squared.
Note that the reference does not give a complete equation.
Type MagnetMass for a demo.
The demo uses Titanium. The default beta is 1.
mM = MagnetMass( rhoM, sigmaM, bM, rM, beta )
rhoM (1,1) Density (kg/m^3) sigmaM (1,1) Stress (N/m^2) bM (1,1) Magnetic field (T) rM (1,:) Radius (m) beta (1,1) Plasma beta
mM (1,:) Magnet Mass (kg)
References: Schaffer, M.J., "Considerations for Steady-State FRC-Based Fusion Space Propulsion", GA-A23579, December 2000. General Atomics, San Diego, CA
References and().
function MagnetMassVirial | ( | in | rhoM, |
in | sigmaM, | ||
in | bM, | ||
in | v | ||
) |
Compute the magnetic structural mass using a Virial method.
Computes mass from density, stress, magnetic field, and volume enclosed by the magnet. This is an energy method. Note that the reference does not give a complete equation.
Type MagnetMassVirial for a demo.
The demo uses carbon fiber.
mM = MagnetMassVirial( rhoM, sigmaM, bM, v )
rhoM (1,1) Density (kg/m^3) sigmaM (1,1) Stress (N/m^2) bM (1,1) Magnetic field (T) v (1,:) Volume (m^3)
mM (1,:) Magnet Mass (kg) eM (1,:) Stored energy (J)
Reference: Santarius, J.F. and B.G. Logan, "Generic Magnetic Fusion Rocket Model", UWFDM-914, University of Wisconsin, February 1998.
References and().
function MagnetRadius | ( | in | mM, |
in | rhoM, | ||
in | sigmaM, | ||
in | bM | ||
) |
Computes magnet radius from mass, density, stess, and magnetic field.
Type MagnetRadius for a demo.
rM = MagnetRadius( mM, rhoM, sigmaM, bM )
mM (1,:) Mass (kg) rhoM (1,1) Density (m^-3) sigmaM (1,1) Stress (N/m) bM (1,1) Magnetic field (T)
rM (1,:) Radius (m)
Reference: Schaffer, M.J., "Considerations for Steady-State FRC-Based Fusion Space Propulsion", GA-A23579, December 2000. General Atomics, San Diego, CA
References and().
function MagnetStoredEnergy | ( | in | b, |
in | v | ||
) |
Energy stored in a magnet from field and volume.
Type MagnetStoredEnergy for a demo.
e = MagnetStoredEnergy( b, v )
b (1,1) Magnetic field (T) v (1,:) Volume (m^3)
e (1,1) Stored energy (J)
Reference: Santarius, J.F. and B.G. Logan, "Generic Magnetic Fusion Rocket", UWFDM-914, University of Wisconsin, February 1998.
References and().
function MaxwellianV | ( | in | r1, |
in | r2, | ||
in | tK | ||
) |
Computes Maxwellian thermonuclear reaction rates.
Reaction rates averaged over Maxwellian energy distributions. Add n or p to one of the d's to get the neutron or proton variant. d-d gives you the proton variant. These are accurate to within about 2% for 1<T<100 keV and 10% for 2<T<150 keV.
Type MaxwellianV for a demo.
sV = MaxwellianV( r1, r2, tK )
r1 (1,:) Reactant name ('D','T','He3') r2 (1,:) Reactant name ('D','T','He3') tK (:) Kinetic temperature (keV)
sV (:) Reaction rate <ov> in m^3/sec
Reference: "A Simple Computational Form for Maxwellian Reactivities", L. Hively, Plasma Engineering, Technical Note, 1982.
References Add().
function NetFusionPower | ( | in | nI, |
in | zI, | ||
in | tI, | ||
in | tE, | ||
in | rW, | ||
in | L, | ||
in | b, | ||
in | r1, | ||
in | r2 | ||
) |
Computes net fusion power after Synchrotron and Bremsstrahlung.
Point source model. Assumes electron and ion temperatures are the same.
Type NetFusionPower for a demo.
[pN, pF, pB, pS] = NetFusionPower( nI, zI, tI, tE, rW, L, b, r1, r2, )
nI (1,2) Ion densities (#/m^3) zI (1,2) Ion atomic numbers tI (1,:) Ion temperature (keV) tE (1,:) Electron temperature (keV) rW (1,1) Wall reflection L (1,1) Average Plasma Radius (m) b (1,1) Magnetic Field (T) r1 (1,1) Reactant 1 r2 (1,1) Reactant 2
pN (1,:) Net power (MW/m^3) pF (1,:) Fusion power (MW/m^3) pB (1,:) Bremsstrahlung power (MW/m^3) pS (1,:) Synchrotron power (MW/m^3)
See also: FusionPower
References and().
function NozzleRadius | ( | in | bAx, |
in | bN, | ||
in | rInner, | ||
in | tSOL | ||
) |
Compute the nozzle coil inner radius from flux conservation.
The radius and thickness must be the same units, which will be the units of rN.
rN = NozzleRadius( bAx, bN, rInner, tSOL )
bAx (1,1) Axial magnetic field (T) bN (1,1) Nozzle magnetic field (T) rInner (1,1) SOL inner radius tSOL (1,1) SOL thickness
rN (1,1) Nozzle inner radius
References and().
function NumberDensity | ( | in | rho, |
in | formula, | ||
in | M | ||
) |
function NumberDensityFromBeta | ( | in | beta, |
in | b, | ||
in | kT | ||
) |
Compute number density from beta, b and kT.
Type NumberDensityFromBeta for a demo.
n = NumberDensityFromBeta( beta, b, kT )
beta (1,1) Plasma beta (0 to 1) b (1,1) Magnetic field (Tesla) kT (1,:) Energy (kEV)
n (1,:) Number density (/m^3)
Reference: Szirmay, L. V., "Nuclear Fusion Reactor Design Fundamentals",
Colas Pub, 1993, p. 137.
References and().
function NumberOfElectrons | ( | in | nI, |
in | zI | ||
) |
function OvernightCapitalCost | ( | in | type | ) |
Returns Overnight Capital Cost of power plants and other parameters.
Returns overnight capital cost, heating rate, variable O&M and fixed O&M. If type = 'all' oCC will be a latex table and hR will be a cell array for all of the power sources.
type is not case sensitive. Numbers are from 2016.
Type OvernightCapitalCost for a demo that will list all the types.
[oCC,hR,fOM,vOM] = OvernightCapitalCost(type)
type (1,:) Type
oCC (1,1) Overnight capital cost ($/kW) hR (1,1) Heating rate (Btu/kWh) fOM (1,1) Fixed O&M ($/kW-yr) vOM (1,1) Variable O&M ($/kWh)
Reference: EIA, "Capital Cost Estimates for Utility Scale Electricity Generating Plants," November 2016.
References and().
function PhotonEnergy | ( | in | frequency | ) |
function PlasmaConstant | ( | in | q | ) |
Constants useful in plasma physics.
If no inputs are entered it prints the list in the catalog.
Type PlasmaConstant to get a catalog of constants.
[x, u] = PlasmaConstant( q )
q (1,:) String describing the constant
x (1,1) The value u (1,:) Units (if applicable)
References get().
function PlasmaFrequency | ( | in | n, |
in | m | ||
) |
function PlasmaHeating | ( | in | n, |
in | kT | ||
) |
function PlasmaInternalEnergy | ( | in | n, |
in | t, | ||
in | v | ||
) |
function PlasmaPressure | ( | in | nI, |
in | zI, | ||
in | tI, | ||
in | tE | ||
) |
Computes fusion plasma pressure.
The ion constituents are assumed to be at the same temperature. Type PlasmaPressure for a demo.
p = PlasmaPressure( nI, zI, tI, tE )
nI (1,2) Number densities of the constituents (1/m^3) zI (1,2) Atomic numbers tI (1,:) Temperature of the ions (keV) tE (1,:) Temperature of the electrons (keV)
p (:) Pressure (N/m^2)
function PlasmaRadius | ( | in | pNet, |
in | pD, | ||
in | aR | ||
) |
Computes the Plasma Radius from the desired power and net power density.
aR is entered for a cylindrical plasma.
Type PlasmaRadius for a demo.
r = PlasmaRadius( pNet, pD, aR )
pNet (1,:) Net power (MW/m^3) pD (1,1) Desired power (MW) aR (1,1) Aspect ratio length/r
r (1,:) Plasma Radius (m)
References and().
function PlasmaVolume | ( | in | pNet, |
in | pD | ||
) |
Computes the plasma vadius from the desired power and net power density.
Type PlasmaVolume for a demo.
v = PlasmaVolume( pNet, pD )
pNet (1,:) Net power (MW/m^3) pD (1,1) Desired power (MW)
v (1,:) Plasma Volume (m^3)
References and().
function PointFusionReaction | ( | in | r1, |
in | r2, | ||
in | nI, | ||
in | v, | ||
in | beta, | ||
in | tI, | ||
in | pType | ||
) |
Computes the net power from a fusion reaction.
Calculates the power output of a fusion reactor. Assumes that profiles inside the core volume (v) are flat.
Also calculates the electron temperature self-consistently by balancing the power collisionally transferred from ions to electrons with power lost from electrons via Bremsstrahlung. Synchrotron loss is not included. Electron particle loss is not included.
Type PointFusionReaction for a demo.
[p, tE, b, pB, pF] = PointFusionReaction( r1, r2, nI, v, beta, tI, pType )
r1 (1,:) Reactant name ('p' 'D','T','He3','B11','Li6','He4') r2 (1,:) Reactant name ('p' 'D','T','He3','B11','Li6','He4') nI (1,:) Ion density (#/m^3) for each species v (1,1) Volume (m^3) beta (1,1) Plasma beta tI (1,:) Ion temperature pType (1,:) 'lin' or 'log'
p (1,:) Power output (MW) tE (1,:) Electron temperature (kEV) b (1,:) Magnetic field (T) pB (1,:) Bremsstrahlung power (MW) pF (1,:) Fusion power (MW)
function PowerDD | ( | in | d | ) |
Compute the power for a He3-catalyzed D-D reactor.
Computes the D-D, D-3He and D-T side reactions. fT reduces the D-T side reactions for non-homogeneous plasmas. fHe sets the helium-3 density as a fraction of the D density. Synchrotron is neglected. The rate at which 3He is produced is the same as the neutron flux from D-D reactions.
Type PowerDD for a demo for temperatures from 20 keV to 200 keV.
d = PowerDD [pF, pN, pB, rHe, nNd, nNt] = PowerDD( d )
d (.) Data structure .nD (1,1) Number density deuterium (#/m3) .tD (1,:) Temperature deuterium (keV) .tE (1,:) Electron temperature (keV) .fT (1,1) Factor reducing D-T reactions (0-1) .fHe (1,1) Factor recycled 3He (0-0.5)
pF (1,1) Total fusion power (MW/m^3) pN (1,1) Neutron power (MW/m^3) pB (1,1) Bremsstrahlung power (MW/m^3) rHe (1,1) Rate of Helium-3 consumption (#/s) nNd (1,1) Neutron flux from D-D reactions (#/s) nNt (1,1) Neutron flux from D-T reactions (#/s) See also MaxwellianV, FusionReaction
Reference: Santarius, J.F. and B.G. Logan, "Generic Magnetic Fusion Rocket", UWFDM-914, University of Wisconsin, February 1998.
References and().
function PowerDHe3 | ( | in | d | ) |
Compute the power for a D-He3 reactor including Bremsstrahlung.
Computes the D-D, and D-T side reactions. fD and fT reduce the D-D and D-T side reactions for non-homogeneous plasmas. Synchrotron is neglected.
Type PowerDHe3 for a demo for temperatures from 20 kEV to 200 kEV.
d = PowerDHe3 [pF, pN, pB, nNd, nNt] = PowerDHe3( d )
d (.) Data structure .nD (1,1) Number density deuterium (#/m3) .nHe3 (1,1) Number density helium-3 (#/m3) .tD (1,:) Temperature deuterium (keV) .tHe3 (1,:) Temperature helium-3 (keV) .tE (1,:) Electron temperature (keV) .fD (1,1) Factor reducing D-D reactions (0-1) .fT (1,1) Factor reducing D-T reactions (0-1)
pF (1,1) Total fusion power (MW/m^3) pN (1,1) Neutron power (MW/m^3) pB (1,1) Bremsstrahlung power (MW/m^3) nNd (1,1) Neutron flux from D-D reactions (#/m^3-s) nNt (1,1) Neutron flux from D-T reactions (#/m^3-s) See also MaxwellianV, FusionReaction
Reference: Santarius, J.F. and B.G. Logan, "Generic Magnetic Fusion Rocket", UWFDM-914, University of Wisconsin, February 1998.
function PowerDT | ( | in | d | ) |
Compute the power for a D-T fusion reactor.
Computes the D-T and D-D side reactions. fT reduces the D-T side reactions for non-homogeneous plasmas. fHe sets the helium-3 density as a fraction of the D density. Synchrotron is neglected. The rate at which 3He is produced is the same as the neutron flux from D-D reactions.
Type PowerDT for a demo for temperatures from 20 keV to 200 keV.
d = PowerDD [pF, pN, pB, rHe, nNd, nNt] = PowerDT( d )
d (.) Data structure .nD (1,1) Number density deuterium (#/m3) .nT (1,1) Number density tritium (#/m3) .tD (1,:) Temperature deuterium (keV) .tE (1,:) Electron temperature (keV)
pF (1,1) Total fusion power (MW/m^3) pN (1,1) Neutron power (MW/m^3) pB (1,1) Bremsstrahlung power (MW/m^3) nNd (1,1) Neutron flux from D-D reactions (#/s) nNt (1,1) Neutron flux from D-T reactions (#/s) See also MaxwellianV, FusionReaction
Reference: Santarius, J.F. and B.G. Logan, "Generic Magnetic Fusion Rocket", UWFDM-914, University of Wisconsin, February 1998.
References and().
function PowerIE | ( | in | zI, |
in | nI, | ||
in | aI, | ||
in | Ti, | ||
in | Te | ||
) |
Power from ions to electrons, NRL model.
This is a simplified form suitable when Te ~= Ti. Nonrelativistic.
[p,nu] = PowerIE( zI, nI, aI, Ti, Te )
zI (m) Ion atomic numbers nI (m) Ion densities (#/m^3) aI (m) Ion atomic weight (amu) Ti (1,1) Ion temperature (kev) Te (n) Electron temperature (kev)
p (m,n) Ion to Electron Loss (MW/m^3) nu (m,n) nuE/I, equilibration
References: NRL Plasma Formulary, 2016.
See also: IonElectronEquilibration
function PowerIonsToElectrons | ( | in | nE, |
in | zI, | ||
in | nI, | ||
in | aI, | ||
in | tI, | ||
in | tE | ||
) |
Power lost by the ions to the electrons, Dawson model (relativistic).
This is the power lost to electrions via collisions, when ions are hotter than electrons.
Type PowerIonsToElectrons for a demo.
p = PowerIonsToElectrons( nE, zI, nI, aI, tI, tE )
nE (1,1) Electron density (#/m^3) zI (:) Ion atomic numbers nI (:) Ion densities (#/m^3) aI (:) Ion atomic weight tI (1,1) Ion temperature (kev) tE (n) Electron temperature (kev)
p (m,n) Ion to Electron Loss (MW/m^3)
References: Dawson, J. M., "Advanced Fusion Reactors," Fusion, Teller,
E. Editor, Academic Press, 1981, pp. 488.
function ReactionString | ( | in | r1, |
in | r2 | ||
) |
function ReactorField | ( | in | d, |
in | beta | ||
) |
Calculate magnetic field from plasma pressure and beta.
b = ReactorField( d, beta )
d (.) Input data structure .nD (1,1) Number density D (m^-3) .nHe3 (1,1) Number density He3 (m^-3) .tHe3 (1,1) Temperature He3 (kEV) .tD (1,1) Temperature D (kEV) .tE (1,1) Temperature e- (kEV) beta (1,1) Ratio of pressure to magnetic pressure
b (1,1) Field strength (T)
See also PowerDHe3, PlasmaConstant, NumberOfElectrons, BField
References and().
function ShieldingThickness | ( | in | limit, |
in | years, | ||
in | flux, | ||
in | Sigma | ||
) |
Shielding thickness from neutron attenuation model.
This is a simple model for the thickness of neutron shielding given a flux and the shielding material properties. The attenuation equation is:
I/I0 = exp(-Sigma*t)
The cross-section must be calculated for the energy of the incoming flux. The macroscopic cross-section for LiH is about 0.27.
thick = ShieldingThickness( limit, years, flux, Sigma )
limit (1,1) Lifetime fluence limit, n/m2 years (1,:) Lifetime in years flux (1,1) Flux at the wall, % n/m2/s Sigma (1,1) Macroscopic cross section, 1/cm (default: 0.27)
thick (1,:) Shielding thickness
References and().
function SigmaV | ( | in | r1, |
in | r2, | ||
in | tK | ||
) |
Computes thermonuclear reaction reaction rates.
Energy-averaged fusion reaction rates. Add n or p to one of the d's to get the neutron or proton variant. d-d gives you the proton variant.
Type SigmaV for a demo.
sV = SigmaV( r1, r2, tK )
r1 (1,:) Reactant name ('D','T','He3','B11','Li6','He4', 'p') r2 (1,:) Reactant name ('D','T','He3','B11','Li6','He4', 'p') tK (:) Kinetic temperature (keV)
sV (:) Reaction rate in m^3/sec
References: http://home.earthlink.net/~jimlux/nuc/reactions.htm
References Add().
function SteadyStateTokamak | ( | in | d | ) |
Generates a statespace model of a tokamak.
The output is the vertical current moment of the plasma current centroid. This system is unstable.
Type SteadyStateTokamak for a demo.
g = SteadyStateTokamak( d )
d (1,1) Data structure .rAA (1,1) Active coil resistance (Ohm) .rVV (1,1) Passive coil resistance(Ohm) .lAV (1,1) Active-passive coil mutual inductance (H) .lAA (1,1) Active coil self-inductance (H) .lVV (1,1) Passive coil self-inductance (H) .lAP (1,1) Mutual change inductance between the active coils and plasma displacement (H/m) .lVP (1,1) Mutual change inductance between the passive coils and plasma displacement(H/m) .aPP (1,1) Normalized destabilizing force 0.4 to 0.6 e-6 H/m^2
References statespace().
function Synchrotron | ( | in | nI, |
in | zI, | ||
in | b, | ||
in | tE, | ||
in | L, | ||
in | rW | ||
) |
Computes synchrotron radiation.
Synchrotron is radiation lost by the electrons. The NRL formulary provides a global loss model that assumes a constant field and temperature. Bingren provides a model that accounts for wall reflection for a toroidal field.
Type Synchrotron for a demo comparing the two models.
p = Synchrotron( nI, zI, b, tE ) % global model (NRL) p = Synchrotron( nI, zI, b, tE, L, rW ) % wall reflection (Bingren)
nI (1,m) Ion densities (#/m^3) zI (1,m) Ion atomic numbers b (1,1) Magnetic Field (T) tE (1,n) Electron temperature (keV) L (1,1) Average plasma radius (m) rW (1,1) Wall reflection (0-1)
p (1,n) Synchrotron radiation (MW/m^3)
References: NRL Plasma Formulary, 2016. Bingren, S., "Core Plasma Characteristics of a Spherical Tokamak D-3He Fusion Reactor", Plasma Science & Technology, Vol. 7 No. 2 April 2005. Bing-Ren, S. "Possibility of Establishing D-3He Fusion Reactor Using Spherical Tokamaks", Chinese Physics Letters, 2004
References and().
function SynchrotronFrequency | ( | in | b, |
in | v | ||
) |
function ThermalConductivityG10 | ( | in | T | ) |
Thermal conductivity of G-10 Cryo at a given temperature.
It's different in the warp direction than in the normal directon, so give both.
[KWarp,KNormal] = ThermalConductivityG10( T )
T (1,:) Temperature (K)
KWarp (1,:) Thermal conductivity in the warp direction (W/K*m) KNormal (1,:) Thermal conductivity in the normal direction (W/K*m)
Reference: Bradley, Peter, Ray Radebaugh, and Gary Hardin. "NIST Thermodynamics Research Center Cryogenic Technology Resources: Cryogenic Material Properties." NIST Thermodynamics Research Center Cryogenic Technology Resources: Cryogenic Material Properties. Accessed November 16, 2020. https://trc.nist.gov/cryogenics/materials/materialproperties.htm.
function ThermalConductivityInconel | ( | in | T | ) |
Give the thermal conductivity of Inconel at a given temperature.
From 4 K to 300 K
K = ThermalConductivityG10( T )
T (1,:) Temperature (K)
KWarp (1,:) Thermal conductivity (W/K*m)
Reference: Bradley, Peter, Ray Radebaugh, and Gary Hardin. "NIST Thermodynamics Research Center Cryogenic Technology Resources: Cryogenic Material Properties." NIST Thermodynamics Research Center Cryogenic Technology Resources: Cryogenic Material Properties. Accessed November 16, 2020. https://trc.nist.gov/cryogenics/materials/materialproperties.htm.
function TokamakBeta | ( | in | aR | ) |
Computes the tokamak beta from aspect ratio.
The input is the minor radius/major radius. The minor radius is the radius of the cylinder that makes up the toroid. The major radius is from the center of the toroid to the centerline of the cylinder that makes up the torus.
Type TokamakBeta for a demo.
beta = TokamakBeta( aR )
aR (1,:) Aspect ratio, minor radius/major radius
beta (1,:) Toroidal beta
References: Szirmay, L. V., "Nuclear Fusion Reactor Design Fundamentals", Colas Publishing, 1992, p. 146.
function TPVHRHS | ( | in | x, |
in | t, | ||
in | d | ||
) |
Simulates a model of the vertical position of a plasma in a Tokamak.
xDot = TPVHRHS( x, t, d )
x (3,1) State [wA4;wB4;h] t (1,1) Time d (1,1) Structure .a (1,1) State space model .b (1,1) .c (1,1) .d (1,1) .v (1,1) .eLM (1,1) Edge limited mode disturbance
xDot (3,1) State derivative
Reference: Scibile, L. and B. Kouvaritakis (2001.) "A Discrete Adaptive Near-Time Optimum Control for the Plasma Vertical Position in a Tokamak." IEEE Transactions on Control System Technology. Vol. 9, No. 1, January 2001.
function TransportPower | ( | in | n, |
in | T, | ||
in | tau, | ||
in | v | ||
) |
Compute transport power loss given confinement time.
This is the ratio of internal plasma energy to the confinement time.
[Pt,iE] = TransportPower( n, T, tau, v )
n (1,:) Ion densities (/m3) T (1,:) Ion temperatures (keV) tau (1,:) Confinement time (s) v (1,1) Volume, default 1 (m3)
Pt (1,:) Power (MW) iE (1,:) Plasma internal energy (J)
function VolumeAveragedPressure | ( | in | t, |
in | nI, | ||
in | zI | ||
) |
Computes the volume averaged pressure.
Compute the electron density from the ion density to compute the plasma pressure.
Type VolumeAveragedPressure for a demo.
rMS = VolumeAveragedPressure( t, nI, zI )
Inputs
t (1,:) Temperature (keV) nI (1,:) Ion density (#/m^3) zI (1,:) Atomic number
p (1,:) Volume Averaged Pressure (N/m^2)
References: M.J. Schaffer, "CONSIDERATIONS FOR STEADY-STATE FRC-BASED FUSION SPACE PROPULSION", General Atomic GA?A23579,2000.
function XRayMassAttenCoeff | ( | in | el, |
in | e, | ||
in | file | ||
) |
Computes the X-ray mass attenuation coefficient.
Uses NIST data. d has one cell row per element in the database.
file needs to be an ASCII text file of the form:
%% element e (MeV), mu, mu Energy e (MeV), mu, mu Energy e (MeV), mu, mu Energy ...
You can have multiple elements in one file. The default file has helium, xenon, hydrogen, titanium and tungsten.
Some of the NIST data has discontinuities, two values of mu at the same energy. If the file reader finds an element like that it adjusts the energy slightly.
This function will extrapolate past the limits of the input data.
Type XRayMassAttenCoeff for a demo for a mixture of helium and xenon.
[m, mEn, d] = XRayMassAttenCoeff( el, e, file )
el {} Elements {name, fraction ... } e (1,:) Energy (MeV) file (1,:) File Name (Default is MassAttenCoeff.txt)
m (1,:) Mass attenuation coefficients (cm^2/g) mEn (1,:) Mass attenuation energy coefficients (cm^2/g) d {name,e,m,mEn} Data
Reference: https://www.nist.gov/pml/x-ray-mass-attenuation-coefficients
References and().