Stencil for calculating viscosity flux at the boundary

Brian Sanderson

Ocean and atmospheric models typically have horizontal resolution that is so coarse that horizontal fluxes due to molecular viscosity cannot be resolved. It is, therefore, totally meaningless to even include horizontal viscosity within a numerical model of the ocean or atmosphere. Nevertheless, some pseudo-modellers do include this term for foolish reasons: Of course, if one is calculating the flow past a small object, like a very small cylinder, then molecular viscosity can become physically important. The following notes pertain to this problem.

A control-volume model (like DieCAST) might define ui as a component of velocity averaged over the volume of the i'th cell. (Many oceanographers crudely think of the index i indicating the center of the cell --- but this is only second-order accurate thinking.) In order to accurately calculate the viscosity terms one must compute viscous fluxes at the cell faces at each side of the cell
K u'i+0.5
and
K u'i-0.5
Here I have used the notation +/-0.5 to indicate locations to the right/left of the cell center. The prime ' indicates the first derivative. A double prime '' wil be used to indicate a second derivative. Molecular viscosity is denoted K.

So the problem reduces to computing the derivative of u at the cell face from the cell-averaged values of u. This may seem a little messy because we are dealing with both face and cell-averaged quantities. Another difficulty arises when there are boundaries. I will use integral reconstruction to make things simple by replacing algebra with simple geometry. Consider ui as the cell-averaged quantity for i=0,1,2,3,4, ... I cells. If the cell i=0 is on land it has no velocity u0=0. Denote the cell-with as D

I think that the above should give you the general idea how you can calculate appropriate stencils to get the derivative at any location to any order of accuracy that you require.