Skip to content
Snippets Groups Projects
Commit cd748432 authored by Laura Nervo's avatar Laura Nervo
Browse files

gtCrystGetSigmas : calculates sigma values for cubic and hcp materials...

gtCrystGetSigmas : calculates sigma values for cubic and hcp materials (extracted from GtAssembleVol3D). For hcp materials, 'X' and 'Y' conventions are taken into account.

Signed-off-by: default avatarLaura Nervo <laura.nervo@esrf.fr>
parent 755441be
No related branches found
No related tags found
No related merge requests found
function sigmas = gtCrystGetSigmas(crystal_system, latticepar, convention)
% GTCRYSTGETSIGMAS Calculates CSL sigmas values for cubic and hexagonal crystal
% sigmas = gtCrystGetSigmas(crystal_system, latticepar, [convention])
% -------------------------------------------------------------------
% INPUT:
% crystal_system =
% latticepar =
% convention = <string> hcp axes convention {'X'}|'Y'
if ~exist('latticepar','var') || isempty(latticepar)
parameters = [];
load('parameters.mat');
latticepar = parameters.cryst.latticepar;
clear parameters
end
if ~exist('convention','var') || isempty(convention)
convention = 'X';
end
if strcmpi(crystal_system, 'cubic')
%sigma s: type, angle, axis cart, brandon criteria {, rodrigues}
sigmas = [ 3 60 1 1 1 0 0.333 0.333 0.333; ...
5 36.86 1 0 0 0 0.333 0 0; ...
7 38.21 1 1 1 0 0.199 0.199 0.199; ...
9 38.94 1 1 0 0 0.25 0.25 0; ...
11 50.47 1 1 0 0 0.333 0.333 0; ...
13 22.62 1 0 0 0 0.2 0 0; ...
13 27.79 1 1 1 0 0.143 0.143 0.143];
%add brandon criteria
sigmas(:, 6) = 15 * sigmas(:, 1) .^ (-0.5);
sigmaNorms = sqrt(sum(sigmas(:, 3:5) .* sigmas(:, 3:5), 2));
%normalise axis
sigmas(:, 3:5) = sigmas(:, 3:5) ./ sigmaNorms(:, [1 1 1]);
elseif strcmpi(crystal_system, 'hexagonal')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% added on 2013-10-09 by LNervo
% R. Bonnet, E. Cousineau, D.H. Warrington (1981) "Determination of
% near-coincident cells for hexagonal crystals. Related DSC
% lattices" Acta Crystallographica, A37, 184-189
% Bozzolo et al. (2010) "Misorientations induced by deformation
% tiwnning in titanium" J. Appl. Cryst. 43, 596-602
% CSL values for HCP; cartesian axis in Y-convention originally
% sigma for hcp s: type, angle, axis hex, brandon criteria, axis cart
sigmas = [ 7 21.8 0 0 0 1 0 0 0 1; ... %7a
7 64.6 1 0 -1 0 0 1 0 0; ... %7b
11 35.1 1 0 -1 0 0 1 0 0; ... %11a
11 84.8 2 -1 -1 0 0 0 1 0; ... %11b
13 27.8 0 0 0 1 0 0 0 1; ... %13a
13 57.4 2 -1 -1 0 0 0 1 0; ... %13b
13 76.7 1 0 -1 0 0 1 0 0; ... %13c
17 40.1 2 -1 -1 0 0 0 1 0; ... %17a NO Ti
17 79.8 3 -1 -2 0 0 0 0 0; ... %17b NONE
19 13.2 0 0 0 1 0 0 0 1; ... %19a
19 65.1 10 -5 -5 3 0 0 0 0; ... %19b
19 87.0 1 0 -1 0 0 1 0 0; ... %19c
23 55.6 1 0 -1 0 0 1 0 0; ... %23a NONE
23 72.3 2 -1 -1 0 0 0 1 0; ... %23b NO Ti
23 86.3 10 0 -10 3 0 0 0 0; ... %23c NONE
];
if strcmpi(convention, 'X')
sigmas(:, 8:10) = gtHex2Cart(sigmas(:, 3:6), latticepar, convention);
end
%add brandon criteria: is it also for hcp? (laura)
sigmas(:, 7) = 15 * sigmas(:, 1) .^ (-0.5);
sigmaNorms = sqrt(sum(sigmas(:, 8:10) .* sigmas(:, 8:10), 2));
%normalise axis
sigmas(:, 8:10) = sigmas(:, 8:10) ./ sigmaNorms(:, [1 1 1]);
end
end % end of function
function [info, sigma] = gtCrystTwinTest(R1, R2, phaseID, varargin)
% GTCRYSTTWINTEST Tests if the two orientations are from two twins
% [info, sigma] = gtCrystTwinTest(R1, R2, [phaseID], varargin)
% ------------------------------------------------------------
% INPUT:
% R1 and R2 = Rodriguez vectors of the two different orientations
% phaseID = current phase
%
% OPTIONAL INPUT (parse by pairs):
% symm = symmetry operators from gtCrystGetSymmetryOperators {[]}
% sigmas = sigma values from gtCrystGetSigmas {[]}
% merge_angle = a threshold to decide if the angle is small {5}
% convention = hcp crystal axes convention {'X'}
%
% Version 001 13-11-2013 by LNervo
if ~exist('phaseID','var') || isempty(phaseID)
phaseID = 1;
end
app.symm = [];
app.sigmas = [];
app.merge_angle = 5;
app.convention = 'X';
app = parse_pv_pairs(app, varargin);
parameters = [];
load('parameters.mat');
crystal_system = parameters.cryst(phaseID).crystal_system;
latticepar = parameters.cryst(phaseID).latticepar;
spacegroup = parameters.cryst(phaseID).spacegroup;
if isempty(app.symm)
app.symm = gtCrystGetSymmetryOperators(crystal_system, spacegroup);
end
if isempty(app.sigmas)
app.sigmas = gtCrystGetSigmas(crystal_system, latticepar, app.convention);
end
sigmas = app.sigmas;
sigma = []; % default sigma
if strcmp(crystal_system, 'cubic')
[mis_angle, mis_axis, mis_info] = gtDisorientation(R1.', R2.', app.symm, 'sort','descend');
if mis_angle > 90
mis_angle = 180 - mis_angle;
end
sigmaOr = [];
if ~isempty(mis_axis)
% determine sigma type
test_angle = abs(mis_angle - sigmas(:, 2)) < sigmas(:, 6);
test_axis = abs(acosd(dot(repmat(mis_axis,size(sigmas,1),1), sigmas(:, 3:5), 2))) < sigmas(:, 6);
sigmaOr = sigmas(find(test_angle | test_axis), :);
sigma = sigmas(find(test_angle & test_axis), 1);
end
elseif strcmp(crystal_system, 'hexagonal')
% In the case of hexagonal crystals
[mis_angle, mis_axis, mis_info] = gtDisorientation(R1.', R2.', app.symm, ...
'latticepar', latticepar, 'convention', app.convention);
if mis_angle > 90
mis_angle = 180 - mis_angle;
end
sigmaOr = [];
if ~isempty(mis_axis)
% determine sigma type
test_angle = abs(mis_angle - sigmas(:, 2)) < sigmas(:, 7);
test_axis = abs(acosd(dot(repmat(mis_axis,size(sigmas,1),1), sigmas(:, 8:10), 2))) < sigmas(:, 7);
sigmaOr = sigmas(find(test_angle | test_axis), :);
sigma = sigmas(find(test_angle & test_axis), :);
end
else
disp('Crystal system is not currently supported... Quitting')
return
end
% add low angle (merge grains) criteria
if (mis_angle < app.merge_angle)
sigma = -1;
end
info.R1 = R1;
info.R2 = R2;
info.mis_angle = mis_angle;
info.mis_axis = mis_axis;
info.sigmaOr = sigmaOr;
info.sigmaAnd = sigma;
info.sigmas = app.sigmas;
info.merge_angle = app.merge_angle;
info.convention = app.convention;
info = gtAddMatFile(info, mis_info, true, true);
end % end function twinTest
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment