I want to draw this picture:
I tried to to it using:
\documentclass[11pt,a4paper]{article}
\usepackage{xcolor}
\definecolor{lightgray}{gray}{0.9}
\usepackage{tikz}
\usetikzlibrary{calc,patterns,decorations.pathmorphing,arrows.meta,decorations.markings}
\tikzset{place/.style={ circle,
fill=gray!20,
thick,
inner sep=0pt,
minimum size=6mm},
spring/.style={ decorate,
decoration={zigzag,
pre length=0.3cm,
post length=0.3cm,
segment length=6,
amplitude=6
}
},
damper/.style={ thick,
decoration={markings,
mark connection node=dmp,
mark=at position 0.5 with {\node (dmp) [thick,
inner sep=0pt,
transform shape,
rotate=-90,
minimum width=15pt,
minimum height=3pt,
draw=none] {};
\draw [thick] ($(dmp.north east)+(2.5pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(2pt,0)$);
\draw [thick] ($(dmp.north)+(0,-5pt)$) -- ($(dmp.north)+(0,5pt)$);
}
},
decorate
},
ground/.style={ fill,
pattern=north east lines,
draw=black,
minimum width=0.3cm,
minimum height=0.3cm
},
bar/.style={fill=lightgray,
draw=black,
minimum width=6cm,
minimum height=0.2cm,
inner sep=0pt,
anchor=west
}
}
\begin{document}
\begin{tikzpicture}[>=latex,
every node/.style={outer sep = 0pt,
thick
}
]
%% Begining
\draw[thick] (0,0) -+ (6,0) node(l1){};;
\draw[thick] (0,0.5) -- (0.5,0.5) node(l2){};
\draw[thick] (l2.east) -+ ($(l2.east)+(0,2)$) node(l3){};
\draw[thick] (6,0.5) -+ (5.5,0.5) node(l4){};
\draw[thick] (l4.west) -+ ($(l4.west)+(0,2)$) node(l5){};
\node (seperation) [ground,anchor=south,minimum width=0.5cm,minimum height=2cm] at (3,0.5) {};
\draw[thick] (l1.east) -+ ($(l1.east)+(0,-2)$) node(l6){};
\draw[thick] (l6.south) -+ ($(l6.south)+(2.75,0)$) node(l7){};
\draw[thick] ($(l7.east)+(0,0.5)$) -+ ($(l7.east)+(-0.5,0.5)$) node(l8){};
\draw[thick] (l8.west) -+ ($(l8.west)+(0,2)$) node(l9){};
\draw[thick] (0,0) -+ ($(0,0)+(0,-2)$) node(l10){};
\draw[thick] (l10.south) -+ ($(l10.south)+(-2.75,0)$) node(l11){};
\draw[thick] ($(l11.west)+(0,0.5)$) -+ ($(l11.west)+(0.5,0.5)$) node(l12){};
\draw[thick] (l12.east) -+ ($(l12.east)+(0,2)$) node(l13){};
\draw[thick] (l5.north) -+ ($(l5.north)+(2.75,0)$) node(l14){};
\draw[thick] ($(l5.north)+(0,0.5)$) -+ ($(l5.north)+(0.5,0.5)$) node(l15){};
\draw[thick] (l15.east) -+ ($(l15.east)+(0,2)$) node(l16){};
\draw[thick] (l14.east) -+ ($(l14.east)+(0,2)$) node(l17){};
\end{tikzpicture}
\end{document}
But I have a problem in:
1.Connecting lines
2.Creating details like Q, x,R ticks and other labels and water stream like this one:
-|
. Example:\draw[thick] (0,0)-|+(1,6);
. By details you mean the labels?\draw[thick] (l2.center) -+ ($(l2.center)+(0,2)$)
, then the gap is all gone. Although my earlier suggestion is better, in my opinion.