Thermal and thermomechanical studies of beam-based powder-bed additive manufacturing processes