how should be calculated the temperature at the outlet pipe from a relief valve for vapor/gas flow in case of fire or power failure?
is there a temperature gradient along the outlet pipe till the flare header?
I'm not sure of your application, but, normally, if there is a danger of heat and/or gas from a relief valve, the practice is to vent to the outside or to the stack (in the case of a furnace).
what i ment is for example if a relief valve is set to 20 barg and 200 deg C what will be the temperature at the outlet of the relief valve when vapor or gas are discharged from the relief valve.
Do an adiabatic expansion on the gas starting with the inlet conditions. You'll need a simulator or a Mollier diagram to estimate the outlet temperature on expansion.
A rule of thumb for cooling on expansion is about 7 deg F per 100 psi I believe (do a keyword search on the site, this has been discussed quite a few times).
I thing that one way to estimate that temperature is getting entalphy from a Molliere Diagram as TD2K said, after that you can get the oulet temperature with 1 Bar (atmospheric pressure), starting with 20 barg and 200°C I got 160°C, assuming that the entalphy is constant.