1. 12 Jul, 2012 1 commit
    • Steve Russell's avatar
      Fixed two bugs in the 1D field classes, FM1DDynamic, FM1DDynamic_fast, · 058f85d9
      Steve Russell authored
      FM1DElectroStatic, FM1DElectroStatic_fast, FM1DMagnetoStatic and FM1DMagnetoStatic_fast.
      
      The first bug had to do with field normalization. Although the 1D field profile
      derivatives were normalized properly, the actual field was not. Instead of
      looping through all of the field values, the loop was over the Fourier 
      accuracy parameter. This typically had the effect that the on axis field was not
      normalized at all. For input fields that were already normalized to 1, this
      had no effect. However, if the input field was not then the field expansion
      was incorrect.
      
      The second had to do with the Fourier expansion used to calculate the 
      derivatives of the on axis field. The code reflects the input
      field in order to ensure that it is periodic. For best accuracy, this 
      reflection should be about the first point of the input data (z = 0). However,
      what was actually implemented was a reflection about -delta / 2, where delta
      is the 1D grid spacing. This caused an error that was small, and became
      smaller with decreasing delta, but significant. Using the new implementation,
      the reconstruction of the field file for the Envelope-Tracker-Phase-1
      (FINSS-RGUN.dat) is about two orders of magnitude more accurate than when
      using the old Fourier expansion implementation. Even though this error was
      small, there was a noticeable difference in the beam envelope when running
      the Envelope-Tracker-Phase-1 and ExternalFieldTest regression tests. The
      reference files for both of the tests were updated using the new field
      classes.
      
      A quick glance shows that the Fourier expansion bug may also be present in the
      1D Astra field classes, but I need to look more carefully to be sure.
      
      Finally, all six classes were cleaned up to conform to the new coding style.
      058f85d9
  2. 28 Jun, 2012 1 commit
  3. 27 Jun, 2012 1 commit
  4. 26 Jun, 2012 1 commit
  5. 21 Jun, 2012 1 commit
  6. 20 Jun, 2012 2 commits
  7. 19 Jun, 2012 1 commit
    • Matthias Toggweiler's avatar
      optimization for AMTS: join two neighboring calls to push(0.5 * h). For... · 17576d0b
      Matthias Toggweiler authored
      optimization for AMTS: join two neighboring calls to push(0.5 * h). For reduced space charge solve frequency, this reduces push timer to almost 50%. This optimization is not applicable for the default algorithm, as the half pushes there are interleaved with step dumping to stdout (even if there is no stat/ps dump). This optimization could be carried over to MTS method in Cyclotron.
      17576d0b
  8. 17 Jun, 2012 1 commit
  9. 16 Jun, 2012 3 commits
    • Matthias Toggweiler's avatar
      make AMTS work with FSTYPE = NONE · d24634a2
      Matthias Toggweiler authored
      d24634a2
    • Matthias Toggweiler's avatar
      AMTS should now support multi-node and multi-bin simulation. Here is a quick usage guide: · f97692f6
      Matthias Toggweiler authored
      To use AMTS integrator in OPAL-T, add the attribute-value pair TIMEINTEGRATOR="AMTS" to the
      TRACK element. Another attribute DTSCINIT on the same element controls the initial time step (in
      seconds) used for space charge. The multiple time stepping scheme uses an outer time step for space
      charge integration, and inner time steps for basic integration. The inner steps are roughly constant
      and equal to the value specified with the DT attribute. The outer step can change freely if space
      charge forces change their magnitude. Example of a TRACK command where a reduced space charge solve
      frequency is used:
      
          track,line=IW2Line, beam=beam1, MAXSTEPS=56000, DTSCINIT=5.0e-10, DT=1.0e-11, ZSTOP=100.0, TIMEINTEGRATOR="AMTS";
      
      AMTS does not (and will probably never) support emission simulation. In such a case, use a short
      track with the default integrator (MAXSTEPS set such that emission is just finished) and use AMTS in
      the follow-up track.
      
      AMTS does not yet support boundary geometry, wake fields, surface physics. This should be possible
      to add without problems, and the only reason it is not supported yet is that it made the initial
      implementation shorter.
      
      As the (outer) time step size is no more constant, some question arises how this is handled. AMTS
      makes a statistics (.stat) and phase space (.h5) dump at the same times when the default integrator
      would have done it. Therefore, AMTS dumps at multiple of times DT * STATDUMPFREQ and DT * PSDUMPFREQ.
      To reach these times exactly, the variable step size is shortened if necessary. Be careful to not
      set the *DUMPFREQ-numbers too low, as this limits the freedom of AMTS' step size choice. AMTS stops
      exactly at time DT * MAXSTEPS, or after ZSTOP has been crossed. Repartitioning happens if the last
      repartitioning is at least DT * REPARTFREQ in the past (here no extra stop is made to
      reach the old repartitioning times exactly).
      
      As said earlier, AMTS can save time in many simulations where a reduced space charge solve frequency
      is still enough precise. For gun simulations, an initial high space charge solve frequency can be
      used, as it is lowered automatically when space charge forces decrease in magnitude.
      
      Later, we can put AMTS into user guide.
      f97692f6
    • Jianjun Yang's avatar
      0f4afc8c
  10. 15 Jun, 2012 2 commits
  11. 13 Jun, 2012 2 commits
    • Matthias Toggweiler's avatar
      AMTS integrator for OPAL-T: · 61c84bfe
      Matthias Toggweiler authored
          - The adaptive multiple time stepping integrator introduces separate time steps for space
            charge and "basic" external field integration.
          - Two kind of simulations will profit from it:
                1) Space charge dominated scenarios, where the space charge forces vary greatly, e.g.
                   gun simulations ("A aspect")
                2) Scenarios where space charge is not dominant, but has a visible effect. Lowering
                   of solver frequency can save considerable amaount of time while staying close to
                   solution with full solve frequency ("MTS aspect")
          - First basic version, not yet tested well
          - Currently works only for single node and single bin
          - Details how to use it will follow
      61c84bfe
    • adelmann's avatar
      Fix Probe issue reported by Chris Rodgers · e902ea14
      adelmann authored
      e902ea14
  12. 07 Jun, 2012 1 commit
  13. 04 Jun, 2012 2 commits
  14. 15 May, 2012 1 commit
  15. 07 May, 2012 1 commit
  16. 04 May, 2012 2 commits
  17. 03 May, 2012 5 commits
  18. 02 May, 2012 5 commits
  19. 30 Apr, 2012 4 commits
  20. 29 Apr, 2012 1 commit
  21. 28 Apr, 2012 1 commit
  22. 27 Apr, 2012 1 commit