Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] 3D geometries, including mathematically- and mesh-defined #80

Closed
drobnyjt opened this issue Feb 17, 2021 · 4 comments
Closed
Labels
enhancement New feature or request

Comments

@drobnyjt
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Moving to 3D geometries will enable the study of some unique problems not
feasible in 2D.

Proposed solution

  1. Abstract away the input to simplify multiple wrappers for single_ion_bca(). See issue [feature] Add an abstraction layer to simplify calling routines from other codes #79.
  2. Abstract away the Material using Type Generics so that the traits necessary (distance to surface, local composition, whether or not a point is inside/outside the material). See issue [feature] mesh_2d requirement should be replaced with a generic Geometry type #77
  3. Add specific wrapper for mathematically defined 3D geometries
  4. Add specific wrapper for mesh-defined 3D geometries
@drobnyjt
Copy link
Collaborator Author

drobnyjt commented Mar 1, 2021

PR #89 is tracking the progress of this. Currently, Material { ..., mesh_2D: Mesh2D } has been changed to use a generic type T that implements the Geometry trait: Material<T: Geometry> { ..., geometry: T}. I've carried over Mesh2D and implemented a new Mesh0D, which is an infinite-depth, homogeneous composition flat target that starts at x = 0.

I'd like to attempt to have RustBCA automatically recognize which geometry is being used and proceed accordingly - failing that, it will take a single command line argument preceding the .toml.

@drobnyjt
Copy link
Collaborator Author

drobnyjt commented Mar 2, 2021

The geometry rewrite to enable this feature is complete and has been tested and merged with master. 0D reproduces sputtering yields of 2D version where appropriate, and 2D version continues to produce identical sputtering yields and both versions pass all tests.

The next geometry I'd like to add is 1D layers with finite depth, a la SRIM/Tridyn/SD.Trim.SP.

The first 3D implementation I'd like to implement will be Sphere3D - basically, the material will consist of spherical layers of arbitrary composition. This should be the simplest 3D geometry to implement. Further down the line, a Voxel3D would be great. Full 3D meshes will have to wait for performant geometry routines - but, with the Geometry trait, the implementation should be clear.

@drobnyjt
Copy link
Collaborator Author

drobnyjt commented Mar 4, 2021

I've added Mesh0D (infinite depth, homogeneous target), Mesh1D (finite depth layered target), and Sphere (homogeneous spherical target). Both Mesh0D and Mesh1D reproduce implantation distributions, sputtering yields, and reflection coefficients compared to analogous Mesh2D simulations. I don't have any tests to compare Sphere to yet, but it is passing all units tests that I can come up with and the trajectory/implantation plots look really good.

@drobnyjt
Copy link
Collaborator Author

drobnyjt commented Mar 4, 2021

I think this issue is closed in spirit - thanks to the type generics, it takes about 15 minutes to add new geometry types, by implementing the handful of functions in the Geometry trait and adding unit tests. I don't have an explicit use case for the layered spheres right now, so I'll put those off until they are explicitly asked for.

@drobnyjt drobnyjt closed this as completed Mar 4, 2021
@drobnyjt drobnyjt unpinned this issue Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant