| 1 |
# TikZ Library for Structural Analysis |
| 2 |
## Purpose |
| 3 |
|
| 4 |
At university it is always a very time consuming work to create new |
| 5 |
assignments, and tests; especially when those tasks include drawing graphics. |
| 6 |
|
| 7 |
In the field of structural engineering those small structures are a key part |
| 8 |
for teaching. For this reason I developed, in cooperation with the |
| 9 |
[Institute for Structural Analysis](https://www.tugraz.at/institute/ifb/home/) |
| 10 |
at the [Graz University of Technology](http://tugraz.at/), |
| 11 |
a TikZ library for Structural Analysis. |
| 12 |
|
| 13 |
With the package `stanli`, 2D and 3D structures can be created. In the following article only the 2D library will be discussed, but the principles and methods are the same for 3D structures. |
| 14 |
|
| 15 |
## Principles |
| 16 |
|
| 17 |
TikZ is a very powerful tool; however, unfortunately not everyone is used to this part of LaTeX. |
| 18 |
Therefore, in addition to the creation of the library the second goal was to keep the usage as simple as possible. So that: |
| 19 |
|
| 20 |
* anyone can use this library without (deeper) knowledge in TikZ |
| 21 |
* skilled users can easily modify and customise the code |
| 22 |
* the principle of this library can be used for any other library |
| 23 |
|
| 24 |
## Getting Started |
| 25 |
### LaTeX Environment |
| 26 |
|
| 27 |
Like every TikZ graph, needs also this library the |
| 28 |
|
| 29 |
``` \begin{tikzpicture} |
| 30 |
... |
| 31 |
\end{tikzpicture}``` |
| 32 |
|
| 33 |
environment. |
| 34 |
|
| 35 |
### Elements |
| 36 |
#### Basic Commands |
| 37 |
|
| 38 |
The library provides 10 different commands: |
| 39 |
|
| 40 |
* ``\point`` |
| 41 |
* ``\beam`` |
| 42 |
* ``\support`` |
| 43 |
* ``\hinge`` |
| 44 |
* ``\load`` or ``\lineload`` and ``\temperature`` |
| 45 |
* ``\internalforces`` |
| 46 |
* ``\dimensioning`` |
| 47 |
* ``\influenceline`` |
| 48 |
* ``\notation`` |
| 49 |
* ``\addon`` |
| 50 |
|
| 51 |
For each element (command) are different options available. Obligatory options |
| 52 |
are marked with {curley brackets} and optional values are marked with [square |
| 53 |
brackets]. The first type is a must have criteria. In contrast, the optional |
| 54 |
input is not required to be entered. |
| 55 |
|
| 56 |
An easy example is the following single force: |
| 57 |
|
| 58 |
```\load{type}{insertion point}[rotation][length or included angle][loaddistance];``` |
| 59 |
|
| 60 |
### Manual |
| 61 |
|
| 62 |
More specific information about the elements and their options can be found in |
| 63 |
the manual. The manual is written in English. Section 1 provides a table |
| 64 |
with all elements and options; furthermore, the code is also given for each |
| 65 |
picture in the manual. |
| 66 |
|
| 67 |
### Examples |
| 68 |
|
| 69 |
The easiest way to create a structure is the list above, starting with ``\point`` |
| 70 |
and ending with ``\addon``. |
| 71 |
|
| 72 |
The following examples shall give a first impression how drawings can be |
| 73 |
generated. In the manual the example is explained in more detail. |
| 74 |
|
| 75 |
#### 2D Simplified Roof |
| 76 |
|
| 77 |
By using the library ``stanli``, the following graph can be created |
| 78 |
in a very short time: |
| 79 |
|
| 80 |
``` |
| 81 |
\begin{tikzpicture} |
| 82 |
\scaling{.65}; |
| 83 |
|
| 84 |
\point{a}{0}{1}; |
| 85 |
\point{b}{3}{1}; |
| 86 |
\point{c}{11}{3}; |
| 87 |
\point{d}{19}{1}; |
| 88 |
\point{e}{22}{1}; |
| 89 |
\point{f}{3}{0}; |
| 90 |
\point{g}{11}{-2}; |
| 91 |
\point{h}{19}{0}; |
| 92 |
|
| 93 |
\beam{1}{a}{b}[0][1]; |
| 94 |
\beam{1}{b}{c}[1][1]; |
| 95 |
\beam{1}{c}{d}[1][1]; |
| 96 |
\beam{1}{d}{e}[1][0]; |
| 97 |
\beam{1}{f}{b}; |
| 98 |
\beam{1}{d}{h}; |
| 99 |
\beam{2}{f}{g}; |
| 100 |
\beam{2}{g}{h}; |
| 101 |
\beam{2}{g}{c}; |
| 102 |
|
| 103 |
\support{1}{f}; |
| 104 |
\support{2}{h}; |
| 105 |
|
| 106 |
\hinge{1}{f}; |
| 107 |
\hinge{1}{h}; |
| 108 |
\hinge{1}{g}; |
| 109 |
\hinge{2}{c}[b][d]; |
| 110 |
|
| 111 |
\lineload{2}{a}{b}[1][1][.5]; |
| 112 |
\lineload{2}{b}{c}; |
| 113 |
|
| 114 |
\dimensioning{1}{a}{b}{-2.5}[$3,0$]; |
| 115 |
\dimensioning{1}{b}{c}{-2.5}[$8,0$]; |
| 116 |
\dimensioning{1}{c}{d}{-2.5}[$8,0$]; |
| 117 |
\dimensioning{1}{d}{e}{-2.5}[$3,0$]; |
| 118 |
\dimensioning{2}{f}{a}{-1}[$1,0$]; |
| 119 |
\dimensioning{2}{g}{f}{-1}[$2,0$]; |
| 120 |
\dimensioning{2}{a}{c}{-1}[$2,0$]; |
| 121 |
|
| 122 |
\influenceline{a}{e}{3}[.3]; |
| 123 |
|
| 124 |
\notation{1}{a}{$1$}[left]; |
| 125 |
\notation{1}{b}{$2$}[below right=2mm]; |
| 126 |
\notation{1}{c}{$3$}; |
| 127 |
\notation{1}{d}{$4$}[above]; |
| 128 |
\notation{1}{e}{$5$}[above]; |
| 129 |
\notation{1}{f}{$6$}[left=2mm]; |
| 130 |
\notation{1}{g}{$7$}[below=2mm]; |
| 131 |
\notation{1}{h}{$8$}[right=2mm]; |
| 132 |
\notation{4}{f}{g}[$S$]; |
| 133 |
|
| 134 |
\end{tikzpicture} |
| 135 |
``` |
| 136 |
 |
| 137 |
|
| 138 |
|
| 139 |
#### 3D Support Construction |
| 140 |
|
| 141 |
By using the library ``stanli``, the following 3D structure can be created in a very short time with few lines of code: |
| 142 |
|
| 143 |
``` |
| 144 |
\setcoords{-25}{10}[1][1.2] |
| 145 |
\setaxis{2} |
| 146 |
%\showpoint |
| 147 |
\begin{tikzpicture}[coords] |
| 148 |
|
| 149 |
\dpoint{a}{0}{0}{0}; |
| 150 |
\dpoint{b}{3}{0}{0}; |
| 151 |
\dpoint{c}{6}{0}{0}; |
| 152 |
\dpoint{d}{9}{0}{0}; |
| 153 |
\dpoint{e}{12}{0}{0}; |
| 154 |
\dpoint{f}{0}{3}{0}; |
| 155 |
\dpoint{g}{3}{3}{0}; |
| 156 |
\dpoint{h}{6}{3}{0}; |
| 157 |
\dpoint{i}{9}{3}{0}; |
| 158 |
\dpoint{j}{12}{3}{0}; |
| 159 |
|
| 160 |
\daxis{1}{a}; |
| 161 |
|
| 162 |
\dbeam{1}{f}{b}; |
| 163 |
\dbeam{1}{b}{h}; |
| 164 |
\dbeam{1}{h}{d}; |
| 165 |
\dbeam{1}{d}{j}; |
| 166 |
\dbeam{3}{a}{e}; |
| 167 |
\dbeam{3}{f}{j}; |
| 168 |
\dbeam{3}{a}{f}; |
| 169 |
\dbeam{3}{b}{g}; |
| 170 |
\dbeam{3}{c}{h}; |
| 171 |
\dbeam{3}{d}{i}; |
| 172 |
\dbeam{3}{e}{j}; |
| 173 |
|
| 174 |
\dsupport{1}{b}; |
| 175 |
\dsupport{1}{h}[0][0]; |
| 176 |
\dsupport{1}{d}[0]; |
| 177 |
|
| 178 |
\dhinge{2}{b}[f][h][1]; |
| 179 |
\dhinge{2}{h}[b][d][1]; |
| 180 |
\dhinge{2}{d}[h][j][1]; |
| 181 |
|
| 182 |
\dlineload{5}{0}{f}{b}[.5][.5][.11]; |
| 183 |
\dlineload{5}{0}{b}{h}[.5][.5][.11]; |
| 184 |
\dlineload{5}{0}{h}{d}[.5][.5][.11]; |
| 185 |
\dlineload{5}{0}{d}{j}[.5][.5][.11]; |
| 186 |
|
| 187 |
\ddimensioning{xy}{f}{g}{4.5}[$3~m$]; |
| 188 |
\ddimensioning{xy}{g}{h}{4.5}[$3~m$]; |
| 189 |
\ddimensioning{xy}{h}{i}{4.5}[$3~m$]; |
| 190 |
\ddimensioning{xy}{i}{j}{4.5}[$3~m$]; |
| 191 |
\ddimensioning{yx}{e}{j}{13}[$3~m$]; |
| 192 |
|
| 193 |
\dnotation{1}{f}{$q=10~kN/m$}[above left=3mm]; |
| 194 |
\dnotation{1}{b}{$A$}[below left]; |
| 195 |
\dnotation{1}{h}{$C$}[right=2mm]; |
| 196 |
\dnotation{1}{d}{$B$}[below left]; |
| 197 |
|
| 198 |
\end{tikzpicture} |
| 199 |
``` |
| 200 |
 |
| 201 |
|
| 202 |
|
| 203 |
## Author |
| 204 |
|
| 205 |
Copyright (c) 2016 [Juergen Hackl](mailto:[email protected]) |