I want to calculate and display (in post processing) the forces applied to a BC. The number of my BC is 201, so I modified the USPROJ.F90 subroutine like this :
! compute the efforts applied on a face number 201
! ----------------------------------------------------
!===============================================================================
! ----------------------------------------------
iutile = 0
if (iutile.eq.0) return
! ----------------------------------------------
! If efforts have been calculated correctly:
if (ineedf.eq.1) then
do ii = 1, ndim
xfor(ii) = 0.d0
enddo
call getfbr('201', nlelt, lstelt)
!==========
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
do ii = 1, ndim
xfor(ii) = xfor(ii) + iforbr(ii, ifac)
enddo
enddo
if (irangp.ge.0) then
call parrsm(ndim,xfor)
endif
endif
return
end subroutine
Following Jame's post, you should be able to loop on boundary faces to integrate the contribution of the force to the moment you are trying to compute.