I agree with eliebl
Here is the introductory paragraph for Annex B of ASME B16.5 (FYI it is no longer called ANSI B16.5)This annex describes the methods utilized for establishing the pressure temperature ratings.
ANNEX B METHOD USED FOR ESTABLISHING PRESSURE–TEMPERATURE RATINGS
Pressure–temperature ratings for this Standard have
been determined by the procedures described in this
Annex. These procedures are counterpart to those identified
as Standard Class in ASME B16.34. The primary
considerations in establishing ratings are component
dimensions and material properties to sustain pressure
and other loads. Other considerations affecting or limiting
ratings include
(a) stresses in flanges resulting from bolt-up necessary
to maintain a gasket seal
(b) distortion of flanges and flanged fittings due to
loads transmitted through attached piping
(c) limitations applying primarily to flanged components
(e.g., valves), but also imposed on flanges in order
to preserve compatible ratings
I highly recommend obtaining this ASME Standard if you seek the answers to your questions.
There are three kinds of people in this world; those who can Google and those who can't.