0
$\begingroup$

I'm aware that a 2nd order accurate finite-difference method using variable properties for central differencing can be written in a finite-volume type way:

$$ \nabla \bullet (k \nabla f) = \frac{\frac{f_{i+1}-f_{i}}{\Delta x_{i+1/2}}k_{i+1/2}-\frac{f_{i}-f_{i-1}}{\Delta x_{i-1/2}} k_{i-1/2}}{\Delta x_{i}}$$

This discretization is 2nd order accurate for interior points, but what formula is typically used near boundaries? I'm curious about 2 cases: where $f$ is located at (1) cell center and (2) cell corner locations.

Any help is greatly appreciated.

$\endgroup$

1 Answer 1

1
$\begingroup$

This answer is on how to implement boundary conditions (B.C.) for variable material property. My experience is that they are 2nd order accurate, but I can not find now references where such statement is proved. I hope it helps anyway, if not, it might be useful for other readers. The most closest reference is the book of Patankar on Numerical heat and mass transfer.

1.) Let for instance $x_{i-1/2}$ is located at boundary. If $f_i$ is located at cell center then the flux based boundary conditions are straightforward to implement, replace in your scheme the term $$ k_{i-1/2} \frac{f_i - f_{i-1}}{\Delta x_{i-1/2}} $$ by the term prescribed for $k \partial_x f$ in flux based boundary condition.

If you have Dirichlet B.C., then more effort is necessary. Typically you extrapolate linearly the missing (outer) value $f_{i-1}$ from given value $f_{i-1/2}$ from B.C. and from $f_i$ and then plug such $f_{i-1}$ to your scheme. In fact you might use a quadratic extrapolation depending also on $f_{i+1}$.

2.) If $f_i$ is located in corner locations and if $x_i$ is located at boundary and you have Dirichlet B.C., you need not to apply the scheme here, the value $f_i$ is given by B.C. If you have flux-based B.C. then one typically use a "half" finite volume, so your scheme is then $$ \frac{\frac{f_{i+1}-f_{i}}{\Delta x_{i+1/2}}k_{i+1/2}-Flux_i}{\Delta x_{i}/2} $$ where the value $Flux_i$ is obtained from B.C.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.