-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sound velocity anisotropy (Vp, Vs) discrepancy between different versions of MTEX #1830
Comments
Hi
Version 5.9 should be correct, you may want to look at documentation as there was quite some changes in the way you script these calxulations
<https://mtex-toolbox.github.io/CPOSeismicProperties.html>
Plot seismic wave velocities and polarization directions for aggregates | MTEX<https://mtex-toolbox.github.io/CPOSeismicProperties.html>
mtex-toolbox.github.io<https://mtex-toolbox.github.io/CPOSeismicProperties.html>
[favicon.png] <https://mtex-toolbox.github.io/CPOSeismicProperties.html>
Cheers
Luiz
Luiz F. G. Morales
ScopeM - ETH Zürich
Sent from iPhone
On 17 May 2023, at 18:37, ekolesni ***@***.***> wrote:
What do you want to do?
I would like to calculate sound velocity anisotropy of a powder sample from its IPF
What data do you have?
I use odf obtained from XRD diffraction
What code do you use?
Please provide minimalist code with code in the following form
% load the data
pf = PoleFigure.load(fname,h,CS,SS,'interface','beartex');
odffile_name = calcODF(pf, 'resolution',5*degree)
ipf = Miller(0,0,1,CS)
nextAxis
% extrema Vp
[maxVp_exp, maxVpPos_exp] = max(vp_exp);
[minVp_exp, minVpPos_exp] = min(vp_exp);
% percentage anisotropy Vp
AVp_exp = 200*(maxVp_exp-minVp_exp) / (maxVp_exp+minVp_exp);
nextAxis
% Plot P-wave velocity (km/s)
plotPDF(ebsd,Miller(1,0,0,ebsd.CS)
plot(vp_exp,'contourf','complete','upper')
mtexTitle('Vp (km/s)',titleOpt{:})
xlabel(['Vp Anisotropy = ',num2str(AVp_exp,'%6.1f')],titleOpt{:})
**What result do you get**
I get in 5.9.0 a lower value of Vp anisotropy of powder sample than on earlier version of MTEX (5.3.0)
**What result do you expect**
I am wondering if there is a bug in the last version or there was some problem fixed in previous releases?
**Error Message**
If you get an error message copy and paste it below
put the error message here
**What MTEX version do you use?**
5.9.0
—
Reply to this email directly, view it on GitHub<#1830>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALE5IN7X4QVVV2V5YHYX4HTXGT5E3ANCNFSM6AAAAAAYFLEQEI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#1830", "url": "#1830", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
Dear Luiz,
Thank you!
Best,
Efim
Luiz Morales schrieb am 2023-05-17:
… Hi
Version 5.9 should be correct, you may want to look at documentation as there was quite some changes in the way you script these calxulations
<https://mtex-toolbox.github.io/CPOSeismicProperties.html>
Plot seismic wave velocities and polarization directions for aggregates | MTEX<https://mtex-toolbox.github.io/CPOSeismicProperties.html>
mtex-toolbox.github.io<https://mtex-toolbox.github.io/CPOSeismicProperties.html>
[favicon.png] <https://mtex-toolbox.github.io/CPOSeismicProperties.html>
Cheers
Luiz
Luiz F. G. Morales
ScopeM - ETH Zürich
Sent from iPhone
On 17 May 2023, at 18:37, ekolesni ***@***.***> wrote:
What do you want to do?
I would like to calculate sound velocity anisotropy of a powder sample from its IPF
What data do you have?
I use odf obtained from XRD diffraction
What code do you use?
Please provide minimalist code with code in the following form
% load the data
pf = PoleFigure.load(fname,h,CS,SS,'interface','beartex');
odffile_name = calcODF(pf, 'resolution',5*degree)
ipf = Miller(0,0,1,CS)
nextAxis
% extrema Vp
[maxVp_exp, maxVpPos_exp] = max(vp_exp);
[minVp_exp, minVpPos_exp] = min(vp_exp);
% percentage anisotropy Vp
AVp_exp = 200*(maxVp_exp-minVp_exp) / (maxVp_exp+minVp_exp);
nextAxis
% Plot P-wave velocity (km/s)
plotPDF(ebsd,Miller(1,0,0,ebsd.CS)
plot(vp_exp,'contourf','complete','upper')
mtexTitle('Vp (km/s)',titleOpt{:})
xlabel(['Vp Anisotropy = ',num2str(AVp_exp,'%6.1f')],titleOpt{:})
**What result do you get**
I get in 5.9.0 a lower value of Vp anisotropy of powder sample than on earlier version of MTEX (5.3.0)
**What result do you expect**
I am wondering if there is a bug in the last version or there was some problem fixed in previous releases?
**Error Message**
If you get an error message copy and paste it below
put the error message here
**What MTEX version do you use?**
5.9.0
—
Reply to this email directly, view it on GitHub<#1830>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALE5IN7X4QVVV2V5YHYX4HTXGT5E3ANCNFSM6AAAAAAYFLEQEI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#1830", "url": "#1830", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
--
Reply to this email directly or view it on GitHub:
#1830 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
I would like to add several points here. I have tried to trace the origin of the problem and it is not there before version 5.9.0., i.e. before the change of the ODF class to the SO3Fun. Somehow different versions with different classes compute the bulk elastic tensor from ODFs differently. If I use exactly the same input file for ODF and compute the bulk tensor using the same single-crystal Cij tensor I get different results in earlier (before 5.9.0) and later versions. [CVoightFeSi14Textured_exp,CReussFeSi14Textured_exp,CHillFeSi14Textured_exp] = calcTensor(odf141,CFeSi14)
in later versions: [CVoightFeSi14Textured_exp,CReussFeSi14Textured_exp,CHillFeSi14Textured_exp] = calcTensor(odf141,CFeSi14)
I have tried to play around a bit and here are my observations: So, once again, for me, it looks like some error from going from the ODF class to the SO3Fun class. The difference in tensors might not look big, but it results in a significant difference in velocity calculations - with a 3-4 times difference in the anisotropy. @lfgmorales I would greatly appreciate it if you or someone else from the team could have a look at this matter. I am happy to help anyhow if I can. Best, |
Hi Ilya
Thanks for the tests, I will look deeper into this in the coming days and will talk to Ralf and Rüdiger. On the mean time, would you mind to share one of your *.mat files and maybe one ebsd file for me to mimic what you have done?
Cheers
Luiz
Luiz F. G. Morales
ScopeM - ETH Zürich
Sent from iPhone
On 30 May 2023, at 17:29, Ilya-Ku-I ***@***.***> wrote:
I would like to add several points here. I have tried to trace the origin of the problem and it is not there before version 5.9.0., i.e. before the change of the ODF class to the SO3Fun. Somehow different versions with different classes compute the bulk elastic tensor from ODFs differently. If I use exactly the same input file for ODF and compute the bulk tensor using the same single-crystal Cij tensor I get different results in earlier (before 5.9.0) and later versions.
in earlier versions:
`[CVoightFeSi14Textured_exp,CReussFeSi14Textured_exp,CHillFeSi14Textured_exp] = calcTensor(odf141,CFeSi14)
CHillFeSi14Textured_exp
CHillFeSi14Textured_exp = stiffnessTensor (show methods, plot)
density: 14.597
unit : GPa
rank : 4 (3 x 3 x 3 x 3)
mineral: Fe (6/mmm, X||a*, Y||b, Z||c*)
tensor in Voigt matrix representation: *10^2
22.688 12.917 12.13 0.006 0.03 0.058
12.917 22.562 12.224 -0.006 0.022 -0.003
12.13 12.224 23.564 0.002 -0.058 -0.044
0.006 -0.006 0.002 4.832 -0.008 0.003
0.03 0.022 -0.058 -0.008 4.84 0.014
0.058 -0.003 -0.044 0.003 0.014 4.983`
in later versions:
`[CVoightFeSi14Textured_exp,CReussFeSi14Textured_exp,CHillFeSi14Textured_exp] = calcTensor(odf141,CFeSi14)
CHillFeSi14Textured_exp
CHillFeSi14Textured_exp = stiffnessTensor (xyz)
density: 14.597
unit : GPa
rank : 4 (3 x 3 x 3 x 3)
tensor in Voigt matrix representation: *10^2
22.632 12.712 12.419 0.002 0.009 0.021
12.712 22.582 12.455 -0.002 0.008 0
12.419 12.455 22.969 0.001 -0.02 -0.016
0.002 -0.002 0.001 4.968 -0.001 0
0.009 0.008 -0.02 -0.001 4.976 0.005
0.021 0 -0.016 0 0.005 4.991
`
I have tried to play around a bit and here are my observations:
If one saves the odf from earlier versions as a .mat file and then imports it in the later versions (it converts it automatically to SO3Fun class) the computation result in the tensor from the later versions.
If one saves the bulk tensor from earlier versions as a .mat file and then imports it in the later versions the computation result in the tensor from the later versions. Consequently, the velocity calculations are different.
So, once again, for me, it looks like some error from going from the ODF class to the SO3Fun class. The difference in tensors might not look big, but it results in a significant difference in velocity calculations - with a 3-4 times difference in the anisotropy.
I have checked it for several experimental odf-s and the difference is always there. And it is not only a question of which version of mtex is better to use. If the correct calculations are performed only starting from version 5.9.0 it means that all bulk elastic tensors calculated from ODFs using mtex before 2023 are wrong and all publications (including some by our group) using them should be corrected.
@lfgmorales<https://github.com/lfgmorales> I would greatly appreciate it if you or someone else from the team could have a look at this matter. I am happy to help anyhow if I can.
Best,
Ilya
—
Reply to this email directly, view it on GitHub<#1830 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALE5IN53TABM2VZOOCN3GXTXIYG4HANCNFSM6AAAAAAYFLEQEI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#1830 (comment)", "url": "#1830 (comment)", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
Hello Luiz, Thanks for the quick reply! Attached is .zip with odf, single crystal stiffness tensor, bulk stiffness tensor saved in the 5.5.1 version, and the scripts that I use to extract the odf from the experimental data. It is not a ebsd file but a file with Pole Figure Data. Best, |
@lfgmorales May I ask if you had a chance to have a look? Best, |
Hi Ilya,
No, unfortunately not yet, but this is in my to-do list, possibly by Monday I can have a look on that, I apologize for the delay
cheers
Luiz
On 29 Jun 2023, at 15:12, Ilya-Ku-I ***@***.******@***.***>> wrote:
@lfgmorales<https://github.com/lfgmorales>
Hello Luiz,
May I ask if you have a chance to have a look?
Best,
Ilya
—
Reply to this email directly, view it on GitHub<#1830 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALE5IN5WQRGWOE5T6FVFSBLXNV5KFANCNFSM6AAAAAAYFLEQEI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#1830 (comment)", "url": "#1830 (comment)", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
Hi, |
@kilir Thanks for the try to solve the issue. Could you please clarify what exactly you cannot reproduce? For me, if I use the same experimental data (or the same EVPSC data - I checked and the mismatch results is the same) to calculate the aggregate tensor I get different results in versions before 5.8.2 (included) or after. In both versions when I import the data to create the orientation distribution function (odf) and plot the IPF they look identical: The odf can be created either from the pole figure data(experimental - via odf = calcODF(pf)) or from Euler angles (EVPSC via odf = calcDensity(data)). I use this odf to calculate the bulk tensor. I though that the issue may be related to the high Cij values so I tried with to different single-crystal tensors: tensor in Voigt matrix representation: CFeSi14 = stiffnessTensor (Fe) tensor in Voigt matrix representation: *10^2 I do calculations using [CVoightFeSi14Textured,CReussFeSi14Textured,CHillFeSi14Textured] = calcTensor(odf,CFeSi14_low). The resulting bulk tensors are different in earlier and later versions. In earlier versions with the 1x1 ODF file I get the tensors below and high anisotropy of velocities: CHillFeSi14Textured = stiffnessTensor (xyz) tensor in Voigt matrix representation:
|
This one f5bd9f4 introduced the change. Edit: the odf is fine - I simply forgot to square the norm - is resolved. ![]() ![]() ![]()
|
Hi ekolesni, thank you for reporting this issue. This was indeed a regression against earlier version. Could you please check the fix 6755b39? All the best, Ralf. |
Hi Ralf
I can confirm the fix 6755b39<6755b39> fixes the issue, I ran tests with develop version, 5.10, 5.9 and 5.8.1-5.8.2 and the results with the fix are the same as the versions 5.8.1 and 5.8.2
Development version
tensor in Voigt matrix representation:
241.93 74.34 78.25 0.71 4.68 -3.15
74.34 210.34 73.7 3.59 -0.56 -1.83
78.25 73.7 252.19 6.46 4.61 -0.32
0.71 3.59 6.46 76.84 -0.41 1.65
4.68 -0.56 4.61 -0.41 84.87 2.19
-3.15 -1.83 -0.32 1.65 2.19 74.49
MTEX 5.9
tensor in Voigt matrix representation:
237.68 75.29 76.92 0.32 2.07 -1.3
75.29 223.44 75.05 1.77 -0.18 -0.87
76.92 75.05 242.28 2.73 2.05 -0.18
0.32 1.77 2.73 78.25 -0.23 0.8
2.07 -0.18 2.05 -0.23 81.68 0.98
-1.3 -0.87 -0.18 0.8 0.98 77.16
MTEX 5.8.1
tensor in Voigt matrix representation:
241.93 74.34 78.25 0.71 4.68 -3.15
74.34 210.34 73.7 3.59 -0.56 -1.83
78.25 73.7 252.19 6.46 4.61 -0.32
0.71 3.59 6.46 76.84 -0.41 1.65
4.68 -0.56 4.61 -0.41 84.87 2.19
-3.15 -1.83 -0.32 1.65 2.19 74.49
Cheers
Luiz
On 16 Jul 2023, at 22:27, Ralf Hielscher ***@***.******@***.***>> wrote:
Hi ekolesni,
thank you for reporting this issue. This was indeed a regression against earlier version. Could you please check the fix 6755b39<6755b39>?
All the best,
Ralf.
—
Reply to this email directly, view it on GitHub<#1830 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALE5INZG6EHQEYEGFM5EMGLXQRFBTANCNFSM6AAAAAAYFLEQEI>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#1830 (comment)", "url": "#1830 (comment)", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
Hello Ralf, I checked the updated 6755b39 on 5.10.0 with sqrt, now the calculation result matches with previous versions of MTEX. Best regards, |
By the way, in df09ff3 I was able speed up the computation about a factor of 20. This may not so important for a single average. But if you compute multiple averages it might be helpful. Ralf. |
I tried the df09ff3 on my data, The result is almost the same except a small difference on the order of 10^(-5). Though, for me such level of precision is not important. Best, |
What do you want to do?
I would like to calculate sound velocity anisotropy of a powder sample from its IPF
What data do you have?
I use odf obtained from XRD diffraction
What code do you use?
Please provide minimalist code with code in the following form
put the error message here
The text was updated successfully, but these errors were encountered: