|
[Sponsors] |
March 22, 2018, 10:07 |
Boundary Layer over a surface
|
#1 |
New Member
Asif Shahriar Nafi
Join Date: Dec 2015
Location: Conway, SC, USA
Posts: 8
Rep Power: 10 |
Hi,
I am trying to solve this problem numerically (Boundary Layer over a flat plate, see attached). Matlab code: nx=2001;ny=51; xmax=1; ymax=0.25; vis = 1.4e-5; dx = xmax/(nx-1);dy = ymax / (ny - 1); %grid u = nan (nx,ny); v = nan (nx,ny); %Boundary condition u(1, : ) = 0; v(1,: ) = 0; u(nx,: ) = 10; %calc for p = 1:nx-1 for k = 2:ny-1 u(p+1,k)= u(p,k) + (vis*dx / u(p,k)*(dy^2)) * (u(p,k+1) - 2*u(p,k) ... + u(p,k-1)) - (v(p,k)*dx / 2*u(p,k)*dy) * (u(p,k+1) - u(p,k-1)); v(p+1,k) = v(p+1,k-1) - 0.5* dy * ((u(p+1,k) - u(p,k))/dx + ... (u(p+1,k-1) - u(p,k-1))/dx); end end But i dont get any value of u and v. I would very much appreciate your help Last edited by asifnafi; March 22, 2018 at 12:15. Reason: typo |
|
March 26, 2018, 10:36 |
|
#2 |
Member
Philipp Wiedemer
Join Date: Dec 2016
Location: Munich, Germany
Posts: 42
Rep Power: 9 |
Well you're dividing by u(p,k) in your formula for u(p+1,k) but your boundary condition is set to zero. As a result you get a NaN because the numerator is zero aswell (0/0 = NaN in Matlab). This NaN gets then propagated through your whole calculation because you always have NaN's from the row before (If you have a NaN in the formula the result will be a NaN aswell). Maybe you have the indices mixed up or something.
|
|
March 26, 2018, 11:40 |
|
#3 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,877
Rep Power: 73 |
You can solve this problem in a simplified equation using the von Mises transformation
|
|
April 29, 2020, 23:27 |
|
#4 | |
New Member
Colin
Join Date: Apr 2020
Posts: 7
Rep Power: 6 |
Quote:
|
||
Tags |
boundary layer, fdm, flat plate, numerical simulation |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Centrifugal fan | j0hnny | CFX | 13 | October 1, 2019 14:55 |
Question about adaptive timestepping | Guille1811 | CFX | 25 | November 12, 2017 18:38 |
Basic Nozzle-Expander Design | karmavatar | CFX | 20 | March 20, 2016 09:44 |
[snappyHexMesh] Layers don't fully surround surface | EVBUCF | OpenFOAM Meshing & Mesh Conversion | 14 | August 20, 2012 05:31 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |