PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800

◆ compute_velocity()

void pism::hydrology::Routing::compute_velocity ( const array::Staggered W,
const array::Scalar pressure,
const array::Scalar bed,
const array::Staggered K,
const array::Scalar1 no_model_mask,
array::Staggered result 
) const
protected

Get the advection velocity V at the center of cell edges.

Computes the advection velocity \(\mathbf{V}\) on the staggered (edge-centered) grid. If V = (u, v) in components then we have result(i, j, 0) = u(i+1/2, j) and result(i, j, 1) = v(i, j+1/2)

The advection velocity is given by the formula

\[ \mathbf{V} = - K \left(\nabla P + \rho_w g \nabla b\right) \]

where \(\mathbf{V}\) is the water velocity, \(P\) is the water pressure, and \(b\) is the bedrock elevation.

If the corresponding staggered grid value of the water thickness is zero then that component of V is set to zero. This does not change the flux value (which would be zero anyway) but it does provide the correct max velocity in the CFL calculation. We assume bed has valid ghosts.

Definition at line 611 of file Routing.cc.

References pism::array::Array::add(), pism::array::Array2D< T >::copy_from(), pism::hydrology::K(), m_dx, m_dy, pism::Component::m_grid, m_R, m_rg, and pism::array::Array2D< T >::star().

Referenced by pism::hydrology::Distributed::update_impl(), and update_impl().