Procedures

ProcedureLocationProcedure TypeDescription
allocate_blockfson_string_mSubroutine
append_charfson_string_mSubroutine
append_charsfson_string_mSubroutine
append_stringfson_string_mSubroutine
binomialmaths_libraryFunction
boundxcdefine_iteration_variablesSubroutine

Routine to convert variable bounds to their real values author: P J Knight, CCFE, Culham Science Centre None This subroutine converts the scaled iteration variable bounds back to their real values. !

checkinitial.f90Subroutine

Routine to reset specific variables if certain options are being used author: P J Knight, CCFE, Culham Science Centre None This routine performs a sanity check of the input variables and ensures other dependent variables are given suitable values.

Read more…
check_range_intprocess_inputSubroutine

Routine that checks whether an integer variable lies within the desired range author: P J Knight, CCFE, Culham Science Centre outfile : input integer : Fortran output unit identifier cvar : input string : name of variable varval : input integer : value of variable min_value : input integer : minimum allowed value of variable max_value : input integer : maximum allowed value of variable This routine checks whether an integer variable lies within the range predetermined by the user, and reports an error and stops if it doesn't. None

check_range_realprocess_inputSubroutine

Routine that checks whether a real variable lies within the desired range author: P J Knight, CCFE, Culham Science Centre cvar : input string : name of variable varval : input real : value of variable min_value : input real : minimum allowed value of variable max_value : input real : maximum allowed value of variable This routine checks whether a real variable lies within the range predetermined by the user, and reports an error and stops if it doesn't. None

close_idempotence_filesinit_moduleSubroutine
constraint_eqn_001constraintsSubroutine

Relationship between beta, temperature (keV) and density

Read more…
constraint_eqn_002constraintsSubroutine

Global plasma power balance equation

Read more…
constraint_eqn_003constraintsSubroutine

Global power balance equation for ions args : output structure : residual error; constraint value; residual error in physical units; output string; units string Global power balance equation for ions This is a consistency equation (NBI) #=# physics #=#=# consistency and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. ignite : input integer : switch for ignition assumption:

  • = 0 do not assume plasma ignition;
  • = 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) pinjimw : input real : auxiliary injected power to ions (MW) plasma_volume : input real : plasma volume (m3)

constraint_eqn_004constraintsSubroutine

Global power balance equation for electrons author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Global power balance equation for electrons This is a consistency equation N.B. This constraint is currently NOT RECOMMENDED for use. #=# physics #=#=# consistency and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. iradloss : input integer : switch for radiation loss term usage in power balance (see User Guide):

  • = 0 total power lost is scaling power plus radiation (needed for ipedestal=2,3)
  • = 1 total power lost is scaling power plus core radiation only
  • = 2 total power lost is scaling power only, with no additional allowance for radiation. This is not recommended for power plant models.
ignite : input integer : switch for ignition assumption:
  • = 0 do not assume plasma ignition;
  • = 1 assume ignited (but include auxiliary power in costs)
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) 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)

constraint_eqn_005constraintsSubroutine

Equation for density upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for density upper limit #=# physics #=#=# fdene, dnelimt and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. idensl : input integer : switch for density limit to enforce (constraint equation 5):

  • = 1 old ASDEX;
  • = 2 Borrass model for ITER (I);
  • = 3 Borrass model for ITER (II);
  • = 4 JET edge radiation;
  • = 5 JET simplified;
  • = 6 Hugill-Murakami Mq limit;
  • = 7 Greenwald limit
fdene : input real : f-value for density limit dene : input real : electron density (/m3) dnelimt : input real : density limit (/m3) dnla : input real : line averaged electron density (m-3)

constraint_eqn_006constraintsSubroutine

Equation for epsilon beta-poloidal upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for epsilon beta-poloidal upper limit #=# physics #=#=# fbeta, epbetmax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fbeta : input real : f-value for epsilon beta-poloidal epbetmax : input real : maximum (eps*beta_poloidal) eps : input real : inverse aspect ratio betap : input real : poloidal beta

constraint_eqn_007constraintsSubroutine

Equation for hot beam ion density args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for hot beam ion density This is a consistency equation (NBI) #=# physics #=#=# consistency and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. ignite : input integer : switch for ignition assumption:

  • = 0 do not assume plasma ignition;
  • = 1 assume ignited (but include auxiliary power in costs)
Obviously, ignite must be zero if current drive is required. 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) dnbeam : input real : hot beam ion density, variable (/m3)

constraint_eqn_008constraintsSubroutine

Equation for neutron wall load upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for neutron wall load upper limit #=# physics #=#=# fwalld, walalw and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fwalld : input real : f-value for maximum wall load walalw : input real : allowable wall-load (MW/m2) wallmw : input real : average neutron wall load (MW/m2)

constraint_eqn_009constraintsSubroutine

Equation for fusion power upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for fusion power upper limit #=# physics #=#=# ffuspow, powfmax and hence also optional here. 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)

constraint_eqn_010constraintsSubroutine

Equation for field at TF coil This is a consistency equation (do not use for stellarators) #=# tfcoil #=#=# consistency rmajor | plasma major radius (m) bt | toroidal field on axis (T) rbmax | radius of maximum toroidal field (m) bmaxtf | peak field at toroidal field coil (T)

Read more…
constraint_eqn_011constraintsSubroutine

Equation for radial build author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for radial build (This is a consistency equation.) #=# build #=#=# consistency and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. rbld : input real : sum of thicknesses to the major radius (m) rmajor : input real : plasma major radius (m)

constraint_eqn_012constraintsSubroutine

Equation for volt-second capability lower limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for volt-second capability lower limit #=# pfcoil #=#=# fvs, vsstt and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. vsstt : input real : total V-s needed (Wb) vsstt (lower limit) is positive; vstot (available) is negative fvs : input real : f-value for flux-swing (V-s) requirement (STEADY STATE) vstot : input real : total flux swing for pulse (Wb)

constraint_eqn_013constraintsSubroutine

Equation for burn time lower limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for burn time lower limit #=# times #=#=# ftburn, tbrnmn and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. ftburn : input real : f-value for minimum burn time tburn : input real : burn time (s) (calculated if lpulse=1) tbrnmn : input real : minimum burn time (s)

constraint_eqn_014constraintsSubroutine

Equation to fix number of NBI decay lengths to plasma centre author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation to fix number of NBI decay lengths to plasma centre This is a consistency equation #=# current_drive #=#=# consistency and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. taubeam : input real : neutral beam e-decay lengths to plasma centre tbeamin : input real : permitted neutral beam e-decay lengths to plasma centre

constraint_eqn_015constraintsSubroutine

Equation for L-H power threshold limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for L-H power threshold limit #=# physics #=#=# flhthresh, plhthresh and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. flhthresh : input real : f-value for L-H power threshold plhthresh : input real : L-H mode power threshold (MW) pdivt : input real : power to conducted to the divertor region (MW)

constraint_eqn_016constraintsSubroutine

Equation for net electric power lower limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for net electric power lower limit #=# heat_transport #=#=# fpnetel, pnetelin and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fpnetel : input real : f-value for net electric power pnetelmw : input real : net electric power (MW) pnetelin : input real : required net electric power (MW)

constraint_eqn_017constraintsSubroutine

Equation for radiation power upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for radiation power upper limit #=# physics #=#=# 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 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) 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)

constraint_eqn_018constraintsSubroutine

Equation for divertor heat load upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for divertor heat load upper limit #=# divertor #=#=# fhldiv, hldivlim and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fhldiv : input real : f-value for divertor heat load hldivlim : input real : heat load limit (MW/m2) hldiv : input real : divertor heat load (MW/m2)

constraint_eqn_019constraintsSubroutine

Equation for MVA (power) upper limit: resistive TF coil set author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for MVA upper limit #=# tfcoil #=#=# fmva, mvalim and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. tfcpmw : input real : peak resistive TF coil inboard leg power (total) (MW) tflegmw : input real : TF coil outboard leg resistive power (total) (MW) fmva : input real : f-value for maximum MVA mvalim : input real : MVA limit for resistive TF coil set (total) (MW)

constraint_eqn_020constraintsSubroutine

Equation for neutral beam tangency radius upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for neutral beam tangency radius upper limit #=# current_drive #=#=# fportsz, rtanmax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fportsz : input real : f-value for neutral beam tangency radius limit rtanmax : input real : maximum tangency radius for centreline of beam (m) rtanbeam : input real : neutral beam centreline tangency radius (m)

constraint_eqn_021constraintsSubroutine

Equation for minor radius lower limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for minor radius lower limit #=# physics #=#=# frminor, aplasmin and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. frminor : input real : f-value for minor radius limit rminor : input real : plasma minor radius (m) aplasmin : input real : minimum minor radius (m)

constraint_eqn_022constraintsSubroutine

Equation for divertor collision/connection length ratio upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for divertor collision/connection length ratio upper limit #=# divertor #=#=# fdivcol, rlenmax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fdivcol : input real : f-value for divertor collisionality rlenmax : input real : maximum value for length ratio (rlclolcn) rlclolcn : input real : ratio of collision length / connection length

constraint_eqn_023constraintsSubroutine

Equation for conducting shell radius / rminor upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for conducting shell radius / rminor upper limit #=# physics #=#=# fcwr, cwrmax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. rminor : input real : plasma minor radius (m) scraplo : input real : gap between plasma and first wall, outboard side (m) fwoth : input real : outboard first wall thickness, initial estimate (m) blnkoth : input real : outboard blanket thickness (m) fcwr : input real : f-value for conducting wall radius / rminor limit cwrmax : input real : maximum ratio of conducting wall distance to plasma minor radius for vertical stability

constraint_eqn_024constraintsSubroutine

Equation for beta upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for beta upper limit #=# physics #=#=# fbetatry, betalim and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. iculbl : input integer : switch for beta limit scaling (constraint equation 24):

  • = 0 apply limit to total beta;
  • = 1 apply limit to thermal beta;
  • = 2 apply limit to thermal + neutral beam beta
  • = 3 apply limit to toroidal beta
istell : input integer : switch for stellarator option (set via device.dat):
  • = 0 use tokamak model;
  • = 1 use stellarator model
fbetatry : input real : f-value for beta limit 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 bt : input real : toroidal field btot : input real : total field

constraint_eqn_025constraintsSubroutine

Equation for peak toroidal field upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for peak toroidal field upper limit #=# tfcoil #=#=# fpeakb, bmxlim and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fpeakb : input real : f-value for maximum toroidal field bmxlim : input real : maximum peak toroidal field (T) bmaxtf : input real : mean peak field at TF coil (T)

constraint_eqn_026constraintsSubroutine

Equation for Central Solenoid current density upper limit at EOF author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for Central Solenoid current density upper limit at EOF #=# pfcoil #=#=# fjohc, rjohc and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fjohc : input real : f-value for central solenoid current at end-of-flattop rjohc : input real : allowable central solenoid current density at end of flat-top (A/m2) coheof : input real : central solenoid overall current density at end of flat-top (A/m2)

constraint_eqn_027constraintsSubroutine

Equation for Central Solenoid current density upper limit at BOP author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for Central Solenoid current density upper limit at BOP #=# pfcoil #=#=# fjohc0, rjohc0 and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fjohc0 : input real : f-value for central solenoid current at beginning of pulse rjohc0 : input real : allowable central solenoid current density at beginning of pulse (A/m2) cohbop : input real : central solenoid overall current density at beginning of pulse (A/m2)

constraint_eqn_028constraintsSubroutine

Equation for fusion gain (big Q) lower limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for fusion gain (big Q) lower limit #=# physics #=#=# fqval, bigqmin and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fqval : input real : pf-value for Q bigq : input real : Fusion gain; P_fusion / (P_injection + P_ohmic) bigqmin : input real : minimum fusion gain Q ignite : input integer : switch for ignition assumption:

  • = 0 do not assume plasma ignition;
  • = 1 assume ignited (but include auxiliary power in costs)
Obviously, ignite must be zero if current drive is required. 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.

constraint_eqn_029constraintsSubroutine

Equation for inboard major radius: This is a consistency equation author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for inboard major radius: This is a consistency equation #=# build #=#=# consistency and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. rmajor : input real : plasma major radius (m) (iteration variable 3) rminor : input real : plasma minor radius (m) rinboard : input real : plasma inboard radius (m)

constraint_eqn_030constraintsSubroutine

Equation for injection power upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for injection power upper limit #=# current_drive #=#=# fpinj, pinjalw and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. pinjmw : input real : total auxiliary injected power (MW) fpinj : input real : f-value for injection power pinjalw : input real : Maximum allowable value for injected power (MW)

constraint_eqn_031constraintsSubroutine

Equation for TF coil case stress upper limit (SCTF) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for TF coil case stress upper limit (SCTF) #=# tfcoil #=#=# fstrcase, sig_tf_case_max and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fstrcase : input real : f-value for TF coil case stress sig_tf_case_max : input real : Allowable maximum shear stress in TF coil case (Tresca criterion) (Pa) sig_tf_case : input real : Constrained stress in TF coil case (Pa)

constraint_eqn_032constraintsSubroutine

Equation for TF coil conduit stress upper limit (SCTF) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for TF coil conduit stress upper limit (SCTF) #=# tfcoil #=#=# fstrcond, sig_tf_wp_max and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fstrcond : input real : f-value for TF coil conduit stress sig_tf_wp_max : input real : Allowable maximum shear stress in TF coil conduit (Tresca criterion) (Pa) sig_tf_wp : input real : Constrained stress in TF conductor conduit (Pa)

constraint_eqn_033constraintsSubroutine

Equation for TF coil operating/critical J upper limit (SCTF) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for TF coil operating/critical J upper limit (SCTF) #=# tfcoil #=#=# fiooic, jwdgcrt and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fiooic : input real : f-value for TF coil operating current / critical jwdgcrt : input real : critical current density for winding pack (A/m2) jwptf : input real : winding pack current density (A/m2)

constraint_eqn_034constraintsSubroutine

Equation for TF coil dump voltage upper limit (SCTF) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for TF coil dump voltage upper limit (SCTF) #=# tfcoil #=#=# fvdump, vdalw and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fvdump : input real : f-value for dump voltage vdalw : input real : max voltage across TF coil during quench (kV) vtfskv : input real : voltage across a TF coil during quench (kV)

constraint_eqn_035constraintsSubroutine

Equation for TF coil J_wp/J_prot upper limit (SCTF) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for TF coil J_wp/J_prot upper limit (SCTF) #=# tfcoil #=#=# fjprot, jwdgpro and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fjprot : input real : f-value for TF coil winding pack current density jwdgpro : input real : allowable TF coil winding pack current density, for dump temperature rise protection (A/m2) jwptf : input real : winding pack current density (A/m2)

constraint_eqn_036constraintsSubroutine

Equation for TF coil s/c temperature margin lower limit (SCTF) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for TF coil s/c temperature margin lower limit (SCTF) #=# tfcoil #=#=# ftmargtf, tmargmin_tf and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. ftmargtf : input real : f-value for TF coil temperature margin tmargtf : input real : TF coil temperature margin (K) tmargmin_tf : input real : minimum allowable temperature margin : TF coils (K)

constraint_eqn_037constraintsSubroutine

Equation for current drive gamma upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for current drive gamma upper limit #=# current_drive #=#=# fgamcd, gammax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fgamcd : input real : f-value for current drive gamma gammax : input real : maximum current drive gamma gamcd : input real : normalised current drive efficiency (1.0e20 A/W-m2)

constraint_eqn_038constraintsSubroutine

Obsolete author: P B Lloyd, CCFE, Culham Science Centre Obsolete #=# empty #=#=# empty

constraint_eqn_039constraintsSubroutine

Equation for first wall temperature upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for first wall temperature upper limit #=# fwbs #=#=# ftpeak, tfwmatmax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. ftpeak : input real : f-value for first wall peak temperature tfwmatmax : input real : maximum temperature of first wall material (K) (secondary_cycle>1) tpeak : input real : peak first wall temperature (K)

constraint_eqn_040constraintsSubroutine

Equation for auxiliary power lower limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for auxiliary power lower limit #=# current_drive #=#=# fauxmn, auxmin and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fauxmn : input real : f-value for minimum auxiliary power pinjmw : input real : total auxiliary injected power (MW) auxmin : input real : minimum auxiliary power (MW)

constraint_eqn_041constraintsSubroutine

Equation for plasma current ramp-up time lower limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for plasma current ramp-up time lower limit #=# times #=#=# ftohs, tohsmn and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. ftohs : input real : f-value for plasma current ramp-up time tohs : input real : plasma current ramp-up time for current initiation (s) tohsmn : input real : minimum plasma current ramp-up time (s)

constraint_eqn_042constraintsSubroutine

Equation for cycle time lower limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for cycle time lower limit #=# times #=#=# ftcycl, tcycmn and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. ftcycl : input real : f-value for cycle time tcycle : input real : full cycle time (s) tcycmn : input real : minimum cycle time (s)

constraint_eqn_043constraintsSubroutine

Equation for average centrepost temperature: This is a consistency equation (TART) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for average centrepost temperature: This is a consistency equation (TART) #=# tfcoil #=#=# consistency and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. tcpav : input real : average temp of TF coil inboard leg conductor (C)e tcpav2 : input real : centrepost average temperature (C) (for consistency) itart : input integer : switch for spherical tokamak (ST) models:

  • = 0 use conventional aspect ratio models;
  • = 1 use spherical tokamak models

constraint_eqn_044constraintsSubroutine

Equation for centrepost temperature upper limit (TART) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for centrepost temperature upper limit (TART) #=# tfcoil #=#=# fptemp, ptempalw and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fptemp : input real : f-value for peak centrepost temperature ptempalw : input real : maximum peak centrepost temperature (K) tcpmax : input real : peak centrepost temperature (K) itart : input integer : switch for spherical tokamak (ST) models:

  • = 0 use conventional aspect ratio models;
  • = 1 use spherical tokamak models

constraint_eqn_045constraintsSubroutine

Equation for edge safety factor lower limit (TART) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for edge safety factor lower limit (TART) #=# tfcoil #=#=# fq, qlim and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fq : input real : f-value for edge safety factor q : safety factor 'near' plasma edge: equal to q95 (unless i_plasma_current = 2 (ST current scaling), in which case q = mean edge safety factor qbar) qlim : input real : lower limit for edge safety factor itart : input integer : switch for spherical tokamak (ST) models:

  • = 0 use conventional aspect ratio models;
  • = 1 use spherical tokamak models

constraint_eqn_046constraintsSubroutine

Equation for Ip/Irod upper limit (TART) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for Ip/Irod upper limit (TART) #=# tfcoil #=#=# fipir, cratmx and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. eps : input real : inverse aspect ratio fipir : input real : f-value for Ip/Irod upper limit ritfc : input real : total (summed) current in TF coils (A) plasma_current : input real : plasma current (A) itart : input integer : switch for spherical tokamak (ST) models:

  • = 0 use conventional aspect ratio models;
  • = 1 use spherical tokamak models

constraint_eqn_047constraintsSubroutine

Issue #508 Remove RFP option: Relevant only to reversed field pinch devices author: P B Lloyd, CCFE, Culham Science Centre Issue #508 Remove RFP option: Relevant only to reversed field pinch devices Equation for TF coil toroidal thickness upper limit #=# empty #=#=# empty

constraint_eqn_048constraintsSubroutine

Equation for poloidal beta upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for poloidal beta upper limit #=# physics #=#=# fbetap, betpmx and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fbetap : input real : rf-value for poloidal beta betpmx : input real : maximum poloidal beta betap : input real : poloidal beta

constraint_eqn_049constraintsSubroutine

Issue #508 Remove IFE option: Equation for repetition rate upper limit author: P B Lloyd, CCFE, Culham Science Centre Issue #508 Remove IFE option: Equation for repetition rate upper limit #=# empty #=#=# empty

constraint_eqn_050constraintsSubroutine

IFE option: Equation for repetition rate upper limit author: P B Lloyd, CCFE, Culham Science Centre author: S I Muldrew, CCFE, Culham Science Centre IFE option: Equation for repetition rate upper limit #=# IFE #=#=# frrmax, rrmax

constraint_eqn_051constraintsSubroutine

Equation to enforce startup flux = available startup flux author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation to enforce startup flux = available startup flux #=# pfcoil #=#=# consistency and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. vsres : input real : resistive losses in startup V-s (Wb) vsind : input real : internal and external plasma inductance V-s (Wb)) vssu : input real : total flux swing for startup (Wb)

constraint_eqn_052constraintsSubroutine

Equation for tritium breeding ratio lower limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for tritium breeding ratio lower limit #=# fwbs #=#=# ftbr, tbrmin ? TODO should this only be for certain blanket models ? and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. ftbr : input real : f-value for minimum tritium breeding ratio tbr : input real : tritium breeding ratio (iblanket=2,3 (KIT HCPB/HCLL)) tbrmin : input real : minimum tritium breeding ratio (If iblanket=1, tbrmin=minimum 5-year time-averaged tritium breeding ratio)

constraint_eqn_053constraintsSubroutine

Equation for fast neutron fluence on TF coil upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for fast neutron fluence on TF coil upper limit #=# fwbs #=#=# fflutf, nflutfmax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fflutf : input real : f-value for maximum TF coil nuclear heating nflutfmax : input real : max fast neutron fluence on TF coil (n/m2) nflutf : input real : peak fast neutron fluence on TF coil superconductor (n/m2)

constraint_eqn_054constraintsSubroutine

Equation for peak TF coil nuclear heating upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for peak TF coil nuclear heating upper limit #=# fwbs #=#=# fptfnuc, ptfnucmax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fptfnuc : input real : f-value for maximum TF coil nuclear heating ptfnucmax : input real : maximum nuclear heating in TF coil (MW/m3) ptfnucpm3 : input real : nuclear heating in the TF coil (MW/m3) (blktmodel>0)

constraint_eqn_055constraintsSubroutine

vvhemax is no longer calculated in PROCESS and this constraint is disabled

constraint_eqn_056constraintsSubroutine

Equation for power through separatrix / major radius upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for power through separatrix / major radius upper limit #=# current_drive #=#=# fnbshinef, nbshinefmax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fpsepr : input real : f-value for maximum Psep/R limit pseprmax : input real : maximum ratio of power crossing the separatrix to plasma major radius (Psep/R) (MW/m) pdivt : input real : power to be conducted to the divertor region (MW) rmajor : input real : plasma major radius (m)

constraint_eqn_057constraintsSubroutine

Obsolete author: P B Lloyd, CCFE, Culham Science Centre Obsolete #=# empty #=#=# empty

constraint_eqn_058constraintsSubroutine

Obsolete author: P B Lloyd, CCFE, Culham Science Centre Obsolete #=# empty #=#=# empty

constraint_eqn_059constraintsSubroutine

Equation for neutral beam shine-through fraction upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for neutral beam shine-through fraction upper limit #=# current_drive #=#=# fnbshinef, nbshinefmax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fnbshinef : input real : f-value for maximum neutral beam shine-through fraction nbshinefmax : input real : maximum neutral beam shine-through fraction nbshinef : input real : neutral beam shine-through fraction

constraint_eqn_060constraintsSubroutine

Equation for Central Solenoid s/c temperature margin lower limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for Central Solenoid s/c temperature margin lower limit #=# tfcoil #=#=# ftmargoh, tmargmin_cs and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. ftmargoh : input real : f-value for central solenoid temperature margin tmargoh : input real : Central solenoid temperature margin (K) tmargmin_cs : input real : Minimum allowable temperature margin : CS (K)

constraint_eqn_061constraintsSubroutine

Equation for availability limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for availability limit #=# cost #=#=# favail, avail_min and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. favail : input real : F-value for minimum availability cfactr : input real : Total plant availability fraction avail_min : input real : Minimum availability

constraint_eqn_062constraintsSubroutine

Lower limit on taup/taueff the ratio of alpha particle to energy confinement times author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Lower limit on taup/taueff the ratio of alpha particle to energy confinement times #=# physics #=#=# ftaulimit, taulimit and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. ftaulimit : input real : f-value for lower limit on taup/taueff the ratio of alpha particle to energy confinement taup : input real : alpha particle confinement time (s) taueff : input real : global thermal energy confinement time (sec) taulimit : input real : Lower limit on taup/taueff the ratio of alpha particle to energy confinement times

constraint_eqn_063constraintsSubroutine

Upper limit on niterpump (vacuum_model = simple) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Upper limit on niterpump (vacuum_model = simple) #=# vacuum #=#=# fniterpump, tfno and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fniterpump : input real : f-value for constraint that number of pumps < tfno tfno : input real : number of TF coils (default = 50 for stellarators) niterpump : input real : number of high vacuum pumps (real number), each with the throughput

constraint_eqn_064constraintsSubroutine

Upper limit on Zeff author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Upper limit on Zeff #=# physics #=#=# fzeffmax, zeffmax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fzeffmax : input real : f-value for maximum zeff zeffmax : input real : maximum value for Zeff zeff : input real : plasma effective charge

constraint_eqn_065constraintsSubroutine

Limit the stress of the vacuum vessel that occurs when the TF coil quenches. author: Timothy Nunn, UKAEA args : output structure : residual error; constraint value; residual error in physical units; output string; units string Logic change during pre-factoring: err, symbol, units will be assigned only if present. fmaxvvstress : input real : f-value for constraint on maximum VV stress max_vv_stress : input real : Maximum permitted stress of the VV (Pa) vv_stress_quench : input real : Stress of the VV (Pa)

constraint_eqn_066constraintsSubroutine

Limit on rate of change of energy in poloidal field author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Limit on rate of change of energy in poloidal field #=# pfcoil #=#=# fpoloidalpower, maxpoloidalpower and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fpoloidalpower : input real : f-value for constraint on rate of change of energy in poloidal field maxpoloidalpower : input real : Maximum permitted absolute rate of change of stored energy in poloidal field (MW) peakpoloidalpower : input real : Peak absolute rate of change of stored energy in poloidal field (MW) (11/01/16)

constraint_eqn_067constraintsSubroutine

Simple upper limit on radiation wall load author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Simple upper limit on radiation wall load #=# physics #=#=# fradwall, maxradwallload and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fradwall : input real : f-value for upper limit on radiation wall load maxradwallload : input real : Maximum permitted radiation wall load (MW/m^2) peakradwallload : input real : Peak radiation wall load (MW/m^2)

constraint_eqn_068constraintsSubroutine

New Psep scaling (PsepB/qAR) author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string New Psep scaling (PsepB/qAR) Issue #464 #=# physics #=#=# fpsepbqar, psepbqarmax and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fpsepbqar : input real : f-value for upper limit on psepbqar, maximum PsepBt/qAR limit psepbqarmax : input real : maximum permitted value of ratio of PsepBt/qAR (MWT/m) pdivt : input real : Power to conducted to the divertor region (MW) bt : input real : toroidal field on axis (T) (iteration variable 2) q95 : input real : safety factor q at 95% flux surface aspect : input real : aspect ratio (iteration variable 1) rmajor : input real : plasma major radius (m) (iteration variable 3)

constraint_eqn_069constraintsSubroutine

Ensure separatrix power is less than value from Kallenbach divertor author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Ensure separatrix power is less than value from Kallenbach divertor #=# divertor_kallenbach #=#=# consistency, psep_kallenbach fpsep has been removed from the equation. and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. psep_kallenbach : input real : Power conducted through the separatrix, as calculated by the divertor model [W] pdivt : input real : power to conducted to the divertor region (MW)

constraint_eqn_070constraintsSubroutine

Separatrix density consistency author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Separatrix density consistency #=# divertor_kallenbach #=#=# consistency and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. teomp : input real : Separatrix temperature calculated by the Kallenbach divertor model [eV] tesep : input real : Electron temperature at separatrix [keV]

constraint_eqn_071constraintsSubroutine

Separatrix density consistency author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Separatrix density consistency #=# divertor_kallenbach #=#=# consistency and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. neomp : input real : Mean SOL density at OMP calculated by the Kallenbach divertor model [m-3] nesep : input real : electron density at separatrix [m-3] (ipedestal=1,2, calculated if 3) neratio : input real : Ratio of mean SOL density at OMP to separatrix density at OMP (iteration variable 121)

constraint_eqn_072constraintsSubroutine

Central Solenoid Tresca yield criterion author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Central Solenoid Tresca yield criterion #=# pfcoil #=#=# foh_stress, alstroh In the case if the bucked and wedged option ( i_tf_bucking >= 2 ) the constrained stress is the largest the largest stress of the - CS stress at maximum current (conservative as the TF inward pressure is not taken into account) - CS stress at flux swing (no current in CS) from the TF inward pressure This allow to cover the 2 worst stress scenario in the bucked and wedged design Otherwise (free standing TF), the stress limits are only set by the CS stress at max current Reverse the sign so it works as an inequality constraint (tmp_cc > 0) This will have no effect if it is used as an equality constraint because it will be squared. and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. foh_stress : input real : f-value for Tresca yield criterion in Central Solenoid alstroh : input real : allowable hoop stress in Central Solenoid structural material (Pa) s_tresca_oh : input real : Maximum shear stress coils/central solenoid (Pa) sig_tf_cs_bucked : input real : Maximum shear stress in CS case at flux swing (no current in CS) can be significant for the bucked and weged design i_tf_bucking : input integer : switch for TF structure design

constraint_eqn_073constraintsSubroutine

Ensure separatrix power is greater than the L-H power + auxiliary power author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Ensure separatrix power is greater than the L-H power + auxiliary power #=# physics #=#=# fplhsep, pdivt and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fplhsep : input real : F-value for Psep >= Plh + Paux : for consistency of two values of separatrix power plhthresh : input real : L-H mode power threshold (MW) pdivt : input real : power to be conducted to the divertor region (MW) pinjmw : inout real : total auxiliary injected power (MW)

constraint_eqn_074constraintsSubroutine

Ensure TF coil quench temperature < tmax_croco ONLY used for croco HTS coil author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Ensure TF coil quench temperature < tmax_croco ONLY used for croco HTS coil #=# physics #=#=# fcqt, tmax_croco and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fcqt : input real : f-value: TF coil quench temparature remains below tmax_croco croco_quench_temperature : input real : CroCo strand: Actual temp reached during a quench (K) tmax_croco : input real : CroCo strand: maximum permitted temp during a quench (K)

constraint_eqn_075constraintsSubroutine

Ensure that TF coil current / copper area < Maximum value author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Ensure that TF coil current / copper area < Maximum value ONLY used for croco HTS coil #=# physics #=#=# f_coppera_m2, copperA_m2_max and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. copperA_m2 : input real : TF coil current / copper area (A/m2) copperA_m2_max : input real : Maximum TF coil current / copper area (A/m2) f_coppera_m2 : input real : f-value for TF coil current / copper area < copperA_m2_max

constraint_eqn_076constraintsSubroutine

Eich critical separatrix density model: Added for issue 558 author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Eich critical separatrix density model Added for issue 558 with ref to http://iopscience.iop.org/article/10.1088/1741-4326/aaa340/pdf and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. alpha_crit : output real : critical ballooning parameter value nesep_crit : output real : critical electron density at separatrix [m-3] kappa : input real : plasma separatrix elongation (calculated if ishape = 1-5, 7 or 9) triang : input real : plasma separatrix triangularity (calculated if ishape = 1, 3-5 or 7) aspect : input real : aspect ratio (iteration variable 1) pdivt : input real : power to conducted to the divertor region (MW) dlimit(7) : input real array : density limit (/m3) as calculated using various models fnesep : input real : f-value for Eich critical separatrix density

constraint_eqn_077constraintsSubroutine

Equation for maximum TF current per turn upper limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for maximum TF current per turn upper limit #=# tfcoil #=#=# fcpttf, cpttf, cpttf_max and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fcpttf : input : f-value for TF coil current per turn cpttf_max : input : allowable TF coil current per turn [A/turn] cpttf : input : TF coil current per turn [A/turn]

constraint_eqn_078constraintsSubroutine

Equation for Reinke criterion, divertor impurity fraction lower limit author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for Reinke criterion, divertor impurity fraction lower limit #=# divertor #=#=# freinke, fzactual, fzmin and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present; and con will be printed out only if present. Thesw conditions were missing. freinke : input : f-value for Reinke criterion (itv 147) fzmin : input : minimum impurity fraction from Reinke model fzactual : input : actual impurity fraction

constraint_eqn_079constraintsSubroutine

Equation for maximum CS field author: P B Lloyd, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for maximum CS field #=# pfcoil #=#=# fbmaxcs, bmaxoh, bmaxoh0, bmaxcs_lim and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fbmaxcs : input : F-value for CS mmax field (cons. 79, itvar 149) bmaxcs_lim : input : Central solenoid max field limit [T] bmaxoh0 : input : maximum field in central solenoid at beginning of pulse (T) bmaxoh : input real : maximum field in central solenoid at end of flat-top (EoF) (T) (Note: original code has "bmaxoh/bmaxoh0 | peak CS field [T]".)

constraint_eqn_080constraintsSubroutine

Equation for pdivt lower limit author: J Morris, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Lower limit pdivt #=# physics #=#=# fpdivlim, pdivt Logic change during pre-factoring: err, symbol, units will be assigned only if present. fpdivlim : input : F-value for lower limit on pdivt (cons. 80, itvar 153) pdivtlim : input : Minimum power crossing separatrix pdivt [MW] pdivt : input : Power crossing separatrix [MW]

constraint_eqn_081constraintsSubroutine

Make sure that the central density is larger that the pedestal one author: S Kahn, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string Lower limit ne0 > neped !#=# physics !#=#=# ne0, neped Logic change during pre-factoring: err, symbol, units will be assigned only if present. fne0 : input : F-value for constraint on ne0 > neped ne0 : input : Central electron density [m-3] neped : input : Electron density at pedestal [m-3]

constraint_eqn_082constraintsSubroutine

Equation for toroidal consistency of stellarator build author: J Lion, IPP Greifswald args : output structure : residual error; constraint value; residual error in physical units; output string; units string toroidalgap > tftort #=# tfcoil #=#=# tftort, ftoroidalgap Logic change during pre-factoring: err, symbol, units will be assigned only if present. ftoroidalgap : input real : f-value for constraint toroidalgap > tftort toroidalgap : input real : minimal gap between two stellarator coils tftort : input real : total toroidal width of a tf coil

constraint_eqn_083constraintsSubroutine

Equation for radial consistency of stellarator build author: J Lion, IPP Greifswald args : output structure : residual error; constraint value; residual error in physical units; output string; units string available_radial_space > required_radial_space #=# build #=#=# required_radial_space, f_avspace Logic change during pre-factoring: err, symbol, units will be assigned only if present. f_avspace : input real : f-value for constraint available_radial_space > required_radial_space available_radial_space : input real : avaible space in radial direction as given by each s.-configuration required_radial_space : input real : required space in radial direction

constraint_eqn_084constraintsSubroutine

Equation for the lower limit of beta author: J Lion, IPP Greifswald args : output structure : residual error; constraint value; residual error in physical units; output string; units string (beta-betaft) > betalim_lower #=# physics #=#=# betaft, beta, fbetatry_lower Logic change during pre-factoring: err, symbol, units will be assigned only if present. fbetatry_lower : input real : f-value for constraint beta-betaft > betalim_lower betalim_lower : input real : Lower limit for beta beta : input real : plasma beta betaft : input real : Alpha particle beta

constraint_eqn_085constraintsSubroutine

Author : S Kahn args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation constraining the centerpost (CP) lifetime Depending on the chosen option : i_cp_lifetime - 0 : The CP full power year lifelime is set by the user (cplife_input) - 1 : The CP lifelime is equal to the divertor one - 2 : The CP lifetime is equal to the breeding blankets one - 3 : The CP lifetime is equal to the plant one #=# availability #=#=# consistency Logic change during pre-factoring: err, symbol, units will be assigned only if present. cplife : input real : calculated CP full power year lifetime (years) bktlife : input real : calculated first wall/blanket power year lifetime (years) divlife : input real : calculated divertor power year lifetime (years) i_cp_lifetime : input integer : switch chosing which plant element the CP the CP lifetime must equate

constraint_eqn_086constraintsSubroutine

Author : S Kahn args : output structure : residual error; constraint value; residual error in physical units; Equation constraining the turn edge length in the TF winding pack t_turn_tf : input real : TF coil turn edge length including turn insulation [m] f_t_turn_tf : input real : f-value for TF turn edge length constraint t_turn_tf_max : input real : TF turn edge length including turn insulation upper limit [m]

constraint_eqn_087constraintsSubroutine

args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for TF coil cryogenic power upper limit crypmw : input real : cryogenic plant power (MW) f_crypmw : input real : f-value for maximum cryogenic plant power crypmw_max : input real : Maximum cryogenic plant power (MW)

constraint_eqn_088constraintsSubroutine

Equation for TF coil vertical strain upper limit (absolute value) author: CPS Swanson, PPPL, USA args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for TF coil vertical strain upper limit (absolute value) #=# tfcoil #=#=# fstr_wp, str_wp_max and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. fstr_wp : input real : f-value for TF coil strain str_wp_max : input real : Allowable maximum TF coil vertical strain str_wp : input real : Constrained TF coil vertical strain

constraint_eqn_089constraintsSubroutine

Ensure that the Central Solenoid [OH] coil current / copper area < Maximum value author: G Turkington, CCFE, Culham Science Centre args : output structure : residual error; constraint value; residual error in physical units; output string; units string #=# physics #=#=# f_copperaoh_m2, copperaoh_m2_max and hence also optional here. Logic change during pre-factoring: err, symbol, units will be assigned only if present. copperaoh_m2 : input real : CS coil current at EOF / copper area [A/m2] copperaoh_m2_max : input real : maximum coil current / copper area [A/m2] f_copperaoh_m2 : input real : f-value for CS coil current / copper area

constraint_eqn_090constraintsSubroutine

args : output structure : residual error; constraint value; residual error in physical units; output string; units string Equation for minimum CS coil stress load cycles fncycle : input real : f-value for constraint n_cycle > n_cycle_min n_cycle : input real : Allowable number of cycles for CS n_cycle_min : input real : Minimum required cycles for CS

constraint_eqn_091constraintsSubroutine

Equation for checking if the design point is ECRH ignitable at lower values for n and B. Or if the design point is ECRH heatable (if ignite==0) stellarators only (but in principle usable also for tokamaks). author: J Lion, IPP Greifswald args : output structure : residual error; constraint value; residual error in physical units; output string; units string powerht_local > powerscaling #=# physics #=#=# fecrh_ignition, powerht_local, powerscaling fecrh_ignition : input real : f-value for constraint powerht_local > powerscaling max_gyrotron_frequency : input real : Max. av. gyrotron frequency te0_ecrh_achievable : input real : Max. achievable electron temperature at ignition point

constraint_eqnsconstraintsSubroutine

Routine that formulates the constraint equations

Read more…
constraint_err_001constraintsSubroutine

Error in: Relationship between beta, temperature (keV) and density (consistency equation) author: P B Lloyd, CCFE, Culham Science Centre

constraint_err_016constraintsSubroutine

Error in: Equation for net electric power lower limit author: P B Lloyd, CCFE, Culham Science Centre

constraint_err_030constraintsSubroutine

Error in: Equation for injection power upper limit author: P B Lloyd, CCFE, Culham Science Centre

constraint_err_066constraintsSubroutine

Error in: Limit on rate of change of energy in poloidal field author: P B Lloyd, CCFE, Culham Science Centre

convxcdefine_iteration_variablesSubroutine

Routine to convert scaled iteration variables back to their real values author: P J Knight, CCFE, Culham Science Centre author: J Morris, CCFE, Culham Science Centre xc(ipnvars) : input/output real array : scaled iteration variable values nn : input integer : number of iteration variables This subroutine converts the scaled iteration variables back to their real values.

copy_charsfson_string_mSubroutine
dblcolprocess_outputSubroutine

Write a description and 2 columns of values to 2dp in standard notation. file : input integer : Fortran output unit identifier desc : input character string : Character string to be used val1 : input real : Value of the left variable val2 : input real : Value of the right variable

devtypprocess_inputSubroutine

Set icase description based on device type

driverife_moduleSubroutine

Routine to calculate parameters of a generic driver suitable for inertial fusion energy author: P J Knight, CCFE, Culham Science Centre edrive : input real : Driver energy (J) gainve(10) : input real array : Gain vs energy data etave(10) : input real array : Driver efficiency vs energy data gain : output real : Target gain etadrv : output real : Driver efficiency This routine calculates the parameters of a generic driver suitable for inertial fusion energy. Gain and driver efficiency data are interpolated from input data. F/MI/PJK/LOGBOOK12, p.85

dshellareamaths_librarySubroutine

Routine to calculate the inboard, outboard and total surface areas of a D-shaped toroidal shell author: P J Knight, CCFE, Culham Science Centre rmajor : input real : major radius of inboard straight section (m) rminor : input real : horizontal width of shell (m) zminor : input real : vertical half-height of shell (m) ain : output real : surface area of inboard straight section (m3) aout : output real : surface area of outboard curved section (m3) atot : output real : total surface area of shell (m3) This routine calculates the surface area of the inboard and outboard sections of a D-shaped toroidal shell defined by the above input parameters. The inboard section is assumed to be a cylinder. The outboard section is defined by a semi-ellipse, centred on the major radius of the inboard section.

See also dshellvol Internal CCFE note T&M/PKNIGHT/PROCESS/009, P J Knight: Surface Area and Volume Calculations for Toroidal Shells

dshellvolmaths_librarySubroutine

Routine to calculate the inboard, outboard and total volumes of a D-shaped toroidal shell author: P J Knight, CCFE, Culham Science Centre rmajor : input real : major radius to outer point of inboard straight section of shell (m) rminor : input real : horizontal internal width of shell (m) zminor : input real : vertical internal half-height of shell (m) drin : input real : horiz. thickness of inboard shell at midplane (m) drout : input real : horiz. thickness of outboard shell at midplane (m) dz : input real : vertical thickness of shell at top/bottom (m) vin : output real : volume of inboard straight section (m3) vout : output real : volume of outboard curved section (m3) vtot : output real : total volume of shell (m3) This routine calculates the volume of the inboard and outboard sections of a D-shaped toroidal shell defined by the above input parameters. The inboard section is assumed to be a cylinder of uniform thickness. The outboard section's internal and external surfaces are defined by two semi-ellipses, centred on the outer edge of the inboard section; its volume is calculated as the difference in those of the volumes of revolution enclosed by the two surfaces.

See also dshellarea Internal CCFE note T&M/PKNIGHT/PROCESS/009, P J Knight: Surface Area and Volume Calculations for Toroidal Shells

ellipkemaths_librarySubroutine

Routine that calculates the complete elliptic integral of the first and second kinds author: P J Knight, CCFE, Culham Science Centre sqk : input real : square of the elliptic modulus kk : output real : complete elliptic integral of the first kind ek : output real : complete elliptic integral of the second kind This routine calculates the complete elliptic integral of the first and second kinds.

The method used is that described in the reference, and the code is taken from the Culham maglib library routine FN02A. Approximations for Digital Computers, C. Hastings, Princeton University Press, 1955

equals_stringfson_string_mFunction
eshellareamaths_librarySubroutine

Routine to calculate the inboard, outboard and total surface areas of a toroidal shell comprising two elliptical sections author: P J Knight, CCFE, Culham Science Centre rshell : input real : major radius of centre of both ellipses (m) rmini : input real : horizontal distance from rshell to inboard elliptical shell (m) rmino : input real : horizontal distance from rshell to outboard elliptical shell (m) zminor : input real : vertical internal half-height of shell (m) ain : output real : surface area of inboard section (m3) aout : output real : surface area of outboard section (m3) atot : output real : total surface area of shell (m3) This routine calculates the surface area of the inboard and outboard sections of a toroidal shell defined by two co-centred semi-ellipses.

See also eshellvol Internal CCFE note T&M/PKNIGHT/PROCESS/009, P J Knight: Surface Area and Volume Calculations for Toroidal Shells

eshellvolmaths_librarySubroutine

Routine to calculate the inboard, outboard and total volumes of a toroidal shell comprising two elliptical sections author: P J Knight, CCFE, Culham Science Centre rshell : input real : major radius of centre of both ellipses (m) rmini : input real : horizontal distance from rshell to outer edge of inboard elliptical shell (m) rmino : input real : horizontal distance from rshell to inner edge of outboard elliptical shell (m) zminor : input real : vertical internal half-height of shell (m) drin : input real : horiz. thickness of inboard shell at midplane (m) drout : input real : horiz. thickness of outboard shell at midplane (m) dz : input real : vertical thickness of shell at top/bottom (m) vin : output real : volume of inboard section (m3) vout : output real : volume of outboard section (m3) vtot : output real : total volume of shell (m3) This routine calculates the volume of the inboard and outboard sections of a toroidal shell defined by two co-centred semi-ellipses. Each section's internal and external surfaces are in turn defined by two semi-ellipses. The volumes of each section are calculated as the difference in those of the volumes of revolution enclosed by their inner and outer surfaces.

See also eshellarea Internal CCFE note T&M/PKNIGHT/PROCESS/009, P J Knight: Surface Area and Volume Calculations for Toroidal Shells

final_headerfinal_moduleSubroutine
final_outputfinal_moduleSubroutine
find_y_nonuniform_xmaths_libraryFunction

Routine to find y0 such that y0 = y(x0) given a set of values x(1:n), y(1:n) author: P J Knight, CCFE, Culham Science Centre x0 : input real : x value at which we want to find y x(1:n) : input real array : monotonically de/increasing x values y(1:n) : input real array : y values at each x n : input integer : size of array This routine performs a simple linear interpolation method to find the y value at x = x0. If x0 lies outside the range [x(1),x(n)], the y value at the nearest 'end' of the data is returned. None

finishinit_moduleSubroutine
frictionfw_moduleSubroutine

Calculate Darcy friction factor, using Haaland equation author: M Kovari, CCFE, Culham Science Centre reynolds : input real : Reynolds number darcy_friction : output real : Darcy friction factor Darcy friction factor, using Haaland equation, an approximation to the implicit Colebrook–White equationGnielinski correlation. https://en.wikipedia.org/wiki/Darcy_friction_factor_formulae#Haaland_equation

fson_parsefson_libraryFunction
fson_path_getfson_path_mInterface
fson_string_appendfson_string_mInterface
fson_string_copyfson_string_mInterface
fson_string_createfson_string_mFunction
fson_string_destroyfson_string_mSubroutine
fson_string_equalsfson_string_mInterface
fson_string_lengthfson_string_mInterface
fson_value_addfson_value_mSubroutine
fson_value_countfson_value_mFunction
fson_value_createfson_value_mFunction
fson_value_destroyfson_value_mSubroutine
fson_value_getfson_value_mInterface
fson_value_printfson_value_mSubroutine
funfomfunction_evaluatorSubroutine

Objective function evaluator for VMCON author: P J Knight, CCFE, Culham Science Centre fc : output real : value of objective function at the output point This routine evaluates the value of the objective function i.e. the (normalised) figure-of-merit, at the nvar-dimensional point of interest.

Each equation for fc gives a value of the order of unity for the sake of the numerics.

fw_thermal_conductivityfw_moduleFunction

Calculates the thermal conductivity of the first wall t : input real : property temperature (K) Calculates the thermal conductivity of Eurofer (W/m/K).

get_arrayfson_path_mSubroutine
get_by_indexfson_value_mFunction
get_by_name_charsfson_value_mFunction
get_by_name_stringfson_value_mFunction
get_by_pathfson_path_mSubroutine
get_char_atfson_string_mFunction
get_charsfson_path_mSubroutine
get_DDMonYYTimeZonemain_moduleSubroutine

Routine to get date, time and timezone author: M Kumar, CCFE, Culham Science Centre dt_time : output string : String containing formatted time and date This routine calls the intrinsic DATE_AND_TIME subroutine and format the output in DD Mon YYYY hr:minute:second time difference from UTC.

get_doublefson_path_mSubroutine
get_double_arrayfson_path_mSubroutine
get_double_array_in_structfson_path_mSubroutine
get_int_arrayfson_path_mSubroutine
get_int_array_in_structfson_path_mSubroutine
get_integerfson_path_mSubroutine
get_logicalfson_path_mSubroutine
get_realfson_path_mSubroutine
get_real_arrayfson_path_mSubroutine
get_real_array_in_structfson_path_mSubroutine
get_string_arrayfson_path_mSubroutine
get_string_array_in_structfson_path_mSubroutine
get_subscriptprocess_inputSubroutine

Routine that extracts any subscripts present in a line of the input file author: P J Knight, CCFE, Culham Science Centre isub1 : output integer : first subscript found isub2 : output integer : second subscript found icode : output integer : diagnostic flag This routine extracts any subscripts from the current line of the input file, i.e. if any array elements are specified by the user. It looks at the next non-space character in the line, and if it is a left bracket, it assumes that at least one subscript is to follow and extracts it/them. None

get_substringprocess_inputSubroutine

Routine that extracts a substring from a line of the input file author: P J Knight, CCFE, Culham Science Centre string : output string : extracted string icode : output integer : diagnostic flag This routine extracts a string from the current line of the input file, i.e. the value of a string variable as specified by the user. Unlike routine get_substring_trim, this routine does not truncate the string found at its first non-leading blank. None

get_value_intprocess_inputSubroutine

Routine that extracts an integer value from a line of the input file author: P J Knight, CCFE, Culham Science Centre ival : output integer : extracted integer value icode : output integer : diagnostic flag This routine extracts an integer value from the current line of the input file, i.e. the value of an integer variable as specified by the user. None

get_value_realprocess_inputSubroutine

Routine that extracts a real value from a line of the input file author: P J Knight, CCFE, Culham Science Centre rval : output real : extracted real value icode : output integer : diagnostic flag This routine extracts a real value from the current line of the input file, i.e. the value of a real variable as specified by the user. None

get_variable_nameprocess_inputSubroutine

Routine that extracts a variable name from a line of the input file author: P J Knight, CCFE, Culham Science Centre varnam : output string : extracted variable name varlen : output integer : length of variable name isub1 : output integer : first subscript found isub2 : output integer : second subscript found This routine extracts a variable name from the current line of the input file. It also extracts any subscripts present. On exit, the counter iptr points to the first character of the value to be assigned to the variable. If the routine finds an error a value of 0 is returned in variable varlen. None

heat_transferfw_moduleFunction

Calculate heat transfer coefficient using Gnielinski correlation author: M Kovari, CCFE, Culham Science Centre masflx : input real : coolant mass flux in a single channel (kg/m2/s) rhof : input real : coolant density (average of inlet and outlet) (kg/m3) radius : input real : coolant pipe radius (m) cf : input real : coolant specific heat capacity (average of inlet and outlet) (J/K) viscf : input real : coolant viscosity (average of inlet and outlet) (Pa.s) kf : input real : thermal conductivity of coolant (average of inlet and outlet) (W/m.K) Gnielinski correlation. Ignore the distinction between wall and bulk temperatures. Valid for:3000 < Re < 5e6, 0.5 < Pr < 2000 https://en.wikipedia.org/wiki/Nusselt_number#Gnielinski_correlation

herrormain_moduleSubroutine

Routine to print out relevant messages in the case of an unfeasible result from a HYBRD (non-optimisation) run author: P J Knight, CCFE, Culham Science Centre ifail : input integer : error flag This routine prints out relevant messages in the case of an unfeasible result from a HYBRD (non-optimisation) run.

The messages are written to units NOUT and IOTTY, which are by default the output file and screen, respectively.

If IFAIL=1 then a feasible solution has been found and therefore no error message is required. !

ifeacpife_moduleSubroutine

Routine to calculate AC power requirements for an IFE power plant author: P J Knight, CCFE, Culham Science Centre outfile : input integer : output file unit iprint : input integer : switch for writing to output file (1=yes) This routine calculates the AC power requirements for an IFE power plant. F/MI/PJK/LOGBOOK12, p.68

ifebdgife_moduleSubroutine

Routine to calculate the volumes of the buildings required for an Inertial Fusion Energy power plant author: P J Knight, CCFE, Culham Science Centre outfile : input integer : output file unit iprint : input integer : switch for writing to output file (1=yes) This routine calculates the volumes of the buildings required for an Inertial Fusion Energy power plant. The method is based closely on that for tokamaks etc. in routine BLDGS. F/MI/PJK/LOGBOOK12, p.87

ifebldife_moduleSubroutine

Routine to create the build of an inertial fusion energy device and to calculate the material volumes for the device core author: P J Knight, CCFE, Culham Science Centre outfile : input integer : output file unit iprint : input integer : switch for writing to output file (1=yes) This routine constructs the build of an inertial fusion energy device and calculates the material volumes for the device core. F/MI/PJK/LOGBOOK12, p.52

ifefbsife_moduleSubroutine

Routine to calculate the first wall, blanket and shield volumes, masses and other parameters, for an Inertial Fusion Energy device author: P J Knight, CCFE, Culham Science Centre outfile : input integer : output file unit iprint : input integer : switch for writing to output file (1=yes) This routine calculates the first wall, blanket and shield volumes, masses and other parameters, for an Inertial Fusion Energy device. F/MI/PJK/LOGBOOK12, p.86 Moir et al., Fusion Technology, vol.25 (1994) p.5

ifephyife_moduleSubroutine

Routine to calculate the physics parameters of an Inertial Fusion Energy power plant author: P J Knight, CCFE, Culham Science Centre outfile : input integer : output file unit iprint : input integer : switch for writing to output file (1=yes) This routine calculates the physics parameters of an Inertial Fusion Energy power plant. F/MI/PJK/LOGBOOK12, pp.68,85

ifepw1ife_moduleSubroutine

Routine to calculate the first part of the heat transport and plant power balance constituents, for an IFE power plant author: P J Knight, CCFE, Culham Science Centre None This routine calculates the first part of the heat transport and plant power balance constituents, for an IFE power plant. F/MI/PJK/LOGBOOK12, pp.67,89 Bourque et al., Fusion Technology vol.21 (1992) 1465

ifepw2ife_moduleSubroutine

Routine to calculate the rest of the IFE heat transport and plant power balance constituents, not already calculated in IFEPW1 or IFEACP author: P J Knight, CCFE, Culham Science Centre outfile : input integer : output file unit iprint : input integer : switch for writing to output file (1=yes) This routine calculates the rest of the IFE heat transport and plant power balance constituents, not already calculated in routines IFEPW1 or IFEACP. F/MI/PJK/LOGBOOK12, p.67

ifestrife_moduleSubroutine

Routine to calculate the support structural masses for the core of an Inertial Fusion Energy power plant author: P J Knight, CCFE, Culham Science Centre This routine calculates the support structural masses for the core of an Inertial Fusion Energy power plant.

In fact, the output masses are all trivially zero, as they are magnetic fusion specific. F/MI/PJK/LOGBOOK12, p.87

ifetgtife_moduleSubroutine

Routine to calculate the power requirements of the target delivery system and the target factory author: P J Knight, CCFE, Culham Science Centre This routine calculates the power requirements of the target delivery system and the target factory, for an Inertial Fusion Energy power plant. F/MI/PJK/LOGBOOK12, pp.87-88

ifevacife_moduleSubroutine

Routine to calculate parameters of the vacuum system for an Inertial Fusion Energy power plant author: P J Knight, CCFE, Culham Science Centre This routine calculates the parameters of the vacuum system for an Inertial Fusion Energy power plant.

The calculated values are hard-wired; they are based loosely on those for a tokamak of 6m major radius. F/MI/PJK/LOGBOOK12, p.87

informmain_moduleSubroutine

Routine to obtain information about the program being executed author: P J Knight, CCFE, Culham Science Centre progid(0:10) : output string array : Strings containing useful info This subroutine uses system calls to identify the user, date, machine etc. for the present run, and stores the information in a character string array. !

initinit_moduleSubroutine

Routine that calls the initialisation routines author: P J Knight, CCFE, Culham Science Centre None This routine calls the main initialisation routines that set the default values for the global variables, reads in data from the input file, and checks the run parameters for consistency.

init_all_module_varsinit_moduleSubroutine

Initialise all module variables This is vital to ensure a 'clean' state of Process before a new run starts, otherwise components of the previous run's state can persist into the new run. This matters ever since Process is used as a shared library, rather than a 'run-once' executable.

init_blanket_libraryblanket_librarySubroutine

Initialise module variables

init_build_variablesbuild_variablesSubroutine

Initialise module variables

init_buildings_variablesbuildings_variablesSubroutine

Initialise buildings variables

init_ccfe_hcpb_moduleccfe_hcpb_moduleSubroutine

Initialise module variables

init_constantsconstantsSubroutine

Initialise module variables

init_constraint_variablesconstraint_variablesSubroutine

Initialise module variables

init_cost_variablescost_variablesSubroutine

Initialise cost variables

init_CS_fatigue_variablesCS_fatigue_variablesSubroutine

Initialise module variables

init_current_drive_variablescurrent_drive_variablesSubroutine

Initialise module variables

init_dcll_moduledcll_moduleSubroutine

Initialise module variables !!!

init_define_iteration_variablesdefine_iteration_variablesSubroutine

Initialise module variables

init_divertor_variablesdivertor_variablesSubroutine

Initialise divertor_variables

init_error_handlingerror_handlingSubroutine

Initialise the error_handling module variables

init_fson_libraryfson_librarySubroutine

Initialise fson library module variables

init_fwbs_variablesfwbs_variablesSubroutine

Initialise fwbs variables

init_global_variablesglobal_variablesSubroutine

Initialise global variables

init_heat_transport_variablesheat_transport_variablesSubroutine

Initialise module variables

init_ife_variablesife_variablesSubroutine

Initialise module variables

init_impurity_radiation_moduleimpurity_radiation_moduleSubroutine

Initialise module variables

init_inputprocess_inputSubroutine

Initialise module variables

init_itv_1define_iteration_variablesSubroutineRead more…
init_itv_10define_iteration_variablesSubroutineRead more…
init_itv_103define_iteration_variablesSubroutineRead more…
init_itv_104define_iteration_variablesSubroutineRead more…
init_itv_105define_iteration_variablesSubroutineRead more…
init_itv_106define_iteration_variablesSubroutineRead more…
init_itv_107define_iteration_variablesSubroutineRead more…
init_itv_108define_iteration_variablesSubroutineRead more…
init_itv_109define_iteration_variablesSubroutineRead more…
init_itv_11define_iteration_variablesSubroutineRead more…
init_itv_110define_iteration_variablesSubroutineRead more…
init_itv_111define_iteration_variablesSubroutineRead more…
init_itv_112define_iteration_variablesSubroutineRead more…
init_itv_113define_iteration_variablesSubroutineRead more…
init_itv_114define_iteration_variablesSubroutineRead more…
init_itv_115define_iteration_variablesSubroutineRead more…
init_itv_116define_iteration_variablesSubroutineRead more…
init_itv_117define_iteration_variablesSubroutineRead more…
init_itv_118define_iteration_variablesSubroutineRead more…
init_itv_119define_iteration_variablesSubroutineRead more…
init_itv_12define_iteration_variablesSubroutineRead more…
init_itv_120define_iteration_variablesSubroutineRead more…
init_itv_121define_iteration_variablesSubroutineRead more…
init_itv_122define_iteration_variablesSubroutineRead more…
init_itv_123define_iteration_variablesSubroutineRead more…
init_itv_124define_iteration_variablesSubroutineRead more…
init_itv_125define_iteration_variablesSubroutineRead more…
init_itv_126define_iteration_variablesSubroutineRead more…
init_itv_127define_iteration_variablesSubroutineRead more…
init_itv_128define_iteration_variablesSubroutineRead more…
init_itv_129define_iteration_variablesSubroutineRead more…
init_itv_13define_iteration_variablesSubroutineRead more…
init_itv_130define_iteration_variablesSubroutineRead more…
init_itv_131define_iteration_variablesSubroutineRead more…
init_itv_132define_iteration_variablesSubroutineRead more…
init_itv_133define_iteration_variablesSubroutineRead more…
init_itv_134define_iteration_variablesSubroutineRead more…
init_itv_135define_iteration_variablesSubroutineRead more…
init_itv_136define_iteration_variablesSubroutineRead more…
init_itv_137define_iteration_variablesSubroutineRead more…
init_itv_138define_iteration_variablesSubroutineRead more…
init_itv_139define_iteration_variablesSubroutineRead more…
init_itv_14define_iteration_variablesSubroutineRead more…
init_itv_140define_iteration_variablesSubroutineRead more…
init_itv_141define_iteration_variablesSubroutineRead more…
init_itv_142define_iteration_variablesSubroutineRead more…
init_itv_143define_iteration_variablesSubroutineRead more…
init_itv_144define_iteration_variablesSubroutineRead more…
init_itv_145define_iteration_variablesSubroutineRead more…
init_itv_146define_iteration_variablesSubroutineRead more…
init_itv_147define_iteration_variablesSubroutineRead more…
init_itv_148define_iteration_variablesSubroutineRead more…
init_itv_149define_iteration_variablesSubroutineRead more…
init_itv_15define_iteration_variablesSubroutineRead more…
init_itv_152define_iteration_variablesSubroutineRead more…
init_itv_153define_iteration_variablesSubroutineRead more…
init_itv_154define_iteration_variablesSubroutineRead more…
init_itv_155define_iteration_variablesSubroutineRead more…
init_itv_156define_iteration_variablesSubroutineRead more…
init_itv_157define_iteration_variablesSubroutineRead more…
init_itv_158define_iteration_variablesSubroutineRead more…
init_itv_159define_iteration_variablesSubroutineRead more…
init_itv_16define_iteration_variablesSubroutineRead more…
init_itv_160define_iteration_variablesSubroutineRead more…
init_itv_161define_iteration_variablesSubroutineRead more…
init_itv_162define_iteration_variablesSubroutineRead more…
init_itv_163define_iteration_variablesSubroutineRead more…
init_itv_164define_iteration_variablesSubroutineRead more…
init_itv_165define_iteration_variablesSubroutineRead more…
init_itv_166define_iteration_variablesSubroutineRead more…
init_itv_167define_iteration_variablesSubroutineRead more…
init_itv_168define_iteration_variablesSubroutineRead more…
init_itv_169define_iteration_variablesSubroutineRead more…
init_itv_17define_iteration_variablesSubroutineRead more…
init_itv_170define_iteration_variablesSubroutineRead more…
init_itv_171define_iteration_variablesSubroutineRead more…
init_itv_172define_iteration_variablesSubroutineRead more…
init_itv_173define_iteration_variablesSubroutineRead more…
init_itv_174define_iteration_variablesSubroutineRead more…
init_itv_175define_iteration_variablesSubroutineRead more…
init_itv_18define_iteration_variablesSubroutineRead more…
init_itv_19define_iteration_variablesSubroutineRead more…
init_itv_2define_iteration_variablesSubroutineRead more…
init_itv_20define_iteration_variablesSubroutineRead more…
init_itv_21define_iteration_variablesSubroutineRead more…
init_itv_23define_iteration_variablesSubroutineRead more…
init_itv_25define_iteration_variablesSubroutineRead more…
init_itv_26define_iteration_variablesSubroutineRead more…
init_itv_27define_iteration_variablesSubroutineRead more…
init_itv_28define_iteration_variablesSubroutineRead more…
init_itv_29define_iteration_variablesSubroutineRead more…
init_itv_3define_iteration_variablesSubroutineRead more…
init_itv_30define_iteration_variablesSubroutineRead more…
init_itv_31define_iteration_variablesSubroutineRead more…
init_itv_32define_iteration_variablesSubroutineRead more…
init_itv_33define_iteration_variablesSubroutineRead more…
init_itv_34define_iteration_variablesSubroutineRead more…
init_itv_35define_iteration_variablesSubroutineRead more…
init_itv_36define_iteration_variablesSubroutineRead more…
init_itv_37define_iteration_variablesSubroutineRead more…
init_itv_38define_iteration_variablesSubroutineRead more…
init_itv_39define_iteration_variablesSubroutineRead more…
init_itv_4define_iteration_variablesSubroutineRead more…
init_itv_40define_iteration_variablesSubroutineRead more…
init_itv_41define_iteration_variablesSubroutineRead more…
init_itv_42define_iteration_variablesSubroutineRead more…
init_itv_44define_iteration_variablesSubroutineRead more…
init_itv_45define_iteration_variablesSubroutineRead more…
init_itv_46define_iteration_variablesSubroutineRead more…
init_itv_47define_iteration_variablesSubroutineRead more…
init_itv_48define_iteration_variablesSubroutineRead more…
init_itv_49define_iteration_variablesSubroutineRead more…
init_itv_5define_iteration_variablesSubroutineRead more…
init_itv_50define_iteration_variablesSubroutineRead more…
init_itv_51define_iteration_variablesSubroutineRead more…
init_itv_53define_iteration_variablesSubroutineRead more…
init_itv_54define_iteration_variablesSubroutineRead more…
init_itv_56define_iteration_variablesSubroutineRead more…
init_itv_57define_iteration_variablesSubroutineRead more…
init_itv_58define_iteration_variablesSubroutineRead more…
init_itv_59define_iteration_variablesSubroutineRead more…
init_itv_6define_iteration_variablesSubroutineRead more…
init_itv_60define_iteration_variablesSubroutineRead more…
init_itv_61define_iteration_variablesSubroutineRead more…
init_itv_62define_iteration_variablesSubroutineRead more…
init_itv_63define_iteration_variablesSubroutineRead more…
init_itv_64define_iteration_variablesSubroutineRead more…
init_itv_65define_iteration_variablesSubroutineRead more…
init_itv_66define_iteration_variablesSubroutineRead more…
init_itv_67define_iteration_variablesSubroutineRead more…
init_itv_68define_iteration_variablesSubroutineRead more…
init_itv_69define_iteration_variablesSubroutineRead more…
init_itv_7define_iteration_variablesSubroutineRead more…
init_itv_70define_iteration_variablesSubroutineRead more…
init_itv_71define_iteration_variablesSubroutineRead more…
init_itv_72define_iteration_variablesSubroutineRead more…
init_itv_73define_iteration_variablesSubroutineRead more…
init_itv_74define_iteration_variablesSubroutineRead more…
init_itv_75define_iteration_variablesSubroutineRead more…
init_itv_79define_iteration_variablesSubroutineRead more…
init_itv_8define_iteration_variablesSubroutineRead more…
init_itv_81define_iteration_variablesSubroutineRead more…
init_itv_82define_iteration_variablesSubroutineRead more…
init_itv_83define_iteration_variablesSubroutineRead more…
init_itv_84define_iteration_variablesSubroutineRead more…
init_itv_85define_iteration_variablesSubroutineRead more…
init_itv_86define_iteration_variablesSubroutineRead more…
init_itv_89define_iteration_variablesSubroutineRead more…
init_itv_9define_iteration_variablesSubroutineRead more…
init_itv_90define_iteration_variablesSubroutineRead more…
init_itv_91define_iteration_variablesSubroutineRead more…
init_itv_92define_iteration_variablesSubroutineRead more…
init_itv_93define_iteration_variablesSubroutineRead more…
init_itv_94define_iteration_variablesSubroutineRead more…
init_itv_95define_iteration_variablesSubroutineRead more…
init_itv_96define_iteration_variablesSubroutineRead more…
init_itv_97define_iteration_variablesSubroutineRead more…
init_itv_98define_iteration_variablesSubroutineRead more…
init_neoclassics_moduleneoclassics_moduleSubroutine

Initialise module variables

init_numericsnumericsSubroutine
init_pf_power_variablespf_power_variablesSubroutine

Initialise module variables

init_pfcoil_modulepfcoil_moduleSubroutine

Initialise module variables

init_pfcoil_variablespfcoil_variablesSubroutine

Initialise module variables

init_physics_modulephysics_moduleSubroutine

Initialise module variables

init_physics_variablesphysics_variablesSubroutine

Initialise module variables

init_primary_pumping_variablesprimary_pumping_variablesSubroutine

Initialise module variables initialise variables with default values in the absence of a value in the input file. cp_he = 5.195.0D3 ! Specific Heat J/kg K (disabled at the moment)

init_pulse_variablespulse_variablesSubroutine

Initialise module variables

init_rebco_variablesrebco_variablesSubroutine

Initialise module variables

init_reinke_modulereinke_moduleSubroutine

Initialise module variables

init_reinke_variablesreinke_variablesSubroutine

Initialise module variables

init_scan_modulescan_moduleSubroutine

Initialise module variables

init_sctfcoil_modulesctfcoil_moduleSubroutine

Initialise module variables

init_stellarator_modulestellarator_moduleSubroutine

Initialise module variables

init_stellarator_variablesstellarator_variablesSubroutine

Initialise module variables

init_structure_variablesstructure_variablesSubroutine

Initialise module variables

init_tfcoil_variablestfcoil_variablesSubroutine

Initialise module variables

init_times_variablestimes_variablesSubroutine

Initialise module variables

init_vacuum_variablesvacuum_variablesSubroutine

Initialise module variables

init_watuse_variableswater_usage_variablesSubroutine

Initialise module variables

initialinitial.f90Subroutine

Routine to initialise author: P J Knight, CCFE, Culham Science Centre None !

Read more…
initialise_cablessctfcoil_moduleSubroutine
initialise_error_listerror_handlingSubroutine

Initialises the informational/error message list author: P J Knight, CCFE, Culham Science Centre None This routine sets all the possible informational/error messages that may be used during the course of a run. Thus, it needs to be called during the initialisation phase.

The error messages are read in from a JSON-format file. None

inputprocess_inputSubroutine

Routine that calls the main input file parsing routines author: P J Knight, CCFE, Culham Science Centre None This routine provides the interface between the input file reading routines and the rest of PROCESS. A User's Guide to the PROCESS Systems Code, P. J. Knight, AEA Fusion Report AEA FUS 251, 1993

int2charprocess_outputFunction

Converts a single-digit integer into a character string author: P J Knight, CCFE, Culham Science Centre i : input integer : must be between 0 and 9 This is a very simple routine that converts a single-digit integer into a character string. If the integer is outside the range 0 to 9 the program stops with an error. None

int_to_string2process_outputFunction

Converts a positive integer into a two-digit character string author: P J Knight, CCFE, Culham Science Centre i : input integer : must be between 0 and 99 This routine converts a positive integer into a two-digit character string. If the integer is negative, the routine stops with an error. If the integer is greater than 99, the routine returns a string containing its last two digits. None

int_to_string3process_outputFunction

Converts a positive integer into a 3-digit character string author: P J Knight, CCFE, Culham Science Centre i : input integer : must be between 0 and 99 This routine converts a positive integer into a three-digit character string. If the integer is negative, the routine stops with an error. If the integer is greater than 999, the routine returns a string containing its last three digits. None

integer2stringmaths_libraryFunction
integer3stringmaths_libraryFunction
iondrvife_moduleSubroutine

Routine to calculate parameters of a heavy ion driver suitable for inertial fusion energy author: P J Knight, CCFE, Culham Science Centre aaion : input real : Ion mass (amu) bmax : input real : Maximum field at the superconductor (T) dpp : input real : Beam momentum spread dtheta : input real : Pointing error (rad) edrive : input real : Driver energy (J) emitt : input real : Normalised beam emittance (metre-rad) etai : input real : Axial quadrupole packing fraction at injection lf : input real : Distance from final focussing quad to target (m) nbeams : input integer : Number of beams qion : input real : Ion charge state sigma : input real : Depressed tune (incl. space charge effects) (deg) sigma0 : input real : Phase advance per lattice period (tune) (deg) tauf : input real : Post-acceleration pulse duration (s) theta : input real : Final focussing half angle (rad) vi : input real : Injection voltage (V) gain : output real : Target gain etadrv : output real : Driver efficiency This routine calculates the parameters of a heavy ion driver suitable for inertial fusion energy.

Currently, the complicated model taken from the reference is not complete, so it is recommended that the simple model is used (set ISIMP=1) Heavy-ion Driver Design and Scaling, R. Bieri et al., Fusion Technology, vol.21 (1992) 1583 Meier and Bieri, Fusion Technology, vol.21 (1992) 1547

itv_1define_iteration_variablesFunction
itv_10define_iteration_variablesFunction
itv_103define_iteration_variablesFunction
itv_104define_iteration_variablesFunction
itv_105define_iteration_variablesFunction
itv_106define_iteration_variablesFunction
itv_107define_iteration_variablesFunction
itv_108define_iteration_variablesFunction
itv_109define_iteration_variablesFunction
itv_11define_iteration_variablesFunction
itv_110define_iteration_variablesFunction
itv_111define_iteration_variablesFunction
itv_112define_iteration_variablesFunction
itv_113define_iteration_variablesFunction
itv_114define_iteration_variablesFunction
itv_115define_iteration_variablesFunction
itv_116define_iteration_variablesFunction
itv_117define_iteration_variablesFunction
itv_118define_iteration_variablesFunction
itv_119define_iteration_variablesFunction
itv_12define_iteration_variablesFunction
itv_120define_iteration_variablesFunction
itv_121define_iteration_variablesFunction
itv_122define_iteration_variablesFunction
itv_123define_iteration_variablesFunction
itv_124define_iteration_variablesFunction
itv_125define_iteration_variablesFunction
itv_126define_iteration_variablesFunction
itv_127define_iteration_variablesFunction
itv_128define_iteration_variablesFunction
itv_129define_iteration_variablesFunction
itv_13define_iteration_variablesFunction
itv_130define_iteration_variablesFunction
itv_131define_iteration_variablesFunction
itv_132define_iteration_variablesFunction
itv_133define_iteration_variablesFunction
itv_134define_iteration_variablesFunction
itv_135define_iteration_variablesFunction
itv_136define_iteration_variablesFunction
itv_137define_iteration_variablesFunction
itv_138define_iteration_variablesFunction
itv_139define_iteration_variablesFunction
itv_14define_iteration_variablesFunction
itv_140define_iteration_variablesFunction
itv_141define_iteration_variablesFunction
itv_142define_iteration_variablesFunction
itv_143define_iteration_variablesFunction
itv_144define_iteration_variablesFunction
itv_145define_iteration_variablesFunction
itv_146define_iteration_variablesFunction
itv_147define_iteration_variablesFunction
itv_148define_iteration_variablesFunction
itv_149define_iteration_variablesFunction
itv_15define_iteration_variablesFunction
itv_150define_iteration_variablesFunction
itv_151define_iteration_variablesFunction
itv_152define_iteration_variablesFunction
itv_153define_iteration_variablesFunction
itv_154define_iteration_variablesFunction
itv_155define_iteration_variablesFunction
itv_156define_iteration_variablesFunction
itv_157define_iteration_variablesFunction
itv_158define_iteration_variablesFunction
itv_159define_iteration_variablesFunction
itv_16define_iteration_variablesFunction
itv_160define_iteration_variablesFunction
itv_161define_iteration_variablesFunction
itv_162define_iteration_variablesFunction
itv_163define_iteration_variablesFunction
itv_164define_iteration_variablesFunction
itv_165define_iteration_variablesFunction
itv_166define_iteration_variablesFunction
itv_167define_iteration_variablesFunction
itv_168define_iteration_variablesFunction
itv_169define_iteration_variablesFunction
itv_17define_iteration_variablesFunction
itv_170define_iteration_variablesFunction
itv_171define_iteration_variablesFunction
itv_172define_iteration_variablesFunction
itv_173define_iteration_variablesFunction
itv_174define_iteration_variablesFunction
itv_175define_iteration_variablesFunction
itv_18define_iteration_variablesFunction
itv_19define_iteration_variablesFunction
itv_2define_iteration_variablesFunction
itv_20define_iteration_variablesFunction
itv_21define_iteration_variablesFunction
itv_22define_iteration_variablesFunction
itv_23define_iteration_variablesFunction
itv_24define_iteration_variablesFunction
itv_25define_iteration_variablesFunction
itv_26define_iteration_variablesFunction
itv_27define_iteration_variablesFunction
itv_28define_iteration_variablesFunction
itv_29define_iteration_variablesFunction
itv_3define_iteration_variablesFunction
itv_30define_iteration_variablesFunction
itv_31define_iteration_variablesFunction
itv_32define_iteration_variablesFunction
itv_33define_iteration_variablesFunction
itv_34define_iteration_variablesFunction
itv_35define_iteration_variablesFunction
itv_36define_iteration_variablesFunction
itv_37define_iteration_variablesFunction
itv_38define_iteration_variablesFunction
itv_39define_iteration_variablesFunction
itv_4define_iteration_variablesFunction
itv_40define_iteration_variablesFunction
itv_41define_iteration_variablesFunction
itv_42define_iteration_variablesFunction
itv_43define_iteration_variablesFunction
itv_44define_iteration_variablesFunction
itv_45define_iteration_variablesFunction
itv_46define_iteration_variablesFunction
itv_47define_iteration_variablesFunction
itv_48define_iteration_variablesFunction
itv_49define_iteration_variablesFunction
itv_5define_iteration_variablesFunction
itv_50define_iteration_variablesFunction
itv_51define_iteration_variablesFunction
itv_52define_iteration_variablesFunction
itv_53define_iteration_variablesFunction
itv_54define_iteration_variablesFunction
itv_55define_iteration_variablesFunction
itv_56define_iteration_variablesFunction
itv_57define_iteration_variablesFunction
itv_58define_iteration_variablesFunction
itv_59define_iteration_variablesFunction
itv_6define_iteration_variablesFunction
itv_60define_iteration_variablesFunction
itv_61define_iteration_variablesFunction
itv_62define_iteration_variablesFunction
itv_63define_iteration_variablesFunction
itv_64define_iteration_variablesFunction
itv_65define_iteration_variablesFunction
itv_66define_iteration_variablesFunction
itv_67define_iteration_variablesFunction
itv_68define_iteration_variablesFunction
itv_69define_iteration_variablesFunction
itv_7define_iteration_variablesFunction
itv_70define_iteration_variablesFunction
itv_71define_iteration_variablesFunction
itv_72define_iteration_variablesFunction
itv_73define_iteration_variablesFunction
itv_74define_iteration_variablesFunction
itv_75define_iteration_variablesFunction
itv_76define_iteration_variablesFunction
itv_77define_iteration_variablesFunction
itv_78define_iteration_variablesFunction
itv_79define_iteration_variablesFunction
itv_8define_iteration_variablesFunction
itv_80define_iteration_variablesFunction
itv_81define_iteration_variablesFunction
itv_82define_iteration_variablesFunction
itv_83define_iteration_variablesFunction
itv_84define_iteration_variablesFunction
itv_85define_iteration_variablesFunction
itv_86define_iteration_variablesFunction
itv_89define_iteration_variablesFunction
itv_9define_iteration_variablesFunction
itv_90define_iteration_variablesFunction
itv_91define_iteration_variablesFunction
itv_92define_iteration_variablesFunction
itv_93define_iteration_variablesFunction
itv_94define_iteration_variablesFunction
itv_95define_iteration_variablesFunction
itv_96define_iteration_variablesFunction
itv_97define_iteration_variablesFunction
itv_98define_iteration_variablesFunction
lasdrvife_moduleSubroutine

Routine to calculate parameters of a laser driver suitable for inertial fusion energy author: P J Knight, CCFE, Culham Science Centre edrive : input real : Driver energy (J) gain : output real : Target gain etadrv : output real : Driver efficiency This routine calculates the parameters of a laser driver suitable for inertial fusion energy. Gain and driver efficiency data are taken from Figures 1 and 2 of Meier and Rosenberg. Meier and Rosenberg, Fusion Technology vol.21 (1992) p.1552 F/MI/PJK/LOGBOOK12, p.86

loadxcdefine_iteration_variablesSubroutine

Routine to load the physics and engineering variables into the optimisation variables array author: P J Knight, CCFE, Culham Science Centre author: J Morris, CCFE, Culham Science Centre None This subroutine loads the physics and engineering variables into the optimisation variables array XCM.

lower_caseprocess_inputSubroutine

Routine that converts a (sub-)string to lowercase author: P J Knight, CCFE, Culham Science Centre string : input string : character string of interest start : optional input integer : starting character for conversion finish : optional input integer : final character for conversion This routine converts the specified section of a string to lowercase. By default, the whole string will be converted. None

new_stella_configstellarator_configurationSubroutine
no_optimisationfinal_moduleSubroutine
oblnklprocess_outputSubroutine

Routine to print a blank line author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier This routine writes out a simple blank line. !

obuildprocess_outputSubroutine

Routine to print out a description, the thickness and summed build of a component of the radial or vertical build author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier descr : input character string : Description of the component thick : input real : Thickness of the component (m) total : input real : Total build, including this component (m) This routine writes out a description, the thickness and summed build of a component of the radial or vertical build. !

ocentrprocess_outputSubroutine

Routine to print a centred header within a line of asterisks author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier string : input character string : Character string to be used width : input integer : Total width of header This routine writes out a centred header within a line of asterisks. It cannot cope with a zero-length string; routine ostars should be used instead. !

ocmmntprocess_outputSubroutine

Routine to print a comment author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier string : input character string : Character string to be used This routine writes out a comment line. !

ocostsprocess_outputSubroutine

Routine to print out the code, description and value of a cost item author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier ccode : input character string : Code number/name of the cost item descr : input character string : Description of the cost item value : input real : Value of the cost item This routine writes out the cost code, description and value of a cost item. !

oheadrprocess_outputSubroutine

Routine to print a centred header within a line of asterisks, and between two blank lines author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier string : input character string : Character string to be used This routine writes out a centred header within a line of asterisks, and between two blank lines. !

open_idempotence_filesinit_moduleSubroutine
osheadprocess_outputSubroutine

Routine to print a short, centred header within a line of asterisks, and between two blank lines author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier string : input character string : Character string to be used This routine writes out a short, centred header within a line of asterisks, and between two blank lines. !

ostarsprocess_outputSubroutine

Routine to print a line of asterisks author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier width : input integer : Total width of header This routine writes out a line of asterisks. !

osubhdprocess_outputSubroutine

Routine to print a subheading between two blank lines author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier string : input character string : Character string to be used This routine writes out a subheading between two blank lines. !

ovarinprocess_outputSubroutine

Routine to print out the details of an integer variable author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier descr : input character string : Description of the variable varnam : input character string : Name of the variable value : input integer : Value of the variable output_flag : optional character This routine writes out the description, name and value of an integer variable. !

ovarreprocess_outputSubroutine

Routine to print out the details of a floating-point variable using 'E' format author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier descr : input character string : Description of the variable varnam : input character string : Name of the variable value : input real : Value of the variable output_flag : optional character This routine writes out the description, name and value of a double precision variable in E format (e.g. -1.234E+04). !

ovarrfprocess_outputSubroutine

Routine to print out the details of a floating-point variable using 'F' format author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier descr : input character string : Description of the variable varnam : input character string : Name of the variable value : input real : Value of the variable output_flag : optional character This routine writes out the description, name and value of a double precision variable in F format (e.g. -12345.000). !

ovarstprocess_outputSubroutine

Routine to print out the details of a character variable author: P J Knight, CCFE, Culham Science Centre file : input integer : Fortran output unit identifier descr : input character string : Description of the variable varnam : input character string : Name of the variable value : input character string : Value of the variable This routine writes out the description, name and value of a character string variable. None

parse_arrayfson_librarySubroutine
parse_for_charsfson_librarySubroutine
parse_input_fileprocess_inputSubroutine

Routine that parses the contents of the input file author: P J Knight, CCFE, Culham Science Centre author: J Morris, CCFE, Culham Science Centre author: F Warmer, IPP Greifswald in_file : input integer : Fortran input unit identifier out_file : input integer : Fortran output unit identifier show_changes : input integer : switch to turn on (1) or off (0) reporting of changed values This routine reads the data from the PROCESS input file (IN.DAT), dealing with comments or blank lines correctly, and sets the value of any variables found in the file. Any changes from the default values may be reported if required.

Each possible variable in this block is dealt with individually. (To add additional input variables, simply copy and edit one of the similar existing examples.) The routine also does the extremely useful function of checking that the given value for a variable lies within a sensible predefined range, and stops the program if apparently nonsensical values are attempted. A User's Guide to the PROCESS Systems Code, P. J. Knight, AEA Fusion Report AEA FUS 251, 1993

parse_int_arrayprocess_inputSubroutine

Routine that obtains the values of an integer array from the input file author: P J Knight, CCFE, Culham Science Centre varnam : input string : name of the variable varval(n) : input/output integer array : value of the variable isub1 : input integer : array element pointer n : input integer : size of varval array icode : output integer : diagnostic flag description : input string : brief description of the variable This routine parses a line in one of the two following forms:

 name = v1[, v2, ...]
 name(element) = v
 

Read more…
parse_int_variableprocess_inputSubroutine

Routine that obtains the value of an integer variable from the input file and checks that it lies within the expected range author: P J Knight, CCFE, Culham Science Centre varnam : input string : name of the variable varval : input/output integer : value of the variable vmin : input integer : minimum allowed value for the variable vmax : input integer : maximum allowed value for the variable description : input string : brief description of the variable This routine parses a line containing a 'name = value' pair for an integer variable, extracting the value from the line and checking whether it lies between user-defined lower and upper limits. None

parse_integerfson_path_mFunction
parse_integerfson_libraryFunction
parse_numberfson_librarySubroutine
parse_objectfson_librarySubroutine
parse_real_arrayprocess_inputSubroutine

Routine that obtains the values of a real array from the input file author: P J Knight, CCFE, Culham Science Centre varnam : input string : name of the variable varval(n) : input/output real array : value of the variable isub1 : input integer : array element pointer n : input integer : size of varval array icode : output integer : diagnostic flag description : input string : brief description of the variable This routine parses a line in one of the two following forms:

 name = v1[, v2, ...]
 name(element) = v
 

Read more…
parse_real_variableprocess_inputSubroutine

Routine that obtains the value of a real variable from the input file and checks that it lies within the expected range author: P J Knight, CCFE, Culham Science Centre varnam : input string : name of the variable varval : input/output real : value of the variable vmin : input real : minimum allowed value for the variable vmax : input real : maximum allowed value for the variable description : input string : brief description of the variable This routine parses a line containing a 'name = value' pair for a real variable, extracting the value from the line and checking whether it lies between user-defined lower and upper limits. None

parse_stringfson_libraryFunction
parse_string_variableprocess_inputSubroutine

Routine that obtains the value of a string variable from the input file author: P J Knight, CCFE, Culham Science Centre varnam : input string : name of the variable varval : input/output string : value of the variable description : input string : brief description of the variable This routine parses a line containing a 'name = value' pair for a string variable, extracting the value from the line. None

parse_valuefson_librarySubroutine
pop_charfson_libraryFunction
post_optimisescan_moduleSubroutine

Called after calling the optimising equation solver from Python. author: P J Knight, CCFE, Culham Science Centre ifail : input integer : error flag

push_charfson_librarySubroutine
reinke_tsepreinke_moduleFunction

Function for calculating upstream temperature(keV) in Reinke model author: H Lux, CCFE/UKAEA bt : input real : toroidal field on axis (T) flh : input real : fraction of Psep/P_LH qstar : input real : safety factor similar to q95 (see #707) rmajor : input real : major radius (m) eps : input real : inverse aspect ratio fgw : input real : ratio of volume averaged density to n_GW kappa : input real : elongation lhat : input real : connection length factor This function calculates the upstream temperature in the divertor/SoL model used for the Reinke citerion. Issue #707 M.L. Reinke 2017 Nucl. Fusion 57 034004

report_errorerror_handlingSubroutine

Adds the latest error message to the list already specified author: P J Knight, CCFE, Culham Science Centre error_id : input integer : identifier (error_type element number) for the relevant error This routine should be called if a informational, warning or error message needs to be flagged. It uses a linked list (see references) to provide an audit trail for any such messages during the program execution.

Up to eight integer and eight floating-point diagnostic values may be saved by the user in arrays idiags and fdiags, respectively, for debugging; these arrays must be assigned with up to eight values each prior to calling this routine.

The error_status variable returns the highest severity level that has been encountered; if a severe error is flagged (level 3) the program is terminated immediately. Introduction to Fortran 90/95, Stephen J, Chapman, pp.467-472, McGraw-Hill, ISBN 0-07-115896-0

run_summarymain_moduleSubroutine

Routine to print out a summary header author: P J Knight, CCFE, Culham Science Centre None This routine prints out a header summarising the program execution details, plus a list of the active iteration variables and constraint equations for the run. A User's Guide to the PROCESS Systems Code, P. J. Knight, AEA Fusion Report AEA FUS 251, 1993

runtestsmain_moduleSubroutine
scan_1d_store_outputscan_moduleSubroutine
scan_1d_write_plotscan_moduleSubroutine
scan_1d_write_point_headerscan_moduleSubroutine
scan_2d_initscan_moduleSubroutine

Routine to call 2-D scan author: J Morris, UKAEA, Culham Science Centre

scan_2d_store_outputscan_moduleSubroutine
scan_2d_write_plotscan_moduleSubroutine
scan_2d_write_point_headerscan_moduleSubroutine
scan_selectscan_moduleSubroutine

Routine to select first scan case author: J Morris, UKAEA, Culham Science Centre

set_itv_1define_iteration_variablesSubroutine
set_itv_10define_iteration_variablesSubroutine
set_itv_103define_iteration_variablesSubroutine
set_itv_104define_iteration_variablesSubroutine
set_itv_105define_iteration_variablesSubroutine
set_itv_106define_iteration_variablesSubroutine
set_itv_107define_iteration_variablesSubroutine
set_itv_108define_iteration_variablesSubroutine
set_itv_109define_iteration_variablesSubroutine
set_itv_11define_iteration_variablesSubroutine
set_itv_110define_iteration_variablesSubroutine
set_itv_111define_iteration_variablesSubroutine
set_itv_112define_iteration_variablesSubroutine
set_itv_113define_iteration_variablesSubroutine
set_itv_114define_iteration_variablesSubroutine
set_itv_115define_iteration_variablesSubroutine
set_itv_116define_iteration_variablesSubroutine
set_itv_117define_iteration_variablesSubroutine
set_itv_118define_iteration_variablesSubroutine
set_itv_119define_iteration_variablesSubroutine
set_itv_12define_iteration_variablesSubroutine
set_itv_120define_iteration_variablesSubroutine
set_itv_121define_iteration_variablesSubroutine
set_itv_122define_iteration_variablesSubroutine
set_itv_123define_iteration_variablesSubroutine
set_itv_124define_iteration_variablesSubroutine
set_itv_125define_iteration_variablesSubroutine
set_itv_126define_iteration_variablesSubroutine
set_itv_127define_iteration_variablesSubroutine
set_itv_128define_iteration_variablesSubroutine
set_itv_129define_iteration_variablesSubroutine
set_itv_13define_iteration_variablesSubroutine
set_itv_130define_iteration_variablesSubroutine
set_itv_131define_iteration_variablesSubroutine
set_itv_132define_iteration_variablesSubroutine
set_itv_133define_iteration_variablesSubroutine
set_itv_134define_iteration_variablesSubroutine
set_itv_135define_iteration_variablesSubroutine
set_itv_136define_iteration_variablesSubroutine
set_itv_137define_iteration_variablesSubroutine
set_itv_138define_iteration_variablesSubroutine
set_itv_139define_iteration_variablesSubroutine
set_itv_14define_iteration_variablesSubroutine
set_itv_140define_iteration_variablesSubroutine
set_itv_141define_iteration_variablesSubroutine
set_itv_142define_iteration_variablesSubroutine
set_itv_143define_iteration_variablesSubroutine
set_itv_144define_iteration_variablesSubroutine
set_itv_145define_iteration_variablesSubroutine
set_itv_146define_iteration_variablesSubroutine
set_itv_147define_iteration_variablesSubroutine
set_itv_148define_iteration_variablesSubroutine
set_itv_149define_iteration_variablesSubroutine
set_itv_15define_iteration_variablesSubroutine
set_itv_152define_iteration_variablesSubroutine
set_itv_153define_iteration_variablesSubroutine
set_itv_154define_iteration_variablesSubroutine
set_itv_155define_iteration_variablesSubroutine
set_itv_156define_iteration_variablesSubroutine
set_itv_157define_iteration_variablesSubroutine
set_itv_158define_iteration_variablesSubroutine
set_itv_159define_iteration_variablesSubroutine
set_itv_16define_iteration_variablesSubroutine
set_itv_160define_iteration_variablesSubroutine
set_itv_161define_iteration_variablesSubroutine
set_itv_162define_iteration_variablesSubroutine
set_itv_163define_iteration_variablesSubroutine
set_itv_164define_iteration_variablesSubroutine
set_itv_165define_iteration_variablesSubroutine
set_itv_166define_iteration_variablesSubroutine
set_itv_167define_iteration_variablesSubroutine
set_itv_168define_iteration_variablesSubroutine
set_itv_169define_iteration_variablesSubroutine
set_itv_17define_iteration_variablesSubroutine
set_itv_170define_iteration_variablesSubroutine
set_itv_171define_iteration_variablesSubroutine
set_itv_172define_iteration_variablesSubroutine
set_itv_173define_iteration_variablesSubroutine
set_itv_174define_iteration_variablesSubroutine
set_itv_175define_iteration_variablesSubroutine
set_itv_18define_iteration_variablesSubroutine
set_itv_19define_iteration_variablesSubroutine
set_itv_2define_iteration_variablesSubroutine
set_itv_20define_iteration_variablesSubroutine
set_itv_21define_iteration_variablesSubroutine
set_itv_23define_iteration_variablesSubroutine
set_itv_25define_iteration_variablesSubroutine
set_itv_26define_iteration_variablesSubroutine
set_itv_27define_iteration_variablesSubroutine
set_itv_28define_iteration_variablesSubroutine
set_itv_29define_iteration_variablesSubroutine
set_itv_3define_iteration_variablesSubroutine
set_itv_30define_iteration_variablesSubroutine
set_itv_31define_iteration_variablesSubroutine
set_itv_32define_iteration_variablesSubroutine
set_itv_33define_iteration_variablesSubroutine
set_itv_34define_iteration_variablesSubroutine
set_itv_35define_iteration_variablesSubroutine
set_itv_36define_iteration_variablesSubroutine
set_itv_37define_iteration_variablesSubroutine
set_itv_38define_iteration_variablesSubroutine
set_itv_39define_iteration_variablesSubroutine
set_itv_4define_iteration_variablesSubroutine
set_itv_40define_iteration_variablesSubroutine
set_itv_41define_iteration_variablesSubroutine
set_itv_42define_iteration_variablesSubroutine
set_itv_44define_iteration_variablesSubroutine
set_itv_45define_iteration_variablesSubroutine
set_itv_46define_iteration_variablesSubroutine
set_itv_47define_iteration_variablesSubroutine
set_itv_48define_iteration_variablesSubroutine
set_itv_49define_iteration_variablesSubroutine
set_itv_5define_iteration_variablesSubroutine
set_itv_50define_iteration_variablesSubroutine
set_itv_51define_iteration_variablesSubroutine
set_itv_53define_iteration_variablesSubroutine
set_itv_54define_iteration_variablesSubroutine
set_itv_56define_iteration_variablesSubroutine
set_itv_57define_iteration_variablesSubroutine
set_itv_58define_iteration_variablesSubroutine
set_itv_59define_iteration_variablesSubroutine
set_itv_6define_iteration_variablesSubroutine
set_itv_60define_iteration_variablesSubroutine
set_itv_61define_iteration_variablesSubroutine
set_itv_62define_iteration_variablesSubroutine
set_itv_63define_iteration_variablesSubroutine
set_itv_64define_iteration_variablesSubroutine
set_itv_65define_iteration_variablesSubroutine
set_itv_66define_iteration_variablesSubroutine
set_itv_67define_iteration_variablesSubroutine
set_itv_68define_iteration_variablesSubroutine
set_itv_69define_iteration_variablesSubroutine
set_itv_7define_iteration_variablesSubroutine
set_itv_70define_iteration_variablesSubroutine
set_itv_71define_iteration_variablesSubroutine
set_itv_72define_iteration_variablesSubroutine
set_itv_73define_iteration_variablesSubroutine
set_itv_74define_iteration_variablesSubroutine
set_itv_75define_iteration_variablesSubroutine
set_itv_79define_iteration_variablesSubroutine
set_itv_8define_iteration_variablesSubroutine
set_itv_81define_iteration_variablesSubroutine
set_itv_82define_iteration_variablesSubroutine
set_itv_83define_iteration_variablesSubroutine
set_itv_84define_iteration_variablesSubroutine
set_itv_85define_iteration_variablesSubroutine
set_itv_86define_iteration_variablesSubroutine
set_itv_89define_iteration_variablesSubroutine
set_itv_9define_iteration_variablesSubroutine
set_itv_90define_iteration_variablesSubroutine
set_itv_91define_iteration_variablesSubroutine
set_itv_92define_iteration_variablesSubroutine
set_itv_93define_iteration_variablesSubroutine
set_itv_94define_iteration_variablesSubroutine
set_itv_95define_iteration_variablesSubroutine
set_itv_96define_iteration_variablesSubroutine
set_itv_97define_iteration_variablesSubroutine
set_itv_98define_iteration_variablesSubroutine
show_errorserror_handlingSubroutine

Reports all informational/error messages encountered author: P J Knight, CCFE, Culham Science Centre None This routine provides a summary audit trail of all the errors encountered during the program's execution. Introduction to Fortran 90/95, Stephen J, Chapman, pp.467-472, McGraw-Hill, ISBN 0-07-115896-0

stella_config_jsonstellarator_configurationSubroutine

Initialises the effective stellarator values using a json input file author: J Lion, IPP Greifswald None This routine reads in all effective variables that are given needed by the 'constructor' stella_config

The effective values are read in from a JSON-format file. None

stella_errorstellarator_configurationSubroutine
stinitstellarator_moduleSubroutine

Routine to initialise the variables relevant to stellarators author: P J Knight, CCFE, Culham Science Centre author: F Warmer, IPP Greifswald None This routine initialises the variables relevant to stellarators. Many of these may override the values set in routine initial. !

string_clearfson_string_mSubroutine
string_lengthfson_string_mFunction
string_to_intprocess_inputSubroutine

Routine that converts the ASCII digits in a string to an integer author: P J Knight, CCFE, Culham Science Centre string : input string : contains digits of the number length : input integer : useful length of character string ivar : output integer : value stored in the string icode : output integer : diagnostic flag This routine converts the ASCII digits in string(1:length) to the integer ivar. It is equivalent to doing 'READ(STRING(1:LENGTH),I) IVAR' but this routine conforms to the ANSI standard. Each digit is parsed in turn, the current total is multiplied by ten and the new digit is added. None

string_to_realprocess_inputSubroutine

Routine that converts the ASCII digits in a string to a real value author: P J Knight, CCFE, Culham Science Centre string : input string : contains digits of the number length : input integer : useful length of character string rvar : output real : value stored in the string icode : output integer : diagnostic flag This routine converts the ASCII digits in string(1:length) to the real variable rvar. The string is parsed one character at a time, from the left, handling the mantissa, and all other components of the real number separately, combining them at the end. None

svdmaths_librarySubroutine

Singular Value Decomposition author: P J Knight, CCFE, Culham Science Centre author: B. S. Garbow, Applied Mathematics Division, Argonne National Laboratory nm : input integer : Max number of rows of arrays a, u, v; >= m,n m : input integer : Actual number of rows of arrays a, u n : input integer : Number of columns of arrays a, u, and the order of v a(nm,n) : input/output real array : On input matrix to be decomposed; on output, either unchanged or overwritten with u or v w(n) : output real array : The n (non-negative) singular values of a (the diagonal elements of s); unordered. If an error exit is made, the singular values should be correct for indices ierr+1,ierr+2,...,n. matu : input logical : Set to .true. if the u matrix in the decomposition is desired, and to .false. otherwise. u(nm,n) : output real array : The matrix u (orthogonal column vectors) of the decomposition if matu has been set to .true., otherwise u is used as a temporary array. u may coincide with a. If an error exit is made, the columns of u corresponding to indices of correct singular values should be correct. matv : input logical : Set to .true. if the v matrix in the decomposition is desired, and to .false. otherwise. v(nm,n) : output real array : The matrix v (orthogonal) of the decomposition if matv has been set to .true., otherwise v is not referenced. v may also coincide with a if u is not needed. If an error exit is made, the columns of v corresponding to indices of correct singular values should be correct. ierr : output integer : zero for normal return, or k if the k-th singular value has not been determined after 30 iterations. rv1(n) : output real array : work array This subroutine is a translation of the algol procedure SVD, Num. Math. 14, 403-420(1970) by Golub and Reinsch, Handbook for Auto. Comp., vol II - Linear Algebra, 134-151(1971).

It determines the singular value decomposition a=usvt of a real m by n rectangular matrix. Householder bidiagonalization and a variant of the QR algorithm are used. None

underscoreprocess_outputSubroutine

Routine that converts spaces in a string to underscores author: P J Knight, CCFE, Culham Science Centre string : input/output string : character string of interest This routine converts any space characters in the string to underscore characters. None

upper_caseutilitiesSubroutine

Routine that converts a (sub-)string to uppercase author: P J Knight, CCFE, Culham Science Centre string : input string : character string of interest start : optional input integer : starting character for conversion finish : optional input integer : final character for conversion This routine converts the specified section of a string to uppercase. By default, the whole string will be converted. None

variable_errormaths_libraryFunction
verrormain_moduleSubroutine

Routine to print out relevant messages in the case of an unfeasible result from a VMCON (optimisation) run author: P J Knight, CCFE, Culham Science Centre ifail : input integer : error flag This routine prints out relevant messages in the case of an unfeasible result from a VMCON (optimisation) run.

The messages are written to units NOUT and IOTTY, which are by default the output file and screen, respectively.

If IFAIL=1 then a feasible solution has been found and therefore no error message is required. !

writeprocess_outputSubroutine

Write a string to file. file : input integer : Fortran output unit identifier string : input character string : Character string to be used