Comments (4)
I think we should definitely support something like Hermite interpolation for a simple and easy to use interpolation.
However, the optimal approach I think is the one taken for axial symmetry (radial series expansion). It seems like the method can be extended to 3D and planar symmetry as explained by Hawkes[1] chapter 7 and chapter 13.
[1] Peter Hawkes. Principles of Electron Optics. Volume one. 2018.
from traceon.
I looked into it, the radial series expansion in the 3D case is complicated. In theory, if we could effectively calculate the axial harmonics along the optical axis we can do very fast 3D traces. However, how to calculate the axial harmonics is not obvious. The formula in Hawkes is I think incorrect, since it misses the sinus terms that are needed to describe a potential in 3D in full generality.
Implementing Hermite interpolation was a lot of work, and it was not obvious whether it's best to calculate the derivatives analytically or using a finite difference scheme. I figured out in the end that using a finite difference scheme directly on the field components (so not on the potential) is the best option in terms of accuracy/computation. This now works for radial symmetric geometries. See validation/dohi.py
.
from traceon.
Hermite interpolation is now fully implemented for 3D and for radial symmetry. In both cases I think it performs very poorly..
I was finally able to generalize the radial series expansion method to 3D. It looks like it will be an extremely accurate and fast method. If it really works as well as I hope I need to write it down in a paper someday.
from traceon.
I have validated the new method in validation/simple-mirror.py
. It seems to work really well.
from traceon.
Related Issues (20)
- STL import HOT 1
- More iteration information
- Better promotion material HOT 1
- Add field methods that compute forces instead of fields
- Better performance analysis of tracing code
- GSL install HOT 2
- Add verbosity level to control printing to stdout
- Streamline plotting
- Do not supply current density but total current
- Fix potential_at_point/field_at_point functions
- Better handling of normal vector orientation HOT 1
- Add static typing system mypy/pyright etc.
- Fix charge_on_element methods in presence of magnetostatics
- Allow multiple quantities to be checked in validations
- Parametric mesher HOT 1
- Clean up test files
- Add ferromagnetic and ferroelectric excitation
- Field interpolation in 3D in terms of multipole expansion
- Wheels for more platforms HOT 1
- Verbose mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from traceon.