Forces can be generated on the pipe/valve free body, or control volume, by both fluid momentum vectors and internal pressure.
In the absense of changes in pipe direction, high flows and significant surge pressures, the greatest net force on a valve is generated when the valve is closed.
Momentum: A net force will be generated on pipe or valve when there is a change in momentum of fluid within, ie. when mass, velocity or direction of fluid entering the control volume differs from that leaving, such as at an elbow location, with or without a valve, where a simple change of direction of the fluid's momentum, even during steady state flow, causes an opposite reaction on the elbow. When there is a change of direction, lateral forces on the pipe and valve can be generated. In the absense of a change in direction of fluid flow and the case of a fully open valve, it is not possible to generate a net resultant axial force on the valve as there is no colinear surface on which such forces can act. Cv versus valve open/closed position: As the valve closes, presumably surfaces on which the forces aligned with the pipe can act are created and the axial "thrust" on the valve increases as the valve closes. For a time steady state flow may be maintained and developed force may remain more or less constant, because as mass flow remains equal, the flow area is reduced and velocity increases, which causes no net change in momentum. Eventually as the valve closes more and more, undoubtedly steady state flow will be inturrupted, rapidly decreasing mass transfer to zero and eventually losing all momentum as the valve closes. That may or may not cause surge pressures to act on the closed flow surfaces within the valve, which are responsible for "surge forces" on the valve. Force on the valve then becomes differential_surge_pressure x area of flow. When surge pressure eventually come too rest, only internal pressure remains.
Internal Pressure: A net force on a control volume can also be generated from any internal differential pressure. The greatest net force on a valve is often generated when the valve is closed, similar to the end cap force in a closed pressure vessel. F= (Upstream pressure-Downstream Pressure) * cros-sectional area of flow. In the case of a pipeline block valve, that net force is resisted by the by axial stress within the pipe wall, which is typically transferred to the soil through friction over a length of pipe from the valve to virtual soil anchors on each side, or by more immediate means, directly through an anchor/support to which the valve is firmly attached.
“What I told you was true ... from a certain point of view.” - Obi-Wan Kenobi, "Return of the Jedi"