# Temperature transmitter

Head-mounted temperature transmitter on a one-piece flanged thermowell: tapered stem below the raised face, lagging extension, union and nipple, and a dual-compartment Ex d housing with LCD. Origin and port on the flange face (pointing down); insertion and extension lengths are props.

**Standards:** ASME PTC 19.3 TW, IEC 60751, IEC 60079-1, ASME B16.5

## Installation

```bash
npx -y https://decktwin.com/cli/deck-twin-0.2.2.tgz add temperature-transmitter
```

Copies `instruments/temperature-transmitter.tsx`, any helper files it imports and the shared `lib/` into `src/components/deck-twin/`. Needs `three`, `@react-three/fiber` and `@react-three/drei`.

## Usage

```tsx
import { Canvas } from '@react-three/fiber'
import { OrbitControls } from '@react-three/drei'
import { Stage } from './components/deck-twin/lib/stage'
import { TemperatureTransmitter } from './components/deck-twin/instruments/temperature-transmitter'

export default function Scene() {
  return (
    <Canvas shadows camera={{ position: [8, 5, 9], fov: 35 }}>
      <Stage>
        <TemperatureTransmitter />
      </Stage>
      <OrbitControls makeDefault />
    </Canvas>
  )
}
```

## Props

| Prop | Type | Default | Range |
| --- | --- | --- | --- |
| `nps` | `number (NPS, in)` | `1.5` |  |
| `rating` | `150 \| 300 \| 600 \| 900 \| 1500 \| 2500` | `600` |  |
| `insertion` | `number (m)` | `0.25` | 0.1 – 0.6 |
| `extension` | `number (m)` | `0.1` | 0.05 – 0.3 |
| `housing` | `"actuatorBlue" \| "stainless" \| "aluminium" \| "equipmentPaintDark"` | `"actuatorBlue"` |  |
| `tag` | `string` | `"TT-1101"` |  |
| `...group` | position, rotation, scale… |  |  |

## Ports

Flange faces in the component's local frame, metres. Origin: pipe centreline, flow along X.

| Id | Label | Position | Direction | Size | Class |
| --- | --- | --- | --- | --- | --- |
| `process` | Thermowell flange | 0.000, 0.000, 0.000 | 0, -1, 0 | 1-1/2" | 600 |

## P&ID

TT or TIT field bubble joined to a thermowell (a short U-shaped pocket pushed into the pipe, sometimes tagged TW), on the pipe or vessel.

ISA TT · ISA TIT · ISA TE · ISA TW · ISA 5.1 (field-mounted instrument bubble)

TE (element) plus TT (transmitter) of the same loop are one physical item. TI / TG with no transmitter is a dial thermometer (temperature-gauge). A TW bubble on its own is a spare or test thermowell.

Temperature transmitter + thermowell specification forms (ISA-TR20.00.01; ASME PTC 19.3 TW) fields and the props they set:

| Field | Prop |
| --- | --- |
| Thermowell flange size | `nps` |
| Flange rating | `rating` |
| Insertion length (U) | `insertion` |
| Lagging extension (T) | `extension` |
| Housing material / finish | `housing` |
| Tag number | `tag` |

## Typical suppliers

Emerson (Rosemount). The geometry is generic and sized from public standards. It is not vendor CAD.

## Source

`instruments/temperature-transmitter.tsx`. This is the component file only: it imports shared code, so install it with the command above rather than pasting it alone. https://decktwin.com/r/temperature-transmitter.json has every file.

```tsx
// Temperature transmitter: flanged thermowell, lagging extension and union with a head-mounted dual-compartment Ex d transmitter. ASME PTC 19.3 TW, IEC 60751, ASME B16.5.
import type { MatKey } from '../lib/kit'
import { KitMesh, useKit, type GroupProps } from '../lib/mesh'
import { port, type Port } from '../lib/ports'
import type { Rating } from '../lib/standards'
import { SS, exHead, flangedThermowell, tag as tagPlate } from './_parts'

export interface TemperatureTransmitterProps {
  /** thermowell flange size, inches */
  nps?: number
  rating?: Rating
  /** immersion length below the flange face, m */
  insertion?: number
  /** lagging extension, m */
  extension?: number
  housing?: MatKey
  tag?: string
}

export const defaults = { nps: 1.5, rating: 600 as Rating, insertion: 0.25, extension: 0.1, housing: 'actuatorBlue' as MatKey, tag: 'TT-1101' }

export function ports(p: TemperatureTransmitterProps = {}): Port[] {
  const { nps, rating } = { ...defaults, ...p }
  return [port('process', 'Thermowell flange', [0, 0, 0], [0, -1, 0], nps, rating)]
}

export function TemperatureTransmitter({ nps = defaults.nps, rating = defaults.rating, insertion = defaults.insertion, extension = defaults.extension, housing = defaults.housing, tag = defaults.tag, ...group }: TemperatureTransmitterProps & GroupProps) {
  const data = useKit(
    (k) => {
      const y = flangedThermowell(k, nps, rating, insertion, extension)
      k.cyl(SS, 0.012, 0.03, [0, y + 0.015, 0], 'y', 12)
      exHead(k, [0, y + 0.03 + 0.011 + 0.048 - 0.004, 0], housing)
      tagPlate(k, tag, [0, y - 0.038 - extension / 2, 0.0115], 'z', 0.06)
    },
    [nps, rating, insertion, extension, housing, tag],
  )
  return (
    <group {...group}>
      <KitMesh data={data} />
    </group>
  )
}

export default TemperatureTransmitter
```
