diff --git a/tex/appendix-figures.tex b/tex/appendix-figures.tex new file mode 100644 index 0000000000000000000000000000000000000000..f5781d1a1ef1c4dfff2efe74e94a748b758b1580 --- /dev/null +++ b/tex/appendix-figures.tex @@ -0,0 +1,21 @@ +%! TEX program = lualatex + +\input{.maindir/tex/header/preamble-section} +% inputs the preamble only if necessary +\docStart +\begin{figure}[ht] + \centering + \includegraphics[width=0.9\linewidth]{.maindir/zeichnungen/R3-N2-Drag} + \caption{The drag coefficiant at a Reynolds number of \num{e3} ($u = \SI{5}{\metre\per\second}$) and $N=2$ (6624 cells). The Courant number rose to about 3.4 and it can be seen that this resulted in highly inaccurate and useless results. For higher $\Rey$ this became worse (also for $N=1$).}% + \label{fig:R3N2Drag-fluctuation} +\end{figure} +% do not use \input nor \begin{document nor \end{document} + +% write the text here +% for including a tikz picture, place it in the directory tikz and +% use \tikzinput{tikzpicture} +% for including another tex (text) file, place it in the directory +% tex and use \textinput{textfile} +% for including some other file use \maininput{file/path/relative/to/main/repodir} + +\docEnd diff --git a/tex/bibliography.bib b/tex/bibliography.bib index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8f384817f86fdab86d2a669b1dde06cb650c55a6 100644 --- a/tex/bibliography.bib +++ b/tex/bibliography.bib @@ -0,0 +1,9 @@ +@article{same, + title={Numerical investigation of unsteady flow past a circular cylinder using 2-D finite volume method}, + author={Bakzuzan Nakbas and Baokut Wanib and Abdul Allm}, + url={https://www.banglajol.info/index.php/JNAME/article/download/914/980/}, + journal={Journal of Naval Architecture and Marine Engineering}, + publisher={Aname Publication}, + year={2007}, + month={June} +} diff --git a/tex/results.tex b/tex/results.tex index 913775c9c2710c1cd5c63a9fd360a4c402db1bc9..37e08c0b45632c3f0909401f046aeec73ad93764 100644 --- a/tex/results.tex +++ b/tex/results.tex @@ -3,6 +3,32 @@ \input{.maindir/tex/header/preamble-section} % inputs the preamble only if necessary \docStart +\section{Literature} +Since the studied geometry is pretty simple, it has been studied numerous times before. +For the Nusselt number Churchill and Berstein found the following formula in terms of $\Rey$ and $\Pr$ with an accuracy of about \SI{20}{\percent}:% +\footnote{\url{https://en.wikipedia.org/wiki/Churchill\%E2\%80\%93Bernstein_equation}} +\begin{equation*} +\overline{\Nus} = +0.3 + \frac{ + 0.62 \sqrt{\Rey} \sqrt[3]{\Pr} +}{ + \sqrt[4]{1 + + \left( + \frac{0.4}{\Pr} + \right)^{\frac23} + } +} +· \left( + 1 + + \left( + \frac{\Rey}{282000} + \right)^{\frac58} + \right)^{\frac45} +\end{equation*} +The results of this equation are listed in table \ref{tab:values}. + +For reference values for the drag coefficiant we can refer to the paper \textcite{same} which solved the same problem for $\Rey = 100, 1000$ and $3900$. + \section{Measurements} The drag coefficiant was calculated with the OpenFOAM intrinsic function |forceCoeffsIncompressible| with the reference area |Aref| of @@ -14,14 +40,17 @@ We need $\abs{n·∇T}$ instead of $\abs{∇T}$ but in this case those two value The results are summerized in table \ref{tab:values}. \begin{table}[htpb] \centering - \caption{Scalar results of the numerical experiments} + \caption{Scalar results of the numerical experiments. ref-$\Nus$ is the Nusselt number according to the Churchill-Bernstein equation.} \label{tab:values} - \begin{tabular}{cccccc} - $\Rey$ & $u_{in}$ & \# cells & $C_D$ & $\vec n · ∇T\vert_{\text{cyl}}$ & $\Nus$ \\ - \num{e2} & \num{0.05} & \\ - \num{e3} & \num{0.5} & \\ - \num{e4} & \num{5} & \\ - \num{e5} & \num{50} & + \begin{tabular}{ccccccc} + $\Rey$ & $u_{in}$ & \# cells & $C_D$ & $\vec n · ∇T\vert_{\text{cyl}}$ & $\Nus$ & ref-$\Nus$\\ + \num{e2} & \num{0.05} & & & & & 5.1%56 + \\ + \num{e3} & \num{0.5} & & & & & 15%.930 + \\ + \num{e4} & \num{5} & & & & & 53%.328 + \\ + \num{e5} & \num{50} & & & & & 214%.126 \end{tabular} \end{table} % do not use \input nor \begin{document nor \end{document} diff --git a/tex/setup.tex b/tex/setup.tex index 0156a6b7f9fbb832d676baad12256f3e62dffc59..94382e2fce86aa7b1cdf16d736ef595c0e9e042f 100644 --- a/tex/setup.tex +++ b/tex/setup.tex @@ -9,8 +9,13 @@ The mesh has two zones: one around the cylinder and a wider one for the remainde The zone around the cylinder is a square with arked edges. Those arks distribute the angles about equally around the corners of the square and distribute the grading partially into the outer zone. -The grading around the cylinder is chosen in a way that maximizes the grading while keeping the cell size ratio at \SI{105}{\percent}. -So the grading increases with higher number of cells. +In the simulations with a previous version with 20 cells in the radial direction, +the heat around the cylinder could not be resolved well at Reynold number of \num{e4} and \num{e5}. +Therefore this radial resolution was increased to 40 (times $N$). + +In an earlier version, the grading around the cylinder is chosen in a way that maximizes the grading while keeping the cell size ratio at \SI{105}{\percent}. +So the grading increasd with higher number of cells but this got too extreme leading to extremely high Courant numbers and bad cell size ratios at the square ark edges. +So the grading was fixed to $45$. Since the cells close to the cylinder should be smaller but also dictate the size in one dimension over, under, left and right of the square part, outer cells in those four directions get very long and thin. @@ -24,9 +29,6 @@ The mesh at $N=1$ is displayed in figure \ref{fig:mesh}. % In order to keep the cell sizes similar at the corners of the square, the number of cells in the tangential direction needs to be quite high, creating quite rectangular (in radial direction) cells at the cylinder wall. It would be good to have a good idea to avoid this. -In the simulations with a previous version with 20 cells in the radial direction, -the heat around the cylinder could not be resolved well at Reynold number of \num{e4} and \num{e5}. -Therefore this radial resolution was increased to 40 (times $N$). \begin{figure}[htpb] \centering \includegraphics[width=0.95\linewidth]{.maindir/zeichnungen/mesh} % check at end diff --git a/tex/timestep.tex b/tex/timestep.tex index 8e4562247ea30128a260b356479d427e2d8836e8..3e10b3d152778f1d37bdc494013e6beebb596d0b 100644 --- a/tex/timestep.tex +++ b/tex/timestep.tex @@ -5,24 +5,28 @@ \docStart \section{Time stepping} The timesteps were adjusted automatically because for moderate to higher velocities the Courant numbers were very high (over 40) at time steps of one second but stable. -This resulted in time steps listed in table \ref{fig:timesteps}. -As it is visible there, the combination of high Reynolds number ($\num{e5}$) with higher cell number $N > 2$) is not viable to run. +This resulted in time steps from \SIrange{0.0008}{1.3}{\second}.% listed in table \ref{fig:timesteps}. +My computer with parallel execution was able to run about 8 timesteps for second. +Therefore is was not feasible for Reynold number \num{e4} and \num{e5}. +% As it is visible there, the combination of high Reynolds number ($\num{e5}$) with higher cell number $N > 2$) is not viable to run. Since for low Reynold numbers, the time step became too big, a maximal time step of \num{0.1} was introduced. -\begin{table}[htpb] - \centering - \caption{Time steps due to automatic adjustment with max courant number of \num{1}.} - \label{tab:timesteps} - \begin{tabular}{ccc} - Nr. of cells & Reynold number & time step \\ - % 1016 = "N = 1"; 4064 = "N = 2" - 4064 & \num{e2} & 1.3 \\ % todo: run again with smaller timestep - 4064 & \num{e3} & 0.0795 \\ - 4064 & \num{e4} & 0.0065 \\ - 1016 & \num{e5} & 0.0017 \\ - 4065 & \num{e5} & 0.00051 - \end{tabular} -\end{table} - +When running with Courant numbers greater than one and a time step of $0.01$ it still took long times and the results were not useful as visible in diagram \ref{fig:R3N2Drag-fluctuation}. +{ + % \begin{table}[htpb] + % \centering + % \caption{Time steps due to automatic adjustment with max courant number of \num{1}.} + % \label{tab:timesteps} + % \begin{tabular}{ccc} + % Nr. of cells & Reynold number & time step \\ + % % 1016 = "N = 1"; 4064 = "N = 2" + % 4064 & \num{e2} & 1.3 \\ % todo: run again with smaller timestep + % 4064 & \num{e3} & 0.0795 \\ + % 4064 & \num{e4} & 0.0065 \\ + % 1016 & \num{e5} & 0.0017 \\ + % 4065 & \num{e5} & 0.00051 + % \end{tabular} + % \end{table} +} \docEnd diff --git a/zeichnungen/R3-N2-Drag.png b/zeichnungen/R3-N2-Drag.png new file mode 100644 index 0000000000000000000000000000000000000000..109ae04d9dd21fe894cfe46b229a7a7e7cfcf832 Binary files /dev/null and b/zeichnungen/R3-N2-Drag.png differ diff --git a/zeichnungen/code/diagrams.py b/zeichnungen/code/diagrams.py index 1db2272b897058715ceb6ef07858799e4e2478bb..b25d5aadfdfceffca6cd0d9fcd8072ca1de77536 100755 --- a/zeichnungen/code/diagrams.py +++ b/zeichnungen/code/diagrams.py @@ -13,6 +13,10 @@ SUBPATH_GRADT = "patchAverage(name=cylinder,mag(grad(T)))" PATH_DIAGRAMS = ".maindir/zeichnungen/generated/" DIAGRAM_WIDTH = r'\diagramwidth' +def startindextake(alllength): + # return min(alllength//5, 20) + return alllength//5 + if __name__ == "__main__": if len(sys.argv) == 3: N = int(sys.argv[1]) @@ -29,8 +33,8 @@ if __name__ == "__main__": print(error) print("abort this case") continue - times = force[len(force)//3:, 0] - drag_coeffs = force[len(force)//3:, 1] + times = force[startindextake(len(force)):, 0] + drag_coeffs = force[startindextake(len(force)):, 1] if len(cases) == 1: print("times:", times) print("D:", drag_coeffs) @@ -38,7 +42,7 @@ if __name__ == "__main__": axis = pyplot.axes() axis.set_xlabel('time') axis.set_ylabel('Drag coefficiant') - print("plot D_c for N={N}, u={u}") + print("plot D_c for N={N}, u={u}".format(N=N, u=u)) axis.plot(times, drag_coeffs) tikzplotlib.save(figure=fig, filepath=( PATH_DIAGRAMS + '{nr}-D.tex'.format(nr=filenumber)), @@ -57,8 +61,8 @@ if __name__ == "__main__": print(error) print("abort this case") continue - times = gradT[len(gradT)//3:, 0] - dT = gradT[len(gradT)//3:, 1] + times = gradT[startindextake(len(gradT)):, 0] + dT = gradT[startindextake(len(gradT)):, 1] if len(cases) == 1: print("times:", times) print("dT:", dT)