Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Here My first Tikz picture: help on positioning and suggestions we have a nice drawing similar to this image.

enter image description here

How to draw the pump element in the above image? How to draw the anticlock arrow?

Like turbine is it possible to make \tikzset for pump

\tikzset{turb/.style={draw,trapezium,shape border rotate=90,inner sep=1pt,minimum width=2.5cm,trapezium stretches=true,trapezium angle=80,on grid,below right= of evaporatore}}

\documentclass{standalone} 
\usepackage{tikz}
\usetikzlibrary{positioning,shapes.geometric,decorations.pathmorphing,decorations.pathreplacing,decorations.shapes,decorations.markings,patterns,calc,fit,arrows}

\begin{document}

\begin{tikzpicture}[>=latex',auto,inner sep=2mm,node distance=2cm and 3cm]

%set styles for the axis between turbine and pump and for the boxes

\tikzset{box1/.style={draw,minimum width=2.5cm,rectangle,thick}}
\tikzset{deco/.style={decoration={markings,
                       mark=at position #1 with {\arrow{>}}},
                       postaction={decorate}}}
\tikzset{turb/.style={draw,trapezium,shape border rotate=90,inner sep=1pt,minimum width=2.5cm,trapezium stretches=true,trapezium angle=80,on grid,below right= of evaporatore}}   

% draw nodes
\node[box1] (evaporatore)  {Boiler};
\node[turb] (turbina) {Turbine};
\node[box1,on grid,below left=of turbina] (condensatore){Condenser};
%\node[draw,circle,on grid,below left= of evaporatore] (pompa) {Pump};
\node[draw,circle,on grid,below left= of evaporatore] (pompa) {Pump}; 
\draw (pompa.70) |- ++(2.5mm,5mm) coordinate (mid)  -| (pompa.east);


\begin{scope}[>=triangle 45]
 \draw [deco=0.6]  (evaporatore)                -| (turbina.top right corner);
 \draw [deco=0.6]  (turbina.bottom left corner) |- (condensatore);
 \draw [deco=0.4]  (condensatore)               -| (pompa);
 \draw [deco=0.6]  (mid)                      |- (evaporatore);
 \end{scope}

%draw the "shaft"

\path(pompa) to node[]{shaft} (turbina);
\draw[pattern=north east lines] ($(pompa.east)+(0,-3pt)$) rectangle ($(turbina.west)+(0,3pt)$);
\draw[pattern=north east lines] ($(turbina.east)+(0,-3pt)$) rectangle ++(1,6pt);
\draw[->] (25:1) arc (10:320:0.2cm and 0.75cm) ;
%
\end{tikzpicture}
\end{document}

enter image description here

Pump element changed (thanks to percusse). Instead of node, coordinate is used... \draw (pompa.70) |- ++(2.5mm,5mm) coordinate (mid) -| (pompa.east);

enter image description here

share|improve this question
    
Replace the line with \draw (p.70) |- ++(2mm,5mm) node (pompaout){} -| (p.east); and use (pompaout) instead for the pump output. –  percusse Jun 5 '12 at 9:31
    
node (pompaout){} : empty node always reserve some space. –  sandu Jun 5 '12 at 10:09
    
You are right, make it a coordinate. Sorry. –  percusse Jun 5 '12 at 10:16
    
Thank you percusse... Help me in palcing the anticlock arrow. (red color in the image) –  sandu Jun 5 '12 at 10:20
    
You get a fine anticlock arrow with : \draw[->] (evaporatore.north) arc (25:335:0.2cm and 0.8cm) ; –  Alain Matthes Jun 5 '12 at 10:48

4 Answers 4

up vote 7 down vote accepted

Something like that

\documentclass[11pt]{scrartcl}
\usepackage{tikz}
\usetikzlibrary{arrows}

\begin{document}
\begin{tikzpicture}
\draw (0,-0.4) rectangle (2,0.4);
\draw[->] (25:1) arc (30:320:0.2cm and 0.75cm) ;

\end{tikzpicture}
\end{document}

enter image description here

Update with your example

\documentclass{standalone} 
\usepackage{tikz}
\usetikzlibrary{positioning,shapes.geometric,decorations.pathmorphing,decorations.pathreplacing,decorations.shapes,decorations.markings,patterns,calc,fit,arrows}

\begin{document}

\begin{tikzpicture}[>=latex',auto,inner sep=2mm,node distance=2cm and 3cm]

%set styles for the axis between turbine and pump and for the boxes

\tikzset{box1/.style={draw,minimum width=2.5cm,rectangle,thick}}
\tikzset{deco/.style={decoration={markings,
                       mark=at position #1 with {\arrow{>}}},
                       postaction={decorate}}}
\tikzset{turb/.style={draw,trapezium,shape border rotate=90,inner sep=1pt,minimum width=2.5cm,trapezium stretches=true,trapezium angle=80,on grid,below right= of evaporatore}}   

% draw nodes
\node[box1] (evaporatore)  {Boiler};
\node[turb] (turbina) {Turbine};
\node[box1,on grid,below left=of turbina] (condensatore){Condenser};
%\node[draw,circle,on grid,below left= of evaporatore] (pompa) {Pump};
\node[draw,circle,on grid,below left= of evaporatore] (pompa) {Pump}; 
\draw (pompa.70) |- ++(2.5mm,5mm) coordinate (mid)  -| (pompa.east);


\begin{scope}[>=triangle 45]
 \draw [deco=0.6]  (evaporatore)                -| (turbina.top right corner);
 \draw [deco=0.6]  (turbina.bottom left corner) |- (condensatore);
 \draw [deco=0.4]  (condensatore)               -| (pompa);
 \draw [deco=0.6]  (mid)                      |- (evaporatore);
 \end{scope}

%draw the "shaft"

\path(pompa) to node[]{shaft} (turbina);
\draw[pattern=north east lines] ($(pompa.east)+(0,-3pt)$) rectangle ($(turbina.west)+(0,3pt)$);
\draw[pattern=north east lines] ($(turbina.east)+(0,-3pt)$) rectangle ++(1,6pt);
\draw[->] ([shift={(0.75,3pt)}]turbina.east) arc (10:350:0.2cm and {3pt/sin(10)}) ; 

\end{tikzpicture}
\end{document}  

enter image description here

Explanations for the last arrow

You need to determine the origin point. The point of reference here is turbina.east.

You can use calc library or the old method with shift as given below

($ (turbina.east)+(0.75,3pt)$) or ([shift={(0.75,3pt)}]turbina.east)

The origin point is on the top of the last rectangle. Then you need to choice the start angle (see the good answer from PolGab to understand how to get the end angle).

share|improve this answer
    
I want arc on this...\draw[pattern=north east lines] ($(turbina.east)+(0,-3pt)$) rectangle ++(1,6pt); –  sandu Jun 6 '12 at 5:01
    
@sandu I made an update with this request in my answer. –  Alain Matthes Jun 6 '12 at 6:04
    
Thank you...Altermundus –  sandu Jun 6 '12 at 6:21

The arrow is simply a long arc :

\begin{tikzpicture}
\draw[-latex] (15:2.5mm) arc (15:345:2.5mm and 7.5mm);
\end{tikzpicture}

gives

enter image description here

also the pump is a node with extension:

\begin{tikzpicture}
\node[draw,circle] (p) {Pump}; 
\draw (p.70) |- ++(1mm,5mm) -| (p.east);
\end{tikzpicture}

enter image description here

share|improve this answer

here is an example with PSTricks. The code (http://tug.org/PSTricks/main.cgi?file=Examples/Gallery/Gallery) can be run with xelatex to get directly a pdf output

enter image description here

share|improve this answer

The calculation of angles and radii of arc is feasible if the height of the node is fixed.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\foreach \he in {1cm,1.3cm}
{
  \begin{tikzpicture}
    \node [minimum width=2cm,minimum height=\he,draw] (a){Test};
    \foreach \angle in {25,30,35} {
      \draw[-stealth]
      (a.north)
      arc[start angle=\angle,end angle=360-\angle,x radius=\he/4,y radius=\he/sin(\angle)/2]
      ;
    }
  \end{tikzpicture}
}
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.