Skip to content

Commit

Permalink
docu
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfHielscher committed Jul 3, 2023
1 parent 6791809 commit 970e94b
Show file tree
Hide file tree
Showing 9 changed files with 240 additions and 30 deletions.
8 changes: 8 additions & 0 deletions _data/sidebars/function_reference_sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5953,6 +5953,10 @@ entries:
url: /SO3VectorField.display.html
output: web

- title: "div"
url: /SO3VectorField.div.html
output: web

- title: "dot"
url: /SO3VectorField.dot.html
output: web
Expand Down Expand Up @@ -6070,6 +6074,10 @@ entries:
url: /SO3VectorFieldHarmonic.display.html
output: web

- title: "div"
url: /SO3VectorFieldHarmonic.div.html
output: web

- title: "dot"
url: /SO3VectorFieldHarmonic.dot.html
output: web
Expand Down
Binary file modified images/SingleSlipModel_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/SingleSlipModel_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/SingleSlipModel_07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/SingleSlipModel_08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 23 additions & 30 deletions pages/documentation_matlab/SingleSlipModel.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,16 @@
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>Sigle Slip Model</title><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.source" content="script_SingleSlipModel.m"></head><body><font size="2"><a href="https://github.com/mtex-toolbox/mtex/blob/develop/doc/Plasticity/SingleSlipModel.m">
edit page</a></font><div><!--introduction--><p>Details to this model can be found in</p><div><ul><li><a href="https://doi.org/10.1093/gji/ggy442">An analytical finite-strain parametrization for texture evolution in deforming olivine polycrystals</a>, Geoph. J. Intern. 216, 2019.</li></ul></div><!--/introduction--><h2 id="1">The Continuity Equation</h2><p>The evolution of the orientation distribution function (ODF) \(f(g)\) with respect to a crystallopgraphic spin \(\Omega(g)\) is governed by the continuity equation</p><p>\[\frac{\partial}{\partial t} f + \nabla f \cdot \Omega + f \div \Omega = 0\]</p><p>The solution of this equation depends on the initial texture \(f_0(g)\) at time zero and the crystallographic spin \(\Omega(g)\). In this model we assume the initial texture to be isotrope, i.e., \(f_0 = 1\) and the crystallopgraphic spin be associated with a single slip system. The full ODF will be later modelled as a superposition of the single slip models.</p><p>In this example we consider Olivine with has orthorhombic symmetry</p>
edit page</a></font><div><!--introduction--><p>Details to this model can be found in</p><div><ul><li><a href="https://doi.org/10.1093/gji/ggy442">An analytical finite-strain parametrization for texture evolution in deforming olivine polycrystals</a>, Geoph. J. Intern. 216, 2019.</li></ul></div><!--/introduction--><h2 id="1">The Continuity Equation</h2><p>The evolution of the orientation distribution function (ODF) \(f(g)\) with respect to a crystallopgraphic spin \(\Omega(g)\) is governed by the continuity equation</p><p>\[\frac{\partial}{\partial t} f + \nabla f \cdot \Omega + f \text{div} \Omega = 0\]</p><p>The solution of this equation depends on the initial texture \(f_0(g)\) at time zero and the crystallographic spin \(\Omega(g)\). In this model we assume the initial texture to be isotrope, i.e., \(f_0 = 1\) and the crystallopgraphic spin be associated with a single slip system. The full ODF will be later modelled as a superposition of the single slip models.</p><p>In this example we consider Olivine with has orthorhombic symmetry</p>
{% highlight matlab %}
cs = crystalSymmetry('222',[4.779 10.277 5.995],'mineral','olivine')
{% endhighlight %}

{% highlight plaintext %}
cs = crystalSymmetry

mineral : olivine
symmetry: 222
elements: 4
a, b, c : 4.8, 10, 6
cs = crystalSymmetry('222',[4.779 10.277 5.995],'mineral','olivine');
{% endhighlight %}
<p>and the three basic slip systems</p>
{% highlight matlab %}
sS = slipSystem(Miller({1,0,0},{1,0,0},{0,0,1},cs,'uvw'),...
Miller({0,1,0},{0,0,1},{0,1,0},cs,'hkl'))
{% endhighlight %}

{% highlight plaintext %}
sS = slipSystem (olivine)
size: 1 x 3

u v w | h k l CRSS
1 0 0 0 1 0 1
1 0 0 0 0 1 1
0 0 1 0 1 0 1
Miller({0,1,0},{0,0,1},{0,1,0},cs,'hkl'));
{% endhighlight %}
<p>To each of the slip systems we can associate an orientation dependent Schmid or deformation tensor</p>
<p>To each of the slip systems we can associate an orientation dependent Schmid or deformation tensor \(S(g)\)</p>
{% highlight matlab %}
S = sS.deformationTensor
{% endhighlight %}
Expand All @@ -50,7 +31,7 @@
size: 1 x 3
rank: 2 (3 x 3)
{% endhighlight %}
<p>and make the for the orientation dependent strain rate tensor \(e\) the ansatz \(e_{ij}(g) = \gamma(g) S_{ij}\). Fitting this ansatz to a given a macroscopic strain tensor</p>
<p>and make for the orientation dependent strain rate tensor \(e(g)\) the ansatz \(e_{ij}(g) = \gamma(g) S_{ij}(g)\). Fitting this ansatz to a given a macroscopic strain tensor</p>
{% highlight matlab %}
E = strainRateTensor([1 0 0; 0 0 0; 0 0 -1])
{% endhighlight %}
Expand All @@ -63,14 +44,12 @@
0 0 0
0 0 -1
{% endhighlight %}
<p>via minimizing the square difference</p><p>\[\int \sum_{i,j} (e_{i,j}(g) - E_{i,j}) dg \to \text{min}\]</p><p>the orientation dependent strain rate tensor is identified as</p><p>\[e_{i,j}(g) = 10/3 \left&lt; S(g), E right&gt; S(g)\]</p><p>and the corresponding crystallographic spin tensor as</p><p>\[\Omega_i(g) = \epsilon_{ijk} e_{jk}(g)\]</p><p>This can be modeled in MTEX via</p>
<p>via minimizing the square difference</p><p>\[\int_{SO(3)} \sum_{i,j} (e_{i,j}(g) - E_{i,j})^2 dg \to \text{min}\]</p><p>the orientation dependent strain rate tensor is identified as</p><p>\[e_{i,j}(g) = 10/3 \left&lt; S(g), E \right&gt; S(g)\]</p><p>and the corresponding crystallographic spin tensor as</p><p>\[\Omega_i(g) = \epsilon_{ijk} e_{jk}(g)\]</p><p>This can be modeled in MTEX via</p>
{% highlight matlab %}
% explicite version
% Omega = @(ori) 0.5 * EinsteinSum(tensor.leviCivita,[1 -1 -2],(ori * S(1) : E) * (ori * S(1)),[-1 -2])

Omega = @(ori) vector3d(spinTensor(((ori * S(1)) : E) .* (ori * S(1))));

% does not yet work
%Omega = @(ori) vector3d(spinTensor((S(1) : (inv(ori) * E)) .* S(1)));

Omega = SO3VectorFieldHarmonic.quadrature(Omega,cs)
Expand All @@ -88,13 +67,13 @@
{% endhighlight %}
<center>
{% include inline_image.html file="SingleSlipModel_01.png" %}
</center><p>or the total amount of spin by</p>
</center><p>or the divergence of this vectorfield</p>
{% highlight matlab %}
plot(sqrt(normSquare(Omega)),'sigma')
plot(div(Omega),'sigma')
{% endhighlight %}
<center>
{% include inline_image.html file="SingleSlipModel_02.png" %}
</center><h2 id="9">Solutions of the Continuity Equation</h2><p>The solutions of the continuity equation can be analytically computed and are available via the command <a href="SO3FunSBF.SO3FunSBF.html"><code class="language-plaintext highlighter-rouge">SO3FunSBF</code></a>. This command takes as input the specific slips system <code class="language-plaintext highlighter-rouge">sS</code> and the makroscopic strain tensor.</p>
</center><h2 id="9">Solutions of the Continuity Equation</h2><p>The solutions of the continuity equation can be analytically computed and are available via the command <a href="SO3FunSBF.SO3FunSBF.html"><code class="language-plaintext highlighter-rouge">SO3FunSBF</code></a>. This command takes as input the specific slips system <code class="language-plaintext highlighter-rouge">sS</code> and the makroscopic strain tensor <code class="language-plaintext highlighter-rouge">E</code></p>
{% highlight matlab %}
odf1 = SO3FunSBF(sS(1),E)
odf2 = SO3FunSBF(sS(2),E)
Expand Down Expand Up @@ -146,4 +125,18 @@
{% endhighlight %}
<center>
{% include inline_image.html file="SingleSlipModel_06.png" %}
</center><h2 id="15">Checking the Continuity Equation</h2><p>We may now check wether the continuity equation is satisfied. In a stable state the time difference will be zero and hence \(f \text{div} \Omega\)</p>
{% highlight matlab %}
figure(1)
plot(odf1 .* div(Omega),'sigma')
{% endhighlight %}
<center>
{% include inline_image.html file="SingleSlipModel_07.png" %}
</center><p>should be the negative of the inner product \(\nabla f \cdot \Omega\)</p>
{% highlight matlab %}
figure(2)
plot(dot(grad(odf1),Omega),'sigma')
{% endhighlight %}
<center>
{% include inline_image.html file="SingleSlipModel_08.png" %}
</center></div></body></html>
93 changes: 93 additions & 0 deletions pages/function_reference_matlab/SO3Fun.calcComponentsOld.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: calcComponentsOld

sidebar: function_reference_sidebar
permalink: SO3Fun.calcComponentsOld.html
folder: function_reference
toc: false
---
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>calcComponentsOld</title><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.source" content="script_SO3Fun__calcComponentsOld.m"></head><body><font size="2"><a href="https://github.com/mtex-toolbox/mtex/blob/develop/SO3Fun/@SO3Fun/calcComponentsOld.m">
edit page</a></font><div><!--introduction--><!--/introduction--><p>heuristic to find modal orientations</p><h2 id="3">Syntax</h2>
{% highlight matlab %}
[modes, volume] = calcComponents(SO3F)
[modes, volume, centerId] = calcComponents(SO3F,'seed',ori)
{% endhighlight %}
<h2 id="4">Input</h2><p>
<table cellpadding="4" cellspacing="0" class="funcref" width="100%">
<tr>
<td width="100px">
<tt>SO3F</tt>
</td>
<td>
<tt><a href="SO3Fun.SO3Fun.html">SO3Fun</a></tt>
</td>
</tr>
<tr>
<td width="100px">
<tt>ori</tt>
</td>
<td>
<tt>initial list of <a href="orientation.orientation.html">orientation</a></tt>
</td>
</tr>
</table>
</p><h2 id="5">Output</h2><p>
<table cellpadding="4" cellspacing="0" class="funcref" width="100%">
<tr>
<td width="100px">
<tt>modes</tt>
</td>
<td>
<tt>modal <a href="orientation.orientation.html">orientation</a></tt>
</td>
</tr>
<tr>
<td width="100px">
<tt>volume</tt>
</td>
<td>
<tt>volume of the component</tt>
</td>
</tr>
<tr>
<td width="100px">
<tt>centerId</tt>
</td>
<td>
<tt>list of ids to which each initial ori converged to</tt>
</td>
</tr>
</table>
</p><h2 id="6">Options</h2><p>
<table cellpadding="4" cellspacing="0" class="funcref" width="100%">
<tr>
<td width="100px">
<tt>resolution</tt>
</td>
<td>
<tt>search-grid resolution</tt>
</td>
</tr>
<tr>
<td width="100px">
<tt>angle</tt>
</td>
<td>
<tt>maximum component width used for volume computation</tt>
</td>
</tr>
<tr>
<td width="100px">
<tt>exact</tt>
</td>
<td>
<tt>do not dismiss very small modes at the end</tt>
</td>
</tr>
</table>
</p><h2 id="7">See also</h2><p><a href="SO3Fun.max.html">SO3Fun.max</a></p></div></body></html>
58 changes: 58 additions & 0 deletions pages/function_reference_matlab/SO3VectorField.div.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: div

sidebar: function_reference_sidebar
permalink: SO3VectorField.div.html
folder: function_reference
toc: false
---
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>div</title><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.source" content="script_SO3VectorField__div.m"></head><body><font size="2"><a href="https://github.com/mtex-toolbox/mtex/blob/develop/SO3Fun/@SO3VectorField/div.m">
edit page</a></font><div><!--introduction--><!--/introduction--><p>divergence of an SO3VectorField</p><h2 id="3">Syntax</h2>
{% highlight matlab %}
D = SO3VF.div % compute the divergence
d = SO3VF.div(rot) % evaluate the divergence in rot
{% endhighlight %}
<h2 id="4">Input</h2><p>
<table cellpadding="4" cellspacing="0" class="funcref" width="100%">
<tr>
<td width="100px">
<tt>SO3VF</tt>
</td>
<td>
<tt><a href="SO3VectorField.SO3VectorField.html">SO3VectorField</a></tt>
</td>
</tr>
<tr>
<td width="100px">
<tt>rot</tt>
</td>
<td>
<tt><a href="rotation.rotation.html">rotation</a> / <a href="orientation.orientation.html">orientation</a></tt>
</td>
</tr>
</table>
</p><h2 id="5">Output</h2><p>
<table cellpadding="4" cellspacing="0" class="funcref" width="100%">
<tr>
<td width="100px">
<tt>D</tt>
</td>
<td>
<tt><a href="SO3Fun.SO3Fun.html">SO3Fun</a></tt>
</td>
</tr>
<tr>
<td width="100px">
<tt>d</tt>
</td>
<td>
<tt>@double divergence of |SO3VF| at rotation |rot|</tt>
</td>
</tr>
</table>
</p><h2 id="6">See also</h2><p><a href="SO3VectorFieldHarmonic.div.html">SO3VectorFieldHarmonic.div</a> <a href="SO3Fun.grad.html">SO3Fun.grad</a></p></div></body></html>
58 changes: 58 additions & 0 deletions pages/function_reference_matlab/SO3VectorFieldHarmonic.div.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: div

sidebar: function_reference_sidebar
permalink: SO3VectorFieldHarmonic.div.html
folder: function_reference
toc: false
---
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>div</title><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.source" content="script_SO3VectorFieldHarmonic__div.m"></head><body><font size="2"><a href="https://github.com/mtex-toolbox/mtex/blob/develop/SO3Fun/@SO3VectorFieldHarmonic/div.m">
edit page</a></font><div><!--introduction--><!--/introduction--><p>divergence of an SO3VectorFieldHarmonic</p><h2 id="3">Syntax</h2>
{% highlight matlab %}
D = SO3VF.div % compute the divergence
d = SO3VF.div(rot) % evaluate the divergence in rot
{% endhighlight %}
<h2 id="4">Input</h2><p>
<table cellpadding="4" cellspacing="0" class="funcref" width="100%">
<tr>
<td width="100px">
<tt>SO3VF</tt>
</td>
<td>
<tt><a href="SO3VectorFieldHarmonic.SO3VectorFieldHarmonic.html">SO3VectorFieldHarmonic</a></tt>
</td>
</tr>
<tr>
<td width="100px">
<tt>rot</tt>
</td>
<td>
<tt><a href="rotation.rotation.html">rotation</a> / <a href="orientation.orientation.html">orientation</a></tt>
</td>
</tr>
</table>
</p><h2 id="5">Output</h2><p>
<table cellpadding="4" cellspacing="0" class="funcref" width="100%">
<tr>
<td width="100px">
<tt>D</tt>
</td>
<td>
<tt><a href="SO3FunHarmonic.SO3FunHarmonic.html">SO3FunHarmonic</a></tt>
</td>
</tr>
<tr>
<td width="100px">
<tt>d</tt>
</td>
<td>
<tt>@double divergence of |SO3VF| at rotation |rot|</tt>
</td>
</tr>
</table>
</p><h2 id="6">See also</h2><p><a href="SO3VectorField.div.html">SO3VectorField.div</a> <a href="SO3FunHarmonic.grad.html">SO3FunHarmonic.grad</a></p></div></body></html>

0 comments on commit 970e94b

Please sign in to comment.