Calculation of diffusion-like terms

There are situations in which the following diffusion-like term need to be computed on unstructured meshes:


  $\displaystyle \nabla \cdot \left ( \kappa \nabla \varphi \right )
$ (8.39)



in vertices with $\kappa$ a space-varying diffusion coefficient (a tensor) and $\varphi$ a scalar defined in vertices. In SWAN, these are We consider the centroid dual as shown in Figure 8.4. The calculation consists of 3 steps. First, we compute the gradient of $\varphi$ inside each surrounding cell using expressions (8.23) and (8.24). Next, this gradient is multiplied by the appropriate diffusion coefficient $\kappa$ as given in the centroid. Finally, we compute the gradient of $\kappa \nabla \varphi$ inside the CV according to Eqs. (8.36) and (8.37).



The SWAN team 2024-09-09