While modeling a shear-thickening fluid with navier-stokes I update the viscosity at each timestep according to
\nu = 0.01|2^{0.5} \nabla^s \mathbf{u}|^{0.5}
where |\cdot | is the Frobenius norm. This seems to be working fine using gridfunctions and the Innerproduct() method for now, but I would like enforce a minimum value of \nu, say 10^{-4} to reduce the risk of encountering zero-viscosities. What’s the best way of implementing something akin to this:
\nu = max\{ 10^{-4}, 0.01|2^{0.5} \nabla^s \mathbf{u}|^{0.5} \}
Thanks!