Hi,
I was trying to use the physical gradients at the solution points obtained by the intg.grad_soln to compute the forces on the surface with the fluidforce plugin but the results seem to differ. Did you ever try? If so, is it normal? And why?
An MWE of the change is:
# Physical gradient at solution points
duupts = intg.grad_soln[etype][..., surfaceindices]
duupts = duupts.reshape(ndims, nupts, -1)
# Interpolate gradient to flux points
dufpts = np.array([m0 @ du for du in duupts])
dufpts = dufpts.reshape(ndims, nfpts, nvars, -1)
dufpts = dufpts.swapaxes(1, 2)
# Viscous stress
vis = self.stress_tensor(ufpts, dufpts)
# Do the quadrature
fm[1, :ndims] += np.einsum('i...,klij,jil', qwts, vis, norms)
The results obtained with the plugin are (for the viscous part):
[ 22.14644846, -29.03589684]]
and using intg.soln:
[ 34.32209827, -43.92922663]
Best