Author Topic: Modeling Inclusions/Particles Embedded in a Matrix  (Read 37615 times)

Sheri Singerling

  • Post Doc
  • ***
  • Posts: 20
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #15 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!

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3276
  • Other duties as assigned...
    • Probe Software
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #16 on: June 06, 2014, 03:48:01 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...
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3276
  • Other duties as assigned...
    • Probe Software
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #17 on: June 06, 2014, 03:50:10 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.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Sheri Singerling

  • Post Doc
  • ***
  • Posts: 20
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #18 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?
« Last Edit: June 07, 2014, 11:32:14 AM by John Donovan »

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3276
  • Other duties as assigned...
    • Probe Software
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #19 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:

John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Sheri Singerling

  • Post Doc
  • ***
  • Posts: 20
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #20 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!

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3276
  • Other duties as assigned...
    • Probe Software
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #21 on: June 09, 2014, 08:23:21 PM »
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.

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.

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.

4. Correct my actual EPMA analyses by subtracting out the SF contribution which I now have in concentration units.

Yes.
« Last Edit: June 09, 2014, 10:26:53 PM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3276
  • Other duties as assigned...
    • Probe Software
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #22 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://probesoftware.com/smf/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).
« Last Edit: June 10, 2014, 09:25:26 AM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Sheri Singerling

  • Post Doc
  • ***
  • Posts: 20
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #23 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!

Sheri Singerling

  • Post Doc
  • ***
  • Posts: 20
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #24 on: June 10, 2014, 10:06:27 AM »
Quote
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).
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.
« Last Edit: June 10, 2014, 10:50:05 AM by John Donovan »

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3276
  • Other duties as assigned...
    • Probe Software
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #25 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!
« Last Edit: June 12, 2014, 11:00:43 AM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Probeman

  • Emeritus
  • *****
  • Posts: 2838
  • Never sleeps...
    • John Donovan
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #26 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:



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:



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



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.
« Last Edit: June 12, 2014, 10:26:10 AM by John Donovan »
The only stupid question is the one not asked!

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3276
  • Other duties as assigned...
    • Probe Software
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #27 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.
« Last Edit: June 12, 2014, 12:41:23 PM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Sheri Singerling

  • Post Doc
  • ***
  • Posts: 20
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #28 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.
« Last Edit: June 13, 2014, 10:35:14 AM by Sheri Singerling »

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3276
  • Other duties as assigned...
    • Probe Software
Re: Modeling Inclusions/Particles Embedded in a Matrix
« Reply #29 on: June 13, 2014, 02:13:13 PM »
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://probesoftware.com/smf/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.
« Last Edit: June 13, 2014, 02:18:08 PM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"