Colella & Woodward (1984) eq (1.6): the fourth-order interface value
between cells 1 and 2 on a NON-UNIFORM stencil h0,h1,h2,h3.
On equal thicknesses the whole correction term collapses and this
becomes (7/12)(q1 + q2) - (1/12)(q0 + q3), the shipped estimate.
On a stretched column the correction is what makes it consistent:
substituting a profile linear in z (so dq1 = a*h1, dq2 = a*h2)
the three correction terms cancel IDENTICALLY, leaving
q1 + (h1/(h1+h2))*(q2-q1), which is the exact interface value.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Variables
Type
Visibility
Attributes
Name
Initial
real(kind=wp),
private
::
dq21
real(kind=wp),
private
::
i_h12
real(kind=wp),
private
::
wa
real(kind=wp),
private
::
wb
Source Code
pure subroutine ppm_edge_nonuniform(h0,h1,h2,h3,q1,q2,dq1,dq2,edge)!$acc routine seq!! Colella & Woodward (1984) eq (1.6): the fourth-order interface value!! between cells 1 and 2 on a NON-UNIFORM stencil `h0,h1,h2,h3`.!!!! On equal thicknesses the whole correction term collapses and this!! becomes `(7/12)(q1 + q2) - (1/12)(q0 + q3)`, the shipped estimate.!! On a stretched column the correction is what makes it consistent:!! substituting a profile linear in `z` (so `dq1 = a*h1`, `dq2 = a*h2`)!! the three correction terms cancel IDENTICALLY, leaving!! `q1 + (h1/(h1+h2))*(q2-q1)`, which is the exact interface value.real(wp),intent(in)::h0!! Thickness two cells below the interface.real(wp),intent(in)::h1!! Thickness of the cell just below the interface.real(wp),intent(in)::h2!! Thickness of the cell just above the interface.real(wp),intent(in)::h3!! Thickness two cells above the interface.real(wp),intent(in)::q1!! Cell mean just below the interface.real(wp),intent(in)::q2!! Cell mean just above the interface.real(wp),intent(in)::dq1!! Limited CW84 (1.7) jump of the cell below.real(wp),intent(in)::dq2!! Limited CW84 (1.7) jump of the cell above.real(wp),intent(out)::edge!! Interface value.real(wp)::dq21,wa,wb,i_h12dq21=q2-q1i_h12=1.0_wp/(h1+h2+H_DIV_EPS)wa=(h0+h1)/(2.0_wp*h1+h2+H_DIV_EPS)wb=(h2+h3)/(h1+2.0_wp*h2+H_DIV_EPS)edge=q1+h1*i_h12*dq21&+(2.0_wp*h1*h2*i_h12*(wa-wb)*dq21-h1*wa*dq2+h2*wb*dq1)&/(h0+h1+h2+h3+H_DIV_EPS)end subroutine ppm_edge_nonuniform