Berikut ini adalah versi HTML dari berkas http://fusion.gat.com/THEORY/onetwo/images/structure.ps.
G o o g l e membuat versi HTML dari dokumen tersebut secara otomatis pada saat menelusuri web.
Page 1
An Outline of Onetwo Code Structure H.ST.JOHN 1 Brief Description The Onetwo transport code solves a user selectable,arbitrary combination,ofux surface average parabolic equations representing the radial diusion andconvection of 1 or 2 thermal ion species and up to 2 neutral species,theelectron energy,the ion energy,the poloidal magnetic eld,and the toroidalmomentum. The magnetic geometry may be self consistently maintainedby solving the elliptic mhd equilibrium equation simultaneously with thediusion equations. Both free and xed plasma boundary equilibrium modelsare supported. Auxiliary heating models include Monte Carlo neutral beamdeposition and electron and ion cyclotron and fast wave r.f. heating. Modelsfor ohmic,bootstrap, beam and r.f. driven currents are included. Energyconnement may be simulated by selecting theoretical or empirical electronand/or ion thermal conductivity models,including Rebut-Lallia,Shay,Waltz-Dominguez and IFS. A unique feature of the code is its ability to substitutemeasured proles for any of the dependent variables and solving the diusionequations only for the remaining unknown proles. A combination of Crank-Nicholson,predictor and iterated corrector methods are used to converge thenon linear diusion equations. The elliptic equations are solved using variablenite dierence schemes with single cyclic reduction. The code is strictlyprocedural in nature,written entirely in F77 (with the "standard" extensions). ONETWO consist of over 300 subroutines. Only the most signicant onesare listed below. The code consists of a set of functionally grouped subroutinemodules as follows.cray001.fdate/time-stamp and block data routinescray101.fmain driver routinescray102.finput routinescray201.fmhd routinescray202.fsupport routnes for cray201.fcray203.fmore support routines for cray201.fcray204.fiter data base routines (netcdf and ascii)cray205.fnetcdf routines for tdem mode1
Page 2
/u/stjohn/ONETWOPAGES/code descr/source o12.ps 2cray206.ftdem mode routinescray301.fmain transport driver routinescray311.fneutral transport routinescray321.fbeam routinescray331.frf related routinescray341.fpellet injection related routinescray352.frf routinescray401.fgeneral support routinescray402.fNeutron rate calculation routinescray403.fGaussian integration routinescray404.fNordman-Weiland connement modelcray501.fadaptive grid routines(under development) 2 Input/Output ONETWO uses namelist input for all of its kinetic,beam,and rf data input.Magnetic geometry related input is done through special ascii les calledeqdsks or through netcdf les (the TDEM mode,see below).Prole data inputis in the form of time dependent splines or parameterized parabolic shapes.The kinetic proles(densities and temperatures) and the current prole (nooption for q at present) cn be input at pre-specied times if the correspondingdiusion equation is run in analysis mode. Output is to ascii and netcdf les.Graphics output is done with display and/or IDL,both require special post-processing programs (trplot and plot12 respectively). Init(cray102.f) the namelist input and code initialization routine. Alsocontains a detailed description of all input variables.prepar writes data intended for graphics visualization (both dissplay andIDl type)out primary output routine,writes to ascii le outonepreplt time orders data from prepar, creates netcdf output le trplot creates dissplay style graphics le plot12 creates interactive,netcdf driven,IDL graphics. 3 MHD The ONETWO code is structured in a manner which allows mhd calculationsto proceed with a relatively long time step compared to the time steps taken
Page 3
/u/stjohn/ONETWOPAGES/code descr/source o12.ps 3in the transport calculations. This is accomplished by wrapping the trans-port calculations up inside an mhd module (runtwo)which calls the transportmodule (tport). The time steps between mhd calculations are input by theuser (as a heterogeneous list of times at which the equilibrium problem is tobe solved). This list of times is driven by the fact that linear interpolation isused to connect the mhd calculations from one time step to the next. Hencethe user has the ability to allow long time periods of uninterupted transportevolvement when appropriate by picking large time intervals between mhdcalculations. On the other hand, if rapid plasma shaping is occurring, thetime steps can be made short as appropriate. The code will accept the inputtime steps or repeatedly cut the given input time steps in half if the geomet-ric parameters associated with the mhd calculations (ie the metrics)are notconverged. That is, within any given mhd cycle there is a transport cyclewhich evolves the transport equations from the begging to the end of themhd time step. The time dependent mhd derived quantities required to dothe transport calculations are linearly interpolated. The slope of the inter-polation function is intially assumed zero (at program start up) and is takenas the continuation of the slope from the previous mhd cycle thereafter as astarting guess. This guess may have to be rened if it is too far o the valuethat the current mhd calculation gives. If an iteration of the mhd/transportcycle is required then a new slope is determined by combining the previousand current calculations (ie under relaxation) of the mhd metrics to form anew slope for the interoplation function ( there is separate time slope functionfor each sptial grid point). There a good and bad points to this approach.The bad point is that an entire transport cycle set of calculations (whichcould consist of a large number of transport time steps) may be rejected ifthe mhd metrics are too far o at the end of the cycle. One good point isthat there is a lot of exibility associated with this approach. A commonway of running the code is to force a single, time independent mhd cycle (which can easily be set up with the above approach).The code does not have external circuit equations. Instead it uses the(experimentally measured) values of the psi loops and magnetic probes (asa function of time)to determine what the plasma boundary and ux surfaceshape should be.Because equilibrium/transport cycles are expensive and because of theway that experimental data is analyzed there is an option in ONETWO to use time dependent equilibrium calcualtions which were done a priori.In an experimentally driven program it is typicall that many stand aloneequilibirum calcualtions are performed (using an equiibrium code such as et)as function of time to t measured data to the magnetic geometry requiredfor data analysis. Thus many equilibrium les (called eqdsks) are availablebefore any transport calcualtions are attempted. In the TDEM mode of
Page 4
/u/stjohn/ONETWOPAGES/code descr/source o12.ps 4operation (time dependent eqdsk mode) the Onetwo code is instructed toforget about doing equilibrium calculations altogether and instead it usesthe available eqdsks to construct the required information as a function oftime as the transport calcualtions proceed. The previously generated set ofeqdsks is processed by a stand alone code,mepc (multiple eqdsk processor)which writes a netcdf le that is actually used by ONETWO . runtwo(cray201.f) main driver for mhd/transport cycle drive driver for mhd calculations solvegs sets up nite di matrices for equilibirum equation cmpltcyr (single) cyclic reduction solver bound free boundary nder cntour internal ux surface generator uxav does all ux surface avg calculations sorpicard sets up xed boundary calculatioins for Picard iteratioin solution. prepar determines input for transport section iterdb write iter database le (netcdf or ascii) 4 Transport The transport calculations are structured to use a Crank-Nicholson typeapproach for the space and time dierencing of the diusion equations. Thenonlinearities are resolved by using a predictor corrector method. A timestep starts by calculating the sources (subroutine source) which may includeneutral beam and rf heating. The rf packages (toray,curray) are stand alonecodes which are spawned form ONETWO and return results to ONETWO through ascii les. The frequency of the calls to the beam and rf packagesis determined by the user. The evolution of the poloidal magnetic eld andthe associated parrallel and toroidal currents with auxilliary current drive isprobably adequately explained in the document(on hydra)/u/stjohn/ONETWOPAGES/code_descr/sources_o12.ps. Otherwise the solution of the density and (electron,ion) energy equationsis standard (all ions are assumed to have a single common temperature).Modelling of impurities is limited to simple charge balance calculations .The relevant subroutines are
Page 5
/u/stjohn/ONETWOPAGES/code descr/source o12.ps 5 tport(Cray301.f) the driver routine. Controls the time stepping and con-vergence estimates, makes all calls to determine transport coecients,sources, mhd parameters. rhomsh generate the rho mesh (square root of toroidal ux) at current time(alows for expanding boundary and adaptive grid calculations). dius sets up diusion coecient matrix uxx determines the ux forboth analysis and simulation mode zen determines ion densities consistent with fast beam ions and fusion al-phas. specify sets values for analysis mode variables to current time source determines all sources,including neutral densities neucg neutrals code,based on 1d circular cylinder approximation the neutraldensity at any instant is determined by the reaction rates required tosustain the plasma with the current(te,ti) temperatues and densities(primary ions, impurity ions,and fast ions). This section of the codeneeds updating for more complete reaction rates, cross sections and 3dgeometry. solve decomposes and solves the set of nonlinear matrix equations repre-senting the transport system of equations. cheku checks for valid solution. Sets ag to cut time step in half if validsolution is not found. checksolution determines if a corrector step is required ballo does balloning mode calcs propel does pellet injection related calcs ziks determines physical quantities(eq relaxation times,etc) from solutionat current time step freya does neutral beam depostion orbit does prompt fast ion orbit averaging ech gives ech power depostion based on simple internal models or spwansexteranl rf codes tspline primary tension spline routine hirsh88 Hirshman bootstrap current model
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar