## LaTeX forum ⇒ Math & Science ⇒ Process Flow Diagrams in LaTeX? Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
UnevenSteven2
Posts: 3
Joined: Sun Nov 13, 2016 9:49 pm

### Process Flow Diagrams in LaTeX?

Hello everybody!
I have just very recently discovered the fun that is creating graphics in LaTeX. As a chemist, I have wondered if there exist any packages for LaTeX to create process flow diagrams (https://en.wikipedia.org/wiki/Process_flow_diagram)? If you are a chemist or chemical engineer, are you using LaTeX to create process flow diagrams?

Tags:

Stefan Kottwitz
Posts: 9557
Joined: Mon Mar 10, 2008 9:44 pm
Welcome to the forum!

I often create diagrams with LaTeX, also for work. For example, even complex network diagrams, that others use Visio for.

Such flow diagrams are not hard. Seems like a routine task, just styling is a matter of taste.

Did you already make graphics yourself with LaTeX? I would be glad to see some. And do you have a specific diagram that you would like to draw?

Stefan

UnevenSteven2
Posts: 3
Joined: Sun Nov 13, 2016 9:49 pm
Hi Stefan, thanks for the answer!
Well, I only found out recently about how to make graphics in LaTeX, so I have only made two graphics for university protocols yet. To be more clear about my question, is there a package with predefined forms (like stirred tank reactors, pumps, ) based on the rules laid out in DIN EN ISO 10628-1 and DIN EN ISO 10628-2?

I would like to draw something along the following pseudo-code, and am unsure if I need to define the forms myself, or if someone else has solved this problem before.

1. \begin{flowdiagram}
2. \node[bottle]{bottle}{Sugar-Feed}
3. \node[pump]{pump}{}
4. \node[stirredTankReactor]{STR}{Bioreactor}
5. \path[line](bottle)--(pump)
6. \path[line](pump)--(STR)
7. \end{flowdiagram}

I know that some people use sites like this one:
http://www.engineeringtoolbox.com/pfd-p ... _1640.html
or commercial programs, but my university has no free licenses for these commercial programs for ordinary students, and the freeware is, in my opinion, often ugly.

Cheers,Steve!

Stefan Kottwitz
Posts: 9557
Joined: Mon Mar 10, 2008 9:44 pm
Hi Steve!

There are scientific packages such as pst-labo. And there's a lot of TikZ example diagrams.

A good idea good be getting some postscript, pdf or svg images, from some library, and use them in TikZ. That's what I did with network diagrams: I downloaded the Cisco network topology icons, converted them to pdf (small but scalable in high quality), defined styles containing these icons and used them in large diagrams with edges and labels.

Stefan

UnevenSteven2
Posts: 3
Joined: Sun Nov 13, 2016 9:49 pm
Thanks for the help Stefan!
I new of the examples on the Tikz page and went to this forum because I didn't find anything for chemical engineering, but I didn't think of importing pdf/svg images into Tikz, I think that is the best aproach for me!
Cheers!

Stefan Kottwitz
Posts: 9557
Joined: Mon Mar 10, 2008 9:44 pm
Hi Steve,

here I explained how I make diagrams with ps/pdf/svg icons: http://tex.world/drawings.pdf

There are some code snippets showing how I define styles with images for using as TikZ nodes, such as:

1. \tikzset{%
2. image/.style 2 args = {path picture = {% image node
3. \node at (path picture bounding box.center) {
4. \includegraphics[width=#1cm] {#2}};}},
5. Switch/.style = { image = {2.4}{nexus7k },% pdf
6. minimum width = 2cm,
7. inner ysep = 1.5cm },
8. Link/.style = { color=green!60!black, thick },
9. label/.style = { rounded corners = 8pt, fill=blue},
10. channel/.style = { white, double = black,
11. line width = 1.2pt,
12. double distance = 0.8pt },
13. basearc/.style = { start angle = 90, double,
14. delta angle = 180},
15. ...
16. }
17. ...
18. \path (corelevel-left) edge [draw=none]
19. node[Switch, pos=0.5-\distcore] (Core1) {}
20. node[Switch, pos=0.5+\distcore, mirror] (Core2) {}
21. (corelevel-right);
22.
23. \draw [channel] (Core1) -- (Core2);
24.
25. \coordinate (middle) at ($(Core1)!0.5!(Core2)$);
26.
27. \drawArc{middle}{\loopwidth}{\loopheight}
28. ...

Stefan