Comments (5)
Yes, that's correct - the material properties are listed as [tungsten, hydrogen]
, so n has the following structure:
[
[n(W), n(H)], #number densities of first layer in 1/Å^3
[n(W), n(H)] #number densities of second layer in 1/Å^3
]
from rustbca.
Hey @HexSygon - thanks for opening an issue. The easiest way to learn what the arguments do is to refer to the docstrings using help(compound_bca_list_1D_py), although I admit there are likely other functions missing docstrings in libRustBCA:
>>> help(compound_bca_list_1D_py)
Help on built-in function compound_bca_list_1D_py in module libRustBCA:
compound_bca_list_1D_py(ux, uy, uz, energies, Z1, m1, Ec1, Es1, Z2, m2, Ec2, Es2, Eb2, n2, dx)
compound_bca_list_1D_py(ux, uy, uz, energies, Z1, m1, Ec1, Es1, Z2, m2, Ec2, Es2, Eb2 n2, dx)
runs a BCA simulation for a list of particles and outputs a list of sputtered, reflected, and implanted particles.
Args:
ux (list(f64)): initial ion directions x. ux != 0.0 to avoid gimbal lock
uy (list(f64)): initial ion directions y.
uz (list(f64)): initial ion directions z.
energies (list(f64)): initial ion energies in eV.
Z1 (list(f64)): initial ion atomic numbers.
m1 (list(f64)): initial ion masses in amu.
Ec1 (list(f64)): ion cutoff energies in eV. If ion energy < Ec1, it stops in the material.
Es1 (list(f64)): ion surface binding energies. Assumed planar.
Z2 (list(f64)): target material species atomic numbers.
m2 (list(f64)): target material species masses in amu.
Ec2 (list(f64)): target material species cutoff energies in eV. If recoil energy < Ec2, it stops in the material.
Es2 (list(f64)): target species surface binding energies. Assumed planar.
Eb2 (list(f64)): target material species bulk binding energies in eV.
n2 (list(list(f64))): target material species atomic number densities in inverse cubic Angstroms.
dx (list(f64)): target material layer thicknesses starting at surface.
Returns:
output (NX9 list of f64): each row in the list represents an output particle (implanted,
sputtered, or reflected). Each row consists of:
[Z, m (amu), E (eV), x, y, z, (angstrom), ux, uy, uz]
incident (list(bool)): whether each row of output was an incident ion or originated in the target
stopped (list(bool)): whether each row of output is associated with a particle that stopped in the target
>>>
In this case, the last argument, dx
, is a list that contains the thickness of each layer in the target. That is, the first layer is 50 angstroms and the second layer is 1e6 angstroms. It looks like the documentation is missing the unit in the docstring, so I'll be sure to fix that for the next version. Hope this helps.
from rustbca.
Thank you for this, very helpful. @drobnyjt
Is there a way to make a mixed layer of two materials?
I thought that this code was doing this, but it appears that it is just one layer stacked on top of a different material layer correct?
from rustbca.
You're very welcome; the answer is yes, and the documentation should probably be updated to make that clear.
When you define the material parameters, e.g., the atomic numbers, like so:
Z2 = [1, 16, 22],
each element become a species included in the simulation.
Compounds made up of those elements are specified using the n2
argument, for the number densities. In the 1D material case, n2
is a list of lists made up of the number density of each element of each layer. If you have 5 layers, len(n2)=5
, one for each layer. The index of each sub-list of n2
corresponds to the elements specified in Z2, m2, etc, so if you have three elements specified in Z2
, len(n2[i])=3
for i = 0, 1, 2
.
For example, if Z2 = [1, 16, 22]
, and I want a material with 3 layers, one of TiO, one of TiH2, and one of pure titanium (assuming a constant number density of titanium for convenience):
n2 = [
[0.0, 0.0567, 0.0567], # 0 Hydrogen, 1 Oxygen, 1 Titanium
[0.1134, 0.0, 0.0567]. # 2 Hydrogen, 0 Oxygen, 1 Titanium
[0.0, 0.0, 0.0567], # 0 Hydrogen, 0 Oxygen, 1 Titanium
]
Hopefully this way of specifying the composition of each layer makes sense.
from rustbca.
Is this part of the code under line 153 of test_rustbca.py correct?
[[target['n']/1030, target['n']/1030], [target['n']/10**30, 0.0]], [50.0, 1e6]
It's commented that the target is tungsten with a 50 Angstrom layer of W-H on top, but does that match the code above?
Is [target['n']/1030, target['n']/1030] supposed to refer to [n(tungsten), n(hydrogen)] ?
from rustbca.
Related Issues (20)
- [bug] Issue with generate_rustbca_input in scripts HOT 1
- [benchmark] Comparison to Results in 'Nuclear Stopping Powers for DFT Potentials with an Attractive Well'
- [feature] Customizable low energy electronic stopping mode
- [bug?] Trimesh cannot detect particles inside the object? HOT 8
- [benchmark] Xenon on Carbon Sputtering Yields HOT 3
- [benchmark] D on Be implantation profiles from MD
- [question] What happens if running a trimesh object that is not watertight? HOT 2
- [bug] Carbon Z in materials.py should be a float HOT 1
- [question] Error in trimesh implementation despite watertight and fix_normals? HOT 3
- [bug] No specific error message associated with Mesh2D inputs that have zero-length electronic stopping correction factor lists
- Most .toml examples in the examples/ directory won't run HOT 5
- [feature] Add comment to example input files specifying input mode HOT 1
- [bug] Error in Bohdansky sputtering yield formula in formulas.py
- [bug] rare issue with planar surface binding potential in Mesh2D case HOT 2
- [bug] Coordinate rotation function breaks down when normal vector too close to (1.0, 0.0, 0.0)
- [bug] RustBCA simulations crashing above threshold energies HOT 4
- [question] error message significance to sputtering yield result HOT 2
- [question]How to customize the crystal structure and PKA direction HOT 2
- [question] Sign conventions for ux, uy, uz (0D RustBCA geometry) HOT 2
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 rustbca.