CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Applying boundary conditions to 1D Steady Convection Diffusion using Power Law Scheme (https://www.cfd-online.com/Forums/main/95879-applying-boundary-conditions-1d-steady-convection-diffusion-using-power-law-scheme.html)

ConvDiff January 5, 2012 19:47

Applying boundary conditions to 1D Steady Convection Diffusion using Power Law Scheme
 
I am currently trying to solve the convection diffusion problem for Phip(centre of node) utilising the power law scheme but have come unstuck in determining the co-efficients(ae, aw, Su, Sp) at the boundaries i.e the first and last nodes. The form utilised is following the Versteeg CFD Textbook 1995, and the co-efficients are given for only the central nodes:

ap*Phip=ae*Phie+aw*Phiw+Su

ap=aw+ae-Sp

For instance for the central differencing scheme at the 1st node:

aw=0, ae=D-F/2, Sp=-(2D+F), Su=(2D+F)*Phi0.
Where D=DiffusionCoeff/dx and F=rho*u


I have written a TDMA solver in matlab that is currently working for the central differencing, upwind and hybrid schemes, this is the last one and I'm losing my mind!

Any help would be greatly appreciated! Regards Rastaman

leflix January 7, 2012 16:40

Quote:

Originally Posted by ConvDiff (Post 338063)
I am currently trying to solve the convection diffusion problem for Phip(centre of node) utilising the power law scheme but have come unstuck in determining the co-efficients(ae, aw, Su, Sp) at the boundaries i.e the first and last nodes. The form utilised is following the Versteeg CFD Textbook 1995, and the co-efficients are given for only the central nodes:

ap*Phip=ae*Phie+aw*Phiw+Su

ap=aw+ae-Sp

For instance for the central differencing scheme at the 1st node:

aw=0, ae=D-F/2, Sp=-(2D+F), Su=(2D+F)*Phi0.
Where D=DiffusionCoeff/dx and F=rho*u


I have written a TDMA solver in matlab that is currently working for the central differencing, upwind and hybrid schemes, this is the last one and I'm losing my mind!

Any help would be greatly appreciated! Regards Rastaman

Hi,
Once you have been able to compute all the coefficients for every nodes (I mean AP, AW, AE and SU) if your TDMA solver works for the other schemes (central, upwind and hybrid) it should work as well with powerlaw scheme.

Another point is that the BC do not depend on the discretizing scheme at least only on the way to implement them.
If the scheme you use is based on 3 points, W, P and E at most, the way you have implemented the BC for central or upwind will not change for powerlaw.
The scheme which is used only change the coefficients. That"s all.
What you have done according Versteeg seems correct..
Jah guide ;) !


All times are GMT -4. The time now is 19:39.