A flexibility analysis (according to the B31 piping codes) evaluates the mechanical stresses in the piping system assuming a steady-state condition. In most circumstances, the flow in the pipe does not affect the mechanical stresses. (The exception is dynamics.)

For example, the bending stress is computed as iM/Z (where "i" is a Code defined stress intensification factor, "M" is the applied bending moment, and "Z" is the section modulus of the pipe). Where does "M" come from?

"M" comes from the FEA solution of {f} = [K]{x}, where "f" is the applied load vector, usually comprised of system weight, pressure, temperature, predefined displacements, and occasional loads.

You should review the section on flexibility analysis in B31.1 or B31.3 for more details. This short post cannot do the subject of mechanical stress/flexibility analysis justice.

Hydraulic analysis on the other hand (as stated above) evaluates fluid flows and pressures throughout the system. A hydraulic analysis can be used to generated dynamic input data for CAESAR II. These are two completely different fields of Engineering.
_________________________
Regards,
Richard Ay - Consultant