- Timestamp:
- Jan 29, 2013, 10:41:21 AM (11 years ago)
- Location:
- trunk/tracy
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tracy/tools/soltracy.cc
r9 r10 5 5 *************************************/ 6 6 #define ORDER 1 7 8 7 //#define ORDER 4 9 8 … … 832 831 UserCommandFlag[i]._Phase_ctau, 833 832 UserCommandFlag[i]._Phase_nturn); 834 printf(" the simulation time for phase space in tracy 3 is \n");833 printf("6D phase space tracking: \n the simulation time for phase space in tracy 3 is \n"); 835 834 stop = stampstop(start); 836 835 -
trunk/tracy/tracy/doc/soltracy3_userManual_developer.tex
r3 r10 1001 1001 Obtain phase space by tracking \\ 1002 1002 1003 To calculate phase space, use the command: 1004 PhaseSpaceFlagPhase\_phase\_file Phase\_Dim Phase\_X Phase\_Px1003 To calculate phase space, use the command: \\ 1004 \textbf{PhaseSpaceFlag} Phase\_phase\_file Phase\_Dim Phase\_X Phase\_Px 1005 1005 Phase\_Y Phase\_Py Phase\_delta Phase\_ctau 1006 1006 Phase\_nturn damping\_flag 1007 1007 1008 For example: 1008 PhaseSpaceFlagphasespace.out 6D 1e-6 0.0 1e-6 0.0 0.012 0.0 1000 false1009 The meanings of parameters and defaults values of PhaseSpaceFlag are shown in table Table . If user uses PhaseSpaceFlag without parameters, then the code will use the default values. 1010 T able Parameters of the command PhaseSpaceFlag to calculate phase space.1011 Parameter 1012 Meaning 1013 Default value 1014 Phase\_phase\_file 1015 File to save tracked phase space; saved in the current directory. 1016 phase.out 1017 Phase\_Dim 1018 4D/6D tracking 1019 4D 1020 Phase\_X 1021 Horizontal coordinate at the start point of tracking 1022 0.0 1023 Phase\_Px 1024 Horizontal canonical momentum/derivative at the start point of tracking 1025 0.0 1026 Phase\_Y 1027 vertical coordinate at the start point of tracking 1028 0.0 1029 Phase\_Py 1030 vertical canonical momentum/derivative at the start point of tracking 1031 0.0 1032 Phase\_delta 1033 Energy at the start point of tracking 1034 0.0 1035 Phase\_ctau 1036 Longitudinal position at the start point of tracking 1037 0.0 1038 Phase\_nturn 1039 number of turns for tracking 1040 512 1041 Damping\_flag 1042 Boolean flag to turn on/off the radiation damping during the tracking 1043 false 1009 \textbf{PhaseSpaceFlag} phasespace.out 6D 1e-6 0.0 1e-6 0.0 0.012 0.0 1000 false 1010 1011 The meanings of parameters and defaults values of PhaseSpaceFlag are shown in Table \ref{tab:phasespace-para}. 1012 If user uses PhaseSpaceFlag without parameters, then the code will use the default values. 1013 1014 \begin{table}[h] 1015 \centering 1016 \caption{Parameters of the command \textbf{PhaseSpaceFlag} to calculate phase space.} 1017 \label{tab:phasespace-para} 1018 \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} p{0.2\linewidth} p{0.5\linewidth} p{0.15\linewidth} } 1019 \hline 1020 \hline 1021 \textbf{Symbol} & \textbf{Units} & \textbf{Parameter} \\ 1022 \hline 1023 \textbf{Phase\_phase\_file} & File to save tracked phase space; 1024 saved in the current directory. & phase.out \\ 1025 \textbf{Phase\_Dim} & 4D~/~6D tracking & 4D \\ 1026 \textbf{Phase\_X} & Horizontal coordinate at the start 1027 point of tracking. & 0.0 \\ 1028 \textbf{Phase\_Px} & Horizontal canonical momentum~/~derivative 1029 at the start point of tracking. & 0.0 \\ 1030 \textbf{Phase\_Y} & Vertical coordinate at the start point 1031 of tracking. & 0.0 \\ 1032 \textbf{Phase\_Py} & Vertical canonical momentum~/~derivative 1033 at the start point of tracking. & 0.0 \\ 1034 \textbf{Phase\_delta}& Energy at the start point of tracking & 0.0 \\ 1035 \textbf{Phase\_ctau} & Longitudinal position at the start point 1036 of tracking. & 0.0 \\ 1037 \textbf{Phase\_nturn}& Number of turns for tracking & 512 \\ 1038 \textbf{Damping\_flag}& Boolean flag to turn on~/~off the radiation 1039 damping during the tracking. & false \\ 1040 \hline 1041 \hline 1042 \end{tabular*} 1043 \end{table} 1044 1044 1045 1045 1046 \subsection{IDCorrFlag (Tested for TaiWan light source; TO BE CONTINUE DEVELOPPED.)} -
trunk/tracy/tracy/src/naffutils.cc
r3 r10 18 18 19 19 /****************************************************************************/ 20 /* void Trac_Simple4DCOD(double x, double px, double y, double py, double dp, long nmax,21 double Tx[][NTURN], bool *status)20 /* void Trac_Simple4DCOD(double x, double px, double y, double py, double dp, 21 double ctau, long nmax, double Tx[][NTURN], bool *status2) 22 22 23 23 Purpose: 24 24 Single particle tracking around the closed orbit for NTURN turns 25 The 6D phase trajectory is saved in a array 25 The 6D phase trajectory is saved in a array, but the 26 tracked dp and ctau is not about the COD. 26 27 27 28 Input: -
trunk/tracy/tracy/src/soleillib.cc
r3 r10 1667 1667 1668 1668 Trac_Simple6DCOD(x,xp,y,yp,energy,ctau,Nbtour,Tab,&status); 1669 1669 1670 for (i = 0; i < Nbtour; i++) { 1670 1671 fprintf(outf,"% .5e % .5e % .5e % .5e % .5e % .5e\n", 1671 1672 Tab[0][i],Tab[1][i],Tab[2][i],Tab[3][i],Tab[4][i],Tab[5][i]); 1672 1673 } 1674 // cout << "status is: " << status << endl; 1673 1675 fclose(outf); 1674 1676 } -
trunk/tracy/tracy/src/t2elem.cc
r9 r10 89 89 ps = 1+delta 90 90 91 91 92 For exact hamitonian: 92 93 93 ps = sqrt((1+delta)^2 - px_^2 - py_^2) 94 (1) ps = sqrt((1+delta)^2 - px_^2 - py_^2) 95 96 (2) using the check of TEAPOT to check ps < 0 94 97 **********************************************************/ 95 98 template<typename T> … … 827 830 // 828 831 }//approximate Hamiltonian 829 else { 832 else {//first order map 830 833 x[px_] -= L * (ByoBrho + (h_bend - h_ref) / 2.0 + h_ref * h_bend 831 834 * x0[x_] - h_ref * x0[delta_]); 832 835 x[ct_] += L * h_ref * x0[x_]; 833 836 834 // second order of the h_ref 835 837 // second order of the h_ref; has problem when do tracking... 838 u = L * h_ref * x0[x_] /(1.0+x[delta_]); 836 839 x[x_] += u * x0[px_]; 837 840 x[y_] += u * x0[py_]; 838 841 x[ct_] += u*(sqr(x0[px_])+sqr(x0[py_]))/(2.0*(1.0+x0[delta_])); 839 } 842 843 } 840 844 841 845 }//from other straight magnets … … 1116 1120 template<typename T> 1117 1121 void bend_fringe(double hb, double gap, ss_vect<T> &x) { 1118 1122 1123 bool track=false; 1124 1125 if(track) cout << "bend_fringe(): Forest's model"<<endl; 1126 1119 1127 T coeff1,coeff2,coeff3,coeff4; 1120 1128 T ps, ps2, ps3, ps5; … … 1306 1314 if (M->Pirho != 0.0 && M->dipEdge_effect1 == 1){ 1307 1315 if (!globval.H_exact) { //big ring */ 1308 1309 1316 // EdgeFocus(M->Pirho, M->PTx1, M->Pgap, x,true); 1317 //} else {//small and big rings 1310 1318 if(M->PTx1!=0){ 1311 1319 EdgeFocus(M->Pirho, x); … … 1421 1429 if (M->Pirho != 0.0 && M->dipEdge_effect2 == 1){ 1422 1430 if (!globval.H_exact) { //big ring 1423 EdgeFocus(M->Pirho, M->PTx2, M->Pgap, x,false);1424 1431 // EdgeFocus(M->Pirho, M->PTx2, M->Pgap, x,false); 1432 // }else{ 1425 1433 1426 1434
Note: See TracChangeset
for help on using the changeset viewer.