<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I developed this spreadsheet years ago as a quick way to start a layout.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It allows for exploring options pretty quickly regarding magnet placement, powering etc. It's not meant as a final answer of course. The idea is to rough out a solution and then put it into a software like ELEGANT, BMAD, MAD-X etc.. to do the final optimization
taking into account everything else.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="signature_bookmark"></div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> FFA_CEBAF_Collab <ffa_cebaf_collab-bounces@jlab.org> on behalf of Ryan Bodenstein via FFA_CEBAF_Collab <ffa_cebaf_collab@jlab.org><br>
<b>Sent:</b> Monday, July 18, 2022 4:42 PM<br>
<b>To:</b> Berg, J Scott <jsberg@bnl.gov>; ffa_cebaf_collab@jlab.org <ffa_cebaf_collab@jlab.org><br>
<b>Subject:</b> Re: [FFA_CEBAF_Collab] EM Spreader Layout</font>
<div> </div>
</div>
<div lang="EN-US" style="word-wrap:break-word">
<div class="x_WordSection1">
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Thanks Scott!</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">I’ll start with the last point first: the magnet values are calculated through the geometry, essentially. In the spreadsheet, you set the heights, energy, etc (everything in yellow), and then the blue parts are calculated based
on the geometry and the beam/field interactions. Then, in the next tab (3<sup>rd</sup> pass), the calculated values like B field must remain the same (in grey). And the calculations continue from there.</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">As far as getting these into BMAD, it may require me to manually write it in the end. Or at least translate, then adjust by hand heavily. However, once I do so, I will do so using your patch method and the multipass feature.</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">I got some good feedback from Jay regarding some magnet lengths and strengths, and I’ll be iterating with that feedback. While I’m doing it, I’ll keep this information in mind as well, so I can better translate it.
</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Thanks again!</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Ryan</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;margin-bottom:12.0pt">
<b><span style="font-size:12.0pt; color:black">From: </span></b><span style="font-size:12.0pt; color:black">Berg, J Scott <jsberg@bnl.gov><br>
<b>Date: </b>Monday, July 18, 2022 at 4:27 PM<br>
<b>To: </b>Ryan Bodenstein <ryanmb@jlab.org>, ffa_cebaf_collab@jlab.org <ffa_cebaf_collab@jlab.org><br>
<b>Subject: </b>[EXTERNAL] RE: EM Spreader Layout</span></p>
</div>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">The ideal way you would handle this in Bmad would be using its multipass feature, which means there would be only one definition of any magnet. So how would that work? For a rectangular magnet like MAQ1S01, you would declare the
line up through MAQS01 to be multipass, and make MAQS01 have no bend angle but a nonzero field. Then the first pass orbit comes out at some nonzero coordinate and angle, and you introduce a patch element (which is not multipass) to reset the phase space coordinates.
Alternatively make the angle match its field and use an edge angle, and avoid the patch for the first pass (but you won’t avoid one for later passes, and you’ll have to calculate the arc length). When you come through on the second pass, you go through the
same multipass line (up through MAQS01), and now you have a coordinate patch for the second pass (a different one than for the first pass) that resets the phase space coordinates for the second pass. The advantage of this is you have only one definition for
each element, and you can even get things right with the gradient, for instance (which is ignored in the spreadsheet). Tao will do the geometry fitting that the spreadsheet does. Unfortunately that doesn’t translate back into other codes very well.</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Are the magnet gradients measured values of some sort? They look somewhat random. Is there a known gradient-to-field ratio for each magnet?</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">-Scott</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<div style="border:none; border-left:solid blue 1.5pt; padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<b><span style="font-size:11.0pt">From:</span></b><span style="font-size:11.0pt"> Ryan Bodenstein <ryanmb@jlab.org>
<br>
<b>Sent:</b> Monday, July 18, 2022 2:55 PM<br>
<b>To:</b> Berg, J Scott <jsberg@bnl.gov>; ffa_cebaf_collab@jlab.org<br>
<b>Subject:</b> Re: EM Spreader Layout</span></p>
</div>
</div>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
</p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Hi Scott,</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Many thanks! Yes, the calculations take place on “the spreadsheet” of much fame. An older version is on the site, but I’ll attach the one used here. Please note: you have to allow for iterative calculations on the spreadsheet,
or it won’t work. It’s also easy to mistype something and have everything go “wonky,” so back up frequently!</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Regarding the magnet lengths, OptiM uses path length rather than steel length. So each pass through the same magnet will have a slightly different path length. It’s all calculated in the spreadsheet.</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">That said, I’ll also write everything up to better explain things. Regarding the translation to BMAD, you can export from OptiM to MAD8 or MADX, but it doesn’t quite do it right. So I’m trying to find the errors in that, then
convert from MADX to BMAD. Right now, I’m close-ish, but the optics aren’t behaving at all like in OptiM, and I can’t quite figure out why.</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Thanks again, Scott!</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Cheers!</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Ryan</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;margin-bottom:12.0pt">
<b><span style="font-size:12.0pt; color:black">From: </span></b><span style="font-size:12.0pt; color:black">Berg, J Scott <<a href="mailto:jsberg@bnl.gov" data-auth="NotApplicable">jsberg@bnl.gov</a>><br>
<b>Date: </b>Monday, July 18, 2022 at 2:48 PM<br>
<b>To: </b>Ryan Bodenstein <<a href="mailto:ryanmb@jlab.org" data-auth="NotApplicable">ryanmb@jlab.org</a>>,
<a href="mailto:ffa_cebaf_collab@jlab.org" data-auth="NotApplicable">ffa_cebaf_collab@jlab.org</a> <<a href="mailto:ffa_cebaf_collab@jlab.org" data-auth="NotApplicable">ffa_cebaf_collab@jlab.org</a>><br>
<b>Subject: </b>[EXTERNAL] RE: EM Spreader Layout</span></p>
</div>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Hi Ryan,</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Since you mentioned my name, I thought I would have a look through the files at least. My first observation there is that there are some auxiliary calculations that happened elsewhere that lead to some parameters in that file.
A good example are lengths in MAQ1S01; each pass has a different length, and it’s not clear where those come from (analytic, fitting, field map calculation, etc.). So it would be good to have a writeup of where those numbers come from, or a procedure to get
them, etc. That might also make it easier to know how to construct a Bmad version, where one uses a common magnet for MAQ1S01, for instance.</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">-Scott</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<div style="border:none; border-left:solid blue 1.5pt; padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<b><span style="font-size:11.0pt">From:</span></b><span style="font-size:11.0pt"> FFA_CEBAF_Collab <<a href="mailto:ffa_cebaf_collab-bounces@jlab.org" data-auth="NotApplicable">ffa_cebaf_collab-bounces@jlab.org</a>>
<b>On Behalf Of </b>Ryan Bodenstein via FFA_CEBAF_Collab<br>
<b>Sent:</b> Monday, July 18, 2022 8:12 AM<br>
<b>To:</b> <a href="mailto:ffa_cebaf_collab@jlab.org" data-auth="NotApplicable">ffa_cebaf_collab@jlab.org</a><br>
<b>Subject:</b> [FFA_CEBAF_Collab] EM Spreader Layout</span></p>
</div>
</div>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">G’morning Colleagues, and Happy Monday!</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">I have just uploaded some files for the NE Spreader to the file repository. They are in the Optics folder, in a new folder titles “Spreader.” This link should work as well:
<a href="https://urldefense.com/v3/__https:/jeffersonlab-my.sharepoint.com/:f:/r/personal/tristan_jlab_org/Documents/Grad*20Student*202019/Graduate*20Student*20Steering/CEBAF*20FFA*20Working*20Group/Optics/Spreader?csf=1&web=1&e=wAZhqJ__;JSUlJSUlJQ!!P4SdNyxKAPE!Fe2zlrICc2B8roIaArE9OxSJHUAjik53rwsj79En3YMzQM6Li5HCO-YGCOiRhopGsZiZRgF2ZPMSeogIcH68J1IGgQ$" data-auth="NotApplicable">
Spreader</a>. But if the link doesn’t work, please just check the repository.</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">A few notes:</span></p>
<ol start="1" type="1" style="margin-bottom: 0in;margin-top:0in">
<li class="x_MsoListParagraph" style="margin: 0in 0in 0in 0.5in; font-size: 10pt; font-family: Calibri, sans-serif;margin-left:0in">
<span style="font-size:11.0pt">These are all 4 of the EM spreaders for the NE corner. I haven’t done the FFA part yet (and will likely bother Scott a bit to do that part, since I have to know a bit of what requirements the splitter(s) will have).</span></li><li class="x_MsoListParagraph" style="margin: 0in 0in 0in 0.5in; font-size: 10pt; font-family: Calibri, sans-serif;margin-left:0in">
<span style="font-size:11.0pt">These were performed in OptiM, and the conversion to MadX seems to have some odd hiccup (and therefore the conversion to BMAD as well). I’m working on that. For now, I’ve also uploaded the OptiMX installer for Windows (or Wine/Windows
environment that you use). That way, you can run them as you wish, if you wish. But, I also put some .dat files in a subfolder that have some of the info you may need. If you need other info, let me know.</span></li><li class="x_MsoListParagraph" style="margin: 0in 0in 0in 0.5in; font-size: 10pt; font-family: Calibri, sans-serif;margin-left:0in">
<span style="font-size:11.0pt">I’m still working on some other options as well. I’d like to drop the height of the first step in the first pass if possible, but I have to check clearances first. I also need to make sure the setup still fits in the z direction,
but I think it does. For now, let’s call this Option 1, tentatively. There will be more, but this should give us a good enough place to work from.</span></li><li class="x_MsoListParagraph" style="margin: 0in 0in 0in 0.5in; font-size: 10pt; font-family: Calibri, sans-serif;margin-left:0in">
<span style="font-size:11.0pt">The optics will end up different, depending on what comes out of our linac choice(s). But for now, this is a good approximation. I focused mainly on closing the dispersion and dispersion’, and just got the betas to be reasonable,
but not matched to any specific value. None of the magnets are maxed out (Jay – feel free to correct me if I’m wrong there!), so there should still be some flexibility built in.</span></li><li class="x_MsoListParagraph" style="margin: 0in 0in 0in 0.5in; font-size: 10pt; font-family: Calibri, sans-serif;margin-left:0in">
<span style="font-size:11.0pt">For now (relevant to the JLab folks who know our system), don’t assume the names of the magnets are correct. I iterated magnet names in my own way, and some of them don’t reflect the names of a real magnet. It was for my own book
keeping.</span></li></ol>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Any and all advice and feedback welcome! Have a great week!</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Cheers!</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Ryan</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt"> </span></p>
<div>
<div>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Dr. Ryan Bodenstein (he/him)</span></p>
<p class="x_MsoNormal" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;">
<span style="font-size:11.0pt">Staff Scientist II – Center for Advanced Study of Accelerators (CASA)</span></p>
<p class="x_MsoNormal" align="center" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;text-align:center">
<span style="font-size:11.0pt"><img border="0" width="403" height="88" id="x_Picture_x0020_1" alt="signature_3177692690" style="width:4.1979in; height:.9166in" data-outlook-trace="F:1|T:1" src="cid:image001.jpg@01D89ABB.48454250"></span></p>
<p class="x_MsoNormal" align="center" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;text-align:center">
<span style="font-size:11.0pt">12000 Jefferson Avenue</span></p>
<p class="x_MsoNormal" align="center" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;text-align:center">
<span style="font-size:11.0pt">Newport News, VA 23606</span></p>
<p class="x_MsoNormal" align="center" style="margin: 0in; font-size: 10pt; font-family: Calibri, sans-serif;text-align:center">
<span style="font-size:11.0pt">United States of America</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>