Giter Club home page Giter Club logo

autoc1's Introduction

autoC1

Scripts and templates for automatically running M3D-C1

autoC1 script

Call pattern

The fundamental python function is autoC1() which has the following call pattern

autoC1(task='all',machine='DIII-D')

task

Tasks proceed in the following order.
You can skip to a step by setting this keyword to the desired value.
Folder in which a given step occurs is given with parentheses.

  • 'all' [DEFAULT]
    • Starts from the beginning with 'setup'
  • 'setup'
    • Preprocess the g-, p-, and a-files into readable formats ('efit/')
    • Allows user to extend the profiles beyond the separatrix.
  • 'efit'
    • Perform an igs=0 run to get the EFIT equilibrium ('uni_efit/')
  • 'uni_equil'
    • Perform equilibrium calcalutions on a uniform mesh ('uni_equil/')
    • User can iterate on current.dat.out in this step to improvethe equilibrium match to the EFIT
    • Can launch IDL within this step to check the equilibrium match
  • 'adapt'
    • Adapt the mesh to the equilibrium ('rw1_adapt/')
  • 'calculation'
    • Perform linear calculations with adapted mesh

    • User will select from four options

      1. Calculate equilibrium ('rw1_equil/')
      2. Linear stability analysis ('n=<ntor>/eb1_1f_stab/')
             User selects desired toroidal mode number <ntor>
             Currently uses ExB rotation and single-fluid only
      3. Time-independent, linear response ('n=<ntor>/eb1_1f_<coil>/')
             User selects desired toroidal mode number <ntor>
             <coil> values are defined by the machine
             Currently uses ExB rotation and single-fluid only
      4. Open IDL to examine the results

machine

Name of device to be modeled, so appropriate templates can be found.
Machines currently supported:

  • 'DIII-D' [DEFAULT]
  • 'NSTX-U'

Download and setup

  1. Create a base directory to store the autoC1 scripts and templates.
  2. Set the AUTOC1_HOME environmental variable to this base directory.
  3. Make sure the M3DC1_ARCH enviornmental variable is set properly
    • On portalr6, M3DC1_ARCH = sunfire.r6
    • On saturn/iris, M3DC1_ARCH = saturn
  4. cd to $AUTOC1_HOME
  5. Download autoC1 from github
  6. Import the appropriate python module on your system. I use:
    • On portalr6, 'module load anaconda'
    • On saturn/iris, 'module load python'
  7. Add $AUTOC1_HOME/python/ to your PYTHONPATH environmental variable

Running autoC1

  1. Create a new working directory for the current runs
  2. Create a folder called 'efit/' within this working directory
  3. Populate 'efit/' with the g-, p-, and a- files for this shot & time (format should be like g*.*)
  4. From the base working directory, run 'python'
  5. Within python, import the autoC1 function from the autoC1 module.
    For example: from autoC1 import autoC1
  6. Run the autoC1 function (see above for keyword details)
  7. The script should walk you through it's steps in a self-explanatory way.
    It will ask for user input when required, as well as prompt you to check certain things about the runs along the way.

autoc1's People

Contributors

bclyons12 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.