[Back]
New Arrival display

【SAD BBS 移行・ホームページリニューアルのお知らせ】 Name:中村 恵美子 Date:2020/07/06(Mon) 14:06:13 No.2025

スパム対策およびSADホームページリニューアルに伴い、BBSを下記プログラムに移行致しました。
(生出先生 確認済)

★acc-physics.kek.jp/SAD/wforum/sad-sad/
(★=http://)

本日よりこちらのBBSへの記事投稿は出来なくなりましたのでご注意くださいませ。
これまでの投稿ログは残し、閲覧可能な状態に致します。

こちらのBBSを直接ブックマークされている場合、お手数ですが新URLへの登録変更をどうぞ宜しくお願い致します。

SAD Update V1.1.8.2k64 Name:K. Oide Date:2020/06/04(Thu) 08:06:00 No.1616

Fixed:
1. Prevent to insert an unnecessary '.' in some cases in TYPE. The reason why it was written so is unknown.

Added:
1. A new option BelowFrame for Rectangle and Polygon in plots. If it is True, the components are drawn below the frame components such as Ticks and GridLines. The default is True for ListDensityPlot and ListContourPlot.

2. A new option LegendBG for graphics to specify the BG color of the legend box. The default is Null, which does not fill color in the box.

Changes:
1. The descrition of OneTurnExcitation of Emittance[].

SAD Update V1.1.8.1k64 Name:K. Oide Date:2020/05/09(Sat) 13:06:50 No.1316

Fixed:
- PointSymbols - "6O" through "9O" have been strange.
- Followup of checking NaN was not properly done in qcell; distinguish between unstable was not made to lead to optics with NaN.
- QUAD within SOL caused seg fault at calculation of geometry.

Added:
- A few new PointSymbols for Canvas following Morita’s: "BX"(square), "RH"(diamond), "PL"(plus), “TI”(times).
- New flags KEEPEXP and CALEXP. If KEEPEXP (default), once EXP or NOEXP is specified at CALC or GO, the following CALC or GO keeps whether it does EXP or NOEXP, unless specified. CALEXP represent the current status for EXP or NOEXP. If NOKEEPEXP, EXP or NOEXP is handled each time whether EXP(default) NOEXP is specified, which is the behavior of the versions before 1.1.8.1k64.
- '@*' for fit-value commands to change the sign according to the orientation of the MARK element, for orientation-odd functions such as AX, EPX, etc.
- A new keyword 'UPDATE' for LINE to show the update status for tracking parameters (0=not yet, 1=done).
- The function Element becomes usable with +=, -=. *= and /= .

Changes:
- Merged tbal.f, thess.f, tqr.f into teigen.f as members of module eigen.
- Kinematical method for fringe radiation of SOL.
- The internal order of FFS flags are changed. It should not affect anything except the output of STAT.
- Variables EMITX, EMITY, EMITZ, SIGZ, SIGE are restored by BYE.
- The MARK element stores EMITZ and SIGE.
- Internal variables em{x,y,z} in emit.f are renamed to avoid confusion with the same names in ffs.
- The argument dp00 of tfdisp is replaced with dgam.
- Introduced hypot3 as hypot with 3 args.
- Legend symbol in the case of Bar or "BX" is replaced by “BX”.
- Adjusted the area of symbols of PointSymbol.
- Converted some tmultrs to matmul.
- Changed subroutines tinv6, tsymp, tmultr45, tfetwiss, and etwiss2ri to functions.
- Reorganized variables related nve in tffs.
- Use a new type nelv for variables of length nele in tffs.
- Removed some unneeded internal variable is tsoqu.
- DGMX/Y/Z are added to OpticsPlot.
- removed unnecessary update of tracking parameters in TrackParticles. Changing parameters by element-value-command is made reset the update flag.
- The lower bounds of OpticsPlot of betas, gammas, and sizes are set to zero as the default.
- The parameter cmp%update is consistently set .true. if cmp%nparam .le. 0.
- Redefinition of type sad_el, sad_comp.
- Some variable are renamed in ffsv, etc.
- STAT command to include NPARA. Unites for some parameters.
- Removed some commented write statements.

SAD beam-pipe aperture for SuperKEKB Name:Andrii Natochii Date:2020/03/19(Thu) 14:42:39 No.1134

Dear all,
May I ask you about particle tracking for the beam background study at the SuperKEKB:
We define beam-pipe aperture for each ring (LER/HER) as the following:

==============================================================================================
==============================================================================================
(* Set aperture *)
(* global aperture setting *)
Scan[(LINE["AX",#]=0.045;LINE["AY",#]=0.045;LINE["DX",#]=Twiss["DX",#];LINE["DY",#]=Twiss["DY",#];)&,LINE["NAME","AP.*"]];
(* ZVQLC3RP: 26.23m upstream, ZVQLC3LP: 27.50m downstram from IP *)
Scan[(LINE["AX",#]=0.040;LINE["AY",#]=0.040;LINE["DX",#]=Twiss["DX",#];LINE["DY",#]=Twiss["DY",#];)&,
Select[LINE["NAME","AP.*"],(LINE["POSITION","ZVQLC3RP"]<LINE["POSITION",#]<LINE["POSITION","ZVQLC3LP"])&]];
==============================================================================================
==============================================================================================

Here we use twiss parameters DX/DY for the center of the aperture ellipse. Do you know why?
As I understand, it must be 0. Because we need to apply aperture with respect to the design orbit which seats at DX=0 DY=0. Isn’t it? As far as I know Twiss[“DX”] returns an offset between design and closed orbits.
Thanks in advance.

Best regards,
Andrii

SAD Update: V1.1.8k64 Matching Twiss-gamma functions, etc. Name:K. Oide Date:2020/03/16(Mon) 01:58:07 No.1127

Fixed:
1. The treatment of an internal variable bsi in tsolqu was wrong. It only affects the spin tracking anyway.

2. Unnecessary circular dependence of tfloor.f on tffs.f.

Added:
1. New optical functions GMX, GMY, GMZ to represent the gamma functions (1+alpha^2)/beta for matching, OpticsPlot and DRAW. They can be displayed by DISP GA and DISP Z. GMX and GMY are useful to estimate the natural chromaticities of a beam line.

Changes:
1. The usage of an internal function akang has been changed.

2. Some internal parameters p_.._QUAD and p_,,_MULT are changed.

3. Removed an unused arg poldiv of tmulbs.

4. SADHelp on SKn.

5. Rearrange some trigonometric/hyperbolic functions in tracking for efficiency. Also more use of hypot, p2h, etc.

6. Removed some computed GOTOs.

7. The number of iterations in teigen is increased to avoid inconvergence in some cases. Also merged tbal.f, thess.f, tqr.f into teigen.f as members of module eigen.
8. Inserting some sleeps in make, to avoid i/o error in the case of lxplus with eos.

SAD Update V1.1.7.3k64 Name:K. Oide Date:2020/02/22(Sat) 17:28:42 No.1100

Fixed:
1. Added a check of the third argument of Partition to be positive.

2. Removed a rare possibility of seg fault by an unassociated poointer in tchge.

3. A recent mistake in tqfrie.f to have dropped trans1(6,6)=0.d0 .

4. The handring of F1, F2 has been wrong since 1.1.6.18.2k64 dated on Dec. 28, 2019, when the sign of K1 is fixed to positive.

5. Some possibility of production of NaN was patched in bbstrhl.f .

6. Corrected a mistake in an internal constant cave in tspin, by the previous change.

7. ElectronRadius and ProtonRadius are adjusted to the new definition.

8. Removed a pssibility to cause seg fault in itfmessage with a character string with syntax errors, such as wrong file input.

9. A bug was found in LINE["GEO"], returning meaningless data.

Changes:
1. Suppress generation of NaN in tqchge in an extreme case.

2. ExtendedTwissParameters of Emittance[] for partial ring is taken care.

3. Removed several unused variables in .f .

4. tradkf1n is created to avoid subroutine call in radiation in tracking.

5. Avoid initialzation of bsi unless calpol.

6. If SLICE in BEAMBEAM is non-positive, it is disabled. This is useful to turn off the calculation.

7. Check the fourth arg of TrackParticles within the range of the lattice length.

Added:
1. Emittance[] now takes an option Region->{begin, end} to do the caluculation for a part of the ring. The default is {1,-1}. If Region is not the entire ring, parameters such as Emittances and DampingRate, etc., are not calculated,
and return NaNs.

2. More descriptions in SADHelp, esp. for beam dynamics and transformations.

V1.1.6.18.2k64 Name:K. Oide Date:2019/12/31(Tue) 09:42:28 No.1081

Fixed:
1. The kinematical correction in CALC and EMIT for QUAD and MULT has been ignored since V1.1.6.3k64 on Feb. 13, 2019. The optics, transfermatrix, etc. had small deviation for non-zero orbit. Tracking was not affected.

2. Made behavior for negative L more consistent. Now tsolqu and tsolque are no longer called with ak*al <0.

3. Added spin rotation in tosolrote for ROTATE, CHI1, CH2. Modified TENT, tsolrot, tsolrote, etc., for better consistency in CHI1, CHI2, ROTATE.


Changes:
1. Changes in tradk to simplify arguments.

2. A variable SolenoidShape becomes obsolete.

3. Avoid unnecessarily too many slicing of MULT in CALC.

SAD Update. V.1.1.6.17k64 Name:K. Oide Date:2019/12/14(Sat) 11:38:30 No.1074

Fixes:
1. A bug was found in BEND with nonzero K1 when momentum changes, in tracking, emit, and CALC. This bug was generated in V1.1.6.16.3k64, on Nov. 19, 2019.

2. A bug in Insert has been found by Haoyu Shi. Insert[a, b, n] failed when n == Length[a].

3. Tracking in BENDs with F1,FB2,FB2 for nonzero K1 or ANGLE=0.

Changes:
1. Minor changes in tkrad & tkradf1: declarations of intent.

2. Changed the handling of carriage return to be more compatible with the DOS format.

3. gs now sets LD_LIBRARY_PATH to avoid confusion of libraries such as TclTk.

4. Avoid circular dependences.

SAD Update. V1.1.6.16k64 Name:K. Oide Date:2019/11/08(Fri) 03:10:22 No.1056

(Newer items come upper)

Fixed:
1. A (silly) bug in a macro inc/TEXIT.inc, which is supposed to do anti-rotation at the end of some elements. However by this bug, introduced on March 6 this year, if the x is larger than 45 deg, it does rotate the particles again, not anti-rotate.

Affected elements are:

BEND (ANGLE=0, K0<>0, |ROTATE|> 45 deg)
QUAD, TCAV (|ROTATE|> 45 deg)

2. Corrected emittance calculation with F1/FB1/FB2, which is left uncared with the introduction of the kinematical method for SR.

3. CorrectOrbit did not correct: mostly due to CALC instead of CALC NOEXP, as well as change of position of orbit in CalculateOptics from #15 instead #16.

4. GetMAIN did not return to the original stream.

5. A bug in LinearSolveConstrained since migrated to k64.

6. Prevent seg fault when a file cannot be opened by READ.

7. Refurbished RADINT, which was built in 1991 and has been neglected for a long time. Although it does not handle many elements such as MULT and SOL, it may be useful for a simple lattice.

8. Input redirection (READ, in, GetMAIN) has not been working properly. Some fixes have been made, but not perfect yet.

9. Assume clang for the default c-compiler of macos, since gcc9 does not work well in my case of Catalina. Then an option fo CC -mpreferred-stack-boundary=4 is removed, which clang does not accept.

10. Scale of photon energy from PhotonList was corrected to be prop to the local design momentum.

11. Passing length of character*(*).

12. tfevalc has not been working due to a strangeness in passing string length of charater*(*) variable from c.

13. An issue in MAIN to read C_CARRIAGE_RETURN.

Changes:
1. A better solution for emit with F1 of a bend. According changes for tracking will follow soon.

2. Reduced unnecessary things in input file redirections. Still incomplete yet.

3. removed implicit real from INTGRL.f .

4. The horizontal misalignment of BEND and MULT with ANGLE is treated in a physically reasonable way. Until now, it has been treated by adding/subtracting DX from the orbit at the entrance and exit. This does not represent the misalignment very well, esp. for the path length.

5. Now CAVI is allowed to place within SOL.

6. Now BEAMBEAM can generate PhotonList due to beamstrahlung (coded by Ohmi-san).

7. Removeal of some of unused variables in *.f .

8. Elimnated 'l' dummy arg for the component number from many tracking routines. A new variable l_track in tmacro module is used instead.

V1.1.6.11.4k64 Name:K. Oide Date:2019/10/06(Sun) 10:40:34 No.1032

Fixes:
1. An issue in MAIN to read C_CARRIAGE_RETURN.

2. Passing the length of character*(*) by value, from some routines in c.

Changes:
1. Removeal of some of unused variables in *.f .

2. Now BEAMBEAM can generate PhotonList due to beamstrahlung (coded by Ohmi-san, on-going).

V1.1.6.11k64 PhotonList with PHOTONS Name:K. Oide Date:2019/09/28(Sat) 10:15:09 No.1026

Fixed:
1. PhotonList with PHOTONS, which has not been working since the kinematic evaluation of radiation wasintroduces, now comes back. It requires all PHOTONS, RAD, FLUC flags.

V1.1.6.10k64 Name:K. Oide Date:2019/09/22(Sun) 06:50:07 No.1021

Fixed:
1. Reading a blank line from a file and terminal has been incorrect.
2. If an input line ends with '\\', it continues to the next line, even in the middle of a number or symbol.

Changes:
1. The routine tfreadbuf was divided into individual routines. Simplified tfreadstringf. tfsystemcommand does not look like reasonable: why does it accumulate ntable?

Re: V1.1.6.9.2k64 Name:K. Oide Date:2019/09/02(Mon) 16:10:33 No.1007

Fixed:

1. Some lines ending with " " in HelpMessages caused an issue after the new strict input handling.

2. Probably due to the compiler optimization since gcc9, some alternative keywords of elements have been ignored, such as BETAX of BEAMBEAM, etc.

Changes:

1. Try to set the buffer pointer right after the point to be evaluated for the input stream.

2. Updated SADHelp.

V1.1.6.9k64 Name:K. Oide Date:2019/08/30(Fri) 23:14:39 No.1006

Fixes:

1. Bessel functions have been wrong as it returns f[x,x] instead of f[n,x]. I am not sure when it happened.

2. Physical constants based of CODATA 2018. New constants PlanckConstant and PlanckHbar are added.

3. BoltzmannConstant's spell.

4. The interface to bbbrem (BBBRem1) now returns tje momentum after radiation.

5. HistoPlot has dropped some samples near the maximum.

6. Tkinter wrongly Clears a protected symbol 'In'.


Added:
1. Now FFS has a "Reference optics". It is automatically set by the first CALC or GO after USE or VISIT, and can be updated by a new command REFERENCE(REF).

- The reference optics can be printed by DISP REF (mode).
- Twiss function returns the reference optics with "R"//(Twiss function), eg. Twiss["RBX", p];
- The diffrence between the currnt optics and the reference optics are printed by DISP DREF (mode). Relative changes are shown for beta functions.
- Twiss["D"//(Twiss function",..] returns the difference between the current optics and the reference. Relative changes are returned for beta functions
- OpticsPlot and the DRAW command handle "R" and "D" functions as above, eg. DRAW DBX & DBY;

2. A new option TitleFontSize is added to control the font size of PlotTitle.

3. Another example of designing a storage ring, "example_booster.sad".


Changes:

1. The DISPLAY(DISP) command now halts at every 66 output lines to ask

(c_ontinue, q_uit, a_ll)?

to avoid unwanted too large output, in the input/output is terminal. If the kwyeword ALL is attached, the dialog is skipped. For instance

DISP ALL e1 e2

prints out from e1 to e2 without intervention.

2. Now the DISPLAY(DISP) accepts a location number for the range. For instance

DISP 100 110

prints out from 100th to 110th components. A nevative number n means $$$+n+1.

3. In DISPLAY(DISP):

DISP e1 e2

If e1 is a component after e2, it prints out starting from e1 through $$$, then continues printing from ^^^ through e2.

4. Internal algorithms for file reading was further updated to avoid intermetiate buffering. The handling of comment (!), tab, and \\\n become more consistent. These changes affect Read, Get, FFS, StringToStream, and other file input functions.

5. The formal maximum vaules of beam line length, etc., are set small to avoid a unnecessary large size of the object files. It is a little bit strange why gfortran generates a large object with a dummy size of a pointer which is not allocated at the start.

6. PolynomialFit has become somewhat more robust against the range and scale of the independent variable.

7. Comply with gcc/gfortran 9.

8. SetElement now allows {} for the third arg (keyword->value list).

V1.1.6.7.1k64 SUS flag, etc. Name:K. Oide Date:2019/07/24(Wed) 15:43:20 No.988

Added:

1. A new flag SUS has been introduced. When ON (default), END and SUSPEND(SUSP) commands are effective. It may be convenient to disable all SUSPs in the input at once.

Changes:

1. bin/HostArch is modified to accept machine name to separate modules which depends on each machine under the same OS.

V1.1.6.7k64 BBBrem, etc. Name:K. Oide Date:2019/07/23(Tue) 11:12:54 No.987

1. BBBrem (https://doi.org/10.1016/0010-4655(94)90085-X
c R. Kleiss and H. Burkhardt, Comput.Phys.Commun. 81 (1994) 372-380 DOI 10.1016/0010-4655(94)90085-X) has been installed in SAD as a function BBBrem1[sqrts, de], where sqrts is Sqrt[s] in eV, de is the lower limit of dE/E to calculate the cross section. It returns{p4,sig}, where p4 is a four momentum vector of the scattered particle in the cm frame (initial orientation of the momentum is in z-direction) and sig is the cross section.

2. New FFS commands SUSPEND(SUSP) and RESUME(RES) are added. SUSPEND(SUSP) suspends reading the input stream and returns to the original input stream. It is equivalent to END. RESUME(RES) resumes reading of previous input stream. Currntly nesting SUSPENDs may not work properly.

3. The keyword SIGZ is used instead of SIGMAZ in the TYPE command for a MARK element. SIGMAZ is still usable for input.

V1.1.6.6.6k64 Bug in OpenRead["!..."] Name:K. Oide Date:2019/07/05(Fri) 07:42:43 No.984

Fixed:

1. A bug, probably very old, was found in OpenRead to read the results of a command (file name starting with "!"), when the result is null.

2. Compatibility of tfCrypt_.c (see Yamamoto-san's posts).

Changes:

1. The convergence algorithm for GO now always terminates at a certain number of iterations.

Re^2: Docker Image (was Re: VirtualBox 仮想アプライアンス) Name:Noboru Yamamoto Date:2019/06/24(Mon) 09:34:42 No.982

> imageをMacOSXに持ってきてdocker内でsad1.exeが動作することは確認できました。X11は認証が必要なので、まだ動作しません。またいずれ。

container起動の際に、" -v /Users/noboru/.Xauthority:/root/.Xauthority -e DISPLAY=${HOST}:0"を指定することで、表示が可能となりました。

ローカルのsad scriptをdocker container内で利用するには、これも起動時に、'-v'オプションを使ってディレクトリを共有すればOKです。

Re: Docker Image (was Re: VirtualBox 仮想アプライアンス) Name:Noboru Yamamoto Date:2019/06/22(Sat) 16:15:31 No.981

imageをMacOSXに持ってきてdocker内でsad1.exeが動作することは確認できました。X11は認証が必要なので、まだ動作しません。またいずれ。

Docker Image (was Re: VirtualBox 仮想アプライアンス) Name:Noboru Yamamoto Date:2019/06/22(Sat) 15:43:19 No.980

DockerImageを作成し、このイメージを実行したContainerからホストのX-serverに画像を出力できることを確認しました。使い易くするためには、まだ設定を詰めないといけませんが、原理的には可能であることは示せたかと思います。
Containerの実行は、Imageを作成したUbuntu(しかもVirtual Box内)で
しか試していません。MacOSX(やwindows)のDockerでこのイメージを動作させることができれば、VirtualBoxのovaを配布するより、実行環境の提供という意味では簡単かと思います。

VirtualBox 仮想アプライアンス Name:Noboru Yamamoto Date:2019/06/19(Wed) 16:01:07 No.979

oldsad(main trunk)をインストール済みのVirtualBox 仮想アプライアンス(.ova)を作成しました。五十嵐/佐藤によるSADを使った講義用に用意しました。
興味のある方はご連絡ください。 同様にoldsad(main trunk)をインストール済みのDocker imageを作成することを狙って準備中です。こちらについても、興味のある方(あるいは既に作成済みの方)はご連絡いただければ、ありがたく存じます。

SAD(main-trunk) on Raspberry pi. Name:Noboru Yamamoto Date:2019/06/12(Wed) 11:15:07 No.976

Raspberry PiでSAD(main-trunk)をbuildしてみました。
実用性はありませんが、教育用には使えるかもしれません。
Raspbian(Raspberry Pi用Debian Linux)でgcc/gfortranを使っています。cpu_archはArmv7lなので、ABI=32です。
(ちなみに macOSXでは clang/gfortranの組み合わせでbuildしてみています。gccを入れた方がいいのかもしれませんが。)

V1.1.6.6.5k64 LaTeX in SADHelp.html, etc. Name:K. Oide Date:2019/06/03(Mon) 18:26:38 No.972

Changes:

1. Flags NOINTRES and NOHALFRES now ignore unstableness with trace > 2 and trace < -2, respectively.

2. SADHelp.html starts to use LaTeX output for some texts with equations.

Added:
1. latex.n to provide library to include LaTeX output, now used in SADHelp.

Re: V1.1.6.6.4k64 Bugs in InverseErf, etc. Name:K. Oide Date:2019/04/01(Mon) 22:12:07 No.954

Fixed:

1. Imprementation of InverseErf to have caused seg fault, since the last version.

2. tsolqu had a large local varibles for spins.

3. A bung in LinearSolve (tsolvm), recently introduced.

V1.1.6.6.1k64 FindClosedOrbit, etc. Name:K. Oide Date:2019/03/27(Wed) 19:19:39 No.950

Fixed:

1. Confusion of INF and NaN for output.

2. A glitch when set-element-value-command is applied to multiple types.


Added:

1. A new function Put (similar to Mathematica):
Put[x__,file_String]:=With[{f=OpenWrite[file]},
Scan[Write[f,#]&,{x}];
Close[f]];

2. New tags Polarization2, Polarization4, Polarization6 in the results of Emittance[], corresponding to 2nd, 4th, 6th order calculation, respectively.
Polarization returs the same value as Polarization.

3. A new function FindClosedOrbit[z0_:{0,0,0,0}]: try to find out the closed orbit with CALC4D. z0 is the initial orbit at the entrance. CALC4D only.


Changes:

1. Eleminate a list as the arg of FFS USE .

2. The internal indices of idval, idtype, pname, lpname now start from 0.

3. Added cross terms into 4th and 6th order terms in the depolarization matrix.

4. Now element-value-command such as "Q* K1 0" allows a wildcard for the keyword. It is especially useful to reset all keywords before GetMAIN, etc.

5. Many math functions are moved to a new module mathfun, internally.

7. MAIN now accpets INF and NaN as the value of input parameters.

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |

- WebForum -