# 0.10 Numerical simulation  (Page 8/8)

 Page 8 / 8

This is the equation when the coordinates have the same reference length. If the coordinates are normalized with respect to different lengths, then the equation is as follows.

$\frac{{\partial }^{2}P}{\partial {x}^{2}}+{\alpha }^{2}\frac{{\partial }^{2}P}{\partial {y}^{2}}=2{\alpha }^{2}\left[\frac{{\partial }^{2}\psi }{\partial {x}^{2}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\frac{{\partial }^{2}\psi }{\partial {y}^{2}}-{\left(\frac{{\partial }^{2}\psi }{\partial x\partial y}\right)}^{2}\right]$

The Poisson equation for pressure needs to have boundary conditions for solution. The equations of motion give an expression for the pressure gradient. The normal derivative of pressure at the boundary can be determined for the Neumann-type boundary condition. The equations of motion usually simplify at boundaries if the boundary has no slip BC or if it has parallel flow in the direction either parallel or normal to the boundary. For example, for no-slip

$\begin{array}{c}\frac{\partial P}{\partial x}=\frac{{\alpha }^{2}}{Re}\phantom{\rule{0.166667em}{0ex}}\frac{{\partial }^{2}u}{\partial {y}^{2}},\phantom{\rule{1.em}{0ex}}\mathrm{at}\phantom{\rule{0.277778em}{0ex}}y=c,\phantom{\rule{0.277778em}{0ex}}u=v=0\\ \alpha \frac{\partial P}{\partial y}=\frac{1}{Re}\phantom{\rule{0.166667em}{0ex}}\frac{{\partial }^{2}v}{\partial {x}^{2}},\phantom{\rule{1.em}{0ex}}\mathrm{at}\phantom{\rule{0.277778em}{0ex}}x=c,\phantom{\rule{0.277778em}{0ex}}u=v=0\end{array}$

If the flow is parallel and in the direction normal to the boundary

$\begin{array}{c}\frac{\partial P}{\partial x}=\frac{{\alpha }^{2}}{Re}\phantom{\rule{0.166667em}{0ex}}\frac{{\partial }^{2}u}{\partial {y}^{2}},\phantom{\rule{1.em}{0ex}}y=c,\phantom{\rule{0.277778em}{0ex}}v=0,\phantom{\rule{0.277778em}{0ex}}u=u\left(y\right)\\ \alpha \frac{\partial P}{\partial y}=\frac{1}{Re}\phantom{\rule{0.166667em}{0ex}}\frac{{\partial }^{2}v}{\partial {x}^{2}},\phantom{\rule{1.em}{0ex}}x=c,\phantom{\rule{0.277778em}{0ex}}u=0,\phantom{\rule{0.277778em}{0ex}}v=v\left(x\right)\end{array}$

## Cylindrical-polar coordinates

The code for the numerical solution of the Navier-Stokes equations in Cartesian coordinates can be easily modified to cylindrical-polar coordinates. The coordinate transformation is first illustrated for the Laplacian operator.

${\nabla }^{2}\psi =\frac{1}{r}\frac{\partial }{\partial r}\left(r\frac{\partial \psi }{\partial r}\right)+\frac{1}{{r}^{2}}\frac{{\partial }^{2}\psi }{\partial {\theta }^{2}},\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}{r}_{1}\le r\le {r}_{2},\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{1.em}{0ex}}0\le \theta \le {\theta }_{o}$

The independent variables are made dimensionless with respect to the boundary parameters.

${r}^{*}=\frac{r}{{r}_{1}},\phantom{\rule{1.em}{0ex}}{\theta }^{*}=\frac{\theta }{{\theta }_{o}},\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}1\le {r}^{*}\le \frac{{r}_{2}}{{r}_{1}}=\beta ,\phantom{\rule{1.em}{0ex}}0\le {\theta }^{*}\le 1$

The Lapacian operator with the dimensionless coordinates after dropping the * is now,

${\nabla }^{2}\psi =\frac{1}{{r}_{1}^{2}}\left[\frac{1}{r}\frac{\partial }{\partial r}\left(r\frac{\partial \psi }{\partial r}\right)+\frac{1}{{\theta }_{o}^{2}}\frac{1}{{r}^{2}}\frac{{\partial }^{2}\psi }{\partial {\theta }^{2}}\right],\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}1\le r\le \beta ,\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{1.em}{0ex}}0\le \theta \le 1$

$\begin{array}{c}z=\frac{lnr}{ln\beta }=\gamma lnr,\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}0\le z\le 1,\phantom{\rule{1.em}{0ex}}\gamma =\frac{1}{ln\left({r}_{2}/{r}_{1}\right)}\hfill \\ r=exp\left(z/\gamma \right)\hfill \\ \frac{\partial }{\partial r}=\frac{dz}{dr}\frac{\partial }{\partial z}=\frac{\gamma }{r}\frac{\partial }{\partial z}\hfill \\ \frac{1}{r}\frac{\partial }{\partial r}\left(r\frac{\partial \psi }{\partial r}\right)=\frac{{\gamma }^{2}}{{r}^{2}}\frac{{\partial }^{2}\psi }{\partial {z}^{2}}\hfill \end{array}$

The Laplacian operator is now as follows,

${\nabla }^{2}\psi =\frac{1}{{r}_{1}^{2}}\left[\frac{{\gamma }^{2}}{{r}^{2}}\frac{{\partial }^{2}\psi }{\partial {z}^{2}}+\frac{{\alpha }^{2}}{{r}^{2}}\frac{{\partial }^{2}\psi }{\partial {\theta }^{2}}\right],\phantom{\rule{1.em}{0ex}}0\le z\le 1,\phantom{\rule{1.em}{0ex}}0\le \theta \le 1,\phantom{\rule{1.em}{0ex}}\alpha =\frac{1}{{\theta }_{o}}$

The finite difference expression for the Laplacian will be same as that for Cartesian coordinates with $\left(z,\theta \right)$ substituted for $\left(x,y\right)$ except for ${\gamma }^{2}$ and ${r}^{2}$ factors.

$\begin{array}{c}0\le {z}_{i}\le 1,\phantom{\rule{1.em}{0ex}}0\le {\theta }_{j}\le 1,\phantom{\rule{1.em}{0ex}}i,j=1,2,...,JMAX\hfill \\ \delta =\frac{1}{JMAX-1}\hfill \\ {z}_{i}=\delta \left(i-1\right),\phantom{\rule{1.em}{0ex}}{\theta }_{j}=\delta \left(j-1\right)\hfill \end{array}$

The curl operator is modified from that in Cartesian coordinates.

$\begin{array}{ccc}\hfill {v}_{r}& =& \frac{\alpha }{r}\frac{\partial \psi }{\partial \theta }\hfill \\ \hfill {v}_{\theta }& =& -\frac{\partial \psi }{\partial r}=-\frac{\gamma }{r}\frac{\partial \psi }{\partial z}\hfill \\ \hfill w& =& \frac{1}{r}\frac{\partial \left(r\phantom{\rule{0.277778em}{0ex}}{v}_{\theta }\right)}{\partial r}-\frac{\alpha }{r}\frac{\partial {v}_{r}}{\partial \theta }\hfill \\ & =& \frac{\gamma }{{r}^{2}}\frac{\partial \left(r\phantom{\rule{0.277778em}{0ex}}{v}_{\theta }\right)}{\partial z}-\frac{\alpha }{r}\frac{\partial {v}_{r}}{\partial \theta }\hfill \\ & =& -\frac{{\gamma }^{2}}{{r}^{2}}\frac{{\partial }^{2}\psi }{\partial {z}^{2}}-\frac{{\alpha }^{2}}{{r}^{2}}\frac{{\partial }^{2}\psi }{\partial {\theta }^{2}}\hfill \end{array}$

The vorticity boundary conditions with the transformed coordinates is for the $z$ boundary,

${w}_{1}^{BC}=-\frac{{\gamma }^{2}}{{r}^{2}}\frac{2}{{\delta }^{2}}\left({\psi }_{2}-{\psi }_{1}^{BC}\right)\mp \frac{\gamma }{r}\frac{2}{\delta }{v}_{\theta }^{BC}-\frac{\alpha }{r}\frac{\partial {v}_{r}^{BC}}{\partial \theta }$

and for the $\theta$ boundary,

${w}_{1}^{BC}=-\frac{{\alpha }^{2}}{{r}^{2}}\frac{2}{{\delta }^{2}}\left({\psi }_{2}-{\psi }_{1}^{BC}\right)±\frac{\alpha }{r}\frac{2}{\delta }{v}_{r}^{BC}+\frac{\gamma }{{r}^{2}}\frac{\partial \left(r{v}_{\theta }^{BC}\right)}{\partial z}$

The stream function at the boundaries are expressed different from that in Cartesian coordinates.

$\begin{array}{c}d\psi =\left(r\phantom{\rule{0.277778em}{0ex}}{v}_{r}/\alpha \right)\phantom{\rule{0.166667em}{0ex}}d\theta ,\phantom{\rule{1.em}{0ex}}\mathrm{at}\phantom{\rule{0.277778em}{0ex}}z\phantom{\rule{0.277778em}{0ex}}\mathrm{boundary}\hfill \\ d\psi =-\left(r\phantom{\rule{0.277778em}{0ex}}{v}_{\theta }/\gamma \right)\phantom{\rule{0.166667em}{0ex}}dz,\phantom{\rule{1.em}{0ex}}\mathrm{at}\phantom{\rule{0.277778em}{0ex}}\theta \phantom{\rule{0.277778em}{0ex}}\mathrm{boundary}\hfill \end{array}$

The convective terms are expressed different from that in Cartesian coordinates.

$\begin{array}{ccc}\hfill \frac{\partial \left(u\phantom{\rule{0.166667em}{0ex}}w\right)}{\partial x}& ⇒& \frac{1}{r}\frac{\partial \left(r\phantom{\rule{0.166667em}{0ex}}u\phantom{\rule{0.166667em}{0ex}}w\right)}{\partial r}\hfill \\ & =& \frac{\gamma }{{r}^{2}}\frac{\partial \left(r\phantom{\rule{0.166667em}{0ex}}u\phantom{\rule{0.166667em}{0ex}}w\right)}{\partial z}\hfill \\ & \approx & \frac{\gamma }{{r}^{2}\phantom{\rule{0.166667em}{0ex}}\delta }\left[{\left(r\phantom{\rule{0.166667em}{0ex}}u\phantom{\rule{0.166667em}{0ex}}w\right)}_{i+1/2}-{\left(r\phantom{\rule{0.166667em}{0ex}}u\phantom{\rule{0.166667em}{0ex}}w\right)}_{i-1/2}\right]\hfill \\ \hfill \alpha \frac{\partial \left(v\phantom{\rule{0.166667em}{0ex}}w\right)}{\partial y}& ⇒& \frac{\alpha }{r}\frac{\partial \left(v\phantom{\rule{0.166667em}{0ex}}w\right)}{\partial \theta }\hfill \\ & \approx & \frac{\alpha }{r\phantom{\rule{0.166667em}{0ex}}\delta }\left[{\left(v\phantom{\rule{0.166667em}{0ex}}w\right)}_{j+1/2}-{\left(v\phantom{\rule{0.166667em}{0ex}}w\right)}_{j-1/2}\right]\hfill \end{array}$

The code should be written so one can have either Cartesian coordinates or transformed cylindrical-polar coordinates. A parameter will be needed to identify the choice of coordinates, e.g. $icase=1$ for Cartesian coordinates and $icase=2$ for transformed cylindrical-polar coordinates. Also, another parameter should be specified to identify the choice of boundary conditions, e.g., $ibc=1$ for radial flow, $ibc=2$ for Couette flow, and $ibc=3$ for flow around a cylinder. Test cases with known solutions should be used to verify the code. The first case is radial, potential flow from a line source and the second is Couette flow in the annular region between two cylindrical surfaces.

$\begin{array}{c}\left(\begin{array}{c}{v}_{r}=1/r\\ {v}_{\theta }=0\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\end{array}}\phantom{\rule{1.em}{0ex}}\mathrm{radial}\phantom{\rule{0.277778em}{0ex}}\mathrm{flow}\hfill \\ \left(\begin{array}{c}{v}_{r}=0\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\phantom{\rule{1.em}{0ex}}\\ {v}_{\theta }=\left(r-1/r\right)/\left(\beta -1/\beta \right)\end{array}}\phantom{\rule{1.em}{0ex}}\mathrm{Couette}\phantom{\rule{0.277778em}{0ex}}\mathrm{flow}\hfill \end{array}$

Flow around a cylinder needs a boundary condition for the flow far away from the cylinder. The flow very far away may be uniform translation. However, this condition may be so far away that it may result in loss of resolution near the cylinder. Another boundary condition that may be specified beyond the region of influence of the boundary layer is to use the potential flow past a cylinder. This boundary condition will not be correct in the wake of cylinder where the flow is disturbed by the convected boundary layer buts its influence may be minimized if the outer boundary is far enough.

$\left(\begin{array}{c}{v}_{r}=\left(1-1/{r}^{2}\right)\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.277778em}{0ex}}cos\theta \\ {v}_{\theta }=-\left(1+1/{r}^{2}\right)\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}sin\theta \phantom{\rule{0.277778em}{0ex}}\end{array}}\phantom{\rule{1.em}{0ex}}\mathrm{Potential}\phantom{\rule{0.277778em}{0ex}}\mathrm{flow}\phantom{\rule{0.277778em}{0ex}}\mathrm{past}\phantom{\rule{0.277778em}{0ex}}\mathrm{cylinder}$

Potential flow will not be a valid approximation along the $\theta$ boundaries close to the cylinder. Here, one may assume a surface of symmetry, at least for the upstream side.

show that the set of all natural number form semi group under the composition of addition
explain and give four Example hyperbolic function
_3_2_1
felecia
⅗ ⅔½
felecia
_½+⅔-¾
felecia
The denominator of a certain fraction is 9 more than the numerator. If 6 is added to both terms of the fraction, the value of the fraction becomes 2/3. Find the original fraction. 2. The sum of the least and greatest of 3 consecutive integers is 60. What are the valu
1. x + 6 2 -------------- = _ x + 9 + 6 3 x + 6 3 ----------- x -- (cross multiply) x + 15 2 3(x + 6) = 2(x + 15) 3x + 18 = 2x + 30 (-2x from both) x + 18 = 30 (-18 from both) x = 12 Test: 12 + 6 18 2 -------------- = --- = --- 12 + 9 + 6 27 3
Pawel
2. (x) + (x + 2) = 60 2x + 2 = 60 2x = 58 x = 29 29, 30, & 31
Pawel
ok
Ifeanyi
on number 2 question How did you got 2x +2
Ifeanyi
combine like terms. x + x + 2 is same as 2x + 2
Pawel
x*x=2
felecia
2+2x=
felecia
Mark and Don are planning to sell each of their marble collections at a garage sale. If Don has 1 more than 3 times the number of marbles Mark has, how many does each boy have to sell if the total number of marbles is 113?
Mark = x,. Don = 3x + 1 x + 3x + 1 = 113 4x = 112, x = 28 Mark = 28, Don = 85, 28 + 85 = 113
Pawel
how do I set up the problem?
what is a solution set?
Harshika
find the subring of gaussian integers?
Rofiqul
hello, I am happy to help!
Abdullahi
hi mam
Mark
find the value of 2x=32
divide by 2 on each side of the equal sign to solve for x
corri
X=16
Michael
Want to review on complex number 1.What are complex number 2.How to solve complex number problems.
Beyan
yes i wantt to review
Mark
use the y -intercept and slope to sketch the graph of the equation y=6x
how do we prove the quadratic formular
Darius
hello, if you have a question about Algebra 2. I may be able to help. I am an Algebra 2 Teacher
thank you help me with how to prove the quadratic equation
Seidu
may God blessed u for that. Please I want u to help me in sets.
Opoku
what is math number
4
Trista
x-2y+3z=-3 2x-y+z=7 -x+3y-z=6
can you teacch how to solve that🙏
Mark
Solve for the first variable in one of the equations, then substitute the result into the other equation. Point For: (6111,4111,−411)(6111,4111,-411) Equation Form: x=6111,y=4111,z=−411x=6111,y=4111,z=-411
Brenna
(61/11,41/11,−4/11)
Brenna
x=61/11 y=41/11 z=−4/11 x=61/11 y=41/11 z=-4/11
Brenna
Need help solving this problem (2/7)^-2
x+2y-z=7
Sidiki
what is the coefficient of -4×
-1
Shedrak
A soccer field is a rectangle 130 meters wide and 110 meters long. The coach asks players to run from one corner to the other corner diagonally across. What is that distance, to the nearest tenths place.
Jeannette has $5 and$10 bills in her wallet. The number of fives is three more than six times the number of tens. Let t represent the number of tens. Write an expression for the number of fives.
What is the expressiin for seven less than four times the number of nickels
How do i figure this problem out.
how do you translate this in Algebraic Expressions
why surface tension is zero at critical temperature
Shanjida
I think if critical temperature denote high temperature then a liquid stats boils that time the water stats to evaporate so some moles of h2o to up and due to high temp the bonding break they have low density so it can be a reason
s.
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!