File: tensorOperator.sty

package info (click to toggle)
openfoam 4.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 163,028 kB
  • ctags: 58,990
  • sloc: cpp: 830,760; sh: 10,227; ansic: 8,215; xml: 745; lex: 437; awk: 194; sed: 91; makefile: 77; python: 18
file content (128 lines) | stat: -rw-r--r-- 4,852 bytes parent folder | download | duplicates (3)
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
%-----------------------------------------------------------------------------
% =========                 |
% \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
%  \\    /   O peration     |
%   \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
%    \\/     M anipulation  |
%------------------------------------------------------------------------------
% License
%     This file is part of OpenFOAM.
%
%     OpenFOAM is free software: you can redistribute it and/or modify it
%     under the terms of the GNU General Public License as published by
%     the Free Software Foundation, either version 3 of the License, or
%     (at your option) any later version.
%
%     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
%     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
%     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
%     for more details.
%
%     You should have received a copy of the GNU General Public License
%     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
%
% LaTeX Style file
%     tensorOperator.sty
%
% Description
%     Standard OpenFOAM LaTeX macros for typesetting tensor algebra.
%
%------------------------------------------------------------------------------

% tensor style
% ~~~~~~~~~~~~
\renewcommand{\vec}[1] {\ensuremath{\mathbf #1}}
\newcommand{\gvec}[1] {\ensuremath{\mbox{\boldmath$\bf#1$}}}

% products
% ~~~~~~~~
\newcommand{\anyprod}{\star}
\newcommand{\cprod} {\times}
\newcommand{\dprod} {\,{\scriptscriptstyle \stackrel{\bullet}{{}}}\,}
\newcommand{\ddprod} {\,{\scriptscriptstyle \stackrel{\bullet}{\bullet}}\,}
\newcommand{\tdprod} {\,{\scriptscriptstyle \stackrel{3}{\bullet}}\,}
\newcommand{\tprod} {\,{\scriptscriptstyle \stackrel{\otimes}{{}}}\,}

% operations
% ~~~~~~~~~~
\newcommand{\adj} {\ensuremath{\operatorname{adj}}}
\newcommand{\cof} {\ensuremath{\operatorname{cof}}}
\newcommand{\diag} {\ensuremath{\operatorname{diag}}}
\newcommand{\dev} {\ensuremath{\operatorname{dev}}}

\newcommand{\Hodge} {\ensuremath{\operatorname{\stackrel{\displaystyle \ast}{}}}}
\newcommand{\hyd} {\ensuremath{\operatorname{hyd}}}
\renewcommand{\max} {\ensuremath{\operatorname{max}}}
\renewcommand{\min} {\ensuremath{\operatorname{min}}}
\newcommand{\inv} {\ensuremath{\operatorname{inv}}}
\newcommand{\sym} {\ensuremath{\operatorname{symm}}}    % symm ?
\newcommand{\skw} {\ensuremath{\operatorname{skew}}}    % skew already defined
\newcommand{\tr} {\ensuremath{\operatorname{tr}}}
\newcommand{\trans}[1] {\ensuremath{#1^{\operatorname{T}}}}

% alternative tensor operators for hypersonics etc.
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\newcommand{\devs}[1] {\overset{\scriptscriptstyle\circ}{#1}}
%\newcommand{\trans}[1] {\ensuremath{#1^{\operatorname{T}}}}
\newcommand{\symms}[1] {\overleftrightarrow{#1}}
\newlength{\skewslength}
\newlength{\skewsheight}
\newcommand{\skews}[1]{
    \settowidth{\skewslength}{#1}%
    \settoheight{\skewsheight}{#1}%
    \addtolength{\skewsheight}{0.4mm}%
    {\overleftrightarrow{#1}\hspace{-.5\skewslength}%
    \rule[\skewsheight]{.4pt}{1.4mm}
    \hspace{.5\skewslength}%
}}
%\newcommand{\skew}[1] {\ensuremath{#1^{\operatorname{A}}}}

% spatial derivatives
% ~~~~~~~~~~~~~~~~~~~
\newcommand{\curl}{\ensuremath{\nabla\cprod}}
\renewcommand{\div} {\ensuremath{\nabla\dprod}}
\newcommand{\grad}{\ensuremath{\nabla}}
\newcommand{\laplacian}{\ensuremath{\nabla^{2}}}

% temporal derivatives
% ~~~~~~~~~~~~~~~~~~~~
\newcommand{\ddt}[1] {\ensuremath{\frac{\partial #1}{\partial t }}}
\newcommand{\DDt}[1] {\ensuremath{\frac{D #1}{D t}}}
\newcommand{\DpDt}[2] {\ensuremath{\frac{d_{#1} #2}{d t }}}
\newcommand{\dsdts}[1] {\ensuremath{\frac{\partial ^2 #1}{\partial t^2}}}
\newcommand{\rate}[1] {\ensuremath{\dot{#1}}}

\newcommand{\genDer}{\mathcal{L}}

% time average symbols
% ~~~~~~~~~~~~~~~~~~~~
\newcommand{\av}[1] {\ensuremath{\overline{#1}}}
\newcommand{\corrtwo}[2] {{\dwea{\dprime{#1} \dprime{#2}}}}
\newcommand{\curly}[1] {{\cal #1}}
\newcommand{\dprime}[1] {\ensuremath{{#1}^{^{\prime \prime}}}}
\newcommand{\dwea}[1] {\ensuremath{\widetilde{#1}}}
\newcommand{\dweafluc}[1] {\ensuremath{\dprime{#1}}}
\newcommand{\fluc}[1] {\ensuremath{#1^{\prime}}}

% index style
% ~~~~~~~~~~~
\newcommand{\veci}[2][i] {\ensuremath{#2_{#1}}}
\newcommand{\teni}[2][ij] {\ensuremath{#2_{#1}}}
\newcommand{\tenTi}[2][ji] {\ensuremath{#2_{#1}}}

% index operations
% ~~~~~~~~~~~~~~~~
\newcommand{\deltai}[1] {\ensuremath{\partial_{#1}}}

% Sub-subscripts
% ~~~~~~~~~~~~~~
\newcommand{\eff} {{\scriptscriptstyle e\!f\!\!f\!}}

% unknown use
% ~~~~~~~~~~~
%\font\bigtenrm=cmr12 scaled 1200
%\newcommand{\eexp}[1]{{\hbox{$\textfont1=\bigtenrm e$}}^{\raise3pt
%\hbox{$#1$}}}


% ------------------------------------------------------------------------------