1

Wondering how I could draw the deflection curve underneath a simply supported beam in dashed lines with the y = ? label as shown: enter image description here

I am using the structuralanalysis package. Below is the code I've created so far:

\documentclass[11 pt]{article}
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage{ae,aecompl}
\usepackage[automark]{scrpage2}
\usepackage[pdftex]{graphicx}
\usepackage[margin=0.99in]{geometry}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{structuralanalysis}
\usepackage{siunitx}
\begin{document}
\begin{center}
\begin{tikzpicture}
\draw[help lines, step =.45]
(0,-3.95) grid(9.115,3.325);
\scaling{.45};
\point{a}{0}{0};
\support{2}{a};
\point{b}{20}{0};
\support{2}{b};
\beam{2}{a}{b}[0][20];
\notation{5}{a}{b}[$\text{w}_{\text{f}} = 19.2 \ \text{kN/m}$][.5][above = 
15.5 mm];
\lineload{2}{a}{b}[1.20][1.20][0.0625];
\dimensioning{1}{a}{b}{ -1.125}[\textbf{$\ell = $}];
\notation{1}{a}{Gridline 4}[left = 2.5 mm];
\notation{1}{b}{Gridline 6}[right = 2.5 mm];
\end{tikzpicture}
\end{center}
\end{document}

Any help or hint is appreciated.

3 Answers3

3

I think the package has been renamed structuralanalysis to stanli !

TexLive 2019

Curve draw:

\internalforces{a}{b}{0}{0}[-1.5][black];

Exam file:

\documentclass{article}
\usepackage{amsmath} 
\usepackage{stanli}

\begin{document}

\begin{center}
\begin{tikzpicture}
\point{a}{0}{0};
\point{ab}{0}{-.2};
\point{b}{4}{0};
\point{c}{2}{.5};
\point{d}{2}{-2};
\beam{2}{a}{b}[0][3];
\beam{3}{c}{d}[0][4];
\internalforces{a}{b}{0}{0}[-1.5][black];
\notation {1}{a}{$x=0$}[left];
\notation {1}{ab}{$y=0$}[below left];
\notation {1}{b}{$x=L$}[right];
\notation {1}{d}{$\theta=0$}[right];
\draw [<->,very thick] (2,-.3)--(2,-1.2)node[left,midway]{$y=?$};
\end{tikzpicture}
\end{center}

\end{document}

Output: enter image description here

M.Ahmadi
  • 1,477
  • Thank you for your help! – ballislyfe24 Oct 05 '19 at 20:19
  • @M.Ahmadi, regarding the "\internalforces" command, the optional parameter regarding the height of the parabola, In case the starting and the ending points are set to zero, then the height is the distance from the center of the datum to the parabola. However, if one end of the parabola is negative and the other is positive. in this case what does the height represent, I have an issue comprehending this – Silva Oct 24 '20 at 12:39
  • Hello, I will answer your question, I hope it will be useful. in this question – M.Ahmadi Oct 29 '20 at 14:24
0

Showed image is simple to draw with pure TikZ:

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                quotes}

\begin{frame}[fragile]
\begin{center}
    \begin{tikzpicture}[
     block/.style = {align=left, yshift=-\baselineskip},
shorten <>/.style = {shorten <=#1, shorten >=#1},
                > = Straight Barb
                        ]
\draw   (-3,0) coordinate (a) -- (3,0) coordinate (b)
        (a) to [bend right=45] coordinate (c)   (b);
\node[block, left]  at (a)  {$x=0$\\    $y=0$\\ $\Phi=?$};
\node[block, right] at (b)  {$x=L$\\    $y=0$\\ $\Phi=?$};
\node[below right]  at (c)  {$\Phi=0$};
\draw[densely dash dot, shorten <>=-3mm]    (c) -- (0,0);
\draw[<->, semithick, shorten <>=1mm]       (c) to ["$y=?$"]    (0,0); 
    \end{tikzpicture}
\end{center}
\end{frame}
\end{document}

enter image description here

For some other solution (using your code) you should provide MWE (minimal Working Example), a small but complete document, which we can test as it is.

Zarko
  • 296,517
  • Hi Zarko, I've just entered my code. Any chance you may be able to show it with that? Thank you again. – ballislyfe24 Oct 04 '19 at 19:44
  • @ballislyfe24, sorry, I'm not familiar with the package structuralanalysis. For solution with it you should wait on some other answer. – Zarko Oct 04 '19 at 19:51
  • I used your code and adjusted it to mine and I was able to draw the dashed deflection line of the beam. Your code solved my problem, so thank you again! I really appreciated it. – ballislyfe24 Oct 04 '19 at 20:23
0
\documentclass[11 pt]{article}
\usepackage[english]{babel}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, quotes}
\usepackage[latin1]{inputenc}
\usepackage{ae,aecompl}
\usepackage[automark]{scrpage2}
\usepackage[margin=0.99in]{geometry}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{structuralanalysis}
\usepackage{siunitx}
\begin{document}
\begin{center}
\begin{tikzpicture}
\draw[help lines, step =.45]
(0,-3.95) grid(9.115,3.325);
\scaling{.45};
\point{a}{0}{0};
\support{2}{a};
\point{b}{20}{0};
\support{2}{b};
\point{c}{5}{0}
\beam{2}{a}{b}[0][20];
\notation{5}{a}{b}[$\text{w}_{\text{f}} = ? \ \text{kN/m}$][.5][above = 15.5 mm];
\lineload{2}{a}{b}[1.20][1.20][0.0625];
\dimensioning{1}{a}{b}{-1.5}[\textbf{$\ell = $}];
\notation{1}{a}{}[left = 2.5 mm];
\notation{1}{b}{}[right = 2.5 mm];
\draw [densely dashed,color=blue] (0,0) coordinate (a) -- (8.975,0) coordinate (b)
    (a) to [bend right=15] coordinate (c)   (b);
\draw[<->, semithick] (c) to ["${\Delta} = $"]    (4.5,0); 
\end{tikzpicture}
\end{center}
\end{document}