3D B field map
Moderators: cyao, michael_borland
Re: 3D B field map
Hi Michael,
I tried to get rid of all errors by using your quad-test example and carefully recalculating my ftable
It now produces results which look as expected. See the attached plot. Ideal is an ftable file of an ideal plasma lens and MHD is a nonlinear plasma lens. Some particles don't het the field (it's only 0.5mm square). Thank you for your help and quick replies!
Cheers,
Jan
I tried to get rid of all errors by using your quad-test example and carefully recalculating my ftable
It now produces results which look as expected. See the attached plot. Ideal is an ftable file of an ideal plasma lens and MHD is a nonlinear plasma lens. Some particles don't het the field (it's only 0.5mm square). Thank you for your help and quick replies!
Cheers,
Jan
-
- Posts: 1945
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: 3D B field map
Jan,
Glad to hear that it is working. In the next release (which I hope to get out next week), there will be some improvements in FTABLE and other elements that should make this sort of thing easier.
--Michael
Glad to hear that it is working. In the next release (which I hope to get out next week), there will be some improvements in FTABLE and other elements that should make this sort of thing easier.
--Michael
Re: 3D B field map
Hi Michael,
I installed 30.0.0 and saw the changes to FTABLE. It says it's the same format as BMXYZ but I couldn't find a forum entry or example case for that. Did I miss it? I think it would help me alot to see the formatting in an example.
Best,
Jan
I installed 30.0.0 and saw the changes to FTABLE. It says it's the same format as BMXYZ but I couldn't find a forum entry or example case for that. Did I miss it? I think it would help me alot to see the formatting in an example.
Best,
Jan
-
- Posts: 1945
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: 3D B field map
Jan,
Here's an example.
--Michael
Here's an example.
--Michael
- Attachments
-
- FTABLE-BMXYZ.zip
- (24.53 MiB) Downloaded 335 times
Re: 3D B field map
Hi Micheal,
thanks again for the help. I used FTABLE with the old input some more and simulated passage through a radially symmetric field. The field is 15mm long (z), and 250µm by 250µm (x and y). It gives the expected results except for a kick at the end of the lens. I plotted s1 over s from my .sig file and saw this. Then i plotted with a scatter plot and saw what's in my attached BeamSize plot. So the FTABLE element seems to have no division. I have KICKS = 400 and element_division = 32. How can I divide the field? Or is this some artefact of the definition of s since it is the distance travelled by individual particles?
Many thanks again and kind regards,
Jan
thanks again for the help. I used FTABLE with the old input some more and simulated passage through a radially symmetric field. The field is 15mm long (z), and 250µm by 250µm (x and y). It gives the expected results except for a kick at the end of the lens. I plotted s1 over s from my .sig file and saw this. Then i plotted with a scatter plot and saw what's in my attached BeamSize plot. So the FTABLE element seems to have no division. I have KICKS = 400 and element_division = 32. How can I divide the field? Or is this some artefact of the definition of s since it is the distance travelled by individual particles?
Many thanks again and kind regards,
Jan
- Attachments
-
- Example.ele
- (1 KiB) Downloaded 280 times
-
- Example.lte
- (592 Bytes) Downloaded 277 times
-
- Posts: 1945
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: 3D B field map
Jan,
Unfortunately, FTABLE elements can be readily divided. You'd have to divide the field file and make many elements.
I'll think about how this might be included as a program feature, but it won't be straightforward.
--Michael
Unfortunately, FTABLE elements can be readily divided. You'd have to divide the field file and make many elements.
I'll think about how this might be included as a program feature, but it won't be straightforward.
--Michael
Re: 3D B field map
Hi Michael,
I'll just divide the field file since it doesn't vary with z over the most part. That's easy. I just thought i did something wrong. By the way is there any way to input a functional field? It has a very easy formula since it is radially symmetric and it would make things much easier. I've got my script working but maybe for other users that want to do similar things.
Cheers,
Jan
I'll just divide the field file since it doesn't vary with z over the most part. That's easy. I just thought i did something wrong. By the way is there any way to input a functional field? It has a very easy formula since it is radially symmetric and it would make things much easier. I've got my script working but maybe for other users that want to do similar things.
Cheers,
Jan
-
- Posts: 1945
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: 3D B field map
Jan,
There's no way to input a field in functional form, but it is a good suggestion. We'll try to have it in the next release.
--Michael
There's no way to input a field in functional form, but it is a good suggestion. We'll try to have it in the next release.
--Michael
-
- Posts: 42
- Joined: 21 Jan 2010, 02:27
Re: 3D B field map
Hello, Michael
I tried to use the FTable for tracking simulation of the specific elements.
The FTable input is made following the instruction and checked the field map file by "sddsprint". It looks fine.
But it gives error message such as "error: L+L1+L2 != field length in file %s." even I don't assign the length of the elements.
Could you explain what causes this problem? or how to make the field input file for FTable?
Best regards
Ji-Gwang
I tried to use the FTable for tracking simulation of the specific elements.
The FTable input is made following the instruction and checked the field map file by "sddsprint". It looks fine.
But it gives error message such as "error: L+L1+L2 != field length in file %s." even I don't assign the length of the elements.
Could you explain what causes this problem? or how to make the field input file for FTable?
Best regards
Ji-Gwang
- Attachments
-
- test_FTable.zip
- (17.59 MiB) Downloaded 308 times
-
- Posts: 1945
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: 3D B field map
Ji-Gwang,
FTABLE requires that you provide a value for L. L1 and L2 are optional. The quantity L+L1+L2 must accurately agree with the span of z given in the file
Using this, I modified your lattice file as follows
This runs successfully. Note that I increased the N_KICKS value to get convergence.
You may also try the BMXYZ element, which uses a more conventional integration technique:
--Michael
FTABLE requires that you provide a value for L. L1 and L2 are optional. The quantity L+L1+L2 must accurately agree with the span of z given in the file
Code: Select all
$ sddsprocess ftable.ftable -pipe=out -process=z,spread,%sSpread | sdds2stream -pipe -param=zSpread
2.299999952316284e+00
Code: Select all
RW: ftable,l=2.299999952316284e+00, input_file="ftable.ftable", simple_input=1, FACTOR = 1, N_KICKS = 4000
test: line = (RW)
You may also try the BMXYZ element, which uses a more conventional integration technique:
Code: Select all
RW: bmxyz,l=2.299999952316284e+00, filename="ftable.ftable", strength = 1, accuracy=1e-12, method = "bulirsch-stoer"
test: line = (RW)