Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

Some More Quick Advice on The Computer Project by redheadwaitress


									Some More Quick Advice on
  The Computer Project
          Chris Clark
                General Advice
•Consider the provided files a starting point
   •You will need to write a fair bit of your own
                 Specific Advice
•If using Matlab outside of COE need to authorize the
tethered software at:
•Remove diagnostic plots from field_line_follow();
•Modify field_line_follow to take an arbitrary integration
•Modify field_line_follow to also integrate the total length
•Modify field_line_follow to also integrate 1/B dl
•Create a second version of field_derivates /
field_line_follow to have error field and islands
           Some Pseudo-Code
          (Flux Surface Ploting)
for each starting R         %Arbitrary points across r
      Z=Phi = 0             %Arbitrarily start at midplane
      for (# of transits to map)
             follow field line (2 pi)   %Can do 2 pi / 7
             plot R,Z
      end for;
end for
  Algorithm for Finding the Axis
Pick an R,Z that looks near the axis, but that are definitely
outboard of it
While(haven’t found axis) %Arbitrary points across r
              follow field line (largish # of rotations)
              if (all points very close to starting point)
                     found axis
                     move next starting point inboard
           Algorithm for iota Profile
For (Each Flux Surface)
           # Poloidal Transits = 0;
           For (100s of transits)
                      for (#subtransits >> 1/iota)
                                 follow field line (subtransit length)
                                 If (crossed midplane)
                      end for;
           End for;
End for;
Iota = PoloidalTransits / ToroidalTransits;
            Algorithm for Mod B
1) Follow a field line a couple of times around the machine
2) For each point in the trajectory, calculate the strength of
B using the biot-savart code
                   Toroidal Flux
1) Find the flux surface with many points
2) Make a grid of points that covers the entire flux surface
   and then some
   1) Matlab has min and max functions to help do this
3) Test each grid cell for being in or out of the flux surface
   1) Inpolygon() is one way to do this
4) Assume that the grid is small enough such that it has
   one value of B
         Integrating 1/B dl
• You know how to integrate with respect
  to phi
• Transform problem to be in those terms
                 Adding Islands
•Error field strength should be about 5 Gauss (.0005)
• Need to calculate poloidal angle
   •Axis is almost circular
•Can add the error field in field_derivates, or in biot-savart

To top