-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.tex
3858 lines (3296 loc) · 168 KB
/
index.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
%
\documentclass[
letterpaper,
DIV=11,
numbers=noendperiod]{scrreprt}
\usepackage{amsmath,amssymb}
\usepackage{iftex}
\ifPDFTeX
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
\usepackage{lmodern}
\ifPDFTeX\else
% xetex/luatex font selection
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
\KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\setcounter{secnumdepth}{1}
% Make \paragraph and \subparagraph free-standing
\makeatletter
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}{
\@ifstar
\xxxParagraphStar
\xxxParagraphNoStar
}
\newcommand{\xxxParagraphStar}[1]{\oldparagraph*{#1}\mbox{}}
\newcommand{\xxxParagraphNoStar}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}{
\@ifstar
\xxxSubParagraphStar
\xxxSubParagraphNoStar
}
\newcommand{\xxxSubParagraphStar}[1]{\oldsubparagraph*{#1}\mbox{}}
\newcommand{\xxxSubParagraphNoStar}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
\makeatother
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
% Add ',fontsize=\small' for more characters per line
\usepackage{framed}
\definecolor{shadecolor}{RGB}{241,243,245}
\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.40,0.45,0.13}{#1}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
\newcommand{\BuiltInTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{\textbf{#1}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
\newcommand{\ExtensionTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.28,0.35,0.67}{#1}}
\newcommand{\ImportTok}[1]{\textcolor[rgb]{0.00,0.46,0.62}{#1}}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{\textbf{#1}}}
\newcommand{\NormalTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}}
\newcommand{\RegionMarkerTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.07,0.07,0.07}{#1}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}}
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}\usepackage{longtable,booktabs,array}
\usepackage{calc} % for calculating minipage widths
% Correct order of tables after \paragraph or \subparagraph
\usepackage{etoolbox}
\makeatletter
\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
\makeatother
% Allow footnotes in longtable head/foot
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
\makesavenoteenv{longtable}
\usepackage{graphicx}
\makeatletter
\newsavebox\pandoc@box
\newcommand*\pandocbounded[1]{% scales image to fit in text height/width
\sbox\pandoc@box{#1}%
\Gscale@div\@tempa{\textheight}{\dimexpr\ht\pandoc@box+\dp\pandoc@box\relax}%
\Gscale@div\@tempb{\linewidth}{\wd\pandoc@box}%
\ifdim\@tempb\p@<\@tempa\p@\let\@tempa\@tempb\fi% select the smaller of both
\ifdim\@tempa\p@<\p@\scalebox{\@tempa}{\usebox\pandoc@box}%
\else\usebox{\pandoc@box}%
\fi%
}
% Set default figure placement to htbp
\def\fps@figure{htbp}
\makeatother
% definitions for citeproc citations
\NewDocumentCommand\citeproctext{}{}
\NewDocumentCommand\citeproc{mm}{%
\begingroup\def\citeproctext{#2}\cite{#1}\endgroup}
\makeatletter
% allow citations to break across lines
\let\@cite@ofmt\@firstofone
% avoid brackets around text for \cite:
\def\@biblabel#1{}
\def\@cite#1#2{{#1\if@tempswa , #2\fi}}
\makeatother
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing
{\begin{list}{}{%
\setlength{\itemindent}{0pt}
\setlength{\leftmargin}{0pt}
\setlength{\parsep}{0pt}
% turn on hanging indent if param 1 is 1
\ifodd #1
\setlength{\leftmargin}{\cslhangindent}
\setlength{\itemindent}{-1\cslhangindent}
\fi
% set entry spacing
\setlength{\itemsep}{#2\baselineskip}}}
{\end{list}}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{\hfill\break\parbox[t]{\linewidth}{\strut\ignorespaces#1\strut}}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{\strut#1\strut}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
\KOMAoption{captions}{tablesignature}
\makeatletter
\@ifpackageloaded{tcolorbox}{}{\usepackage[skins,breakable]{tcolorbox}}
\@ifpackageloaded{fontawesome5}{}{\usepackage{fontawesome5}}
\definecolor{quarto-callout-color}{HTML}{909090}
\definecolor{quarto-callout-note-color}{HTML}{0758E5}
\definecolor{quarto-callout-important-color}{HTML}{CC1914}
\definecolor{quarto-callout-warning-color}{HTML}{EB9113}
\definecolor{quarto-callout-tip-color}{HTML}{00A047}
\definecolor{quarto-callout-caution-color}{HTML}{FC5300}
\definecolor{quarto-callout-color-frame}{HTML}{acacac}
\definecolor{quarto-callout-note-color-frame}{HTML}{4582ec}
\definecolor{quarto-callout-important-color-frame}{HTML}{d9534f}
\definecolor{quarto-callout-warning-color-frame}{HTML}{f0ad4e}
\definecolor{quarto-callout-tip-color-frame}{HTML}{02b875}
\definecolor{quarto-callout-caution-color-frame}{HTML}{fd7e14}
\makeatother
\makeatletter
\@ifpackageloaded{bookmark}{}{\usepackage{bookmark}}
\makeatother
\makeatletter
\@ifpackageloaded{caption}{}{\usepackage{caption}}
\AtBeginDocument{%
\ifdefined\contentsname
\renewcommand*\contentsname{Table of contents}
\else
\newcommand\contentsname{Table of contents}
\fi
\ifdefined\listfigurename
\renewcommand*\listfigurename{List of Figures}
\else
\newcommand\listfigurename{List of Figures}
\fi
\ifdefined\listtablename
\renewcommand*\listtablename{List of Tables}
\else
\newcommand\listtablename{List of Tables}
\fi
\ifdefined\figurename
\renewcommand*\figurename{Fig.}
\else
\newcommand\figurename{Fig.}
\fi
\ifdefined\tablename
\renewcommand*\tablename{Tab.}
\else
\newcommand\tablename{Tab.}
\fi
}
\@ifpackageloaded{float}{}{\usepackage{float}}
\floatstyle{ruled}
\@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]}
\floatname{codelisting}{Listing}
\newcommand*\listoflistings{\listof{codelisting}{List of Listings}}
\makeatother
\makeatletter
\makeatother
\makeatletter
\@ifpackageloaded{caption}{}{\usepackage{caption}}
\@ifpackageloaded{subcaption}{}{\usepackage{subcaption}}
\makeatother
\usepackage{bookmark}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same} % disable monospaced font for URLs
\hypersetup{
pdftitle={Echoes},
pdfauthor={Jean-François Barthélémy},
colorlinks=true,
linkcolor={blue},
filecolor={Maroon},
citecolor={Blue},
urlcolor={Blue},
pdfcreator={LaTeX via pandoc}}
\title{Echoes}
\usepackage{etoolbox}
\makeatletter
\providecommand{\subtitle}[1]{% add subtitle to \maketitle
\apptocmd{\@title}{\par {\large #1 \par}}{}{}
}
\makeatother
\subtitle{Extended Calculator of HOmogEnization Schemes}
\author{Jean-François Barthélémy}
\date{2025-01-24}
\begin{document}
\maketitle
\renewcommand*\contentsname{Table of contents}
{
\hypersetup{linkcolor=}
\setcounter{tocdepth}{2}
\tableofcontents
}
\bookmarksetup{startatroot}
\chapter*{Welcome}\label{sec-welcome}
\addcontentsline{toc}{chapter}{Welcome}
\markboth{Welcome}{Welcome}
\begin{center}
\includegraphics[width=0.2\linewidth,height=\textheight,keepaspectratio]{img/cover.pdf}
\end{center}
The library \texttt{echoes} allows to implement various mean-field
homogenization schemes of random media involving different types of
heterogeneities in the framework of elasticity, conductivity,
viscoelasticity as well as nonlinear homogenization.
This book gathers tutorials presenting the main features of the library:
\begin{itemize}
\tightlist
\item
elements of tensor calculus,
\item
Hill and Eshelby tensors and their derivatives with respect to
reference medium moduli,
\item
concentration problems,
\item
RVEs and schemes in linear homogenization,
\item
extension to nonlinear homogenization,
\item
extension to linear time-dependent behaviors.
\end{itemize}
\section*{Download}\label{download}
\addcontentsline{toc}{section}{Download}
\markright{Download}
The core of \texttt{echoes} has been developed in C++ and wrapped by a
Python interface. Hence its use requires first the installation of a
Python environment including \texttt{pip} executable (for instance
\href{https://www.anaconda.com/products/distribution}{Anaconda}).
Wheel packages can be downloaded for various versions of Python under
Windows or Linux by choosing the appropriate file for your configuration
under the link
https://doi.org/10.5281/zenodo.14959866
Once in possession of the relevant \texttt{.whl} file, the package can
be installed in a console (Anaconda console or any console allowing to
run \texttt{pip}) by
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{pip install }\OperatorTok{{-}}\NormalTok{U echoes}\OperatorTok{{-}}\NormalTok{XYZ.whl}
\CommentTok{\# replacing echoes{-}XYZ.whl by the correct path to the whl file}
\end{Highlighting}
\end{Shaded}
\section*{Citation}\label{citation}
\addcontentsline{toc}{section}{Citation}
\markright{Citation}
If you use \texttt{echoes}, please cite it as
(\citeproc{ref-echoes}{Barthélémy, 2022}) or in \texttt{bibtex} style
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{@software\{echoes,}
\NormalTok{ title = \{Echoes: \{\{Extended Calculator\}\} of \{\{HOmogEnization Schemes\}\}\},}
\NormalTok{ shorttitle = \{Echoes\},}
\NormalTok{ author = \{Barthélémy, Jean{-}François\},}
\NormalTok{ date = \{2022{-}11{-}22\},}
\NormalTok{ doi = \{10.5281/ZENODO.14959866\},}
\NormalTok{ url = \{https://zenodo.org/record/14959866\},}
\NormalTok{ organization = \{Zenodo\},}
\NormalTok{ version = \{v1.0.0\},}
\NormalTok{\}}
\end{Highlighting}
\end{Shaded}
All this work is licensed under the
\href{https://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons
Attribution-ShareAlike 4.0 International License}
\pandocbounded{\includegraphics[keepaspectratio]{index_files/mediabag/88x31.png}}.
\section*{About the author}\label{about-the-author}
\addcontentsline{toc}{section}{About the author}
\markright{About the author}
Jean-François Barthélémy is a researcher at
\href{https://www.cerema.fr/en}{Cerema} in the research team
\href{https://www.cerema.fr/fr/presse/dossier\%20cerema-universite-gustave-eiffel-creent-unite-mixte}{UMR
MCD}.
\begin{itemize}
\item
\href{https://github.com/jfbarthelemy}{GitHub}
\item
\href{https://www.researchgate.net/profile/Jean-Francois_Barthelemy}{ResearchGate}
\item
\href{https://scholar.google.com/citations?user=RVjtCiAAAAAJ&hl=en}{Google
scholar}
\item
📚
\href{https://hal.archives-ouvertes.fr/search/index/?q=\%2A&authIdHal_s=jfbarthelemy}{HAL}
\item
🌍 \href{https://www.webofscience.com/wos/author/record/449919}{Web Of
Science}
\item
\href{https://orcid.org/0000-0002-1968-8939}{ORCID}
\item
📩 \href{mailto:[email protected]}{Email}
\end{itemize}
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
Powered by \href{https://quarto.org/}{Quarto}.
\(\,\)
\bookmarksetup{startatroot}
\chapter*{Introduction}\label{sec-intro}
\addcontentsline{toc}{chapter}{Introduction}
\markboth{Introduction}{Introduction}
This book is aimed at researchers, engineers and students, knowing the
fundamentals of mean-field theory to help them learn how to use the
\texttt{echoes} library with some brief theoretical recalls when
relevant. For a more exhaustive presentation of the theory of random
medium homogenization, see (\citeproc{ref-bornert2001a}{Bornert et al.,
2001}), (\citeproc{ref-milton2002}{Milton, 2002}),
(\citeproc{ref-torquato2002}{Torquato, 2002}) or
(\citeproc{ref-kachanov2018}{Kachanov and Sevostianov, 2018}) among
others.
The objectives of the library can be summarized as follows:
\begin{itemize}
\item
simple and quick implementation of Eshelby problems and homogenization
schemes,
\item
multi-physics and multi-scale homogenization,
\item
effects of microstructure changes by chemical, physical or mechanical
process.
\end{itemize}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-note-color!10!white, colback=white, colframe=quarto-callout-note-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title={Features}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
\begin{itemize}
\item
Eshelby problem solved at 2nd (conductivity) et 4th orders
(elasticity)
\item
Isotropy and anisotropy
\item
Several types of inclusions including generic (user-defined) inclusion
\item
Large variety of schemes
\item
Derivatives of the macroscopic elasticity with respect to lower scale
moduli
\item
Aging linear viscoelasticity
\item
Complex moduli
\end{itemize}
\end{tcolorbox}
In this manual, some snippets of Python codes are presented. The
\texttt{echoes} library can be imported as
\begin{Shaded}
\begin{Highlighting}[]
\ImportTok{from}\NormalTok{ echoes }\ImportTok{import} \OperatorTok{*}
\end{Highlighting}
\end{Shaded}
or, to avoid any ambiguity between libraries, as
\begin{Shaded}
\begin{Highlighting}[]
\ImportTok{import}\NormalTok{ echoes }\ImportTok{as}\NormalTok{ ec}
\end{Highlighting}
\end{Shaded}
A usual start of any tutorial could be the following
\begin{Shaded}
\begin{Highlighting}[]
\ImportTok{import}\NormalTok{ numpy }\ImportTok{as}\NormalTok{ np}
\ImportTok{from}\NormalTok{ echoes }\ImportTok{import} \OperatorTok{*}
\ImportTok{import}\NormalTok{ matplotlib.pyplot }\ImportTok{as}\NormalTok{ plt }\CommentTok{\# if plots are needed}
\NormalTok{np.set\_printoptions(precision}\OperatorTok{=}\DecValTok{8}\NormalTok{, suppress}\OperatorTok{=}\VariableTok{True}\NormalTok{)}
\CommentTok{\# to display only 8 significant digits of array components}
\end{Highlighting}
\end{Shaded}
Whenever they are omitted, it is implicitly considered that these lines
have previously been added.
\(\,\)
\part{𝗘𝗹𝗲𝗺𝗲𝗻𝘁𝘀 𝗼𝗳 𝘁𝗲𝗻𝘀𝗼𝗿 𝗰𝗮𝗹𝗰𝘂𝗹𝘂𝘀}
\chapter{Kelvin-Mandel notation}\label{sec-kelvin_mandel}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-important-color!10!white, colback=white, colframe=quarto-callout-important-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title={Objectives}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
Before introducing the specific objects of \texttt{echoes} devoted to
tensor calculations in isotropic or anisotropic contexts, this tutorial
aims at providing the syntax allowing to represent second-order or
fourth-order tensors under the form of matrices in the Kelvin-Mandel
notation as detailed in Section~\ref{sec-KM}.
\end{tcolorbox}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-note-color!10!white, colback=white, colframe=quarto-callout-note-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title={Download}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
\begin{itemize}
\item
\href{kelvin_mandel.py}{Python script}
\item
\href{kelvin_mandel.ipynb}{Jupyter notebook}
\end{itemize}
\end{tcolorbox}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-tip-color!10!white, colback=white, colframe=quarto-callout-tip-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title={Imports}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
\begin{Shaded}
\begin{Highlighting}[]
\ImportTok{import}\NormalTok{ numpy }\ImportTok{as}\NormalTok{ np}
\ImportTok{from}\NormalTok{ echoes }\ImportTok{import} \OperatorTok{*}
\ImportTok{import}\NormalTok{ math, random}
\NormalTok{np.set\_printoptions(precision}\OperatorTok{=}\DecValTok{8}\NormalTok{, suppress}\OperatorTok{=}\VariableTok{True}\NormalTok{)}
\CommentTok{\# to display only 8 significant digits of array components}
\end{Highlighting}
\end{Shaded}
\end{tcolorbox}
A symmetric \(3×3\) second-order matrix can be transformed in a vector
of \(\R^6\) by the function \texttt{KM} consistently with \ref{eq-KM2}.
The inverse is done by \texttt{invKM}.
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{α }\OperatorTok{=}\NormalTok{ np.random.rand(}\DecValTok{3}\NormalTok{, }\DecValTok{3}\NormalTok{) }\OperatorTok{;}\NormalTok{ ε }\OperatorTok{=}\NormalTok{ (α}\OperatorTok{+}\NormalTok{α.T)}\OperatorTok{/}\DecValTok{2}
\BuiltInTok{print}\NormalTok{(}\StringTok{"ε =}\CharTok{\textbackslash{}n}\StringTok{"}\NormalTok{,ε)}
\BuiltInTok{print}\NormalTok{(}\StringTok{"KM(ε) =}\CharTok{\textbackslash{}n}\StringTok{"}\NormalTok{,KM(ε))}
\ControlFlowTok{assert}\NormalTok{ np.allclose(invKM(KM(ε)), ε), }\StringTok{"error"}
\end{Highlighting}
\end{Shaded}
\begin{verbatim}
ε =
[[0.11518697 0.36389157 0.68531149]
[0.36389157 0.24973352 0.85029112]
[0.68531149 0.85029112 0.36267488]]
KM(ε) =
[0.11518697 0.24973352 0.36267488 1.20249323 0.9691768 0.5146204 ]
\end{verbatim}
Given a \(3×3×3×3\) array \texttt{c} (of type \texttt{numpy.ndarray})
satisfying major and minor symmetries (see Section~\ref{sec-KM}), the
corresponding \(6×6\) matrix \texttt{C} obtained by Kelvin-Mandel
transform is calculated by \texttt{C\ =\ KM(c)}. Conversely, if
\texttt{C} is a positive definite matrix, \texttt{c} is calculated by
\texttt{c\ =\ invKM(C)}.
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{A }\OperatorTok{=}\NormalTok{ np.random.rand(}\DecValTok{6}\NormalTok{,}\DecValTok{6}\NormalTok{)}
\NormalTok{C }\OperatorTok{=}\NormalTok{ A.T.dot(A) }\OperatorTok{+}\NormalTok{ np.eye(}\DecValTok{6}\NormalTok{) }\CommentTok{\# generation of an arbitrary positive definite matrix}
\NormalTok{c }\OperatorTok{=}\NormalTok{ invKM(C)}
\BuiltInTok{print}\NormalTok{(}\StringTok{"C =}\CharTok{\textbackslash{}n}\StringTok{"}\NormalTok{,C)}
\BuiltInTok{print}\NormalTok{(}\StringTok{"c =}\CharTok{\textbackslash{}n}\StringTok{"}\NormalTok{,c)}
\ControlFlowTok{assert}\NormalTok{ np.allclose(KM(c), C), }\StringTok{"error: KM(c) should be equal to C"}
\end{Highlighting}
\end{Shaded}
\begin{verbatim}
C =
[[2.77299328 2.2444528 1.04322629 1.40082289 1.84329357 1.25925132]
[2.2444528 4.43283651 1.60572381 1.59875001 2.60033506 2.04101056]
[1.04322629 1.60572381 2.59112573 0.86867369 1.86259637 0.75512835]
[1.40082289 1.59875001 0.86867369 2.31689298 1.55525077 0.87239494]
[1.84329357 2.60033506 1.86259637 1.55525077 3.88870775 1.40974405]
[1.25925132 2.04101056 0.75512835 0.87239494 1.40974405 2.32015014]]
c =
[[[[2.77299328 0.89042515 1.30340538]
[0.89042515 2.2444528 0.99053136]
[1.30340538 0.99053136 1.04322629]]
[[0.89042515 1.16007507 0.70487202]
[1.16007507 1.44321241 0.43619747]
[0.70487202 0.43619747 0.53395637]]
[[1.30340538 0.70487202 1.94435387]
[0.70487202 1.83871456 0.77762538]
[1.94435387 0.77762538 1.31705452]]]
[[[0.89042515 1.16007507 0.70487202]
[1.16007507 1.44321241 0.43619747]
[0.70487202 0.43619747 0.53395637]]
[[2.2444528 1.44321241 1.83871456]
[1.44321241 4.43283651 1.13048697]
[1.83871456 1.13048697 1.60572381]]
[[0.99053136 0.43619747 0.77762538]
[0.43619747 1.13048697 1.15844649]
[0.77762538 1.15844649 0.61424505]]]
[[[1.30340538 0.70487202 1.94435387]
[0.70487202 1.83871456 0.77762538]
[1.94435387 0.77762538 1.31705452]]
[[0.99053136 0.43619747 0.77762538]
[0.43619747 1.13048697 1.15844649]
[0.77762538 1.15844649 0.61424505]]
[[1.04322629 0.53395637 1.31705452]
[0.53395637 1.60572381 0.61424505]
[1.31705452 0.61424505 2.59112573]]]]
\end{verbatim}
\(\,\)
\chapter{Rotation matrices}\label{sec-rot_tensors}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-important-color!10!white, colback=white, colframe=quarto-callout-important-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title={Objectives}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
This tutorial presents the construction of rotation matrices in \(\R^3\)
in the convention proposed in Section~\ref{sec-rottens} for Euler
angles.
\end{tcolorbox}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-note-color!10!white, colback=white, colframe=quarto-callout-note-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title={Download}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
\begin{itemize}
\item
\href{rot_matrices.py}{Python script}
\item
\href{rot_matrices.ipynb}{Jupyter notebook}
\end{itemize}
\end{tcolorbox}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-tip-color!10!white, colback=white, colframe=quarto-callout-tip-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title={Imports}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
\begin{Shaded}
\begin{Highlighting}[]
\ImportTok{import}\NormalTok{ numpy }\ImportTok{as}\NormalTok{ np}
\ImportTok{from}\NormalTok{ echoes }\ImportTok{import} \OperatorTok{*}
\ImportTok{import}\NormalTok{ math, random}
\NormalTok{np.set\_printoptions(precision}\OperatorTok{=}\DecValTok{8}\NormalTok{, suppress}\OperatorTok{=}\VariableTok{True}\NormalTok{)}
\CommentTok{\# to display only 8 significant digits of array components}
\end{Highlighting}
\end{Shaded}
\end{tcolorbox}
Given the Euler angles \texttt{θ,\ ϕ,\ ψ} defined in
Section~\ref{sec-rottens} and more particularly in
Fig.~\ref{fig-eulerangles}, the rotation matrix (\ref{eq-rot3}) recalled
here \[
\small
\mat{R}=
\left(
\begin{array}{ccc}
c_\theta c_\psi c_\phi - s_\psi s_\phi & - c_\theta c_\phi s_\psi - c_\psi s_\phi & c_\phi s_\theta \\
c_\theta c_\psi s_\phi + c_\phi s_\psi & - c_\theta s_\psi s_\phi + c_\psi c_\phi & s_\theta s_\phi \\
- c_\psi s_\theta & s_\theta s_\psi & c_\theta \\
\end{array}
\right)
\]
can be built with \texttt{rot3(θ,\ ϕ,\ ψ)}
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{π }\OperatorTok{=}\NormalTok{ math.pi}
\NormalTok{θ, ϕ, ψ }\OperatorTok{=}\NormalTok{ π}\OperatorTok{/}\DecValTok{3}\NormalTok{, π}\OperatorTok{/}\DecValTok{4}\NormalTok{, π}\OperatorTok{/}\DecValTok{5}
\NormalTok{R }\OperatorTok{=}\NormalTok{ rot3(θ, ϕ, ψ)}
\BuiltInTok{print}\NormalTok{(}\StringTok{"R =}\CharTok{\textbackslash{}n}\StringTok{"}\NormalTok{,R)}
\end{Highlighting}
\end{Shaded}
\begin{verbatim}
R =
[[-0.12959624 -0.77987487 0.61237244]
[ 0.70165764 0.36424793 0.61237244]
[-0.70062927 0.50903696 0.5 ]]
\end{verbatim}
The vectors of the spherical basis correspond to the column of the
rotation matrix for \(\psi=0\). They can individually be obtained by the
function \texttt{es(i,\ θ,\ ϕ)}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-warning-color!10!white, colback=white, colframe=quarto-callout-warning-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title=\textcolor{quarto-callout-warning-color}{\faExclamationTriangle}\hspace{0.5em}{Warning}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
Python numbering starts at 0 so \texttt{i} takes the values 0, 1 and 2.
Besides vectors of the spherical basis are ordered as \(\ve{\theta}\),
\(\ve{\phi}\), \(\ve{r}\).
\end{tcolorbox}
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{θ, ϕ }\OperatorTok{=}\NormalTok{ π}\OperatorTok{/}\DecValTok{8}\NormalTok{, π}\OperatorTok{/}\DecValTok{5}
\NormalTok{R }\OperatorTok{=}\NormalTok{ rot3(θ, ϕ)}
\BuiltInTok{print}\NormalTok{(}\StringTok{"R =}\CharTok{\textbackslash{}n}\StringTok{"}\NormalTok{,R)}
\ControlFlowTok{for}\NormalTok{ i }\KeywordTok{in} \BuiltInTok{range}\NormalTok{(}\DecValTok{3}\NormalTok{): }\BuiltInTok{print}\NormalTok{(}\SpecialStringTok{f"es(}\SpecialCharTok{\{}\NormalTok{i}\SpecialCharTok{\}}\SpecialStringTok{, θ, ϕ) = "}\NormalTok{, es(i, θ, ϕ), }\SpecialStringTok{f" → e̱}\SpecialCharTok{\{}\NormalTok{[}\StringTok{\textquotesingle{}θ\textquotesingle{}}\NormalTok{,}\StringTok{\textquotesingle{}ϕ\textquotesingle{}}\NormalTok{,}\StringTok{\textquotesingle{}r\textquotesingle{}}\NormalTok{][i]}\SpecialCharTok{\}}\SpecialStringTok{"}\NormalTok{)}
\end{Highlighting}
\end{Shaded}
\begin{verbatim}
R =
[[ 0.74743424 -0.58778525 0.3095974 ]
[ 0.54304276 0.80901699 0.22493568]
[-0.38268343 0. 0.92387953]]
es(0, θ, ϕ) = [ 0.74743424 0.54304276 -0.38268343] → e̱θ
es(1, θ, ϕ) = [-0.58778525 0.80901699 0. ] → e̱ϕ
es(2, θ, ϕ) = [0.3095974 0.22493568 0.92387953] → e̱r
\end{verbatim}
As shown in Section~\ref{sec-rottens} the rotation matrix applying on
fourth-order tensors in Kelvin-Mandel notation can be deduced from the
\(3×3\) rotation matrix from \ref{eq-rot6} \[
\scriptsize
\left(
\begin{array}{cccccc}
R_{1 1}^{2} & R_{1 2}^{2} & R_{1 3}^{2} & \sqrt{2} R_{1 2} R_{1 3} & \sqrt{2} R_{1 1} R_{1 3} & \sqrt{2} R_{1 1} R_{1 2} \\
R_{2 1}^{2} & R_{2 2}^{2} & R_{2 3}^{2} & \sqrt{2} R_{2 2} R_{2 3} & \sqrt{2} R_{2 1} R_{2 3} & \sqrt{2} R_{2 1} R_{2 2} \\
R_{3 1}^{2} & R_{3 2}^{2} & R_{3 3}^{2} & \sqrt{2} R_{3 2} R_{3 3} & \sqrt{2} R_{3 1} R_{3 3} & \sqrt{2} R_{3 1} R_{3 2} \\
\sqrt{2} R_{2 1} R_{3 1} & \sqrt{2} R_{2 2} R_{3 2} & \sqrt{2} R_{2 3} R_{3 3} & R_{2 2} R_{3 3} + R_{2 3} R_{3 2} & R_{2 1} R_{3 3} + R_{2 3} R_{3 1} & R_{2 1} R_{3 2} + R_{2 2} R_{3 1} \\
\sqrt{2} R_{1 1} R_{3 1} & \sqrt{2} R_{1 2} R_{3 2} & \sqrt{2} R_{1 3} R_{3 3} & R_{1 2} R_{3 3} + R_{1 3} R_{3 2} & R_{1 1} R_{3 3} + R_{1 3} R_{3 1} & R_{1 1} R_{3 2} + R_{1 2} R_{3 1} \\
\sqrt{2} R_{1 1} R_{2 1} & \sqrt{2} R_{1 2} R_{2 2} & \sqrt{2} R_{1 3} R_{2 3} & R_{1 2} R_{2 3} + R_{1 3} R_{2 2} & R_{1 1} R_{2 3} + R_{1 3} R_{2 1} & R_{1 1} R_{2 2} + R_{1 2} R_{2 1} \\
\end{array}
\right)
\]
It can be directly obtained by \texttt{rot6(θ,\ ϕ,\ ψ)}.
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{θ, ϕ, ψ }\OperatorTok{=}\NormalTok{ π}\OperatorTok{/}\DecValTok{3}\NormalTok{, π}\OperatorTok{/}\DecValTok{4}\NormalTok{, π}\OperatorTok{/}\DecValTok{5}
\NormalTok{R }\OperatorTok{=}\NormalTok{ rot3(θ, ϕ, ψ)}
\NormalTok{sboxtimes}\OperatorTok{=}\KeywordTok{lambda}\NormalTok{ a,b:}\FloatTok{0.5}\OperatorTok{*}\NormalTok{(np.einsum(}\StringTok{\textquotesingle{}ik,jl\textquotesingle{}}\NormalTok{,a,b)}\OperatorTok{+}\NormalTok{np.einsum(}\StringTok{\textquotesingle{}il,jk\textquotesingle{}}\NormalTok{,a,b))}
\BuiltInTok{print}\NormalTok{(}\StringTok{"R⊠ˢR =}\CharTok{\textbackslash{}n}\StringTok{"}\NormalTok{,KM(sboxtimes(R,R)))}
\NormalTok{ℝ }\OperatorTok{=}\NormalTok{ rot6(θ, ϕ, ψ)}
\BuiltInTok{print}\NormalTok{(}\StringTok{"ℝ =}\CharTok{\textbackslash{}n}\StringTok{"}\NormalTok{,ℝ)}
\end{Highlighting}
\end{Shaded}
\begin{verbatim}
R⊠ˢR =
[[ 0.01679518 0.60820482 0.375 -0.67539145 -0.11223363 0.14293294]
[ 0.49232344 0.13267656 0.375 0.31544796 0.60765334 0.36144095]
[ 0.49088137 0.25911863 0.25 0.35994349 -0.49541971 -0.50437388]
[-0.69523004 0.26221734 0.4330127 0.49384417 -0.07821723 0.10196691]
[ 0.12840906 -0.56142176 0.4330127 -0.07821723 -0.49384417 0.48043389]
[-0.12859754 -0.40173255 0.53033009 -0.25451848 0.35031463 -0.59441032]]
ℝ =
[[ 0.01679518 0.60820482 0.375 -0.67539145 -0.11223363 0.14293294]
[ 0.49232344 0.13267656 0.375 0.31544796 0.60765334 0.36144095]
[ 0.49088137 0.25911863 0.25 0.35994349 -0.49541971 -0.50437388]
[-0.69523004 0.26221734 0.4330127 0.49384417 -0.07821723 0.10196691]
[ 0.12840906 -0.56142176 0.4330127 -0.07821723 -0.49384417 0.48043389]
[-0.12859754 -0.40173255 0.53033009 -0.25451848 0.35031463 -0.59441032]]
\end{verbatim}
\(\,\)
\chapter{Special tensors}\label{sec-special_tensors}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-important-color!10!white, colback=white, colframe=quarto-callout-important-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title={Objectives}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
This tutorial presents the matrix representation of isotropic tensors of
second and fourth orders as well as Walpole tensors useful for
transverse isotropy. It strongly relies on conventions of tensor algebra
introduced in Appendix~\ref{sec-tensor_algebra} especially in terms of
products and contractions.
\end{tcolorbox}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-note-color!10!white, colback=white, colframe=quarto-callout-note-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title={Download}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
\begin{itemize}
\item
\href{special_tensors.py}{Python script}
\item
\href{special_tensors.ipynb}{Jupyter notebook}
\end{itemize}
\end{tcolorbox}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-tip-color!10!white, colback=white, colframe=quarto-callout-tip-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title={Imports}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
\begin{Shaded}
\begin{Highlighting}[]
\ImportTok{import}\NormalTok{ numpy }\ImportTok{as}\NormalTok{ np}
\ImportTok{from}\NormalTok{ echoes }\ImportTok{import} \OperatorTok{*}
\ImportTok{import}\NormalTok{ math}
\NormalTok{np.set\_printoptions(precision}\OperatorTok{=}\DecValTok{6}\NormalTok{, suppress}\OperatorTok{=}\VariableTok{True}\NormalTok{)}
\CommentTok{\# to display only 6 significant digits of array components}
\end{Highlighting}
\end{Shaded}
\end{tcolorbox}
\section{Second-order identity}\label{second-order-identity}
The second-order identity \(\uu{1}=\delta_{ij}\ve{i}\otimes\ve{j}\) is
given in Kelvin-Mandel notation (i.e.~vector of \(\R^6\)) by the
constant vector \texttt{Id2}
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{δ }\OperatorTok{=}\NormalTok{ Id2}
\BuiltInTok{print}\NormalTok{(}\StringTok{"𝟏 (Kelvin{-}Mandel notation) =}\CharTok{\textbackslash{}n}\StringTok{"}\NormalTok{,δ)}
\BuiltInTok{print}\NormalTok{(}\StringTok{"𝟏 =}\CharTok{\textbackslash{}n}\StringTok{"}\NormalTok{,invKM(δ))}
\end{Highlighting}
\end{Shaded}
\begin{verbatim}
𝟏 (Kelvin-Mandel notation) =
[1. 1. 1. 0. 0. 0.]
𝟏 =
[[1. 0. 0.]
[0. 1. 0.]
[0. 0. 1.]]
\end{verbatim}
\section{Fourth-order isotropic
tensors}\label{fourth-order-isotropic-tensors}
As detailed in Section~\ref{sec-ISO}, the fourth-order identity tensor
is
\[
\uuuu{I}=\uu{1}\sboxtimes\uu{1}=
\frac{\delta_{ik}\delta_{jl}+\delta_{il}\delta_{jk}}{2}\,\ve{i}\otimes\ve{j}\otimes\ve{k}\otimes\ve{l}
\]
and the projectors
\[
\uuuu{J}=\frac{1}{3}\uu{1}\otimes\uu{1}
\quad \textrm{and} \quad
\uuuu{K}=\uuuu{I}-\uuuu{J}=\uu{1}\sboxtimes\uu{1}-\frac{1}{3}\uu{1}\otimes\uu{1}
\]
which are provided in \texttt{echoes} by \texttt{Id4}, \texttt{J4} and
\texttt{K4}
\begin{Shaded}
\begin{Highlighting}[]
\ControlFlowTok{for}\NormalTok{ T }\KeywordTok{in}\NormalTok{ [Id4, J4, K4]:}
\BuiltInTok{print}\NormalTok{(T)}
\end{Highlighting}
\end{Shaded}
\begin{verbatim}
[[1. 0. 0. 0. 0. 0.]
[0. 1. 0. 0. 0. 0.]
[0. 0. 1. 0. 0. 0.]
[0. 0. 0. 1. 0. 0.]
[0. 0. 0. 0. 1. 0.]
[0. 0. 0. 0. 0. 1.]]
[[0.333333 0.333333 0.333333 0. 0. 0. ]
[0.333333 0.333333 0.333333 0. 0. 0. ]
[0.333333 0.333333 0.333333 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]]
[[ 0.666667 -0.333333 -0.333333 0. 0. 0. ]
[-0.333333 0.666667 -0.333333 0. 0. 0. ]
[-0.333333 -0.333333 0.666667 0. 0. 0. ]
[ 0. 0. 0. 1. 0. 0. ]
[ 0. 0. 0. 0. 1. 0. ]
[ 0. 0. 0. 0. 0. 1. ]]
\end{verbatim}
\section{Walpole bases}\label{walpole-bases}
The Walpole bases are useful to decompose transversely isotropic
fourth-order tensors. They are presented in Section~\ref{sec-TI}. The
Kelvin-Mandel representation of the \(i^\textrm{th}\) Walpole tensor
oriented along an axis \(\n\) is constructed by \texttt{W(i,n=e₃)}
(\(i \in \{0,..,5\}\) and the normal is by default oriented along the
third axis). The symmetrized version is provided by \texttt{WS(i,n=e₃)}
(\(i \in \{0,..,4\}\)).
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-warning-color!10!white, colback=white, colframe=quarto-callout-warning-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title=\textcolor{quarto-callout-warning-color}{\faExclamationTriangle}\hspace{0.5em}{Warning}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
Note again the shift in indices between the Python convention starting
at 0 and the tensors presented in Section~\ref{sec-TI}.
\end{tcolorbox}
\begin{Shaded}
\begin{Highlighting}[]
\ControlFlowTok{for}\NormalTok{ i }\KeywordTok{in} \BuiltInTok{range}\NormalTok{(}\DecValTok{6}\NormalTok{):}
\BuiltInTok{print}\NormalTok{(}\StringTok{"𝕎"}\OperatorTok{+}\BuiltInTok{str}\NormalTok{(i}\OperatorTok{+}\DecValTok{1}\NormalTok{)}\OperatorTok{+}\StringTok{" =}\CharTok{\textbackslash{}n}\StringTok{"}\NormalTok{,W(i))}
\ControlFlowTok{for}\NormalTok{ i }\KeywordTok{in} \BuiltInTok{range}\NormalTok{(}\DecValTok{5}\NormalTok{):}
\BuiltInTok{print}\NormalTok{(}\StringTok{"𝕎ˢ"}\OperatorTok{+}\BuiltInTok{str}\NormalTok{(i}\OperatorTok{+}\DecValTok{1}\NormalTok{)}\OperatorTok{+}\StringTok{" =}\CharTok{\textbackslash{}n}\StringTok{"}\NormalTok{,WS(i))}
\end{Highlighting}
\end{Shaded}
\begin{verbatim}
𝕎1 =
[[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 1. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]]
𝕎2 =
[[0.5 0.5 0. 0. 0. 0. ]
[0.5 0.5 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]]
𝕎3 =
[[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0.707107 0.707107 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]]
𝕎4 =
[[0. 0. 0.707107 0. 0. 0. ]
[0. 0. 0.707107 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]]
𝕎5 =
[[ 0.5 -0.5 0. 0. 0. 0. ]
[-0.5 0.5 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 1. ]]
𝕎6 =
[[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 1. 0. 0.]
[0. 0. 0. 0. 1. 0.]
[0. 0. 0. 0. 0. 0.]]
𝕎ˢ1 =
[[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 1. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]]
𝕎ˢ2 =
[[0.5 0.5 0. 0. 0. 0. ]
[0.5 0.5 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]]
𝕎ˢ3 =
[[0. 0. 0.707107 0. 0. 0. ]
[0. 0. 0.707107 0. 0. 0. ]
[0.707107 0.707107 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]
[0. 0. 0. 0. 0. 0. ]]
𝕎ˢ4 =
[[ 0.5 -0.5 0. 0. 0. 0. ]
[-0.5 0.5 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 0. ]
[ 0. 0. 0. 0. 0. 1. ]]
𝕎ˢ5 =
[[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0. 0.]
[0. 0. 0. 1. 0. 0.]
[0. 0. 0. 0. 1. 0.]
[0. 0. 0. 0. 0. 0.]]
\end{verbatim}
\(\,\)
\chapter{\texorpdfstring{The \texttt{tensor}
object}{The tensor object}}\label{sec-tensor}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-important-color!10!white, colback=white, colframe=quarto-callout-important-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title={Objectives}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
This tutorial presents the object \texttt{tensor} which is the main
structure of \texttt{echoes} allowing to represent symmetric
second-order or fourth-order tensors both in matrix and synthetic forms
and containing information about anisotropy.
\end{tcolorbox}
\begin{tcolorbox}[enhanced jigsaw, left=2mm, bottomrule=.15mm, colbacktitle=quarto-callout-note-color!10!white, colback=white, colframe=quarto-callout-note-color-frame, rightrule=.15mm, bottomtitle=1mm, toptitle=1mm, titlerule=0mm, title={Download}, toprule=.15mm, arc=.35mm, opacityback=0, opacitybacktitle=0.6, leftrule=.75mm, breakable, coltitle=black]
\begin{itemize}
\item
\href{tensor.py}{Python script}