Material¶
Material definition.
Example
Create a material definition for copper:
mat = Material('copper', {29: 1.0}, 8.9)
with open('copper.mat.in', 'w') as fp:
mat.write_input(fp)
Using the material
program of PENELOPE in the pendbase
folder, run:
material.exe < copper.mat.in
There should now be a copper.mat
in the pendbase
folder.
-
class
pypenelopetools.material.
Material
(name, composition, density_g_per_cm3, mean_excitation_energy_eV=None, oscillator_strength_fcb=None, plasmon_energy_wcb_eV=None)[source]¶ Bases:
object
Creates a new material.
Parameters: - name (str) – Name of material.
- composition (dict) – Composition in weight fraction. The composition is specified by a dictionary. The keys are atomic numbers and the values are weight fraction between ]0.0, 1.0].
- density_g_per_cm3 (float) – Material’s density in g/cm3.
- mean_excitation_energy_eV (float, optional) – mean excitation energy.
If
None
, it will be calculated by PENELOPE. - oscillator_strength_fcb (float, optional) – oscillator strength of plasmon excitation.
If
None
, it will be estimated by PENELOPE. - plasmon_energy_wcb_eV (float, optional) – energy of plasmon excitation in eV.
If
None
, it will be estimated by PENELOPE.
-
name
¶ str – Name of material.
-
composition
¶ dict – Composition in weight fraction. The composition is specified by a dictionary. The keys are atomic numbers and the values are weight fraction between ]0.0, 1.0].
-
density_g_per_cm3
¶ float – Material’s density in g/cm3.
-
mean_excitation_energy_eV
¶ float, optional – mean excitation energy. If
None
, it will be calculated by PENELOPE.
-
oscillator_strength_fcb
¶ float, optional – oscillator strength of plasmon excitation. If
None
, it will be estimated by PENELOPE.
-
plasmon_energy_wcb_eV
¶ float, optional – energy of plasmon excitation in eV. If
None
, it will be estimated by PENELOPE.
-
filename
¶
-
classmethod
read_input
(fileobj)[source]¶ Reads the input file created by this class (see
write_input
).Parameters: fileobj (file object) – file object opened with read access. Returns: new material. Return type: Material
-
pypenelopetools.material.
VACUUM
= <Material(Vacuum)>¶ Material representing vacuum.