def dt_phi_constraint_preserving_spherical_radiation(face_mesh_velocity, normal_covector, normal_vector, psi, phi, inertial_coords, gamma1, gamma2, lapse, shift, dt_psi, dt_pi, dt_phi, d_psi, d_phi):
    char_speed_zero = char_speed_vzero(gamma1, lapse, shift, normal_covector)
    if (face_mesh_velocity is not None):
        char_speed_zero -= np.dot(normal_covector, face_mesh_velocity)
    return ((0.5 * np.einsum('ij,j', (d_phi.T - d_phi), normal_vector)) * min(0, char_speed_zero))
def dt_phi_constraint_preserving_spherical_radiation(face_mesh_velocity, normal_covector, normal_vector, psi, phi, inertial_coords, gamma1, gamma2, lapse, shift, dt_psi, dt_pi, dt_phi, d_psi, d_phi):
    char_speed_zero = char_speed_vzero(gamma1, lapse, shift, normal_covector)
    if (face_mesh_velocity is not None):
        char_speed_zero -= np.dot(normal_covector, face_mesh_velocity)
    return ((0.5 * np.einsum('ij,j', (d_phi.T - d_phi), normal_vector)) * min(0, char_speed_zero))