gray/schemas/params.schema.json

266 lines
14 KiB
JSON
Raw Normal View History

{
"$id": "https://www.istp-cnr.it/gray/schemas/params",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Code parameters",
"type" : "object",
"properties": {
"raytracing": {
"description": "Raytracing parameters",
"type": "object",
"properties": {
"nRayRad": {
"description": "Number of rays in the radial direction",
"type": "integer",
"minimum": 1,
"default": 1
},
"nRayAng": {
"description": "Number of rays in the angular direction",
"type": "integer",
"minimum": 1,
"default": 1
},
"rwMax": {
"description": "Normalized beam truncation radius.\\nThe last shell of rays is set at a distance r = `rwmax`⋅w from\\nthe magnetic axis, where w is the 1/e amplitude beam radius.",
"type": "number",
"exclusiveMinimum": 0,
"default": 1.0
},
"asBeam": {
"description": "`false` for raytracing (Geometrical Optics approximation), `true` for beamtracing (Complex GO)",
"type": "boolean",
"default": false
},
"dStep": {
"description": "Step length for the numerical integration of the ray trajectories. Units [cm]",
"type": "number",
"exclusiveMinimum": 0
},
"nStep": {
"description": "Maximum number of integration steps",
"type": "integer",
"minimum": 0,
"default": 12000
},
"stepVar": {
"description": "Choice of the integration variable. One of:\\n - `ARCLEN`: arc length (s)\\n - `TIME`: time (actually c⋅t)\\n - `PHASE`: phase (actually the real part of the eikonal S_r=k₀⋅φ)",
"enum": ["ARCLEN", "TIME", "PHASE"],
"default": "TIME"
},
"nPass": {
"description": "Maximum number of crossing (in, out) of the plasma.\\nWhen positive, reflections occur on the plasma limiter provided as input\\n(e.g., via the G-EQDSK file);\\nwhen negative on a simple cylindrical limiter is set at R = `rwall`",
"type": "integer",
"default": 1
}
}
},
"ecrh_cd": {
"description": "ECRH and current drive parameters",
"type":"object",
"properties": {
"absModel": {
"description": "Choice of the power absorption model. One of:\\n - `OFF`: no absorption\\n - `WEAK`: weakly relativistic\\n - `FULL`: fully relativistic\\n - `FULL_ALT`: fully relativistic (slower variant)\\nNote: `iwarm` /= `OFF` is required for current drive.",
"enum": ["OFF", "WEAK", "FULL", "FULL_ALT"],
"default": "FULL"
},
"nLarm": {
"description": "Order of the electron Larmor radius expansion used for the warm dielectric tensor",
"type": "integer",
"minimum": 0,
"default": 5
},
"nIterMax": {
"description": "Max number of iterations for the solution of the warm dispersion relation.\\nNote: if negative the result of the first iteration will be used in case\\nthe result doesn't converge within |imx| iterations.",
"type": "integer",
"default": -20
},
"cdModel": {
"description": "Current drive model. One of:\\n - `OFF`: no current drive\\n - `COHEN`: Cohen model\\n - `NO_TRAP`: no trapping\\n - `NEOCLASS`: Neoclassical with momentum conservation",
"enum": ["OFF", "COHEN", "NO_TRAP", "NEOCLASS"],
"default": "NEOCLASS"
}
}
},
"input": {
"description": "Input data pre-processing",
"type": "object",
"properties": {
"searchXPoint": {
"description": "Search X point for psi re-normalization.\\nOne of:\\n - `NO`: do not search\\n - `TOP`: upper X-point\\n - `BOTTOM`: lower X-point\\n - `BOTH`: search both, normalize to the innermost.",
"enum": ["NO", "TOP", "BOTTOM", "BOTH"],
"default": "NO"
},
"smoothPsi": {
"description": "Tension of the 2D spline for the normalised poloidal flux ψ_n(R,z).\\n0 gives an interpolating spline.",
"type": "number",
"minimum": 0,
"default": 0.005
},
"smoothFpol": {
"description": "Tension of the 1D spline for the poloidal current function F(ψ)=R⋅B_T.\\n0 gives an interpolating spline.",
"type": "number",
"minimum": 0,
"default": 0.01
},
"smoothDens": {
"description": "Tension of the 1D spline for the electron density function n_e(ψ).\\n0 gives an interpolating spline.",
"type": "number",
"minimum": 0,
"default": 0.1
},
"signB": {
"description": "Force the sign of the toroidal field. One of:\\n - `+1`: counter-clockwise (viewed from above)\\n - `-1`: clockwise\\n - `0`: do not force, interpret sign according to input COCOS",
"enum": [-1, 0, 1],
"default": 0
},
"signI": {
"description": "Force the sign of the toroidal plasma current. One of:\\n - `+1`: counter-clockwise (viewed from above)\\n - `-1`: clockwise\\n - `0`: do not force, interpret sign according to input COCOS",
"enum": [-1, 0, 1],
"default": 0
},
"factB": {
"description": "Rescaling factor for the magnetic field, applied after sign forcing with `signB`.",
"type": "number",
"default": 1
},
"factTemp": {
"description": "Rescaling factor for the electron temperature profile.\\nThe combined effect with `factB` depends on the `scalType` parameter.\\n",
"type": "number",
"default": 1
},
"factDens": {
"description": "Rescaling factor for the electron density profile.\\nThe combined effect with `factB` depends on the `scalType` parameter.\\n",
"type": "number",
"default": 1
},
"scalType": {
"description": "Model for temperature and density rescaling with the magnetic field. One of:\\n - `OFF`: don't rescale with B\\n - `COLLISION`: preserve effective collisionality nustar:\\n n_e -> n_e⋅`factDens`⋅`factB`^(4/3)\\n T_e -> T_e⋅`factTemp`⋅`factB`^(2/3)\\n - `GREENWALD`, preserve Greenwald fraction n_e/n_GW:\\n n_e -> n_e⋅`factDens`⋅`factB`\\n T_e -> T_e⋅`factTemp`⋅`factB`",
"enum": ["OFF", "COLLISION", "GREENWALD"],
"default": "OFF"
}
}
},
"output": {
"description": "Output data parameters",
"type": "object",
"properties": {
"rhoVar": {
"description": "Main radial coordinate to build uniform grid for ECRH&CD profiles. One of:\\n - `RHO_TOR`: ρ_t = √Φ_n (where Φ_n is the normalised toroidal flux)\\n - `RHO_POL`: ρ_p = √ψ_n (where ψ_n is the normalised poloidal flux)",
"enum": ["RHO_TOR", "RHO_POL"],
"default": "RHO_POL"
},
"nRho": {
"description": "Number of points in the radial grid",
"type": "integer",
"minimum": 2,
"default": 501
},
"iStepProj": {
"description": "Step subsampling factor for the beam cross section (units 8, 12)",
"type": "integer",
"default": 5
},
"iStepTraj": {
"description": "Step subsampling factor for the outer rays data (unit 33)",
"type": "integer",
"default": 5
}
}
},
"beam": {
"description": "Beam launch parameters setup from configuration file",
"type": "object",
"properties": {
"filename": {
"description": "Filepath (relative to the parameters file) for the beam properties description, possibly in a system with one or more degrees of freedom",
"type": "string"
},
"nSteerAxes": {
"description": "Number of degrees of freedom in the system described by the configuration file",
"type": "integer",
"minimum": 0,
"maximum": 2
},
"steering": {
"description": "Steering values used to select the beam parameters from the configuration file. The number of required values is set with the `nSteerAxis` parameter. Units [a.u.]",
"$ref": "number1d"
},
"index": {
"description": "Position index of the selected beam in the configuration file, 1-based.",
"type": "integer",
"minimum": 1,
"default": 1
},
"power": {"$ref": "beam#/power"},
"polarization": {"$ref": "beam#/polarization"}
}
},
"equilibrium": {
"description": "Magnetic field configuration read from external file",
"type": "object",
"properties": {
"filename": {
"description": "Filepath (relative to the parameters file) of the equilibrium data",
"type": "string"
},
"equilType": {
"description": "Type of magnetic equilibrium description. One of:\\n - `VACUUM`: vacuum (no plasma)\\n - `ANALYTICAL`: analytical model\\n - `EQDSK_FULL`: G-EQDSK format - data valid on the whole domain\\n - `EQDSK_PARTIAL`: G-EQDSK format - data valid only inside the LCFS",
"enum": ["VACUUM", "ANALYTICAL", "EQDSK_FULL", "EQDSK_PARTIAL"],
"default": "EQDSK_FULL"
},
"cocos": {
"description": "COCOS index of the equilibrium data (G-EQDSK only)",
"$ref" : "cocos",
"default": 3
},
"hasPsiNorm": {
"description": "Whether the 2D poloidal flux is normalised (G-EQDSK only)",
"type": "boolean",
"default": false
},
"hasDesc": {
"description": "Whether the header starts with a description/identification string (G-EQDSK only)",
"type": "boolean",
"default": true
},
"hasFreeFormat": {
"description": "Whether the records have variable length (G-EQDSK only)\\nNote: some non-compliant programs output numbers formatted with variable\\nlength instead of using the single (5e16.9) specifier.",
"type": "boolean",
"default": false
}
}
},
"profiles": {
"description": "(input) plasma profiles parameters",
"type": "object",
"properties": {
"filename": {
"description": "Filepath (relative to the parameters file) of the plasma profiles data",
"type": "string"
},
"profType": {
"description": "Type of plasma profiles description. One of:\\n - `ANALYTIC`: analytical model\\n - `NUMERIC: tabulated data",
"enum": ["ANALYTIC", "NUMERIC"],
"default": "NUMERIC"
},
"rhoDef": {
"description": "Plasma profiles radial coordinate in input file\\n(`profType`==`NUMERIC` only). One of:\\n - `RHO_TOR`: ρ_t = √Φ_n (where Φ_n is the normalised toroidal flux)\\n - `RHO_POL`: ρ_p = √ψ_n (where ψ_n is the normalised poloidal flux)\\n - `PSI_N`: normalised poloidal flux ψ_n",
"enum": ["RHO_TOR", "RHO_POL", "PSI_N"],
"default": "PSI_N"
}
}
},
"misc": {
"description": "Other parameters",
"type": "object",
"properties": {
"rWall": {
"description": "Radius of the inner wall. Used to build a simple cylindrical limiter for\\nreflections (only when `nPass`<0), and to discard invalid solutions\\n(at R < `rWall`) when reconstructing the flux surfaces contours. Units [m]",
"type": "number",
"minimum": 0,
"default": 0
}
}
}
}
}