Implementation of BC's in FV code
Hi there,
Im not sure how to implement boundary conditions in a finite volume method. This is what I have so far: Discretized transport equation (pure convection) is of the form ap*phi_P -aw*phi_W -ae*phi_E = S and aP=aE+aW I'm using upwind for face values ( and U is positive) so aE=0 On a boundary, I set the coefficient of the boundary face to zero and add the flux to the source term. So on the west boundary, aW is set to zero and the source term is nonzero. However, this will make aP=(aW+aE)=0 so the TDMA solver will not converge. Any help greatly appreciated Thanks! |
Re: Implementation of BC's in FV code
At the west boundary, calculate aW (non-zero) by the usual method (from the prescribed flux, likely). Set aP=(aW+aE) = aW+0 = aW. Next, set aW to zero (without changing aP), and add the prescribed flux to the source term S (making the latter non-zero). Solve using the TDMA. Allow to cool, stir, and enjoy.
|
All times are GMT -4. The time now is 09:39. |