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.

I would like to do a flow chart with the first row width the same as that of the second row but just below the first row. I can not do it and actually I don't know how to fix the problem.

If anyone can help I will appreciate it. Here is the LaTeX code:

\documentclass[10pt,a4paper]{article} 

\usepackage[hmargin=1cm,vmargin=1cm]{geometry}
\renewcommand{\rmdefault}{bch} 

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{tikz} 
\usetikzlibrary{
arrows,decorations.pathmorphing,
backgrounds,fit,positioning,shapes.symbols,chains}
\usepackage{verbatim}
\usepackage[active,tightpage,floats]{preview}
\setlength\PreviewBorder{5pt}%

\begin{document}

\begin{figure}[h]

\centering
\begin{tikzpicture}
[node distance = 1cm, auto,font=\footnotesize,
every node/.style={node distance=3cm},
comment/.style={
rectangle, 
inner sep= 5pt, 
text width=4cm, 
node distance=0.25cm, 
font=\scriptsize\sffamily},
force/.style={rectangle, 
draw, 
fill=black!10, 
inner sep=5pt, 
text width=4cm,  
text badly centered, 
minimum height=1.2cm,    
font=\bfseries\footnotesize\sffamily},
forcea/.style={rectangle, 
draw, fill=black!10, 
inner sep=5pt, 
text width=15cm, 
text badly centered,    
minimum height=1.2cm, 
font=\bfseries\footnotesize\sffamily},
forceb/.style={rectangle, draw, fill=black!10, inner sep=5pt, text width=10cm, text badly centered, minimum height=1.2cm,  font=\bfseries\footnotesize\sffamily}] 

\node [forcea] (numericalsimulation) {Numerical simulation of turbomachinery};
\node [forceb, below of=numericalsimulation] (multiplerf) {Fluid zones with multiple rotating frames};
\node [force, left=1cm of multiplerf] (singlerf) {rotational periodic in a single fluid zone};
\node [force, below of = singlerf] (steady) {steady approach};
\node [force, right=1cm of steady] (unsteady) {unsteady};
\node [force, below of = steady] (mrf) {MRF/frozen rotor};
\node [force, right=1cm of mrf] (mpl) {Mixing plane};
\node [force, right=1cm of mpl] (smm) {Sliding mesh};
\node [force, left=1cm of mrf] (rrf) {RRF};

\node [comment, below=0.25 of mrf] (comment-mrf){
(-) relative movement between fluid zones \\
(-) improper for rotor-stator interaction (mixed-out approach)};

\node [comment, below=0.25 of mpl] {
(-) relative movement between fluid zones \\
(-) improper for rotor-stator interaction (mixed-out approach)};

\node [comment, below=0.25 of smm] {
(-) unsteady approach \\
(-) for transient rotor-stator interactions};

\node [comment, below=0.25 of rrf]{
(-) Fluid Zones with constant angular speed \\
(-) One impeller channel need be modeled\\
(-) only in absence of stators or volute};

\draw [->] (numericalsimulation) -- (multiplerf);
\draw [->] (numericalsimulation) -- (singlerf);
\draw [->] (multiplerf) -- (steady);
\draw [->] (multiplerf) -- (unsteady);
\draw [->] (steady) -- (mpl);
\draw [->] (steady) -- (mrf);
\draw [->] (unsteady) -- (smm);
\draw [->] (singlerf) -- (rrf);

\end{tikzpicture} 
\end{figure}

\end{document}
share|improve this question
add comment

1 Answer

I am not sure if this is what you were expecting to achieve:

\documentclass[10pt,a4paper]{article} 

\usepackage[hmargin=1cm,vmargin=1cm]{geometry}
\renewcommand{\rmdefault}{bch} 

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{tikz} 
\usetikzlibrary{
arrows,decorations.pathmorphing,
backgrounds,fit,positioning,shapes.symbols,chains}
\usepackage{verbatim}
\usepackage[active,tightpage,floats]{preview}
\setlength\PreviewBorder{5pt}%

\begin{document}

\begin{figure}
\begin{tikzpicture}
[node distance = 1cm, auto,font=\footnotesize,
every node/.style={node distance=3cm,inner sep=0pt},
comment/.style={
rectangle, 
inner sep= 5pt, 
text width=4cm, 
font=\scriptsize\sffamily},
force/.style={rectangle, 
draw, 
fill=black!10, 
text width=4cm,  
text badly centered, 
minimum height=1.2cm,    
font=\bfseries\footnotesize\sffamily},
forcea/.style={rectangle, 
draw, fill=black!10, 
text width=15cm, 
text badly centered,    
minimum height=1.2cm, 
font=\bfseries\footnotesize\sffamily},
forceb/.style={rectangle, draw, fill=black!10, text width=10cm, text badly centered, minimum height=1.2cm,  font=\bfseries\footnotesize\sffamily}] 

\node [forcea] (numericalsimulation) {Numerical simulation of turbomachinery};
\node [forceb, below of=numericalsimulation,xshift=2.5cm] (multiplerf) {Fluid zones with multiple rotating frames};
\node [force, below of = numericalsimulation,xshift=-5.5cm] (singlerf) {rotational periodic in a single fluid zone};
\node [force, below of = multiplerf,xshift=-3cm] (steady) {steady approach};
\node [force, below of = multiplerf,xshift=3cm] (unsteady) {unsteady};
\node [force, below of = steady,xshift=-2.5cm] (mrf) {MRF/frozen rotor};
\node [force, right=1cm of mrf] (mpl) {Mixing plane};
\node [force, right=1cm of mpl] (smm) {Sliding mesh};
\node [force, left=1cm of mrf] (rrf) {RRF};

\node [comment, below=0.25 of mrf] (comment-mrf){
(-) relative movement between fluid zones \\
(-) improper for rotor-stator interaction (mixed-out approach)};

\node [comment, below=0.25 of mpl] {
(-) relative movement between fluid zones \\
(-) improper for rotor-stator interaction (mixed-out approach)};

\node [comment, below=0.25 of smm] {
(-) unsteady approach \\
(-) for transient rotor-stator interactions};

\node [comment, below=0.25 of rrf]{
(-) Fluid Zones with constant angular speed \\
(-) One impeller channel need be modeled\\
(-) only in absence of stators or volute};

\draw [->] (numericalsimulation) -- (multiplerf);
\draw [->] (numericalsimulation) -- (singlerf);
\draw [->] (multiplerf) -- (steady);
\draw [->] (multiplerf) -- (unsteady);
\draw [->] (steady) -- (mpl);
\draw [->] (steady) -- (mrf);
\draw [->] (unsteady) -- (smm);
\draw [->] (singlerf) -- (rrf);

\end{tikzpicture} 
\end{figure}

\end{document}

enter image description here

I simply set inner sep to 0pt for the non-comment nodes and then used xshift to fix the horizontal position of the child nodes.

share|improve this answer
add comment

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.