## 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: 9226
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.

\begin{flowdiagram}    \node[bottle]{bottle}{Sugar-Feed}    \node[pump]{pump}{}    \node[stirredTankReactor]{STR}{Bioreactor}    \path[line](bottle)--(pump)    \path[line](pump)--(STR)\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: 9226
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: 9226
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:

\tikzset{%  image/.style 2 args = {path picture = {% image node    \node at (path picture bounding box.center) {          \includegraphics[width=#1cm] {#2}};}},  Switch/.style  = { image = {2.4}{nexus7k },% pdf                     minimum width = 2cm,                     inner ysep    = 1.5cm },  Link/.style    = { color=green!60!black, thick },  label/.style   = { rounded corners = 8pt, fill=blue},  channel/.style = { white, double = black,                     line width = 1.2pt,                     double distance = 0.8pt },  basearc/.style = { start angle = 90, double,                     delta angle = 180},  ...}  ...\path (corelevel-left) edge [draw=none]    node[Switch, pos=0.5-\distcore]         (Core1) {}    node[Switch, pos=0.5+\distcore, mirror] (Core2) {}  (corelevel-right); \draw [channel] (Core1) -- (Core2); \coordinate (middle) at ($(Core1)!0.5!(Core2)$); \drawArc{middle}{\loopwidth}{\loopheight}...

Stefan