CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   guidance on steps for writing code for boundary layer of velocity (https://www.cfd-online.com/Forums/main/201470-guidance-steps-writing-code-boundary-layer-velocity.html)

siamak 60 May 3, 2018 11:03

guidance on steps for writing code for boundary layer of velocity
 
hi
I want to write code with matlab using dufort frankel method.
two equation exist for this work . momentum equation in x direction for obtaining velocity inside boundary layer. consider gradient of pressure gradient at x direction as zero but in y direction is not zero.
continuity equation for determining velocity inside boundary layer at y direction.
what should i do for finding unknown variable. should i first determine all velocity in x direction by an approximate method like pohlhousen ? if i do that; then i shall believe that some finite difference method like dufort frankel is useless unless it will be used to optimize results obtained by an approximate method ?
Thanks for your time

FMDenaro May 3, 2018 12:38

Quote:

Originally Posted by siamak 60 (Post 691086)
hi
I want to write code with matlab using dufort frankel method.
two equation exist for this work . momentum equation in x direction for obtaining velocity inside boundary layer. consider gradient of pressure gradient at x direction as zero but in y direction is not zero.
continuity equation for determining velocity inside boundary layer at y direction.
what should i do for finding unknown variable. should i first determine all velocity in x direction by an approximate method like pohlhousen ? if i do that; then i shall believe that some finite difference method like dufort frankel is useless unless it will be used to optimize results obtained by an approximate method ?
Thanks for your time


Are you solving laminar BL? The Prandtl equations are parabolic as the x-direction can be seen in a time-like way. Therefore, you can use FD method for parabolic equations. I suggest to write the equations in the form provided by the von Mises transformation

siamak 60 May 3, 2018 15:19

Laminar Boundary Layer
Momentum in X-Direction (steady state, Incompressible flow):
u ∂u/∂x+V ∂u/∂y=v (∂^2 u)/〖∂y〗^2
Dufort-Frankel finite Difference Discretization:
u(i,j)*((u(i+1,j)-u(i-1,j))/(2*∆x)+V(i,j)*((u(i,j+1)-u(i,j-1)))/(2*∆y)=v ((u(i,j+1)-2*u(i,j)+u(i,j-1))/〖∆y〗^2
Above finite difference form of momentum equation shall be used to find all u(i,j) inside boundary layer.
Continuity equation:
∂u/∂x+∂V/∂y=0
Dufort-Frankel form
(u(i+1,j)-u(i-1,j))/(2*∆x)+(V(i,j+1)-V(i,j-1))/(2*∆y)=0
Above finite Difference form of continuity equation shall be used to drive V(i,j) .

For using these equations it seems that you shall have all values of u(i,j) and Dufort-Frankel will only optimize these values. These initial values of u(i,j) can be driven from approximated methods like Karman-Pohlhausen:
u/U_∞ =2*y/δ-〖(y/δ)〗^2
δ/x=√(30/((xU_∞)/v))
My questions are :1) isn’t any direct method to use Dufort-Frankel Method ?
2) Is described method a correct method for using Dufort- Frankel ?

FMDenaro May 3, 2018 15:34

Quote:

Originally Posted by siamak 60 (Post 691107)
Laminar Boundary Layer
Momentum in X-Direction (steady state, Incompressible flow):
u ∂u/∂x+V ∂u/∂y=v (∂^2 u)/〖∂y〗^2
Dufort-Frankel finite Difference Discretization:
u(i,j)*((u(i+1,j)-u(i-1,j))/(2*∆x)+V(i,j)*((u(i,j+1)-u(i,j-1)))/(2*∆y)=v ((u(i,j+1)-2*u(i,j)+u(i,j-1))/〖∆y〗^2
Above finite difference form of momentum equation shall be used to find all u(i,j) inside boundary layer.
Continuity equation:
∂u/∂x+∂V/∂y=0
Dufort-Frankel form
(u(i+1,j)-u(i-1,j))/(2*∆x)+(V(i,j+1)-V(i,j-1))/(2*∆y)=0
Above finite Difference form of continuity equation shall be used to drive V(i,j) .

For using these equations it seems that you shall have all values of u(i,j) and Dufort-Frankel will only optimize these values. These initial values of u(i,j) can be driven from approximated methods like Karman-Pohlhausen:
u/U_∞ =2*y/δ-〖(y/δ)〗^2
δ/x=√(30/((xU_∞)/v))
My questions are :1) isn’t any direct method to use Dufort-Frankel Method ?
2) Is described method a correct method for using Dufort- Frankel ?


Use the von Mises transformation so that you can work with only one equation in the form of the classical heat equation. Then you can use standard FD method for the update along x- direction


All times are GMT -4. The time now is 16:32.