Author Topic: Nasty Boundary Fluorescence Analytical Situations  (Read 58031 times)

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #60 on: March 18, 2019, 01:22:37 PM »
...I could really use some help from someone with experience in Penepma .geo files to create a .geo file for 3 materials for us with a geometry shown in the attachment below.

The idea being that we could run it twice, once with epoxy as the matrix and a second time with SiO2 as the matrix.

Thanks!

Here's the geometry for a .geo file that we need from a Penepma .geo file expert:



The materials are arbitrary, we just need help with creating the .geo file.  The beam position could be varied but normally we'd put it in the center of the 20 um inclusion.

Does anyone have a file of this (or similar) geometry that they can share with us?
The only stupid question is the one not asked!

Philippe Pinard

  • Post Doc
  • ***
  • Posts: 22
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #61 on: March 19, 2019, 05:29:21 AM »
I think this should work (see attachment). I shifted the TiO2 inclusion by 40um, so a beam at (x=0, y=0) hits in the centre of the SiO2 inclusion.

macosta

  • Graduate
  • **
  • Posts: 9
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #62 on: March 19, 2019, 03:17:43 PM »
Hello Philippe,

Thank you for your help! It is much appreciated. Just a  quick clarifying question - is the TiO2 inclusion shifted 40 micron with respect to the edge of the sphere or the center of it (i.e. is the center or the edge of the TiO2 inclusion 40 microns from the center of the SiO2 phase?) ?

Best,
Marisa
Marisa D. Acosta

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #63 on: March 19, 2019, 03:36:42 PM »
So converting the k-ratios to % k-ratio and applying a matrix correction of ~1.2 (TiO2 std k-factor = 0.5546) for Ti Ka in SiO2 we get the following results:

                       Dist from inclu      k-ratio        % k-ratio         wt% matrix corrected
"5um_TiO2_in_SiO2_10um"    7.5                .000046          .0046         .00300           (30 PPM)
"5um_TiO2_in_SiO2_20um"    17.5               .000010          .0010         .00066          (6.6 PPM)
"5um_TiO2_in_SiO2_40um"    37.5               .000002          .0002         .00013          (1.3 PPM)

Therefore we're seeing only about 1-2 PPM SF effect from a 5 um TiO2 particle 40 (37.5) um away from our beam spot in SiO2.  I have to admit, it surprises me a bit that at 7.5 um from a 5 um particle and we're only getting 30 PPM of SF effect.   Can anyone confirm these calculations?

Someone might wonder where the matrix correction of ~1.2 comes from.  Well it's a good question because while the matrix correction for 15 keV, Ti Ka in SiO2 is ~1.2, one might note that in this case the Ti Ka emissions are *not* coming from the SiO2 inclusion, but instead they are emitted from the TiO2 inclusion, which is 37.5 um away from the SiO2!

So we might use a matrix correction for Ti Ka in TiO2, which is roughly 1.08. But in this context of secondary fluorescence I'm not exactly sure what it means to even have a matrix correction for the SF emission.  This is why in the Penfluor/Fanal calculation plot we show the concentrations calculated two ways, because I'm not exactly sure how the matrix correction should be applied. Because, let's be honest, secondary fluorescence is not electron-solid physics, it's x-ray fluorescence!

Ben Buse discusses this issue here:

https://probesoftware.com/smf/index.php?topic=58.msg5891#msg5891

and I responded with the code, because frankly, I'm not sure how these SF intensities should be matrix corrected:

https://probesoftware.com/smf/index.php?topic=58.msg5893#msg5893

Perhaps just a simple absorption correction for the fluoresced matrix?  Now one might ask: why do we even care about the "apparent" concentration of the secondary fluorescence? The only reason is because our analysis results will assume the concentration is emitted from the beam incident matrix, and will therefore apply the matrix correction for that matrix.   

If we then intend to subtract that "apparent" concentration from our results, we will want to be self consistent with those concentrations.  Of course in reality we do not want to simply subtract concentrations, for example in an Excel spreadsheet. Instead we would want to subtract the simulated *intensity* during the matrix iteration procedure to obtain the most accurate correction of the secondary fluorescence effect. This procedure in already implemented in the CalcZAF utility and described here:

https://probesoftware.com/smf/index.php?topic=58.msg223#msg223
« Last Edit: March 19, 2019, 10:03:12 PM by Probeman »
The only stupid question is the one not asked!

Philippe Pinard

  • Post Doc
  • ***
  • Posts: 22
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #64 on: March 20, 2019, 01:22:22 AM »
Hello Philippe,

Thank you for your help! It is much appreciated. Just a  quick clarifying question - is the TiO2 inclusion shifted 40 micron with respect to the edge of the sphere or the center of it (i.e. is the center or the edge of the TiO2 inclusion 40 microns from the center of the SiO2 phase?) ?

Best,
Marisa

The 40um is from the center of each half-sphere. This distance is defined by the x-shift of the TiO2 inclusion.

If it helps, I attached the Python script I used to create this geometry. You need Python3 and pypenelopetools https://github.com/pymontecarlo/pypenelopetools library, which you should be able to install using
Code: [Select]
pip install pypenelopetools

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #65 on: March 20, 2019, 08:04:02 AM »
Hi Philippe,
Thanks.

We modified and renamed the .geo file to obtain a distance of 40um between the boundaries of the inclusions by setting the x distance of the TiO2 inclusion to 52.5 um (0.525E-02 cm) as seen here highlighted in red.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
       Nasty fluorescence case
0000000000000000000000000000000000000000000000000000000000000000
SURFACE (   1) Plane Z=0.00 cm
INDICES=( 0, 0, 0, 1, 0)
X-SCALE=(+1.000000000000000E+00,   0)              (DEFAULT=1.0)
Y-SCALE=(+1.000000000000000E+00,   0)              (DEFAULT=1.0)
Z-SCALE=(+1.000000000000000E+00,   0)              (DEFAULT=1.0)
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE (   2) Sphere of radius 0.00 cm
INDICES=( 1, 1, 1, 0,-1)
X-SCALE=(+0.200000000000000E-02,   0)              (DEFAULT=1.0)
Y-SCALE=(+0.200000000000000E-02,   0)              (DEFAULT=1.0)
Z-SCALE=(+0.200000000000000E-02,   0)              (DEFAULT=1.0)
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE (   3) Sphere of radius 0.00 cm
INDICES=( 1, 1, 1, 0,-1)
X-SCALE=(+0.500000000000000E-03,   0)              (DEFAULT=1.0)
Y-SCALE=(+0.500000000000000E-03,   0)              (DEFAULT=1.0)
Z-SCALE=(+0.500000000000000E-03,   0)              (DEFAULT=1.0)
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE (   4) Cylinder of radius 3.00 cm along z-axis
INDICES=( 1, 1, 0, 0,-1)
X-SCALE=(+3.000000000000000E+00,   0)              (DEFAULT=1.0)
Y-SCALE=(+3.000000000000000E+00,   0)              (DEFAULT=1.0)
Z-SCALE=(+1.000000000000000E+00,   0)              (DEFAULT=1.0)
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
MODULE  (   1) Inclusion TiO2
MATERIAL(   2)
SURFACE (   1), SIDE POINTER=(-1)
SURFACE (   3), SIDE POINTER=(-1)
1111111111111111111111111111111111111111111111111111111111111111
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.525000000000000E-02,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
MODULE  (   2) Inclusion SiO2
MATERIAL(   3)
SURFACE (   1), SIDE POINTER=(-1)
SURFACE (   2), SIDE POINTER=(-1)
1111111111111111111111111111111111111111111111111111111111111111
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
MODULE  (   3) matrix
MATERIAL(   1)
SURFACE (   1), SIDE POINTER=(-1)
SURFACE (   4), SIDE POINTER=(-1)
MODULE  (   1)
MODULE  (   2)
1111111111111111111111111111111111111111111111111111111111111111
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
END      0000000000000000000000000000000000000000000000000000000

That is, 40 um plus 10 um radius for the 20 um SiO2 inclusion plus 2.5um radius for the 5 um TiO2 inclusion. The renamed .geo file is attached below.
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #66 on: March 20, 2019, 11:41:22 AM »
Attached below are the 10 and 20 um distance (edge to edge) between the TiO2 and SiO2 inclusions .geo files. Hopefully on Monday I can post a small table with the results.
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #67 on: March 22, 2019, 09:11:09 AM »
I thought I would share how Marisa and I manually edited the Penepma .in input files to work with Penepma .geo files containing three materials.  This manual editing is necessary because the Penepma GUI in Standard only supports one or two materials. This two material limitation covers most modeling situations, e.g., a single phase (bulk.geo), a SF boundary fluorescence (couple.geo), a thin file on a substrate (bilayer_200nm.geo), and an inclusion in a matrix (50mic_sphere.geo).

The reason for not supporting more than two materials in the Standard GUI is that the possible configurations gets complicated, and so it was decided to limit the Penepma GUI in Standard to two materials. But we can add a third material to the Penepma .in input files manually using a text editor, and then still be able to run these input files from the Penepma GUI in Batch Mode, which automatically copies each completed simulation to a specified subfolder for subsequent review and/or k-ratio extraction.

But first let me mention that after manually modifying the Penepma .in files for a third material and then reloading the modified .in file into the Penepma GUI, we discovered a small bug that caused an error message about a missing control index (for the manually edited third material).  This bug still allowed the batch mode option to run the simulation, but one had to "click through" the error message for each .in file containing more than two materials. The current version of the Penepma GUI in Standard (update to PFE and CalcZAF v. 12.6.0) now handles three materials for running in batch mode. But please note that loading a manually edited three material .in file into the Penepma GUI (by using the Browse button), and re-saving that .in file, will cause the third material to be excluded from the saved .in file. Bottom line: don't click the Create PENEPMA Input File button if your .in file contains more than two materials.  Or if you do, simply re-edit the .in file afterwards, by adding the third material manually, as I am about to describe below.

So, let's start by looking at a three material .geo file, specifically the one created by Philippe Pinard for two inclusions (each a different material) separated by a specified distance, in a matrix (a third material).

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
       Nasty fluorescence case
0000000000000000000000000000000000000000000000000000000000000000
SURFACE (   1) Plane Z=0.00 cm
INDICES=( 0, 0, 0, 1, 0)
X-SCALE=(+1.000000000000000E+00,   0)              (DEFAULT=1.0)
Y-SCALE=(+1.000000000000000E+00,   0)              (DEFAULT=1.0)
Z-SCALE=(+1.000000000000000E+00,   0)              (DEFAULT=1.0)
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE (   2) Sphere of radius 0.00 cm
INDICES=( 1, 1, 1, 0,-1)
X-SCALE=(+0.200000000000000E-02,   0)              (DEFAULT=1.0)
Y-SCALE=(+0.200000000000000E-02,   0)              (DEFAULT=1.0)
Z-SCALE=(+0.200000000000000E-02,   0)              (DEFAULT=1.0)
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE (   3) Sphere of radius 0.00 cm
INDICES=( 1, 1, 1, 0,-1)
X-SCALE=(+0.500000000000000E-03,   0)              (DEFAULT=1.0)
Y-SCALE=(+0.500000000000000E-03,   0)              (DEFAULT=1.0)
Z-SCALE=(+0.500000000000000E-03,   0)              (DEFAULT=1.0)
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
SURFACE (   4) Cylinder of radius 3.00 cm along z-axis
INDICES=( 1, 1, 0, 0,-1)
X-SCALE=(+3.000000000000000E+00,   0)              (DEFAULT=1.0)
Y-SCALE=(+3.000000000000000E+00,   0)              (DEFAULT=1.0)
Z-SCALE=(+1.000000000000000E+00,   0)              (DEFAULT=1.0)
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
MODULE  (   1) Inclusion TiO2
MATERIAL(   2)
SURFACE (   1), SIDE POINTER=(-1)
SURFACE (   3), SIDE POINTER=(-1)
1111111111111111111111111111111111111111111111111111111111111111
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.525000000000000E-02,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
MODULE  (   2) Inclusion SiO2
MATERIAL(   3)
SURFACE (   1), SIDE POINTER=(-1)
SURFACE (   2), SIDE POINTER=(-1)
1111111111111111111111111111111111111111111111111111111111111111
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
MODULE  (   3) matrix
MATERIAL(   1)
SURFACE (   1), SIDE POINTER=(-1)
SURFACE (   4), SIDE POINTER=(-1)
MODULE  (   1)
MODULE  (   2)
1111111111111111111111111111111111111111111111111111111111111111
  OMEGA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
  THETA=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
    PHI=(+0.000000000000000E+00,   0) DEG          (DEFAULT=0.0)
X-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Y-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
Z-SHIFT=(+0.000000000000000E+00,   0)              (DEFAULT=0.0)
0000000000000000000000000000000000000000000000000000000000000000
END      0000000000000000000000000000000000000000000000000000000

The lines highlighted in red above, indicate which material is assigned to each geometric body. In this particular .geo file,  material 2 is the TiO2 inclusion (separated from the SiO2 inclusion by a non-zero distance), material 3 is the SiO2 inclusion (centered on the incident beam when the beam incident X/Y distances are zero), and material 1 is the matrix (SiO2 or epoxy).  Note that these three geometric bodies could be any material (as defined in the .in file), and the comments in the .geo file are simply there to assist in their identification in the .geo file.  By the way, these .geo files are normally saved to the C:\UserData\Penepma12 folder.

So now we look at a corresponding .in file created using the Penepma GUI in Standard (note that the Penepma .in input files are normally stored in the C:\UserData\Penepm12\Penepma folder). Let's start with a two material .in file, by utilizing the default couple.geo file and modifying it for our two inclusion materials:



After the .in file is saved in the 6th step, let's look at it in a text editor:

TITLE  Secondary Fluorescence Couple X-ray Production Model
       .
       >>>>>>>> Electron beam definition.
SENERG 1.50E+04                  [Energy of the electron beam, in eV]
SPOSIT 0.001 0 1                 [Coordinates of the electron source]
SDIREC 180 0              [Direction angles of the beam axis, in deg]
SAPERT 0                                      [Beam aperture, in deg]
       .
       >>>>>>>> Material data and simulation parameters.
MFNAME SiO2_atom.mat                  [Material file, up to 20 chars]
MSIMPA 1.0E+3 1.0E+3 1E+3 0.1 0.1 1E+3 1E+3 [EABS(1:3),C1,C2,WCC,WCR]
MFNAME TiO2_atom.mat                  [Material file, up to 20 chars]
MSIMPA 1.0E+3 1.0E+3 1E+3 0.1 0.1 1E+3 1E+3 [EABS(1:3),C1,C2,WCC,WCR]
       .
       >>>>>>>> Geometry of the sample.
GEOMFN 20um_40um_5um.geo         [Geometry definition file, 20 chars]
DSMAX  1 1.5e-4             [IB, Maximum step length (cm) in body IB]
DSMAX  2 1.5e-4             [IB, Maximum step length (cm) in body IB]
       .
       >>>>>>>> Interaction forcing.
IFORCE 1 1 4 -10     0.1  1.0         [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 1 1 5 -400   0.1  1.0          [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 1 2 2 -10    1e-4 1.0          [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 1 2 3 -10    1e-4 1.0          [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 1 4 -10     0.1  1.0         [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 1 5 -400   0.1  1.0          [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 2 2 -10    1e-4 1.0          [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 2 3 -10    1e-4 1.0          [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
       .
       >>>>>>>> Photon detectors (up to 10 different detectors).
PDANGL 45.0 55.0 0.0 360.0 0           [Angular window, in deg, IPSF]
PDENER .0 20e+03 1000                [Energy window, no. of channels]
       .
       .
       >>>>>>>> Job properties
RESUME dump1.dat               [Resume from this dump file, 20 chars]
DUMPTO dump1.dat                  [Generate this dump file, 20 chars]
DUMPP  120                                   [Dumping period, in sec]
       .
NSIMSH 2.0e+09                  [Desired number of simulated showers]
RSEED  1 1                     [Seeds of the random-number generator]
TIME   100000                      [Allotted simulation time, in sec]

In this case material 1 is the first material (SiO2), and material 2 is the second material (TiO2). These material designations could be reversed if the beam incident and boundary materials were swapped in the Penepma GUI.

Now we know from our .geo file that we need the following material ordering:

Material 1 = matrix (SiO2 or epoxy for these particular set of simulations)
Material 2 = TiO2
Material 3 = SiO2

So we need to add a third material for the matrix (SiO2 or epoxy) and then re-arrange the order of the TiO2 and SiO2 materials as seen here:

TITLE  Secondary Fluorescence Couple X-ray Production Model
       .
       >>>>>>>> Electron beam definition.
SENERG 1.50E+04                  [Energy of the electron beam, in eV]
SPOSIT 0.001 0 1                 [Coordinates of the electron source]
SDIREC 180 0              [Direction angles of the beam axis, in deg]
SAPERT 0                                      [Beam aperture, in deg]
       .
       >>>>>>>> Material data and simulation parameters.
MFNAME Epon 828 Epoxy.mat             [Material file, up to 20 chars]
MSIMPA 1.0E+3 1.0E+3 1E+3 0.1 0.1 1E+3 1E+3 [EABS(1:3),C1,C2,WCC,WCR]
MFNAME TiO2_atom.mat                  [Material file, up to 20 chars]
MSIMPA 1.0E+3 1.0E+3 1E+3 0.1 0.1 1E+3 1E+3 [EABS(1:3),C1,C2,WCC,WCR]
MFNAME SiO2_atom.mat                  [Material file, up to 20 chars]
MSIMPA 1.0E+3 1.0E+3 1E+3 0.1 0.1 1E+3 1E+3 [EABS(1:3),C1,C2,WCC,WCR]
       .
       >>>>>>>> Geometry of the sample.
GEOMFN 20um_40um_5um.geo         [Geometry definition file, 20 chars]
DSMAX  1 1.5e-4             [IB, Maximum step length (cm) in body IB]
DSMAX  2 1.5e-4             [IB, Maximum step length (cm) in body IB]
       .
       >>>>>>>> Interaction forcing.
IFORCE 1 1 4 -10     0.1  1.0         [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 1 1 5 -400   0.1  1.0          [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 1 2 2 -10    1e-4 1.0          [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 1 2 3 -10    1e-4 1.0          [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 1 4 -10     0.1  1.0         [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 1 5 -400   0.1  1.0          [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 2 2 -10    1e-4 1.0          [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
IFORCE 2 2 3 -10    1e-4 1.0          [KB,KPAR,ICOL,FORCER,WLOW,WHIG]
       .
       >>>>>>>> Photon detectors (up to 10 different detectors).
PDANGL 45.0 55.0 0.0 360.0 0           [Angular window, in deg, IPSF]
PDENER .0 20e+03 1000                [Energy window, no. of channels]
       .
       .
       >>>>>>>> Job properties
RESUME dump1.dat               [Resume from this dump file, 20 chars]
DUMPTO dump1.dat                  [Generate this dump file, 20 chars]
DUMPP  120                                   [Dumping period, in sec]
       .
NSIMSH 2.0e+09                  [Desired number of simulated showers]
RSEED  1 1                     [Seeds of the random-number generator]
TIME   100000                      [Allotted simulation time, in sec]

Note that if one has utilized different SIMPA values for each material, you will want to move those lines along with their corresponding MFNAME lines.  But in this case all the minimum electron/photon energies are 1 keV for all three materials.

Now finally one can go to the Batch Mode window from the Penepma GUI and select the .in files to run as seen here where we created different .geo files with different distances, but we used the same .in file, except of course for the Ti standard which will get used for extracting the k-ratios once it's all finished the simulations (note the Ti standard only needs to run a short time compared to the SF inclusion simulations which are expected to be in the PPM range):



It's so *simple*...     :)   seriously though, it's a lot simpler than editing everything by hand, and besides, the two material GUI works for almost all modeling situations.

And you didn't forget the specify the correct beam energy in the .in files for all the models, right?   :)
« Last Edit: March 22, 2019, 11:28:07 AM by Probeman »
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #68 on: March 25, 2019, 12:56:52 PM »
So our 20 keV simulations for a 5um TiO2 inclusion 10, 20 and 40 um from a 20 um SiO2 grain *in an epoxy* matrix, finished over the weekend. I forgot to optimize for secondary fluorescence but the variances are smaller than the k-ratios so perhaps it's OK:

"Ti ka in Sample"   "Distance or Radius (um)"   "Std.Tot.Int."   "Unk.Tot.Int."   "Unk.Tot.Int.Var."   "K-ratio"   "K-ratio Var."
"5um_TiO2_40um_from_20um_SiO2"   0   1.69e-04   7.65e-10   1.37e-10    .000005    .000001
All ti ka k-ratios were calculated and output to folder C:\UserData\Penepma12\Penepma\Batch\5um_TiO2_10-20-40um_from_20um_SiO2_epoxy_matrix\5um_TiO2_40um_from_20um_SiO2

"Ti ka in Sample"   "Distance or Radius (um)"   "Std.Tot.Int."   "Unk.Tot.Int."   "Unk.Tot.Int.Var."   "K-ratio"   "K-ratio Var."
"5um_TiO2_20um_from_20um_SiO2"   0   1.69e-04   1.81e-09   2.08e-10    .000011    .000001
All ti ka k-ratios were calculated and output to folder C:\UserData\Penepma12\Penepma\Batch\5um_TiO2_10-20-40um_from_20um_SiO2_epoxy_matrix\5um_TiO2_20um_from_20um_SiO2

"Ti ka in Sample"   "Distance or Radius (um)"   "Std.Tot.Int."   "Unk.Tot.Int."   "Unk.Tot.Int.Var."   "K-ratio"   "K-ratio Var."
"5um_TiO2_10um_from_20um_SiO2"   0   1.69e-04   3.50e-09   2.94e-10    .000021    .000002
All ti ka k-ratios were calculated and output to folder C:\UserData\Penepma12\Penepma\Batch\5um_TiO2_10-20-40um_from_20um_SiO2_epoxy_matrix\5um_TiO2_10um_from_20um_SiO2

Expressing the k-ratio in PPM we get:

10 um from: 21 +/- 2 PPM
20 um from: 11 +/- 1 PPM
40 um from:  5 +/- 1 PPM

So about the same (~ 1/2) as we got for an SiO2 matrix (at 15 keV), but the distances were a little different so I'm going to re-run the SiO2 matrix simulations with the correct distances and at 20 keV again over the weekend so we can compare apples to apples.
« Last Edit: March 25, 2019, 01:02:07 PM by Probeman »
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #69 on: March 25, 2019, 01:15:23 PM »
By the way, I'm sure others have already thought of this, but it just occurred to me that if one acquires the Ti signal on *all 5* WDS spectrometers (for ultimate sensitivity as Marisa is doing in her trace element measurements), then the Penepma simulations are actually somewhat more applicable to these WDS measurements because there won't be such a Bragg defocus effect as reported in Ben Buse's paper on this.

https://www.cambridge.org/core/journals/microscopy-and-microanalysis/article/secondary-fluorescence-in-wds-the-role-of-spectrometer-positioning/94F6F5D3992B37BFBB8B4116BB4605D3

Because, the Penepma secondary fluorescence simulations don't account for WDS Bragg defocussing.  So acquiring a trace element on all 5 WDS spectrometers reduces the uncertainty from the direction of the fluoresed phase (or boundary) being at different orientations from the fluorescing phase.

So acquiring a trace element on all 5 spectrometers is almost sort of an annular WDS detector!    :D
« Last Edit: March 25, 2019, 03:04:02 PM by Probeman »
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #70 on: April 01, 2019, 09:37:59 AM »
Edit by John: I realized last week that I had used input files that contained a 10 um offset for the calculations below, That placed the incident beam right at the edge of the 20 um  diameter SiO2 inclusion, which explains the odd reults as thye distance between the SiO2 and TiO2 incusions (in SiO2 matrix) were decreased. 

So after re-running the calcualtions over the weekend, I have edited this post for the correct results and will follow up with a summary post.  Sorry for the confusion!

And finally, the above simulation for a 5 um TiO2 inclusion 10, 20 and 40 um from a 20 um SiO2 grain (with the electron beam centered on the 20 um SiO2 inclusion), but this time in an SiO2 matrix. Again, one didn't really need to model 3 materials for this, but just to compare apples to apples...

"Ti ka in Sample"   "Distance or Radius (um)"   "Std.Tot.Int."   "Unk.Tot.Int."   "Unk.Tot.Int.Var."   "K-ratio"   "K-ratio Var."
"5um_TiO2_10um_from_20um_SiO2"   0   1.69e-04   3.25e-09   2.82e-10    .000019    .000002
All ti ka k-ratios were calculated and output to folder C:\UserData\Penepma12\Penepma\Batch\5um_TiO2_10-20-40um_from_20um_SiO2_SiO2_matrix\5um_TiO2_10um_from_20um_SiO2

"Ti ka in Sample"   "Distance or Radius (um)"   "Std.Tot.Int."   "Unk.Tot.Int."   "Unk.Tot.Int.Var."   "K-ratio"   "K-ratio Var."
"5um_TiO2_20um_from_20um_SiO2"   0   1.69e-04   1.76e-09   2.08e-10    .000010    .000001
All ti ka k-ratios were calculated and output to folder C:\UserData\Penepma12\Penepma\Batch\5um_TiO2_10-20-40um_from_20um_SiO2_SiO2_matrix\5um_TiO2_20um_from_20um_SiO2

"Ti ka in Sample"   "Distance or Radius (um)"   "Std.Tot.Int."   "Unk.Tot.Int."   "Unk.Tot.Int.Var."   "K-ratio"   "K-ratio Var."
"5um_TiO2_40um_from_20um_SiO2"   0   1.69e-04   4.79e-10   1.12e-10    .000003    .000001
All ti ka k-ratios were calculated and output to folder C:\UserData\Penepma12\Penepma\Batch\5um_TiO2_10-20-40um_from_20um_SiO2_SiO2_matrix\5um_TiO2_40um_from_20um_SiO2

Expressing the Ti Ka k-ratios in PPM we get for the SiO2 matrix (again at a 20 keV electron energy):

10 um from: 19 +/- 2 PPM
20 um from: 10 +/- 1 PPM
40 um from:  3 +/- 1 PPM

So the SF effect is slightly more pronounced when the SiO2 inclusion and the TiO2 inclusion are separated by epoxy when compared to an SiO2 matrix, and this makes sense since the absorption of continuum x-rays which are of sufficient energy to excite the Ti K edge are less absorbed in epoxy than in SiO2.
« Last Edit: April 15, 2019, 10:27:45 AM by Probeman »
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #71 on: April 15, 2019, 10:56:54 AM »
After recalculating the SiO2 matrix effect in Penepma for a three material geometry, and editing the above post, here is a summary of the two matrices:

Expressing the Ti Ka k-ratios in PPM we get (for the beam in the center of a 20 um SiO2 inclusion adjacent to a 5 um TiO2 inclusion) in an epoxy matrix (at a 20 keV electron energy):

10 um from: 21 +/- 2 PPM
20 um from: 11 +/- 1 PPM
40 um from:  5 +/- 1 PPM

Expressing the Ti Ka k-ratios in PPM for the same but with an SiO2 matrix (at a 20 keV electron energy):

10 um from: 19 +/- 2 PPM
20 um from: 10 +/- 1 PPM
40 um from:  3 +/- 1 PPM

We can see the effect of less absorption of the continuum (greater SF effect) by the epoxy matrix, by modeling the x-ray absorption in CalcZAF using the Calculate Electron and X-Ray ranges menu as described here:

https://probesoftware.com/smf/index.php?topic=86.0

Doing that we can see that assuming a Cr or Mn Ka radiation as a proxy for continuum x-rays sufficient to excite the Ti K edge (at ~4.9 keV), for a distance of 10 um we get roughly a transmission of 0.8 for an SiO2 matrix, and a transmission of 0.95 for an epoxy matrix.

Therefore the epoxy matrix produces a slightly larger secondary fluorescence effect for Ti Ka than an SiO2 matrix.  Sorry for the earlier confusion!   :-[
« Last Edit: April 15, 2019, 11:20:15 AM by Probeman »
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #72 on: March 28, 2022, 11:20:23 AM »
I was recently contacted by Di Zhang at the Institute of Geology and Geophysics, Chinese Academy of Sciences (IGGCAS) and they asked where the Epon 828 epoxy composition comes from (it has 0.3 wt% Cl) and I cannot remember where I found it.



It's not a huge contribution is this case as there is only about 40 PPM Cl a few microns from the boundary, but maybe other epoxies have higher Cl contents? 

Does any one have compositional data on other epoxies?

This also reminds me of a time a few years ago when we started seeing about 100 PPM of Cl in all our samples, and we finally traced it to our carbon coater, in which the engineer had replaced a piece of vacuum tubing to the roughing pump with PVC tubing, that turned out was out gassing Cl into the system and getting into our carbon coats!
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #73 on: March 29, 2022, 04:27:59 AM »
I should also mention that, for the purposes of modeling the boundary fluorescence of Cl by x-rays generated from a (volcanic) glass, the CNOH composition of the epoxy isn't especially important. That is to say, the composition of the organic compounds isn't as important as the Cl content of the epoxy. In other words, the fluorescence of chlorine by X-rays from the glass interaction volume will primarily be from the continuum.

To that end, has anyone here ever attempted to analyze the concentration of Cl or other (non-CNOH) elements in epoxy?

Yeah, I know that normally one always tries to avoid hitting epoxy!   :o  But if we actually needed to know the Cl concentrations in various epoxies, how might one go about that using the EPMA?  Obviously a very gentle, defocused beam, but even then would it be possible?

I also note that asking Google this question I got the following response:

Quote
Epoxy resin used in various applications is superior in adhesive strength, heat resistance and has good handling, too. However, epoxy resin usually includes several percent chlorine as impurities.

So if indeed there are epoxy formulations with several percent Cl, then the boundary fluorescence issue of this element at trace concentrations (near epoxy boundaries) could become a much larger concern for us.

I'll attempt to calculate a PAR file with "several percent chlorine" and present these results...
The only stupid question is the one not asked!

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Nasty Boundary Fluorescence Analytical Situations
« Reply #74 on: March 29, 2022, 04:35:21 AM »
I found this reference but the pdf is apparently only available in Russian:

"Content of chlorine in epoxy resins and assessment of his [sic] influence on quality of production on their basis"    September 2017
The only stupid question is the one not asked!