start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
start [2014/04/17 11:20] – [Documentation] simonw7 | start [2022/07/21 06:59] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
+ | Here you'll find all of the codes and tutorials for our regular [[http:// | ||
+ | [[https:// | ||
- | Welcome to the CORSICA wiki. | + | Since 2005 we have designed, built and tested [[http://www.woodruffscientific.com/ |
- | This wiki will be populated with information about the CORSICA code suite. The purpose is to bring together CORSICA resources that cannot currently be found in a central location. | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | ==== What CORSICA is ==== | + | |
- | + | ||
- | The LLNL CORSICA code provides a comprehensive predictive capability for axisymmetric toroidal plasmas. It has been applied successfully to many tokamaks, to the SSPX spheromak, and to the reversed-field pinches MST and RFX. At the heart of CORSICA is a 1.5-D, time-dependent plasma simulation code which solves the Grad-Hogan problem: self-consistent evolution of free-boundary plasma equilibria and internal profiles, including external conductors and magnetic diffusion, with a variety of available transport models. | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | ==== Components of the code ==== | + | |
- | ==1-1/2 D Core Transport Equations== | + | |
- | + | ||
- | In this section | + | |
- | We start with the low-frequency limit of Maxwell' | + | |
- | + | ||
- | \begin{equation}\label{FaradaysLaw} | + | |
- | \Grad\times\Evec | + | |
- | \end{equation} | + | |
- | \begin{equation}\label{AmperesLaw} | + | |
- | \Grad\times\Bvec | + | |
- | \end{equation} | + | |
- | \begin{equation}\label{QuasiNeutral} | + | |
- | \sum_j q_j n_j = 0 \qquad (q_j = Z_j e) | + | |
- | \end{equation} | + | |
- | \begin{equation}\label{DivV} | + | |
- | \Grad\cdot\Bvec | + | |
- | \end{equation} | + | |
- | and the zeroth order moments of the Boltzman equation, including | + | |
- | fluctuations: | + | |
- | \begin{equation}\label{Continuity} | + | |
- | \ddt{n_j} + \Grad\cdot(n_j \uvec_j + \Gamvec_{Aj}) = S_{n,j} | + | |
- | \end{equation} | + | |
- | \begin{equation}\label{FullMomentum} | + | |
- | \ddt{}(m_j n_j \uvec_j) + | + | |
- | \Grad\cdot(m_j n_j \uvec_j \uvec_j + p\; \mathrm{I} + \Tens{\Pi}) | + | |
- | n_j q_j (\Evec + \uvec_j\times\Bvec) + \Fvec_j + \Vec{S}_{\text{momentum}, | + | |
- | \end{equation} | + | |
- | + | ||
- | \begin{equation}\label{Energy} | + | |
- | \frac32 \ddt{p_j} + \Grad\cdot(q_j + q_{A,j} + \frac52 p_j \uvec_j ) | + | |
- | = Q_j + \uvec_j \cdot (\Fvec_j + q_j n_j \Evec) + S_{E,j} + S_{EA,j} | + | |
- | \end{equation} | + | |
- | + | ||
- | + | ||
- | where the index $j$ refers to all ion species plus electrons, and the | + | |
- | quantities with subscript $A$ are anomalous transport terms resulting | + | |
- | from turbulent fluctuations. | + | |
- | have been lumped into the source term. | + | |
- | + | ||
- | ==Quasi-equilibrium== | + | |
- | + | ||
- | We are interested in modeling core transport in toroidal axisymmetric | + | |
- | plasmas. | + | |
- | closed magnetic surfaces. | + | |
- | define a coordinate system consisting of $\psi$, a magnetic surface | + | |
- | label, $\theta$, a poloidal angle variable, and $\varphi$, a toroidal | + | |
- | angle variable. | + | |
- | $2\pi$. | + | |
- | ensure single-valuedness, | + | |
- | scalars be independent of the $\varphi$. | + | |
- | \varphi)$ coordinates are described in more detail in | + | |
- | Sec.~\ref{ch:details}.\ref{sec: | + | |
- | + | ||
- | The $\psi = \hbox{constant}$ surfaces are called | + | |
- | surfaces because the magnetic field lines lie in these surfaces. | + | |
- | As a result, we can write: | + | |
- | \begin{equation}\label{eq: | + | |
- | | + | |
- | \end{equation} | + | |
- | + | ||
- | + | ||
- | Given that the magnetic field lines lie in the flux surfaces, along | + | |
- | with the axisymmetry assumption, one can express the magnetic field in | + | |
- | the general form: | + | |
- | \begin{equation}\label{BRep} | + | |
- | \Bvec = \Grad\varphi\times\Grad\psi + F\Grad\varphi | + | |
- | \end{equation} | + | |
- | where $F(\psi)$ is an arbitrary function (it is shown in | + | |
- | Sec.~\ref{ch: | + | |
- | that $F$ is independent of $\theta$). It is easy to show that this | + | |
- | expression for $\Bvec$ guarantees that $\Bvec$ is divergence-free. | + | |
- | + | ||
- | We proceed by calculating the total momentum balance, summing | + | |
- | Eq.~\ref{Momentum} over all species. This gives: | + | |
- | \begin{equation} | + | |
- | \Evec\sum_j q_j n_j + \Jvec\times\Bvec + \sum_j\Fvec_j = \Grad p | + | |
- | \end{equation} | + | |
- | Using quasi-neutrality, | + | |
- | friction must be zero, we have | + | |
- | \begin{equation}\label{MHDEqForceBalance} | + | |
- | \Jvec\times\Bvec = \Grad p | + | |
- | \end{equation} | + | |
- | This is the ideal \acro{MHD} equilibrium relation. Thus, as the plasma | + | |
- | evolves on the transport timescale it moves through a series of | + | |
- | quasi-static \acro{MHD} equilibrium. | + | |
- | + | ||
- | There are several implications of Eq.~\ref{MHDEqForceBalance}. First, | + | |
- | we see that the constant flux surfaces must also be constant pressure | + | |
- | surfaces since | + | |
- | \begin{equation} | + | |
- | \Bvec\cdot\Grad p = 0 | + | |
- | \end{equation} | + | |
- | This implies that $p = p(\psi)$. | + | |
- | also flow in these surfaces since | + | |
- | \begin{equation} | + | |
- | \Jvec\cdot\Grad p = \Jvec\cdot\Grad\psi\: | + | |
- | \end{equation} | + | |
- | which implies $J^\psi = 0$. | + | |
- | + | ||
- | We can calculate an expression for the current by substituting our | + | |
- | expression for the magnetic field, Eq.~\ref{BRep}, | + | |
- | The result is: | + | |
- | \begin{equation} | + | |
- | \label{eq: | + | |
- | \mu_0\, \Jvec = \Grad\varphi\; | + | |
- | | + | |
- | \end{equation} | + | |
- | where | + | |
- | \begin{equation} | + | |
- | \Delstarpsi \equiv R^2 \Grad\cdot\frac1{R^2}\Grad\psi | + | |
- | \end{equation} | + | |
- | + | ||
- | Finally, substituting this result into Eq.~\ref{MHDEqForceBalance} | + | |
- | leads to the Grad-Shafranov equation for the magnetic flux function | + | |
- | $\psi(\Rvec)$: | + | |
- | + | ||
- | \begin{equation} | + | |
- | \label{eq: | + | |
- | \Delstarpsi = - \mu_0 R^2 \ddpsi{p} - F\ddpsi{F} | + | |
- | \end{equation} | + | |
- | + | ||
- | This is a quasilinear partial differential equation for $\psi$. Many | + | |
- | computer codes have been written to solve this problem, with a variety | + | |
- | of functional forms for $p(\psi)$ and $F(\psi)$, and with various | + | |
- | types of boundary conditions. | + | |
- | depend parametrically on time, being evolved consistent with the | + | |
- | flux-surface averaged transport equations that will be derived below. | + | |
- | + | ||
- | ==Scalar Transport Equations== | + | |
- | + | ||
- | Next we derive a set of transport equations for the ion density, the | + | |
- | electron and ion energy, and the magnetic flux. | + | |
- | + | ||
- | Ion Density | + | |
- | + | ||
- | The full evolution of the ion density is given by Eq.~\ref{Continuity}. | + | |
- | + | ||
- | Electron Density | + | |
- | + | ||
- | The electron density is found from quasi-neutrality; | + | |
- | Eq.~\ref{QuasiNeutral} for $n_e$ to give: | + | |
- | \begin{equation} | + | |
- | n_e = \sum_k Z_k n_k | + | |
- | \end{equation} | + | |
- | Furthermore, | + | |
- | must equal the weighted radial ion particle flux: | + | |
- | \begin{equation} | + | |
- | \Gamma_e\cdot\Grad\psi = | + | |
- | \sum_k Z_k (n_k \uvec_k + \Gamma_{\text{A}k})\cdot\Grad\psi | + | |
- | \end{equation} | + | |
- | + | ||
- | ==Energy== | + | |
- | + | ||
- | The disparity between the electron and ion masses makes the | + | |
- | equilibration time between electrons and ions much longer than the | + | |
- | equilibration time amongst ion species: | + | |
- | \begin{equation} | + | |
- | \tau_{ee}: | + | |
- | 1: | + | |
- | \frac1{2Z}\frac{m_i}{m_e} | + | |
- | \end{equation} | + | |
- | + | ||
- | Given this disparity, we are justified in assuming that all ion species are characterized by the same temperature $T_i$ and the electrons have a different temperature $T_e$. | + | |
- | + | ||
- | The electron-ion equilibration time $\tau_{ei}$ is still short for most | + | |
- | fusion plasmas. However, preferential heating of one species can | + | |
- | result in a large difference between $T_e$ and $T_i$. | + | |
- | + | ||
- | We now write Eq.~\ref{Energy} for the electrons and ions, with the ion | + | |
- | equation obtained by summing the equations for the individual ion species: | + | |
- | \begin{equation} | + | |
- | \frac32 \ddt{p_e} + \Grad\cdot(q_e + \frac52 p_e \uvec_e ) | + | |
- | = Q_e + \uvec_e \cdot (\Fvec_e - e n_e \Evec) + S_{E,e} | + | |
- | \end{equation} | + | |
- | and | + | |
- | \begin{equation} | + | |
- | \frac32 \ddt{p_i} + \Grad\cdot(q_i + \frac52 p_i \uvec_i ) | + | |
- | = S_{E,i} + \sum_k Q_k + \uvec_k \cdot (\Fvec_k + q_k n_k \Evec) | + | |
- | \end{equation} | + | |
- | where | + | |
- | + | ||
- | \begin{equation} | + | |
- | x_i = \sum_k x_k, \quad x = p, q, S_{E} \\ | + | |
- | p_i \uvec_i = \sum_k p_k \uvec_k \label{eq: | + | |
- | \end{equation} | + | |
- | and where the anomalous contributions to $q_i$ and $S_E$ have been | + | |
- | lumped in with the non-anomalous parts. | + | |
- | an implicit definition of $\uvec_i$. | + | |
- | $\uvec_i$ being the total ion particle flux since all ion species | + | |
- | share the same temperature. | + | |
- | + | ||
- | Conservation of energy and momentum by collisional processes leads to | + | |
- | the following relationship between the collisional heating source and | + | |
- | the collisional friction term: | + | |
- | \begin{equation} | + | |
- | \sum_j Q_j + \uvec_j \cdot \Fvec_j = 0 | + | |
- | \end{equation} | + | |
- | + | ||
- | + | ||
- | ---- | + | |
- | + | ||
- | + | ||
- | ==== Online CORSICA Resources ==== | + | |
- | + | ||
- | + | ||
- | Currently, the CORSICA code is described online. | + | |
- | + | ||
- | The Basis language can be found here: [[https://wci.llnl.gov/ | + | |
- | + | ||
- | ---- | + | |
- | + | ||
- | ==== Documentation ==== | + | |
- | + | ||
- | CORSICA user manual {{::main.pdf|}} | + | |
- | + | ||
- | Tokamak deadstart {{:: | + | |
- | + | ||
- | SSPX manual {{:: | + | |
- | + | ||
- | DIII-D manual | + | |
- | + | ||
- | Basis manual {{: | + | |
- | + | ||
- | CORSICA final report {{: | + | |
- | + | ||
- | Fiducial generation manual {{: | + | |
- | + | ||
- | OneTwo user manual {{: | + | |
- | + | ||
- | Device configuration management {{:: | + | |
- | + | ||
- | PF coil design tutorial {{:: | + | |
- | + | ||
- | Code builds {{: | + | |
- | + | ||
- | Final report v2 {{: | + | |
- | + | ||
- | DC {{: | + | |
- | ---- | + | |
- | + | ||
- | ==== Bibliography ==== | + | |
- | + | ||
+ | [[http:// |
start.1397755236.txt.gz · Last modified: 2022/07/21 06:59 (external edit)