Skip to content

Commit

Permalink
Added lots of geometry content to GACODE page
Browse files Browse the repository at this point in the history
  • Loading branch information
jcandy committed Jul 30, 2024
1 parent 4b2ba75 commit 0ae529c
Show file tree
Hide file tree
Showing 19 changed files with 506 additions and 325 deletions.
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 556eb8091613b199f169c4c376f2cb96
config: 711f83b3aa3bbab10fa381c061ae4e28
tags: 645f666f9bcd5a90fca523b33c5a78b7
4 changes: 2 additions & 2 deletions docs/cgyro.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ <h2>Past and Future<a class="headerlink" href="#past-and-future" title="Link to
primarily on the core region. A popular kinetic code used for this purpose
was GYRO <span id="id2">[<a class="reference internal" href="zreferences.html#id37" title="J. Candy and E. Belli. GYRO Technical Guide. General Atomics Technical Report, 2010.">CB10</a>, <a class="reference internal" href="zreferences.html#id26" title="J. Candy and R.E. Waltz. Anomalous transport scaling in the DIII-D tokamak matched by supercomputer simulation. Phys. Rev. Lett., 91:045001, 2003. doi:10.1103/PhysRevLett.91.045001.">CW03a</a>, <a class="reference internal" href="zreferences.html#id25" title="J. Candy and R.E. Waltz. An Eulerian gyrokinetic-Maxwell solver. J. Comput. Phys., 186:545, 2003. doi:10.1016/S0021-9991(03)00079-2.">CW03b</a>, <a class="reference internal" href="zreferences.html#id27" title="J. Candy, R.E. Waltz, and W. Dorland. The local limit of global gyrokinetic simulations. Phys. Plasmas, 11:L25, 2004. doi:10.1063/1.1695358.">CWD04</a>]</span>.
Thousands of nonlinear simulations with GYRO have informed the fusion community’s understanding of
core plasma turbulence <span id="id3">[<a class="reference internal" href="zreferences.html#id78" title="N.T. Howard, C. Holland, A.E. White, M. Greenwald, and J. Candy. Multi-scale gyrokinetic simulation of tokamak plasmas: enhanced heat loss due to cross-scale coupling of plasma turbulence. Nucl. Fusion, 56(1):014004, 2016. doi:10.1088/0029-5515/56/1/014004.">HHW+16</a>, <a class="reference internal" href="zreferences.html#id81" title="J.E. Kinsey, R.E. Waltz, and J. Candy. Nonlinear gyrokinetic turbulence simulations of E×B shear quenching of transport. Phys. Plasmas, 12:062302, 2005.">KWC05</a>, <a class="reference internal" href="zreferences.html#id82" title="J.E. Kinsey, R.E. Waltz, and J. Candy. The effect of safety factor and magnetic shear on turbulent transport in nonlinear gyrokinetic simulations. Phys. Plasmas, 13:022305, 2006.">KWC06</a>, <a class="reference internal" href="zreferences.html#id83" title="J.E. Kinsey, R.E. Waltz, and J. Candy. The effect of plasma shaping on turbulent transport and E×B shear quenching in nonlinear gyrokinetic simulations. Phys. Plasmas, 14:102306, 2007.">KWC07</a>]</span>
core plasma turbulence <span id="id3">[<a class="reference internal" href="zreferences.html#id79" title="N.T. Howard, C. Holland, A.E. White, M. Greenwald, and J. Candy. Multi-scale gyrokinetic simulation of tokamak plasmas: enhanced heat loss due to cross-scale coupling of plasma turbulence. Nucl. Fusion, 56(1):014004, 2016. doi:10.1088/0029-5515/56/1/014004.">HHW+16</a>, <a class="reference internal" href="zreferences.html#id83" title="J.E. Kinsey, R.E. Waltz, and J. Candy. Nonlinear gyrokinetic turbulence simulations of E×B shear quenching of transport. Phys. Plasmas, 12:062302, 2005.">KWC05</a>, <a class="reference internal" href="zreferences.html#id84" title="J.E. Kinsey, R.E. Waltz, and J. Candy. The effect of safety factor and magnetic shear on turbulent transport in nonlinear gyrokinetic simulations. Phys. Plasmas, 13:022305, 2006.">KWC06</a>, <a class="reference internal" href="zreferences.html#id85" title="J.E. Kinsey, R.E. Waltz, and J. Candy. The effect of plasma shaping on turbulent transport and E×B shear quenching in nonlinear gyrokinetic simulations. Phys. Plasmas, 14:102306, 2007.">KWC07</a>]</span>
and provided a <em>transport database</em> for the calibration of reduced transport models
such as TGLF <span id="id4">[<a class="reference internal" href="zreferences.html#id98" title="G. M. Staebler, J. E. Kinsey, and R. E. Waltz. A theory-based transport model with comprehensive physics. Phys. Plasmas, 14(5):055909, 2007. doi:10.1063/1.2436852.">SKW07</a>]</span>. GYRO was the first global electromagnetic solver,
such as TGLF <span id="id4">[<a class="reference internal" href="zreferences.html#id100" title="G. M. Staebler, J. E. Kinsey, and R. E. Waltz. A theory-based transport model with comprehensive physics. Phys. Plasmas, 14(5):055909, 2007. doi:10.1063/1.2436852.">SKW07</a>]</span>. GYRO was the first global electromagnetic solver,
and pioneered the development of numerical algorithms for the GK equations
with kinetic electrons. It is formulated in real space and like all global solvers
requires <em>ad hoc</em> absorbing-layer boundary conditions when simulating cases
Expand Down
2 changes: 1 addition & 1 deletion docs/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ <h1>Download and user agreement<a class="headerlink" href="#download-and-user-ag
</tr>
<tr class="row-odd"><td><p>TGLF</p></td>
<td><p>transport model</p></td>
<td><p><span id="id4">[<a class="reference internal" href="zreferences.html#id98" title="G. M. Staebler, J. E. Kinsey, and R. E. Waltz. A theory-based transport model with comprehensive physics. Phys. Plasmas, 14(5):055909, 2007. doi:10.1063/1.2436852.">SKW07</a>, <a class="reference internal" href="zreferences.html#id100" title="G.M. Staebler and J.E. Kinsey. Electron collisions in the trapped gyro-landau fluid transport model. Phys. Plasmas, 17:122309, 2010.">SK10</a>]</span></p></td>
<td><p><span id="id4">[<a class="reference internal" href="zreferences.html#id100" title="G. M. Staebler, J. E. Kinsey, and R. E. Waltz. A theory-based transport model with comprehensive physics. Phys. Plasmas, 14(5):055909, 2007. doi:10.1063/1.2436852.">SKW07</a>, <a class="reference internal" href="zreferences.html#id103" title="G.M. Staebler and J.E. Kinsey. Electron collisions in the trapped gyro-landau fluid transport model. Phys. Plasmas, 17:122309, 2010.">SK10</a>]</span></p></td>
</tr>
<tr class="row-even"><td><p>TGYRO</p></td>
<td><p>profile evolution</p></td>
Expand Down
67 changes: 56 additions & 11 deletions docs/geometry.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@
<p class="caption" role="heading"><span class="caption-text">Physics</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">FLUX-SURFACE GEOMETRY</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#coordinates">Coordinates</a></li>
<li class="toctree-l2"><a class="reference internal" href="#clebsch-coordinates">Clebsch coordinates</a></li>
<li class="toctree-l2"><a class="reference internal" href="#bounding-box-method">Bounding-box method</a></li>
<li class="toctree-l2"><a class="reference internal" href="#effective-field">Effective field</a></li>
<li class="toctree-l2"><a class="reference internal" href="#equilibria">Equilibria</a></li>
<li class="toctree-l2"><a class="reference internal" href="#table-of-geometry-parameters">Table of geometry parameters</a></li>
<li class="toctree-l2"><a class="reference internal" href="#magnetic-field-orientation">Magnetic field orientation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#toroidal-and-poloidal-flux">Toroidal and poloidal flux</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="rotation.html">PLASMA ROTATION THEORY</a></li>
Expand Down Expand Up @@ -107,23 +108,44 @@

<section id="flux-surface-geometry">
<h1>FLUX-SURFACE GEOMETRY<a class="headerlink" href="#flux-surface-geometry" title="Link to this heading"></a></h1>
<section id="coordinates">
<h2>Coordinates<a class="headerlink" href="#coordinates" title="Link to this heading"></a></h2>
<section id="clebsch-coordinates">
<h2>Clebsch coordinates<a class="headerlink" href="#clebsch-coordinates" title="Link to this heading"></a></h2>
<p>GYRO/CGYRO/NEO use a right-handed (positively-oriented), field-aligned coordinate system
<span class="math notranslate nohighlight">\((r,\theta,\alpha)\)</span> and the Clebsch field representation</p>
<span class="math notranslate nohighlight">\((r,\theta,\alpha)\)</span> and the Clebsch field representation <span id="id1">[<a class="reference internal" href="zreferences.html#id93" title="M.D. Kruskal and R.M. Kulsrud. Equilibrium of a magnetically confined plasma in a toroid. Phys. Fluids, 1:265, 1958.">KK58</a>]</span></p>
<div class="math notranslate nohighlight">
\[\mathbf{B} =\nabla \alpha \times \nabla \psi (r) \; ,\]</div>
\[\mathbf{B} = \nabla\alpha\times\nabla\psi \quad \text{such that} \quad\mathbf{B}\cdot\nabla\alpha = \mathbf{B}\cdot\nabla\psi = 0\]</div>
<p>where <span class="math notranslate nohighlight">\(\psi\)</span> is the poloidal flux divided by <span class="math notranslate nohighlight">\(2\pi\)</span> and</p>
<div class="math notranslate nohighlight">
\[\alpha =\varphi +\nu (r,\theta )\]</div>
\[\alpha =\varphi +\nu (r,\theta)\]</div>
<p>is the Clebsch angle. Here, <span class="math notranslate nohighlight">\(\varphi\)</span> is the <strong>toroidal angle</strong>, oriented as shown
in the figure below, and <span class="math notranslate nohighlight">\(\theta\)</span> is the <strong>poloidal angle</strong> which increases as one
moves counterclockwise along the flux-surface (shown in blue).</p>
<p>The coordinate systems <span class="math notranslate nohighlight">\((R,Z,\varphi)\)</span> and <span class="math notranslate nohighlight">\((r,\theta,\varphi)\)</span> are positively oriented.</p>
moves counterclockwise along the flux-surface (shown in blue). In these coordinates, the Jacobian is</p>
<div class="math notranslate nohighlight">
\[{\mathcal J}_\psi \doteq \frac{1}{\nabla\psi\times\nabla\theta\cdot\nabla\alpha} = \frac{1}{\nabla\psi\times\nabla\theta\cdot\nabla\varphi} \; .\]</div>
<p>Since the coordinates <span class="math notranslate nohighlight">\((\psi,\theta,\alpha)\)</span> and <span class="math notranslate nohighlight">\((\psi,\theta,\varphi)\)</span> form right-handed systems, the Jacobian <span class="math notranslate nohighlight">\({\mathcal J}_\psi\)</span> is positive-definite. In the latter coordinates, the magnetic field becomes</p>
<div class="math notranslate nohighlight">
\[\mathbf{B} = \nabla\varphi\times\nabla\psi + \frac{\partial \nu}{\partial \theta} \nabla\theta\times\nabla\psi\]</div>
<p>Using the definition of the safety factor, <span class="math notranslate nohighlight">\(q(\psi)\)</span>, we may deduce</p>
<div class="math notranslate nohighlight">
\[q(\psi) \doteq \frac{1}{2\pi} \int_0^{2\pi} \frac{\mathbf{B}\cdot\nabla\varphi}{\mathbf{B}\cdot\nabla\theta} \, d\theta = \frac{1}{2\pi} \int_0^{2\pi} \left( -\frac{\partial \nu}{\partial \theta} \right) \, d\theta = \frac{\nu(\psi,0)-\nu(\psi,2\pi)}{2\pi} \; .\]</div>
<div class="math notranslate nohighlight">
\[\]</div>
<p>For concreteness, we choose the following boundary conditions for <span class="math notranslate nohighlight">\(\nu\)</span>:</p>
<div class="math notranslate nohighlight">
\[\begin{split}\nu(\psi,2\pi) = &amp;~-2\pi \, q(\psi) \; , \\
\nu(\psi,0) = &amp;~0 \; .\end{split}\]</div>
<p>By writing <span class="math notranslate nohighlight">\(\mathbf{B}\)</span> in the standard form</p>
<div class="math notranslate nohighlight">
\[\mathbf{B} = \nabla\varphi\times\nabla\psi + I(\psi) \nabla\varphi \; ,\]</div>
<p>we can derive the following integral for <span class="math notranslate nohighlight">\(\nu\)</span>:</p>
<div class="math notranslate nohighlight">
\[\nu(\psi,\theta) = -I(\psi)\int_0^\theta {\mathcal J}_\psi \left|\nabla\varphi\right|^2 d\theta\; .\]</div>
<p>In the case of concentric (unshifted) circular flux surfaces, one will obtain the approximate result
<span class="math notranslate nohighlight">\(\nu(\psi,\theta) \sim -q(\psi)\theta\)</span>. Finally, we remark that the coordinate systems <span class="math notranslate nohighlight">\((R,Z,\varphi)\)</span> and <span class="math notranslate nohighlight">\((r,\theta,\varphi)\)</span> are positively oriented.</p>
</section>
<section id="bounding-box-method">
<h2>Bounding-box method<a class="headerlink" href="#bounding-box-method" title="Link to this heading"></a></h2>
<p>In the MXH parameterization <span id="id1">[<a class="reference internal" href="zreferences.html#id9" title="R. Arbon, J. Candy, and E.A. Belli. Rapidly-convergent flux-surface shape parameterization. Plasma Phys. Control. Fusion, 63:012001, 2020. doi:10.1088/1361-6587/abc63b.">ACB20</a>]</span>, we use the bounding-box method to define</p>
<p>In the MXH parameterization <span id="id2">[<a class="reference internal" href="zreferences.html#id9" title="R. Arbon, J. Candy, and E.A. Belli. Rapidly-convergent flux-surface shape parameterization. Plasma Phys. Control. Fusion, 63:012001, 2020. doi:10.1088/1361-6587/abc63b.">ACB20</a>]</span>, we use the bounding-box method to define</p>
<ul class="simple">
<li><p><strong>minor radius</strong> <span class="math notranslate nohighlight">\(r\)</span></p></li>
<li><p><strong>major radius</strong> <span class="math notranslate nohighlight">\(R_0\)</span></p></li>
Expand Down Expand Up @@ -161,7 +183,7 @@ <h2>Equilibria<a class="headerlink" href="#equilibria" title="Link to this headi
<li><p>NEO: <a class="reference internal" href="neo/neo_list.html#neo-equilibrium-model"><span class="std std-ref">EQUILIBRIUM_MODEL</span></a> = 0</p></li>
</ul>
<p><strong>(2) Shaped Grad-Shafranov equilibrium</strong></p>
<p>The flux surfaces, which are local G-S equilibria, have the new MXH3 parameterization <span id="id2">[<a class="reference internal" href="zreferences.html#id9" title="R. Arbon, J. Candy, and E.A. Belli. Rapidly-convergent flux-surface shape parameterization. Plasma Phys. Control. Fusion, 63:012001, 2020. doi:10.1088/1361-6587/abc63b.">ACB20</a>]</span>:</p>
<p>The flux surfaces, which are local G-S equilibria, have the new MXH3 parameterization <span id="id3">[<a class="reference internal" href="zreferences.html#id9" title="R. Arbon, J. Candy, and E.A. Belli. Rapidly-convergent flux-surface shape parameterization. Plasma Phys. Control. Fusion, 63:012001, 2020. doi:10.1088/1361-6587/abc63b.">ACB20</a>]</span>:</p>
<div class="math notranslate nohighlight">
\[\begin{split}R(r,\theta) &amp;= R_0(r) + r \cos \theta_R \\
Z(r,\theta) &amp;= Z_0(r) + \kappa(r) r \sin \theta\end{split}\]</div>
Expand Down Expand Up @@ -332,7 +354,7 @@ <h2>Table of geometry parameters<a class="headerlink" href="#table-of-geometry-p
</tr>
</tbody>
</table>
<p>For further information about geometry and normalization conventions, consult the GYRO Technical Guide <span id="id3">[<a class="reference internal" href="zreferences.html#id37" title="J. Candy and E. Belli. GYRO Technical Guide. General Atomics Technical Report, 2010.">CB10</a>]</span>.</p>
<p>For further information about geometry and normalization conventions, consult the GYRO Technical Guide <span id="id4">[<a class="reference internal" href="zreferences.html#id37" title="J. Candy and E. Belli. GYRO Technical Guide. General Atomics Technical Report, 2010.">CB10</a>]</span>.</p>
</section>
<section id="magnetic-field-orientation">
<h2>Magnetic field orientation<a class="headerlink" href="#magnetic-field-orientation" title="Link to this heading"></a></h2>
Expand Down Expand Up @@ -365,6 +387,29 @@ <h2>Magnetic field orientation<a class="headerlink" href="#magnetic-field-orient
<div><p>In other words, the safety factor and poloidal flux are negative in the typical case. This will be reflected in a properly-constructed <a class="reference internal" href="input_gacode.html"><span class="doc">input.gacode</span></a> file.</p>
</div></blockquote>
</section>
<section id="toroidal-and-poloidal-flux">
<h2>Toroidal and poloidal flux<a class="headerlink" href="#toroidal-and-poloidal-flux" title="Link to this heading"></a></h2>
<p>We can start from the general forms of the toroidal and poloidal fluxes <span id="id5">[<a class="reference internal" href="zreferences.html#id47" title="W.D. Dhaeseleer, W.N.G. Hitchon, J.D. Callen, and J.L. Shohet. Flux coordinates and magnetic field structure. Springer-Verlag, Berlin, 1991.">DHCS91</a>]</span></p>
<div class="math notranslate nohighlight">
\[\begin{split}\Psi_t \doteq &amp;~\iint\limits_{S_t} \mathbf{B} \cdot d{\bf S} = \frac{1}{2\pi} \iiint\limits_{V_t} \mathbf{B} \cdot \nabla\varphi \, dV \; , \\
\Psi_p \doteq &amp;~\iint\limits_{S_p} \mathbf{B} \cdot d{\bf S} = \frac{1}{2\pi} \iiint\limits_{V_p} \mathbf{B} \cdot \nabla\theta \, dV \; .\end{split}\]</div>
<p>Explicitly inserting the field-aligned coordinate system of the previous section, and differentiating these with respect to <span class="math notranslate nohighlight">\(\psi\)</span>, gives</p>
<div class="math notranslate nohighlight">
\[\begin{split}\frac{d\Psi_t}{d\psi} = &amp;~\frac{1}{2\pi} \int_0^{2\pi} d\varphi \int_0^{2\pi} d\theta \,\, \mathbf{B}\cdot\nabla\varphi \, {\mathcal J}_\psi \; , \\
= &amp;~\frac{1}{2\pi} \int_0^{2\pi} d\varphi \int_0^{2\pi} d\theta \,\, \frac{\mathbf{B}\cdot\nabla\varphi}{\mathbf{B}\cdot\nabla\theta} \; , \\
= &amp;~2 \pi \, q(\psi) \; ,\end{split}\]</div>
<div class="math notranslate nohighlight">
\[\begin{split}\frac{d\Psi_p}{d\psi} = &amp;~\frac{1}{2\pi} \int_0^{2\pi} d\varphi \int_0^{2\pi} d\theta
\,\, \mathbf{B}\cdot\nabla\theta \, {\mathcal J}_\psi \; , \\
= &amp;~\frac{1}{2\pi} \int_0^{2\pi} d\varphi \int_0^{2\pi} d\theta \; , \\
= &amp;~2 \pi \; .\end{split}\]</div>
<p>Thus, <span class="math notranslate nohighlight">\(\psi\)</span> is the poloidal flux divided by <span class="math notranslate nohighlight">\(2\pi\)</span>. For this reason, it is useful to also define the toroidal flux divided by <span class="math notranslate nohighlight">\(2\pi\)</span>:</p>
<div class="math notranslate nohighlight">
\[\chi_t \doteq \frac{1}{2\pi} \Psi_t\; .\]</div>
<p>According to these conventions,</p>
<div class="math notranslate nohighlight">
\[d\Psi_t = q \, d\Psi_p \quad \mbox{and} \quad d\chi_t = q \, d\psi \; .\]</div>
</section>
</section>


Expand Down
Loading

0 comments on commit 0ae529c

Please sign in to comment.