Thermowell with flange