Skip to content

CylinderSegment speed #581

Answered by OrtnerMichael
martinusus asked this question in Q&A
Jan 29, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hi @martinusus

In the case of the full cylinder the computation makes use of the core function magpy.core.magnet_cylinder_field() and uses a cut-out operation as described here. We are doing this because, as you have noticed, the full-cylinder computation is much faster (~1-5 us) than the actual cylinder segment computation magpy.core.magnet_cylinder_segment_field() which takes ~ 50-100 us.

The main reason behind this is, that the segement field relies on the incomplete elliptic integrals, while the full cylinder field makes use only of complete elliptics or cel functions, which are much faster to compute.

While we plan to have a closer look on the cylinder segment computation in terms of…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@martinusus
Comment options

@OrtnerMichael
Comment options

Answer selected by martinusus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants