User Tools

Site Tools


start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
start [2014/04/17 11:21] – [Documentation] simonw7start [2022/07/21 06:59] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== CORSICA ======+====== WSI Wiki ======
  
 +Here you'll find all of the codes and tutorials for our regular [[http://woodruffscientific.com/shortcourse|Scientific Computing Bootcamp]].  Please register for the training [[http://www.woodruffscientitic.com/apply|here]], or take a look at some of our past modeling/simulation work [[http://www.woodruffscientific.com/physics|here]].
  
 +[[https://woodruffscientific.us10.list-manage.com/subscribe?u=f4b64a3a93dfc6088f685111d&id=92569d866b | Sign up to our newsletter]] to keep up to speed!
  
-Welcome to the CORSICA wiki. +Since 2005 we have designedbuilt and tested [[http://www.woodruffscientific.com/magnets|custom magnetic coils]], [[http://www.woodruffscientific.com/pulsedpower |pulsed power systems]] and [[http://www.woodruffscientific.com/physics|simulated plasmas]] for a variety of applications
-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 derive the transport equations solved by CORSICA. +
-We start with the low-frequency limit of Maxwell's equations: +
- +
-\begin{equation}\label{FaradaysLaw} +
-  \Grad\times\Evec  =  - \ddt{\Bvec}  +
-\end{equation} +
-\begin{equation}\label{AmperesLaw} +
-  \Grad\times\Bvec  =  \mu_0\,\Jvec    +
-\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},j} +
-\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.  In addition, note that the viscous terms +
-have been lumped into the source term. +
- +
-==Quasi-equilibrium== +
- +
-We are interested in modeling core transport in toroidal axisymmetric +
-plasmas.  By `core' we mean the part of the plasma characterized by +
-closed magnetic surfaces.  Given this situation it is convenient to +
-define a coordinate system consisting of $\psi$, a magnetic surface +
-label, $\theta$, a poloidal angle variable, and $\varphi$, a toroidal +
-angle variable.  Both $\theta$ and $\varphi$ vary between $0$ and +
-$2\pi$.  All physical quantities must be periodic in these angles to +
-ensure single-valuedness, and axisymmetry requires that all physical +
-scalars be independent of the $\varphi$.  The $(\psi, \theta, +
-\varphi)$ coordinates are described in more detail in +
-Sec.~\ref{ch:details}.\ref{sec:Coordinates}. +
- +
-The $\psi = \hbox{constant}$ surfaces are called magnetic flux +
-surfaces because the magnetic field lines lie in these surfaces. +
-As a resultwe can write: +
-\begin{equation}\label{eq:BGradPsi} +
-   B^\psi = \Bvec\cdot\Grad\psi = 0 +
-\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:details}.\ref{app:GradShafranov} that axisymmetry implies +
-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, and the fact that net force due to interspecies +
-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)$.  Next we see that the current must +
-also flow in these surfaces since +
-\begin{equation} +
-  \Jvec\cdot\Grad p = \Jvec\cdot\Grad\psi\: p'(\psi) = 0 +
-\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}, into Ampere's law. +
-The result is: +
-\begin{equation} +
-\label{eq:J} +
-\mu_0\, \Jvec  = \Grad\varphi\; \Delstarpsi -  +
-               \Grad\varphi\times\Grad\psi\; \ddpsi{F} +
-\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:GradShafranov} +
-  \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.  The twist here is that $p$ and $F$ +
-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; i.e. we can solve +
-Eq.~\ref{QuasiNeutral} for $n_e$ to give: +
-\begin{equation} +
-  n_e = \sum_k Z_k n_k +
-\end{equation} +
-Furthermore, since $J^\psi = 0$, the radial electron particle flux +
-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}:\tau_{ii}:\tau_{ei} \sim  +
-    1:\frac1{Z^3}\sqrt{\frac{m_i}{m_e}}\left(\frac{T_i}{T_e}\right)^{3/2}:+
-      \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:pui} +
-\end{equation} +
-and where the anomalous contributions to $q_i$ and $S_E$ have been +
-lumped in with the non-anomalous parts.  Note that Eq.~\ref{eq:pui} is +
-an implicit definition of $\uvec_i$.  This is consistent with +
-$\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. [[https://fusion.gat.com/THEORY/caltrans/]] +
- +
-The Basis language can be found here: [[https://wci.llnl.gov/codes/basis/]] +
- +
----- +
- +
-==== Documentation ==== +
- +
-CORSICA user manual {{::main.pdf|}} +
- +
-Tokamak deadstart {{::tokamak_ds.pdf|}} +
- +
-SSPX manual {{::sspx_guide.pdf|}} +
- +
-DIII-D manual  {{::d3d_demo.pdf|}} +
- +
-Basis manual {{:basismanual.pdf|}} +
- +
-CORSICA final report {{:finalreport.pdf|}} +
- +
-Fiducial generation manual {{:report_on_creating_iter_fiducial_states_44ddcn_v1_0.pdf|}} +
- +
-OneTwo user manual {{:onetwo.pdf|}} +
- +
-Device configuration management {{::managing_device_configurations_in_corsic_449t78_v1_0.pdf|}} +
- +
-PF coil design tutorial {{::tutorial.pdf|}} +
- +
-Code builds {{:code_builds_june4.pdf|}} +
- +
-Final report v2 {{:finalreport2.pdf|}} +
- +
-Data collection for Ufiles {{:dc.pdf|}} +
----- +
- +
-==== Bibliography ==== +
- +
  
 +[[http://woodruffscientific.com/wiki/doku.php?id=Afterschool|Afterschool]]
start.1397755264.txt.gz · Last modified: 2022/07/21 06:59 (external edit)