Probe Software Users Forum

Software => CalcZAF and Standard => Topic started by: John Donovan on September 18, 2013, 12:20:55 PM

Title: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on September 18, 2013, 12:20:55 PM
Another case is the modeling of particles or inclusions embedded in a matrix of another composition. The attached screen shot shows a 5 um Cu particle embedded in an Al matrix (the <n>mic_sphere.geo geometry files are all 50% buried hemisphere geometries).  Remember that one needs to be logged in to see attachments!

The barely visible Al Ka signal is due to secondary fluorescence from the Cu Ka and continuum x-rays generated in the Cu inclusion.

Note that the minimum electron/photon energies (circled in red) should be the same for both materials and set to a value below the ionization energy of the lowest energy emission line of interest.

Note on using the *sphere geometry files:
Note that when using the hemisphere geometry files, make sure that the X beam position shown here is properly set. The default for the straight line boundary geometry (couple.geo), is 10 um (1E-3 cm) to the right into the beam incident material.

If it is desired to place the beam in the exact center of the inclusion, set the X distance to zero as shown here:

(https://smf.probesoftware.com/oldpics/i42.tinypic.com/b89qbb.jpg)
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on September 21, 2013, 11:53:56 AM
Calculating k-ratios from Penepma generated intensities:

It is probably worth explaining how to calculate k-ratios from Penepma photon intensity calculations. Generally we want to utilize elemental k-ratios, therefore in addition to calculating the photon intensities for our unknown sample at the specific conditions and geometry desired, we will also need to calculate the pure element intensities for the element emission of interest at the same sample conditions, though generally for a bulk geometry.

Therefore at least two Penepma calculation models must be run, one for the unknown and one for the standard. Of course each element in the unknown calculation that will be converted to a k-ratio needs a (generally bulk) standard calculated also. In the above example of a Cu particle in an Al matrix that means three input files: one for the unknown inclusion in the matrix, one for the pure bulk Al and one for the pure bulk Cu.

The easiest way to do this is to utilize the "batch" mode of the Penepma GUI, by first generating the two input files from the Create PENEPMA Material and Input Files window which is accessed in the Standard.exe program from the Analytical | PENEPMA (Monte Carlo) Calculations menu.

Once all Penepma input files have been generated, simply click the Batch Mode button as seen here:

(https://smf.probesoftware.com/oldpics/i43.tinypic.com/n1t0no.jpg)

and then select the input files you want to run from the input file list. The basic calculation parameters are displayed as each input file is selected (use <ctrl> click for multiple selections), and when all input files have been selected, Browse to (and create if necessary) a folder to store your calculation results in as shown here:

(https://smf.probesoftware.com/oldpics/i39.tinypic.com/1i1q9y.jpg)

Then simply click the Run Select Input Files In Batch Mode button.  The program will confirm the required calculation time and folder to save to (each calculation and output files will be automatically saved to a separate sub folder), and then simply click OK to start the calculation.

Extracting the intensities for k-ratio calculations:

Once all the Monte-Carlo calculations are complete, one browses to the batch output folders shown here:

(https://smf.probesoftware.com/oldpics/i44.tinypic.com/25at2xk.jpg)

Now locate the pe-intens-01.dat file in each folder and copy or note the transition intensity for each line that you desire to calculate k-ratio values for. The most common transitions are listed here:

K L3       ' (Ka) (see table 6.2 in Penelope-2006-NEA-pdf)
K M3       ' (Kb)
L3 M5      ' (La)
L2 M4      ' (Lb)
M5 N7      ' (Ma)
M4 N6      ' (Mb)


An example from one of the three output files is shown here, specifically the unknown sample (Cu hemisphere in Al):

#  Results from PENEPMA. Output from photon detector #  1
#
#  Angular intervals : theta_1 = 4.500000E+01,  theta_2 = 5.500000E+01
#                        phi_1 = 0.000000E+00,    phi_2 = 3.600000E+02
#
#  Intensities of characteristic lines. All in 1/(sr*electron).
#    P = primary photons (from electron interactions);
#    C = flourescence from characteristic x rays;
#    B = flourescence from bremsstrahlung quanta;
#   TF = C+B, total fluorescence;
#  unc = statistical uncertainty (3 sigma).
#
# IZ S0 S1  E (eV)      P            unc       C            unc       B            unc       TF           unc       T            unc
   29 L1 M3  1.0228E+03  1.954288E-06 2.68E-07  0.000000E+00 0.00E+00  2.207194E-09 2.50E-09  2.207194E-09 2.50E-09  1.956495E-06 2.68E-07
   29 L1 M2  1.0228E+03  1.162781E-06 2.06E-07  0.000000E+00 0.00E+00  1.576567E-09 2.12E-09  1.576567E-09 2.12E-09  1.164358E-06 2.06E-07
   29 L1 M4  1.0927E+03  1.223980E-08 2.12E-08  0.000000E+00 0.00E+00  0.000000E+00 0.00E+00  0.000000E+00 0.00E+00  1.223980E-08 2.12E-08
   29 L1 M5  1.0930E+03  4.079933E-09 1.22E-08  0.000000E+00 0.00E+00  0.000000E+00 0.00E+00  0.000000E+00 0.00E+00  4.079933E-09 1.22E-08
   13  K L2  1.4863E+03  2.744367E-09 2.93E-09  3.577180E-08 1.11E-08  9.888903E-08 1.65E-08  1.346608E-07 2.76E-08  1.374052E-07 2.01E-08
   13  K L3  1.4867E+03  8.534549E-09 5.16E-09  6.731252E-08 1.52E-08  1.939424E-07 2.31E-08  2.612549E-07 3.84E-08  2.697895E-07 2.82E-08
   13  K M2  1.5576E+03  0.000000E+00 0.00E+00  0.000000E+00 0.00E+00  6.028973E-10 1.28E-09  6.028973E-10 1.28E-09  6.028973E-10 1.28E-09
   13  K M3  1.5576E+03  0.000000E+00 0.00E+00  7.692860E-10 1.63E-09  9.043460E-10 1.57E-09  1.673632E-09 3.20E-09  1.673632E-09 2.26E-09
   29  K L2  8.0278E+03  1.026919E-05 6.15E-07  0.000000E+00 0.00E+00  2.809442E-07 2.86E-08  2.809442E-07 2.86E-08  1.055014E-05 6.16E-07
   29  K L3  8.0478E+03  2.028543E-05 8.64E-07  0.000000E+00 0.00E+00  5.410777E-07 4.01E-08  5.410777E-07 4.01E-08  2.082651E-05 8.66E-07
   29  K M2  8.9054E+03  1.244380E-06 2.13E-07  0.000000E+00 0.00E+00  2.680164E-08 8.82E-09  2.680164E-08 8.82E-09  1.271181E-06 2.14E-07
   29  K M3  8.9054E+03  2.570358E-06 3.07E-07  0.000000E+00 0.00E+00  6.747706E-08 1.39E-08  6.747706E-08 1.39E-08  2.637835E-06 3.08E-07
   29  K M4  8.9771E+03  4.079933E-09 1.22E-08  0.000000E+00 0.00E+00  0.000000E+00 0.00E+00  0.000000E+00 0.00E+00  4.079933E-09 1.22E-08

If we are interested in the Al Ka and Cu Ka emissions we simply note the "K L3" photon intensity values in the T column (total intensity and its uncertainty (unc) just to the right).

Remembering that the <K ratio intensity> = <Unk intensity> / <Std intensity>, we save these unknown photon intensity values to be the numerators for our k-ratios. Note that in the case of the K emissions we may also include the Kb emission intensity to improve our precision, by adding in the contribution of the Kb "K M3" transition, since all K emissions are emitted from the same edge.

Now, obtain the same corresponding "K L3" photon intensity values from the pure (bulk) Al and pure (bulk) Cu folder pe-intens-01.dat files and insert the the corresponding intensity values in the denominator of our k-ratio equation to calculate the elemental k-ratio for Al Ka and Cu Ka in our unknown sample relative to the pure elements.

Houston: we have k-ratios!
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Mike Spilde on January 22, 2014, 09:53:54 AM
Hi John,
I'm trying to figure out how to analyze small (micrometer-sized) inclusions of pyrrhotite (FeS) in pentlandite (Fe,Ni)8S9. I wonder if you might provide a more detailed tutorial on PENEPMA using the geometry files? Can we apply the calculations in CalcZAF to correct the Ni-fluorescence on Fe in the same way that we would for a boundary fluorescence problem?

Thanks,
Mike
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Probeman on January 22, 2014, 05:04:26 PM
Hi Mike,
I assume you're trying to figure out if the FeS inclusions have a trace amount of Ni in them?

If so, you only have to worry about continuum fluorescence because the Fe and S characteristic x-rays will not fluorescence any Ni atoms in the matrix material.

But let's see what effect it will have by running Standard.exe and using the Penfluor/Fanal calculation to start as described in painful detail here:

http://smf.probesoftware.com/index.php?topic=58.0

So, let's run at 15 keV (as opposed to 20 keV) to minimize the interaction volume which we normally might want to for trace Ni!  We can note first however that by using this calculation:

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

at 15 keV the Ni interaction volume in FeS is just under 1 um so we are close but OK:

(https://smf.probesoftware.com/oldpics/i42.tinypic.com/zwm0e8.jpg)

So, assigning FeS as our beam incident material and FeNi (50:50 by weight) as our boundary material (because I haven't calculated a Pentlandite yet!) we obtain the following Penfluor/Fanal result:

(https://smf.probesoftware.com/oldpics/i39.tinypic.com/9vgpqf.jpg)

This is a worst case because there's more Ni in Fe-Ni than in Pentlandite, but it tells you you could very well have a problem analyzing trace Ni in FeS adjacent to Pentlandite.

If you want to calculate the effect for Pentlandite as a boundary material (and you will have to calculate Pentlandite if you want to make the boundary correction in CalcZAF or even if you do it by hand!), it will take about 10 hours to calculate the PAR file and the process is described here:

http://smf.probesoftware.com/index.php?topic=58.msg214#msg214

I hope this helps.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on January 25, 2014, 11:51:50 AM
Quote from: Mike Spilde on January 22, 2014, 09:53:54 AM
I'm trying to figure out how to analyze small (micrometer-sized) inclusions of pyrrhotite (FeS) in pentlandite (Fe,Ni)8S9. I wonder if you might provide a more detailed tutorial on PENEPMA using the geometry files? Can we apply the calculations in CalcZAF to correct the Ni-fluorescence on Fe in the same way that we would for a boundary fluorescence problem?

Hi Mike,
I re-read your question and realize I should add the following points:

1. The Penfluor/Fanal secondary boundary fluorescence modeling in Standard.exe will only work for vertical boundaries.

2. However, ignoring "tertiary effects", one can assume that a lamellae with a width twice that of the vertical boundary calculation distance will have an artifact intensity roughly twice as large. However, that assumption is based on the point equidistant from the two boundaries.

3. For an inclusion the geometric effect is even larger, obviously somewhere between 2 and 4 times the effect from a single vertical boundary. I'm working with a mathematician to try and "transform" these intensity profiles into different geometries such as a hemisphere.

4. In the meantime your best bet is to run the full Penepma 2012 from Standard.exe and select one of the "[hemi]sphere" geometry files as described above.  A little more work, but you'll get the right answer!
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 02, 2014, 01:10:34 PM
Hi John,

Thanks for this post; it's been very useful! I am looking at Fe,Ni-metal inclusions (~1 to 2 microns in diameter) in sulfides in a group of meteorites. Can we do the k ratio corrections in CALCZAF when we use a sphere geometry? Or is that function in CALCZAF (as you described it in "Topic: Nasty Boundary Fluorescence Analytical Situations") only limited to a boundary geometry? If that's the case, I take it we just manually calculate the k ratios as you describe above using the "pe-intens-01.dat" files? Thanks!
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Probeman on June 02, 2014, 04:13:34 PM
Funny you should ask that, I've been working with a mathematician to see if we can "re-normalize" the Fanal calculation output to include other geometries such as particles. For example, if your analysis position is equi-distant from two lamellae, then your total SF contribution is roughly twice that of a single boundary (ignoring third order effects). For a sphere (or hemisphere), it will be between 3 and 4 times the single boundary intensity. We want to transform the single boundary intensity into other geometrical intensities but have not completed this yet...

As for modifying the FORTRAN MC code, unfortunately, the Fanal code was written with a dependence on mirror symmetry and cannot be easily modified according to Cesc Salvat.

So the answer at the present time is no.  But as you say, you can still run the full Penepma GUI with particle geometries, which I should mention has recently been improved so be sure to update.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 04, 2014, 02:21:06 PM
Ok, I finally have my data from the microprobe and the k-ratios from the PENEPMA simulations. How do I actually go about correcting my probe data with these SF k-ratios since CalcZAF isn't an option for the sphere geometry? I haven't been able to find anything describing that process so if you could point me in the general direction, that would be fantastic. Thanks!
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Probeman on June 04, 2014, 03:21:08 PM
Quote from: Sheri Singerling on June 04, 2014, 02:21:06 PM
Ok, I finally have my data from the microprobe and the k-ratios from the PENEPMA simulations. How do I actually go about correcting my probe data with these SF k-ratios since CalcZAF isn't an option for the sphere geometry? I haven't been able to find anything describing that process so if you could point me in the general direction, that would be fantastic. Thanks!

The advantage of doing it in CalcZAF, is that *if* there is a large change in the concentrations due to the SF correction, this could affect the matrix correction, especially for low energy x-ray lines. In CalcZAF, the SF correction is iterated and therefore automatically handles this change in composition.

But usually the SF correction is small enough that this can be ignored, and in that case a simple subtraction of the boundary contribution in wt.% (material B), from the measured concentration will be sufficient.  In the kratio2.dat file, it is this column:

(https://smf.probesoftware.com/oldpics/i57.tinypic.com/x1yqsx.jpg)

One way to check this is to run CalcZAF with the uncorrected concentrations and again with the corrected concentrations and see how different the matrix correction term (ZAFCOR) is between the two for each emitting element.  If it is less than a percent or so, I wouldn't worry, though you could apply it.

For reference please use the paper attached below.

Wait!  I just realized that you used Penepma, not Fanal for this modeling so the Fanal output screen shot doesn't help you!

The problem is that Penepma doesn't separate the beam incident contribution from the SF boundary contribution. So if you have some of the element present in the beam incident material, you'll have the intensity of that added in with the SF intensity.

What you'll need to do is calculate your material with a boundary (as you've already done), then calculate the same material *without* a boundary and subtract the appropriate line intensities from each other.

Does that make sense?  Then you can apply that k-ratio intensity difference to your measurements by converting them to concentrations (just multiply the k-ratio by the matrix correction for this material).
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 05, 2014, 09:46:07 AM
Alright, I'll try that out asap! One more question. This applies to the pe-intens-01.dat files and how you setup the files for the standards. You mentioned how we must have PENEPMA calculate intensities for the standards in addition to our beam incident-boundary materials. I just want to make absolutely sure I've done those simulations correctly because I've gotten very odd k ratios by dividing the I_unk by I_std. I've attached screenshots of the parameters I used for each .IN file (Setups.jpg). I'm mostly concerned that I haven't set up the standard .IN files correctly. The standard setups are labeled "Fe", "Ni", and "S". My beam incident material setup is labeled "metal". I've also attached the pe-intens-01 files for each as well (Outputs.jpg). As you can see, dividing the unknown intensity by the standard intensity (I focused on the Ka intensities) from these numbers gives you K ratios of 1 for S and Ni and 0.99927 for Fe. Any clues as to what I may have done wrong with my setup? Thanks again!

Edit by John: I note that 500 seconds is a very short simulation time and that because of this your uncertainties on the "T" values for the K L3 (Ka) are around 5 to 10%. But it's good to "work out the bugs" as they say on short runs such as this.

Also, I would run the the standards using the normal "Optimize Production of Characteristic X-rays" (first) option.  The SF option might work for a single material, but I have never run it this way, so try and see if that helps.

I'll try some simulations myself overnight and let you know what I find.

Note also that the standard can be a compound, but then you'll have to calculate the std K-factor for which you'll need the pure element std calculated anyway!
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on June 05, 2014, 11:03:13 AM
I ran your compositions as a simple boundary in Fanal just as a "sanity check", and as you can see:

(https://smf.probesoftware.com/oldpics/i61.tinypic.com/jkfxgh.jpg)

and depending on the size of the inclusion there will be a significant enhancement of the inclusion from secondary (continuum) fluorescence. Why is it continuum fluorescence only? Because Fe and S characteristic x-rays cannot fluoresce the Fe K edge.

Note that the opposite can occur when the matrix is low Z such as epoxy as John Fournelle has described in the links here:

http://smf.probesoftware.com/index.php?topic=58.msg209#msg209

Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on June 05, 2014, 12:45:11 PM
Sheri,
It just occured to me that you might be doing too much work!

All you need to calculate (to begin with) is a pure Fe std, your inclusion geometry and a bulk version of your inclusion composition, so

1. Fe
2. Fe90Ni10 bulk
3. Fe90Ni10 inclusion in FeS2.

Then ratio both Fe90Ni10 Fe Ka (K L3) intensities to the pure Fe Ka (K L3) std intensity. That intensity ratio difference is the SF effect with and without the geometric effects and it will vary with the beam position (the default position X = 0, Y = 0 is the center of the inclusion, but remember it's in cm).

Since you are using a pure Fe std, the k-ratios you obtain are elemental k-ratios and therefore represent the percent effect when multiplied by 100.

Does that help?
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 06, 2014, 10:00:54 AM
Thanks for helping me with this John! What about S though? When I ran the Fanal for a boundary condition with Fe90Ni10 and FeS (pyrrhotite not pyrite; I just use pyrite as my standard for my microprobe analyses so that's why it's popped up in some of this discussion), it looks like I'm getting some SF. I've attached the resulting plot. Note that the density for my Fe90Ni10 is wrong. Not quite sure how I did that, but I ran my Fe90Ni10 and FeS2 just to compare to what you got above, and they are similar. So I'm thinking the general problem of SF of S will still exist even with the correct density of Fe90Ni10. I'll have to run another .PAR file if I want to fix that, but for the non-Fanal simulations, I'm using my .MAT files which I've fixed the density for.

Additionally, I ran into some major problems with the pe-intens-01 files yesterday and this morning. What I've found is that the pe-intens-01 files are basically overwriting one another. For example, for my pyrite pe-intens-01 file, I don't have any data listed for S. There is only data for Fe and Ni. I then compared this to my Fe90Ni10 pe-intens-01 file, which also only has Fe and Ni (as it should I suppose), and found that they are exactly the same. The time stamps for the files are also identical meaning it was the same file. Any ideas what this is about? I tried deleting any old batch files and any .IN files and rerunning everything, but the problem still persists. Exiting out of Standard.exe didn't solve the problem either. Thanks again!
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on June 06, 2014, 10:30:18 AM
Hi Sheri,
Yes density matters when distance is a factor.

Yes, I didn't model sulfur but it looks like it is getting fluoresced by Fe and Ni Ka.

The main Penepma window is designed for creating input files and they can be run one at a time there, but as you say, the Run Input File in PENEPMA button will overwrite your previous work.  To avoid this simply use the "Batch Mode" button as described here:

http://smf.probesoftware.com/index.php?topic=59.msg221;topicseen#msg221

and the files will all automatically get saved to the specified folder including the input, geo and mat files like this as they are completed:

(https://smf.probesoftware.com/oldpics/i57.tinypic.com/212smfk.jpg)

Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 06, 2014, 02:16:20 PM
I ran it using the batch mode but still had the files being duplicated. There seems to be something with the order that the files are run which determines which ones are duplicated. For example, I initially ran the following .IN files:
- one for my Fe90Ni10 inclusion surrounded by FeS (using the 1 micron sphere .geo file) -> metal.IN
- one for my Fe standard (using the bulk file) -> Fe.IN
- one for my Ni standard (using the bulk file) -> Ni.IN
- one for my S standard (using the bulk file) -> S.IN
- one for my pure, bulk Fe90Ni10 (using the bulk file) -> pureMetal.IN
PENEPMA ran them in the following order (based on the time stamp on the folders in the batch folder): Fe -> metal -> Ni -> pureMetal -> S.
The pe-intens-01 files that were the same were the metal and the Ni files, and then the pureMetal and the S files. The Fe pe-intens-01 had a time stamp from yesterday so maybe it is a duplicate of the last simulation I ran yesterday. Any ideas? Maybe I should reinstall the whole penepma file.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 06, 2014, 02:51:43 PM
I figured out what the problem was. I was using some .MAT files that were already provided in the penepma folder (Fe, Ni, and pyrite Taylor stds), and these were the ones that would not give me actual data after a batch run. Once I created my own Fe, Ni, and FeS2 .MAT files, they ran just fine!
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on June 06, 2014, 03:48:01 PM
Quote from: Sheri Singerling on June 06, 2014, 02:16:20 PM
I ran it using the batch mode but still had the files being duplicated.

Yes, the files are duplicated because they are copied from the Penepma folder rather than moved. That is normal.  But each .IN file (each Penepma run) creates a sub folder based on the input file name in the user specified "batch" folder when that run finishes.

Quote from: Sheri Singerling
There seems to be something with the order that the files are run which determines which ones are duplicated.

Yes, they are run in alphabetical order.  No need to reinstall, unless you are getting an error.

If you want to chat on the phone or even better if you can let me log in to your computer using team viewer or VNC we could chat on the phone while I show you with the mouse...
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on June 06, 2014, 03:50:10 PM
Quote from: Sheri Singerling on June 06, 2014, 02:51:43 PM
I figured out what the problem was. I was using some .MAT files that were already provided in the penepma folder (Fe, Ni, and pyrite Taylor stds), and these were the ones that would not give me actual data after a batch run. Once I created my own Fe, Ni, and FeS2 .MAT files, they ran just fine!

OK, good, though can't see why they wouldn't "give me actual data after a batch run" if they ran without errors. The .MAT files are based only on the composition and density.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 07, 2014, 11:16:05 AM
Well the .IN files that were created based on the Taylor std .MAT files did run without error, but they were the ones that were duplicates as far as I could tell. I ran much longer simulations with my newly created .MAT files last night, and the data looked good. The pyrite intensity data only had S and Fe, the Fe std only had Fe intensities, the Ni std only had Ni intensities, and the Fe90Ni10 had the appropriate elements as well which is a good sign!

Edit by John: Awesome. So how does the MC data compare to the normal boundary geometry from Fanal?
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on June 08, 2014, 11:47:37 AM
Sheri,
I just remembered that I have some couple and hemisphere MC calculations that I generated for my math friend so he could try and work out a solution:

(https://smf.probesoftware.com/oldpics/i60.tinypic.com/20tgkmx.jpg)
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 09, 2014, 11:01:23 AM
I'll have to try and compare my results to what the Fanal run would have given me. I'll get back to you on that shortly!

In order to apply the corrections, here's what I will do just to make sure I've got this down 100% correctly.
1. Take each of my Fe, S, and Ni intensities from my 1 micron sphere Fe90Ni10 in-tens-01 file and subtract them by each of my Fe, S, and Ni intensities from my bulk Fe90Ni10 in-tens-01 file. This yields the Fe, S, and Ni intensities that are only due to SF.
2. Divide each of my Fe, S, and Ni intensities by the appropriate standard to get each of the k ratios. (I don't know how to do S correctly though because I used pyrite as my standard which isn't pure S. I remember you mentioning that I would need to calculate the standard k factor to correct for using a compound as my standard, but I haven't been able to easily find out how I go about doing that!)
3. Turn these k ratios into concentrations (wt%??) by multiplying them by the ZAF corrections. (I have the ZAF corrections for each element from my actual EPMA analyses. I assume I just use these?)
4. Correct my actual EPMA analyses by subtracting out the SF contribution which I now have in concentration units.

Does that sound right? Almost there!
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on June 09, 2014, 08:23:21 PM
Quote from: Sheri Singerling on June 09, 2014, 11:01:23 AM
1. Take each of my Fe, S, and Ni intensities from my 1 micron sphere Fe90Ni10 in-tens-01 file and subtract them by each of my Fe, S, and Ni intensities from my bulk Fe90Ni10 in-tens-01 file. This yields the Fe, S, and Ni intensities that are only due to SF.

Yes.

Quote from: Sheri Singerling on June 09, 2014, 11:01:23 AM
2. Divide each of my Fe, S, and Ni intensities by the appropriate standard to get each of the k ratios. (I don't know how to do S correctly though because I used pyrite as my standard which isn't pure S. I remember you mentioning that I would need to calculate the standard k factor to correct for using a compound as my standard, but I haven't been able to easily find out how I go about doing that!)

Look in the PFE glossary and check the definitions for k-ratio, std k-factor and ZAF. That will help.  Though it should not make any difference in the MC calculation to use pure S as a std for sulfur.

Note that in your case the sulfur intensity is emitted from FeS2, so use that ZAFCOR. The iron intensity will come from both materials (hence the reason for subtracting), the Ni from only the inclusion.

Quote from: Sheri Singerling on June 09, 2014, 11:01:23 AM
3. Turn these k ratios into concentrations (wt%??) by multiplying them by the ZAF corrections. (I have the ZAF corrections for each element from my actual EPMA analyses. I assume I just use these?)

Sure, that will work.

Quote from: Sheri Singerling on June 09, 2014, 11:01:23 AM
4. Correct my actual EPMA analyses by subtracting out the SF contribution which I now have in concentration units.

Yes.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on June 10, 2014, 09:06:10 AM
Hi Sheri,
It should also be pointed out that depending on the physics details, after your inclusion minus bulk subtraction you will most likely see SF which causes an increase in intensity as the incident beam approaches the boundary, *but* you may also see a decrease in intensity due to lack of self fluorescence, which is especially likely in the FeNi system, but can be visible even in a pure element as described here:

http://smf.probesoftware.com/index.php?topic=126.msg525#msg525

In addition, remember you'll need to do an MC calculation for each inclusion diameter (each geo file) *and* each radii (distance from the inclusion center where X = 0 is the center).
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 10, 2014, 09:58:56 AM
Ok I finally got my SF contribution in wt.%! Thanks for the tips on calculating everything. Fe and Ni are both showing negative effects just as you mentioned might be the case. S is at 7.12 wt.%, Fe at -3.68 wt.%, and Ni at -0.39 wt.% from SF. I might run longer simulations to refine my data. This most recent batch was done for 1000 s which may not be as long as it should. I will also try to compare my results to the Fanal ones for a boundary condition and see if I'm getting ~3-4 times the effect from SF. I will need to redo my .PAR file for FeS though since the density was wrong. Stay tuned!
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 10, 2014, 10:06:27 AM
QuoteIn addition, remember you'll need to do an MC calculation for each inclusion diameter (each geo file) *and* each radii (distance from the inclusion center where X = 0 is the center).
Most of my inclusions are ~1 micron, but I should definitely do MC calculations for the actual diameters for each one. Some of them were a little over 2 microns. How do I do the radii calculations? Does this apply to the beam position option? Thanks!

Edit by John: Yes, the X (or Y) beam position in cm where X = 0 is the center of the inclusion.  One micron inclusions? Oh boy, this starts to get into details of electron spreading from beam focus. You might want to read up on the "aperture" parameter in the Penepma input files.  See the Penepma documentation.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on June 10, 2014, 12:49:03 PM
On a somewhat related question Ed Vicenzi asks about modeling FeNi alloy inclusions in carbon. He's running these simulations now using the (hemi)sphere geometry files, but I decided to run them using the couple geometry just for fun. Here are the results:

Penepma MC modeling down to 200 eV               
C Ka in Fe99Ni1 adjacent to carbon               
3600 seconds each, 20 keV            
   
                   Transition   Intensity   K-ratio (fraction)   Variance (fraction)  Variance (percent)
Bulk carbon:          K L3       1.88E-04       1.00E+00              5.37E-02            ~5.4%
               
0 um Fe99Ni1:         K L3       9.46E-05       5.03E-01              1.21E-01            ~12%
1 um Fe99Ni1:         K L3       5.09E-07       2.71E-03              1.67E+00            ~167%
2 um Fe99Ni1:         K L3       3.58E-09       1.90E-05              2.63E+00            ~263%
4 um Fe99Ni1:         K L2 (?)   4.68E-10       2.49E-06              2.99E+00            ~299%


Obviously the above variances are just too large for the non-zero distances so I'm going to continue longer Penepma calculations, but in the meantime, it appears that there is little SF of C K from Fe and Ni as the 1 um boundary distance concentration of C is roughly 0.27 wt%, though again please note the variance is larger than the result, so statistically this is still a zero k-ratio intensity...

Note that I ran a 0 um distance for this couple (first unknown line above) and you can see that the k-ratio is 0.503 (variance ~12%). Which is *almost* exactly is what one should expect if the beam is at the couple intersection and therefore half on the beam incident material and half on the boundary material!   8)

The (?) on the 4 um distance intensity means that the Monte Carlo calculated intensity for C Ka was so small that no K L3 transitions were observed, only (by chance) the less probable K L2 transition!
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Probeman on June 11, 2014, 10:54:55 AM
The above Penepma calculations were very short (3600 sec each) and the uncertainties were larger than the intensities (at the 1, 2 and 4 um distances), so here is another calculation utilizing PAR files calculated by Penfluor down to 200 eV.

The Penfluor/Fanal model assumes pure Fe as the beam incident material and pure carbon as the boundary material and instead of using MC to calculate the fluorescence effects, Fanal uses an analytical model which provides better precision in a fraction of the time:

(https://smf.probesoftware.com/oldpics/i60.tinypic.com/2hzhkbt.jpg)

But the SF curve is very steep for this highly absorbing system so we might expect some differences between the MC and analytical modeling.

Note also that because the Penfluor calculation depends only on composition and density, once this is calculated (~10 hours for each composition), one can run multiple models in seconds with various beam energies, take off angles and distance from the boundary as seen here where the takeoff angle was modified from 40 to 35 degrees:

(https://smf.probesoftware.com/oldpics/i61.tinypic.com/30voosz.jpg)

And here is the same calculation but where the beam incident material is Fe90Ni10 as opposed to pure Fe:

(https://smf.probesoftware.com/oldpics/i62.tinypic.com/2lv1rg7.jpg)

Remember: to perform Penfluor/fanal couple modeling for secondary fluorescence effects at energies lower than 1 keV, one must set the PenepmaMinimumElectronEnergy keyword to the value in keV. So for the above modeling I had to run the Fe and C materials through Penfluor using a PenepmaMinimumElectronEnergy set to 0.2 (or 200 eV) as seen below.

[software]
PenepmaMinimumElectronEnergy="0.2"

To facilitate modeling with these low energy PAR files, I have attached a number of them below.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on June 12, 2014, 12:35:24 PM
I decided to ZIP up all the low energy PAR files that I have already done and make them available here:

http://probesoftware.com/download/PAR_lessthan1000eV.zip

The ones labeled 500eV are good for oxygen Ka and fluorine Ka, the 200eV ones are good for carbon Ka and nitrogen Ka.

Note that these 200 eV PAR files could also be used for oxygen and fluorine emission modeling, but the 200 eV files will have somewhat poorer statistics for the oxygen and fluorine primary (electron beam) excitation intensities, so better to use PAR files that are calculated to an energy no lower than the emitted energy (which will always be less than the edge energy).

Remember, these PAR files currently can only be utilized in a "couple" geometry, that is, a straight line vertical boundary by Fanal. For (hemi)sphere geometries, the intensities must be calculated using the full Penepma method, which is the subject of the current topic.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 13, 2014, 10:32:14 AM
I finally ran the Fanal for my Fe90Ni10 - FeS couple. Strangely enough, it doesn't look like these results agree with my MC ones. Exporting the results to excel gave me a SF contribution to concentration of 0.16 % for S, -1.44 % for Fe, and -0.58 % for Ni right at the boundary. Even at 3-4 times the effect with my sphere geometry that still gives 0.48 to 0.64 % for S, -4.32 to -5.76 % for Fe, and -1.74 to -2.32 % for Ni. As compared to my MC results (7.12 % S, -3.68 % Fe, -0.39 % Ni), they don't appear to agree. I will run longer MC simulations, but the difference in S is especially striking.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on June 13, 2014, 02:13:13 PM
Quote from: Sheri Singerling on June 13, 2014, 10:32:14 AM
I finally ran the Fanal for my Fe90Ni10 - FeS couple. Strangely enough, it doesn't look like these results agree with my MC ones. Exporting the results to excel gave me a SF contribution to concentration of 0.16 % for S, -1.44 % for Fe, and -0.58 % for Ni right at the boundary. Even at 3-4 times the effect with my sphere geometry that still gives 0.48 to 0.64 % for S, -4.32 to -5.76 % for Fe, and -1.74 to -2.32 % for Ni. As compared to my MC results (7.12 % S, -3.68 % Fe, -0.39 % Ni), they don't appear to agree. I will run longer MC simulations, but the difference in S is especially striking.

Hi Sheri,
These functions are very "steep" and slight differences in distance can often make a large difference in the intensities, not to mention the couple model intensities can't be directly compared to the hemisphere model. I would trust the full Penepma intensities assuming you've got enough precision. Note the poor precision in the 3600 second model I ran for Ed for C Ka in Fe:

http://smf.probesoftware.com/index.php?topic=59.msg1341#msg1341

You're also going to want to check the uncertainties in your pe-intens-01.dat file and I'll run some S Ka in metal simulations myself just to double-check your work.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 16, 2014, 02:45:58 PM
Hi John,

I reran the MC and used a 3600 s simulation time. Here are my results for the SF contribution to concentration for S, Fe, and Ni:

S: 7.166 +/- 0.234 wt. %
Fe: -2.840 +/- 0.318 wt. %
Ni: -0.472 +/- 0.121 wt. %

The uncertainty for Ni looks a bit high so maybe I'll have to run an even longer simulation.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Probeman on June 23, 2014, 04:47:22 PM
I re-ran the C Ka in Fe99Ni1 adjacent or included in pure C for both the couple and hemisphere geometries, but using a longer integration time. That is 50K seconds versus the original 3.6K seconds per simulation as seen here:

http://smf.probesoftware.com/index.php?topic=59.msg1341#msg1341

Here are the 50K seconds simulations calculated for Penepma couple and hemisphere geometries along with the Penfluor couple calculation just for comparison:

(https://smf.probesoftware.com/oldpics/i58.tinypic.com/30i9820.jpg)

Note that the Penepma couple calculations and the Penfluor quick and dirty model produces similar but somewhat different intensities also.

A plot shows that the couple and hemisphere geometries produce quite different k-ratios for C Ka:

(https://smf.probesoftware.com/oldpics/i57.tinypic.com/2z511s8.jpg)

The symbols without error bars have errors larger than the data values!

The data file and plot output are attached below.

Note that the hemisphere calculations were originally plotted using the diameter. They have been updated to plot using the radius.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Probeman on June 24, 2014, 11:49:56 AM
Someone asked to see the Penfluor data plotted up alongside the Penepma data for the C Ka in Fe99Ni1 adjacent to pure C and so here it is.  I added an arrow to show where the 0.5 um k-ratio intensity would plot up, but considering how steep this function is for a very, very absorbing system, the differences aren't as bad as one might think.

(https://smf.probesoftware.com/oldpics/i59.tinypic.com/2w70eht.jpg)

In fact, the k-ratio values at 2 microns and further are essentially identical (within statistics)!

As for the difference in the intensities at less than 2 um? These can probably be explained by the fact that at that distance and with a 20 keV incident beam, you'll get some primary electron scattering into the boundary phase which Penepma will handle properly, while that contribution is neglected in the SF calculation in Fanal. Why? Because Penfluor pre-calculates the PAR files for the primary excitation (and continuum fluorescence) intensities based only on composition- without geometrical considerations in its Monte-Carlo modeling. Fanal then calculates the secondary fluorescence intensities using an analytical model which assumes that all electrons come to rest in the beam incident material. More discussion on this here:

http://smf.probesoftware.com/index.php?topic=58.msg1388#msg1388

What does this mean to us?  Well we should perhaps utilize Penfluor when we need a relatively quick answer, but maybe not trust it quite so much as the interaction volume radius approaches our boundary distance.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on June 30, 2014, 02:32:24 PM
I finally managed to run the MC simulations for both a sphere geometry and a couple geometry in my Fe50Ni50 - FeS system. I used a run time of 3600 s and only did the two radii/distances from boundary since my FeNi inclusions range from 1 to 2 microns in diameter. I plotted the k ratios in addition to log K ratio since my negative values for Ni could not be plotted on the log plot. My uncertainties (represented by the vertical error bars) aren't too bad in comparison to the above example with C in Fe99Ni1!
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on July 08, 2014, 02:27:13 PM
Here are my S ka in Fe90Ni10 at 15 keV comparison between Penepma hemispheres vs. Penepma couples vs. Penfluor/Fanal couples.

(https://smf.probesoftware.com/oldpics/i57.tinypic.com/24opvk8.jpg)

The remaining values I am continuing to calculate...

I've also attached a complete set of the hemisphere geo files in case that would be useful below.
john
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Probeman on July 15, 2014, 04:03:41 PM
Here is an updated plot of S Ka in Fe90Ni1 embedded in FeS2:

(https://smf.probesoftware.com/oldpics/i62.tinypic.com/347a70i.jpg)

Just for fun I also calculated the same for Ni, which gives the following:

(https://smf.probesoftware.com/oldpics/i60.tinypic.com/2isf60z.jpg)

Not bad considering the size of the 1 sigma error bars!

Don't know why the Ni intensity drops as the boundary is approached?  A hint is here:

http://smf.probesoftware.com/index.php?topic=126.msg525#msg525

Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on July 16, 2014, 02:50:04 PM
A more recent calculation of Ed's C Ka in Fe/Ni included in carbon (epoxy):

(https://smf.probesoftware.com/oldpics/i59.tinypic.com/2118iv4.jpg)

Data files attached below.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on August 08, 2014, 01:49:33 PM
Has anyone run into difficulties with simulations saying they are complete after only 21 secs? I've set my simulations to a dump time of 60 s and a simulation time of 3600 s. This has only cropped up with 2 of my 16 simulations. I don't know what's unique about these two runs (they are Fe40Ni60 and Fe45Ni55 1.25 micron spheres in FeS). Some of my other successful simulations have also been 1.25 micron spheres and also had the Fe40Ni60 and Fe45Ni55 compositions so it can't have anything to do with the .GEO or .MAT files. I've compared the .IN files of these troublesome ones to my simulations that ran without issue for 3600 s but found no difference that would explain this. I've remade the .IN files a number of times now with no improvement. Any suggestions would be wonderful!
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: John Donovan on August 08, 2014, 03:23:31 PM
Quote from: Sheri Singerling on August 08, 2014, 01:49:33 PM
Has anyone run into difficulties with simulations saying they are complete after only 21 secs? I've set my simulations to a dump time of 60 s and a simulation time of 3600 s. This has only cropped up with 2 of my 16 simulations. I don't know what's unique about these two runs (they are Fe40Ni60 and Fe45Ni55 1.25 micron spheres in FeS). Some of my other successful simulations have also been 1.25 micron spheres and also had the Fe40Ni60 and Fe45Ni55 compositions so it can't have anything to do with the .GEO or .MAT files. I've compared the .IN files of these troublesome ones to my simulations that ran without issue for 3600 s but found no difference that would explain this. I've remade the .IN files a number of times now with no improvement. Any suggestions would be wonderful!

Hi Sheri,
I assume this is in the Penepma window in Standard? I would first ask you to update (yes, again).
I am flying back to Eugene as I write from the Hartford M&M- sorry you didn't make it. Awesome conference!

I am running many, many, many Penepma simulations all the time and have not seen this, but maybe it's a computer specific thing.  Try another computer?
john
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Sheri Singerling on August 09, 2014, 02:08:57 PM
Yes it is PENEPMA within the Standards window. I will update my penepma and see if that helps! I have an old laptop that I can try the simulation on if that doesn't fix the issue. One day I will be able to attend a conference other than LPSC or MetSoc! Wish I could've been there.
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Probeman on August 10, 2014, 03:58:24 PM
Quote from: Sheri Singerling on August 09, 2014, 02:08:57 PM
Yes it is PENEPMA within the Standards window. I will update my penepma and see if that helps! I have an old laptop that I can try the simulation on if that doesn't fix the issue. One day I will be able to attend a conference other than LPSC or MetSoc! Wish I could've been there.

Just update using the CalcZAF.msi file.
john
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Les Moore on November 30, 2014, 02:23:41 PM
Hi all,

I hadn't seen this post but I am glad that people are getting up to speed wrt my nightmare.

The CaO:Al2O3 ratio of inclusions in steel is of primary importance to assessing the performance of the inclusion modification process of Al2O3 inclusions in steel.

But...  The Ca:Al ratio is a horrible coupled situation as a function of particle size.  I hope to present some of this at the AMAS.

The best work in this area is by Chris Pistorius and Nareem Verma in the Microscopy and Microanalysis Journal sometime in 2011. This showed the effect of inclusion shape, size and kV and also the effect of the spectrometer location.  The work also shows the effect of the embedded nature of the inclusion centroid i.e. what he calls caps, hemispheres and truncated spheres.

Have a look at his work, it will make most analysts attempting to analyse small inclusions in a matrix with strong correction effects a bit wobbly at the knees. 

WRT the Ca:Al in the inclusions, it's a horribly complicated analytical system and unfortunately, there are also thermodynamic reasons why the chemistry of the inclusions may well behave in this manner too. A classic microanalysis connundrum at the boundaries of resolution.  PhD anyone?

Les




Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: lsaper on September 23, 2017, 02:14:05 PM
Did a quick search around and couldn't find anything:

For the embedded sphere geometry can PENEMPA model the matrix as the beam incident material?

e.g. For a spherical glass inclusion embedded in olivine, can we model the contribution of secondary fluorescence to Ca measurements of the enclosing olivine?

Thank you,
Lee
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Probeman on September 23, 2017, 05:38:44 PM
Quote from: lsaper on September 23, 2017, 02:14:05 PM
Did a quick search around and couldn't find anything:

For the embedded sphere geometry can PENEMPA model the matrix as the beam incident material?

e.g. For a spherical glass inclusion embedded in olivine, can we model the contribution of secondary fluorescence to Ca measurements of the enclosing olivine?

Thank you,
Lee

Yes. But you need to modify the beam position:

(https://smf.probesoftware.com/gallery/395_23_09_17_5_37_34.png)

to be non-zero.  To make it easy we recently modified the units to be microns, so be sure to update CalcZAF from the Help menu.
john
Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: lsaper on September 25, 2017, 12:02:57 PM
Thank you for the reply and the heads up to install the latest update.

After attempting some calculations, I want to clarify whether I'm doing this properly.

I have attached a file showing a representative setup for creating the input files. The beam incident material is set to glass (the inclusion) with the matrix set to olivine (material I am interesting in calculating SF for). The geometry file is 160mic_sphere.geo and in this example I have set X = 161 (want 1 micron into the olivine from the interface) Y = 0 Z = 1. Assuming these settings are appropriate, I created several of these .in files by incrementing the X-axis beam position to obtain a profile into the matrix and ran them sequentially in batch mode. In addition I have run the same calculation on a bulk geometry (X=Y=0 Z=1) on a synthetic anorthite standard for Ca. I then used the automated "extract k-ratios" tool in the batch mode dialog to calculate the Ca K-alpha k-ratios for the modeled olivine profile, over the anorthite standard. All calculations are for 3600s.

When I run this there is a lot of scatter in the modeled K-ratios. I want to make sure that I'm doing the procedure right before running the calculations for longer. Thanks for your patience and help!

Lee


Title: Re: Modeling Inclusions/Particles Embedded in a Matrix
Post by: Probeman on September 25, 2017, 12:26:18 PM
Quote from: lsaper on September 25, 2017, 12:02:57 PM
Thank you for the reply and the heads up to install the latest update.

After attempting some calculations, I want to clarify whether I'm doing this properly.

I have attached a file showing a representative setup for creating the input files. The beam incident material is set to glass (the inclusion) with the matrix set to olivine (material I am interesting in calculating SF for). The geometry file is 160mic_sphere.geo and in this example I have set X = 161 (want 1 micron into the olivine from the interface) Y = 0 Z = 1. Assuming these settings are appropriate, I created several of these .in files by incrementing the X-axis beam position to obtain a profile into the matrix and ran them sequentially in batch mode. In addition I have run the same calculation on a bulk geometry (X=Y=0 Z=1) on a synthetic anorthite standard for Ca. I then used the automated "extract k-ratios" tool in the batch mode dialog to calculate the Ca K-alpha k-ratios for the modeled olivine profile, over the anorthite standard. All calculations are for 3600s.

When I run this there is a lot of scatter in the modeled K-ratios. I want to make sure that I'm doing the procedure right before running the calculations for longer. Thanks for your patience and help!

Lee

I'd probably leave the Z at 1000 or 10,000 um but it should not matter.

Otherwise it seems reasonable, but yes you'll need to run at least 10-20 hours.

Just as an sanity check you should try the same thing in the secondary fluorescence dialog (next menu down in Standard).  You will only have a vertical boundary geometry but it's easy to specify which is the beam incident material.
john