# Heat Transfer Calculator: Heat Exchangers, Insulation, U-Values (`jumblemog/heat-transfer-calculator`) Actor

Heat exchanger rating and sizing (effectiveness-NTU, LMTD and F, steam and refrigerants), pipe and tank insulation heat loss and thickness (ASTM C680), and wall U-values (ISO 6946). JSON in, numbers and charts out. For AI agents.

- **URL**: https://apify.com/jumblemog/heat-transfer-calculator.md
- **Developed by:** [Jumble Mog](https://apify.com/jumblemog) (community)
- **Categories:** AI, Automation, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Heat Transfer Calculator: Heat Exchangers, Insulation, U-Values

**Three everyday heat transfer calculations in one tool**:

- **Heat exchangers**: rate an exchanger you have, size one for a duty, or find the flow one side needs. It works for counterflow, parallel, shell-and-tube, crossflow and plate exchangers, including steam and refrigerant condensers.
- **Insulation** on pipes, tanks and ducts: heat loss or gain, surface temperature, money saved against bare, and the thinnest standard thickness that keeps a surface safe to touch or above the dew point.
- **Walls, roofs and floors**: the U-value from the layers, the heat flow, the temperature at every layer, and how much insulation reaches a target U.

Write units the way you normally would (`120 l/min`, `65 C`, `3 barg`, `350 W/m2K`, `2 in mineral wool`, `R-13 batt`). Results come back in SI or US units, with a chart and a Markdown report.

It's made for:

- Mechanical, process and HVAC engineers doing quick checks and first sizing.
- Energy auditors pricing insulation upgrades.
- Architects and builders checking U-values against code.
- Students checking homework.
- AI agents that need real heat transfer numbers instead of guessed ones.

![An oil cooler sized by this Actor: hydraulic oil cooled from 65 to 45 °C by water, 66.1 kW, F 0.879, 9.77 m² at U 350 W/m²·K, with its temperature-heat diagram and the effectiveness-NTU curves for shell-and-tube, counterflow and parallel flow](https://api.apify.com/v2/key-value-stores/Km5b4PG3kYHdZSb1E/records/heat-transfer-calculator-example.png?signature=1zj2YBDkniW07TBo4vaTQ)

### What it does

#### Heat exchangers

Each exchanger has a hot side and a cold side. For each side you give the fluid, the flow, and the inlet and outlet temperatures you know. The calculator works out the rest:

- **Rating**: give UA (or U and area) and both flows. You get both outlet temperatures, the duty, the effectiveness and the NTU.
- **Sizing**: give one side's flow and both its temperatures (or the duty), plus the other side's inlet. You get:
  - the other side's outlet temperature or flow;
  - UA, the LMTD and the correction factor F;
  - the area for your U. Without a U, you get an area range from typical U values for that service.
- **Finding a flow**: give UA and one outlet temperature, and leave one flow out. You get the flow that reaches that temperature, for example the cooling water an existing exchanger needs.
- **Condensing and boiling**: mark a side `condensing` or `boiling`, or write `steam` with only a pressure. That side stays at its saturation temperature. If you leave its flow out, you get the flow needed, such as the steam consumption.

Duties come from enthalpy changes (CoolProp), so heat capacities that change with temperature are handled. The calculator also:

- **Stops impossible duties**: if a duty can't be reached, the error says how far the exchanger type can go and what would work instead, such as "Use 5 shells in series, or counterflow".
- **Warns about tight designs**: an F below 0.75, a temperature cross, a very close approach, or a stream that would boil part way.

**Fluids**: water, steam, seawater, air, nitrogen, natural gas, CO₂, ammonia, propane, refrigerants (R134a, R410A, R32, R1234yf and more), ethylene and propylene glycol, brine, diesel, gasoline, kerosene, crude and fuel oil, hydraulic oils, glycerin and milk. You can also give a custom fluid by its `cp`.

#### Insulation

For a pipe (`4 in sch 40`, `DN100`, `2 in type L copper`, or an outside diameter) or a flat surface (vertical, top or bottom), you get:

- **Heat loss or gain** per meter (or per m²) and in total, against the bare surface.
- **Temperatures**: the surface temperature and the temperature at every layer.
- **Surface coefficients**: natural or forced convection plus radiation, with the jacket's emissivity.
- **Yearly energy and cost**, with the hours, energy price and boiler efficiency you give.
- **The fluid's temperature change** along the run, when you give its flow.

**Finding a thickness**: set a layer's thickness to `find`. You get the thinnest standard thickness (10, 13, 19, 25 ... 300 mm, or ½, ¾, 1, 1½ ... 12 in) that meets one of these:

- `maxSurfaceTemperature`, or `personnelProtection: true` for 60 °C (ASTM C1055 touch limit);
- `maxHeatLoss`, per meter, per m² or in total;
- `relativeHumidity`, for a cold pipe that must stay above the dew point.

**Materials**: mineral wool, fiberglass, calcium silicate, cellular glass, elastomeric foam, PIR, PUR, phenolic, aerogel, perlite, XPS, EPS, polyethylene foam and ceramic fiber. Each one's conductivity changes with temperature, and the result warns when a layer goes past its service temperature.

**Jackets**: aluminum, stainless steel, galvanized steel, painted, PVC, all-service jacket, canvas, mastic, or a given emissivity.

#### Walls, roofs and floors

List the layers from inside to outside, as text or objects. You get:

- **The U-value and total R**, in SI and as a US R-value.
- **Each layer's R** and its share of the total.
- **Heat flow**: the heat flux and the heat flow over the area.
- **Temperatures**: at each layer, the inside surface temperature, and the temperature factor fRsi.
- **Condensation check**: whether the inside surface is below the dew point at the inside humidity.
- **Insulation for a target**: with `targetU` (or `targetR`) and one layer's thickness set to `find`, the thickness needed, exact and rounded up.

It follows ISO 6946:

- Surface resistances depend on whether heat flows up, sideways or down.
- Unventilated air layers use Table 8.
- A ventilated cavity drops the layers outside it.
- Studs or rails (`bridging: "15% softwood"`) use the combined method.

Layers can be written like `102 mm brick`, `100 mm mineral wool batt`, `25 mm air gap`, `R-13 batt`, `RSI 2.5`, `k 0.035 W/mK 120 mm`. There are about 50 building materials to choose from.

### How to use it

1. Fill in **Heat exchangers**, **Insulation** and **Walls, roofs and floors**. Each list is optional, and the form has examples of each.
2. Choose **Units**, or leave it on automatic.
3. Click **Start**. Each calculation is a row in the results, with its summary, chart and report.

### Examples

All of these ran on this Actor; the numbers are from the results.

| Request | Result |
|---|---|
| Shell-and-tube oil cooler: hydraulic oil ISO VG 46, 120 l/min, 65 → 45 °C; water 60 l/min at 25 °C; U 350 W/m²·K | 66.12 kW, water out at 40.87 °C, UA 3,419 W/K, LMTD 22 K, F 0.879, **9.77 m²** |
| Steam heater: steam at 3 barg, water 20 m³/h from 15 to 80 °C, U 1500 W/m²·K with 0.0002 m²·K/W fouling | 1,510 kW, steam condensing at 143.7 °C, **0.708 kg/s of steam**, 14.15 m² at U 1,154 W/m²·K |
| Plate exchanger rating: water 10 m³/h at 80 °C, glycol 30% 8 m³/h at 10 °C, U 4000 W/m²·K, 2.5 m² | 345.7 kW, water out at 49.42 °C, glycol out at 49.86 °C, effectiveness 0.569 |
| 4 in steam line at 180 °C, 50 mm mineral wool, aluminum jacket, outdoors, 150 m | **76.66 W/m** (11.5 kW), surface 15.94 °C, 96% less than bare |
| 2 in copper chilled-water pipe at 6 °C in 30 °C air at 80% RH, thickness to find | **25 mm** elastomeric foam: surface 27.4 °C, above the 26.17 °C dew point |
| Tank wall at 250 °C, 4 m tall, keep the surface under 50 °C | **100 mm** mineral wool, surface 49.69 °C, 111.5 W/m² |
| Cavity wall: plaster, 100 mm lightweight block, 100 mm mineral wool, 50 mm air gap, brick | **U 0.267 W/m²·K**, 534 W over 80 m² at 20 / -5 °C, inside surface 19.13 °C |
| Roof to U 0.15 with PIR between plasterboard and plywood | **157 mm** of PIR (160 mm rounded up) |

The tests check that:

- Rating matches the closed-form effectiveness-NTU result.
- F matches Fakheri's formula, and the duty balances on both sides.
- Insulation conduction equals what the surface loses.
- The integral-mean k matches a numerical average.
- A found thickness is the thinnest that works.
- Wall U-values match the ISO 6946 sum.

### How-to examples

Each example is a complete input; the results are from runs of the Actor (also listed under **Examples**).

#### How to size a shell-and-tube heat exchanger

```json
{
  "exchangers": [
    {
      "title": "Hydraulic oil cooler",
      "type": "shell and tube",
      "hot": {
        "fluid": "hydraulic oil ISO VG 46",
        "flow": "120 l/min",
        "inlet": "65 C",
        "outlet": "45 C"
      },
      "cold": {
        "fluid": "water",
        "flow": "60 l/min",
        "inlet": "25 C"
      },
      "U": "350 W/m2K"
    }
  ]
}
```

Result: 66.12 kW, water out at 40.87 °C, UA 3,419 W/K, LMTD 22 K, F 0.879 and **9.77 m²** of area. Give `area` instead of an outlet to rate an exchanger you have: a 2.5 m² plate exchanger with water at 80 °C and 30% glycol at 10 °C gives 345.7 kW.

#### How to find the insulation thickness that stops condensation on a cold pipe

```json
{
  "insulation": [
    {
      "title": "Chilled water condensation check",
      "pipe": "2 in type L copper",
      "processTemperature": "6 C",
      "ambientTemperature": "30 C",
      "relativeHumidity": "80%",
      "layers": [
        {
          "material": "elastomeric foam",
          "thickness": "find"
        }
      ]
    }
  ]
}
```

Result: **25 mm** of elastomeric foam keeps the surface at 27.4 °C, above the 26.17 °C dew point. For a hot pipe, a 4 in steam line at 180 °C with 50 mm of mineral wool loses 76.66 W/m, 96% less than bare.

#### How to calculate a wall's U-value from its layers (ISO 6946)

```json
{
  "walls": [
    {
      "title": "Cavity wall",
      "layers": [
        "13 mm plaster",
        "100 mm lightweight block",
        "100 mm mineral wool batt",
        "50 mm air gap",
        "102 mm brick"
      ],
      "insideTemperature": "20 C",
      "outsideTemperature": "-5 C",
      "area": "80 m2",
      "insideHumidity": "60%"
    }
  ]
}
```

Result: **U 0.267 W/m²·K**, 534 W over 80 m² at 20 / -5 °C, and 19.13 °C on the inside surface. With `"thickness": "find"` and a `targetU`, it finds the insulation: a roof to U 0.15 needs 157 mm of PIR.

#### How to let an AI agent do heat transfer calculations

Add this Actor to the [Apify MCP server](https://mcp.apify.com) with `https://mcp.apify.com/?tools=jumblemog/heat-transfer-calculator`. The agent fills in the exchanger, pipe or wall with units as people write them (`120 l/min`, `3 barg`, `R-13 batt`) and answers with the duty, area, heat loss or U-value.

### FAQ

**Which exchanger types does it handle?** Counterflow, parallel, shell-and-tube (1-2, 2-4), crossflow (mixed or unmixed), plate and double pipe, including steam and refrigerant condensers.

**Where do the fluid properties come from?** They're built in: water, steam, seawater, air, natural gas, refrigerants, glycols, brine, fuels, hydraulic oils and more, so you name the fluid instead of giving its properties. Any other fluid can be given by its `cp`.

**How is insulation heat loss calculated?** By the ASTM C680 method: each layer's k at its mean temperature, outside convection by Churchill-Chu or Churchill-Bernstein, and radiation to the surroundings.

**Can it find a safe-to-touch thickness?** Yes: set `maxSurfaceTemperature`, or `personnelProtection: true` for the 60 °C ASTM C1055 limit, and it gives the thinnest standard thickness that works.

### Input

| Field | What it is |
|---|---|
| `exchangers` | Heat exchangers, as objects (see below). |
| `insulation` | Insulation on pipes or flat surfaces, as objects. |
| `walls` | Walls, roofs and floors, as objects. |
| `units` | `auto`, `SI` or `US`, for bare numbers and the results. |
| `charts` | Draw charts (default on). |

**An exchanger** takes:

- `type`: `counterflow`, `parallel`, `shell and tube`, `1-2`, `2-4`, `crossflow`, `crossflow hot mixed`, `crossflow cold mixed`, `plate` or `double pipe`.
- `shells`.
- `hot` and `cold`, each with `fluid`, `flow`, `inlet`, `outlet`, `pressure`, `cp`, `density`, `condensing`/`boiling`, `latentHeat` and `temperature` (the saturation temperature).
- `U`, `fouling`, `area`, `UA`, `duty` and `title`.

**Insulation** takes:

- The surface: `pipe` (or `outsideDiameter`) and `length`; or `surface: "flat"` with `orientation`, `height`, `width` and `area`.
- Temperatures and air: `processTemperature`, `ambientTemperature`, `location` (`indoor` or `outdoor`) or `wind`.
- The insulation: `layers`, and `jacket` or `emissivity`.
- Limits, for a thickness to find: `maxSurfaceTemperature`, `personnelProtection`, `maxHeatLoss`, `relativeHumidity`.
- Cost: `hoursPerYear`, `energyPrice`, `efficiency`.
- The pipe's contents: `fluid`, `flow`.

**A wall** takes:

- `layers`, from inside to outside, and `order` (`"outside in"` if you list them the other way).
- `position`: `wall`, `roof` or `floor`.
- `insideTemperature`, `outsideTemperature`, `area` and `insideHumidity`.
- `targetU` or `targetR`.

### Output

One dataset item per calculation, also saved together in the run's `OUTPUT` record. An exchanger, shortened:

```json
{
  "request": 1, "status": "ok", "type": "exchanger", "mode": "sizing",
  "title": "Hydraulic oil cooler",
  "summary": "Shell-and-tube (1 shell) exchanger: 66.12 kW from hydraulic oil ISO VG 46 65 °C to 45 °C (1.74 kg/s) to water 25 °C to 40.87 °C (0.997 kg/s); needs UA 3,419 W/K (LMTD 22 K, F 0.879): 9.77 m² at U 350 W/m²·K.",
  "exchangerType": "Shell-and-tube (1 shell)", "duty": 66.12,
  "hot": {"fluid": "Hydraulic oil ISO VG 46", "inlet": 65, "outlet": 45, "massFlow": 1.74, "meanCp": 1.9, "...": "..."},
  "cold": {"fluid": "Water", "inlet": 25, "outlet": 40.87, "massFlow": 0.997, "...": "..."},
  "effectiveness": 0.5, "NTU": 1.03, "UA": 3419, "LMTD": 22.0, "correctionFactorF": 0.879, "U": 350, "area": 9.77,
  "temperatureProfile": [{"heat": 0, "hot": 45, "cold": 25}, "..."],
  "unitLabels": {"duty": "kW", "UA": "W/K", "area": "m²", "...": "..."},
  "imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/001-....png",
  "markdownUrl": "https://api.apify.com/v2/key-value-stores/.../records/001-....md",
  "notes": ["..."], "warnings": []
}
```

The other two kinds:

- **Insulation**: `heatFlow`, `heatFlowTotal`, `surfaceTemperature`, `layers` (with each layer's mean k and temperatures), `bare`, `reduction`, `yearly`, `dewPoint`, `foundThickness` and `fluidOutletTemperature`.
- **Walls**: `U`, `totalR`, `usRValue`, `layers`, `heatFlux`, `heatFlow`, `temperatures`, `insideSurfaceTemperature`, `temperatureFactor` and `foundThickness`.

Every number's unit is in `unitLabels`. A calculation that can't be done has `"status": "failed"` and the reason in `error`, and isn't billed.

### How it works

1. **Exchangers**:
   - Effectiveness-NTU relations from the [ht](https://github.com/CalebBell/ht) library: counterflow, parallel, TEMA E shell-and-tube with shells in series, and single-pass crossflow.
   - Each side's heat capacity rate comes from its enthalpy change, and rating iterates until the duty settles.
   - F is the duty divided by UA times the counterflow LMTD.
2. **Insulation**, by the ASTM C680 method:
   - Each layer's k is taken at its integral-mean temperature.
   - Outside convection uses the Churchill-Chu (still air) and Churchill-Bernstein (wind) correlations, with air properties at the film temperature.
   - Radiation goes to surroundings at the ambient temperature.
   - The heat flow is solved so that conduction equals what the surface loses.
3. **Walls**, by ISO 6946: the layers' resistances are added to the surface resistances. Bridged layers average the upper and lower limits.
4. **Charts** are drawn with Vega-Lite and rendered with vl-convert.

### Pricing

You pay one low price per calculation, at the prices shown on this page:

- one price per heat exchanger;
- a lower one per insulation system or wall.

Each includes the chart and the report. Calculations that can't be done are never charged. If you set a maximum cost per run, the Actor stops before a calculation that wouldn't fit.

### Speed

A calculation takes well under a second, plus its chart. A run through the API answers in about 5 to 15 seconds, including the cloud container starting.

### Tips and limits

- **Typical values**: material conductivities, oil properties and the typical-U area ranges are typical figures. A product data sheet or a measured U is better. You can give `k`, `cp` or `U` to override.
- **Exchanger U is an input**. The calculator doesn't work out film coefficients from tube geometry, so give U from a vendor, a past design or a reference table. `fouling` lowers it.
- **Phase change** is modeled as pure condensing or boiling at the saturation temperature. Subcooling and superheat are not included. A single-phase stream that would boil is stopped with a message.
- **Insulation** takes the pipe surface at the process temperature, ignoring the inside film and the pipe wall. This gives a slightly high, safe-side loss. Check touch limits in still air, the hottest case.
- **Walls** are steady-state, with no thermal mass, moisture transport or ground coupling. For floors on the ground, use ISO 13370.
- **Limits**: 500 calculations per run.

### For AI agents and developers

This Actor works with the [Apify MCP server](https://mcp.apify.com), so AI agents can call it as a tool. Read `summary` for the answer in one sentence, and the named fields for the numbers. A direct API call that waits for the answer:

```bash
curl -X POST "https://api.apify.com/v2/acts/jumblemog~heat-transfer-calculator/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"exchangers": [{"type": "counterflow", "hot": {"fluid": "water", "flow": "2 kg/s", "inlet": "90 C"}, "cold": {"fluid": "water", "flow": "3 kg/s", "inlet": "20 C"}, "UA": "10 kW/K"}]}'
```

`run-sync` instead returns the run's `OUTPUT`: the status, the counts and every result as JSON.

In Python, with the `apify-client` package:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("jumblemog/heat-transfer-calculator").call(run_input={
    "insulation": [{"pipe": "6 in sch 40", "processTemperature": "350 F", "ambientTemperature": "70 F",
                    "layers": [{"material": "calcium silicate", "thickness": "find"}],
                    "personnelProtection": True, "length": "400 ft", "energyPrice": "$8 per MMBtu"}],
    "walls": [{"layers": ["0.5 in drywall", "R-21 batt", "0.5 in plywood"], "targetU": "0.05 Btu/h·ft²·°F"}],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["summary"])
```

### Credits

- Heat transfer correlations and effectiveness-NTU: [ht](https://github.com/CalebBell/ht) and [fluids](https://github.com/CalebBell/fluids) by Caleb Bell (MIT).
- Fluid properties: [CoolProp](http://www.coolprop.org) (MIT).
- Root finding: [SciPy](https://scipy.org) (BSD-3-Clause).
- Charts: [Vega-Lite](https://vega.github.io/vega-lite/) and [vl-convert](https://github.com/vega/vl-convert) (BSD-3-Clause), with the [Inter](https://rsms.me/inter/) font (SIL Open Font License).
- Methods and data:
  - ASTM C680, *Standard Practice for Estimate of the Heat Gain or Loss and the Surface Temperatures of Insulated Flat, Cylindrical, and Spherical Systems*.
  - ISO 6946, *Building components and building elements: Thermal resistance and thermal transmittance*.
  - ISO 10456, and CIBSE Guide A, for the design conductivities.
  - Fakheri, A. (2003), *An alternative approach for determining log mean temperature difference correction factor and number of shells of shell and tube heat exchangers*, J. Enhanced Heat Transfer 10(4).
  - Incropera, F. P. et al., *Fundamentals of Heat and Mass Transfer*, Wiley.

# Actor input Schema

## `exchangers` (type: `array`):

One exchanger per object: {"type": counterflow, parallel, shell and tube (with shells, or '1-2', '2-4'), crossflow, crossflow hot mixed, crossflow cold mixed, plate, double pipe; "hot" and "cold": {fluid (water, steam, air, natural gas, a refrigerant, ethylene glycol 30%, diesel, hydraulic oil ISO VG 46, ...), flow (2 kg/s, 120 l/min, 200 gpm, 5000 scfm, 800 lb/h), inlet, outlet, pressure, cp; condensing or boiling: true (or 'steam' with only a pressure) for a side at its saturation temperature}; U (and fouling), area, UA, duty}. Give UA (or U and area) and both flows to rate it: outlets and duty. Give one side's flow and temperatures (or the duty) to size it: UA, LMTD, F and the area for U (a typical-U range when U isn't given). With UA, leave one flow out and give an outlet to find that flow. A condensing or boiling side with no flow gets the flow needed.

## `insulation` (type: `array`):

One pipe or flat surface per object: pipe ('4 in sch 40', 'DN100', '2 in type L copper') or outsideDiameter, or surface: 'flat' with orientation (vertical, top, bottom), height and area; processTemperature, ambientTemperature, location (indoor or outdoor) or wind, layers (\['50 mm mineral wool', '1 in aerogel'] or \[{material, thickness, k}]; materials: mineral wool, fiberglass, calcium silicate, cellular glass, elastomeric foam, PIR, PUR, phenolic, aerogel, perlite, XPS, EPS, polyethylene, ceramic fiber), jacket (aluminum, stainless, galvanized, PVC, all-service jacket, none) or emissivity, length. Set one layer's thickness to 'find' with maxSurfaceTemperature (or personnelProtection: true), maxHeatLoss ('50 W/m', '20 Btu/h·ft', a total) or relativeHumidity (cold surfaces) for the thinnest standard thickness. Optional: hoursPerYear, energyPrice ('0.05 per kWh', '$10 per MMBtu'), efficiency, fluid and flow for the temperature change along the pipe.

## `walls` (type: `array`):

One construction per object: layers from inside to outside (or order: 'outside in') as text ('100 mm mineral wool', '102 mm brick', '25 mm air gap', 'ventilated cavity', 'R-13 batt', 'RSI 2.5', 'k 0.035 W/mK 120 mm') or {material, thickness, k, R, bridging: '15% softwood'}; position (wall, roof, floor); insideTemperature and outsideTemperature for the heat flow and temperatures; area; insideHumidity for the condensation check; targetU (or targetR) with one layer's thickness 'find' for the insulation needed.

## `units` (type: `string`):

Units of bare numbers and of the results. Automatic picks US when most units written are US units.

## `charts` (type: `boolean`):

A T-Q diagram and effectiveness-NTU curves for each exchanger, heat loss and surface temperature against thickness for insulation, and the temperature profile and resistances of each wall.

## Actor input object example

```json
{
  "exchangers": [
    {
      "title": "Hydraulic oil cooler",
      "type": "shell and tube",
      "hot": {
        "fluid": "hydraulic oil ISO VG 46",
        "flow": "120 l/min",
        "inlet": "65 C",
        "outlet": "45 C"
      },
      "cold": {
        "fluid": "water",
        "flow": "60 l/min",
        "inlet": "25 C"
      },
      "U": "350 W/m2K"
    },
    {
      "title": "Steam water heater",
      "type": "shell and tube",
      "hot": {
        "fluid": "steam",
        "pressure": "3 barg"
      },
      "cold": {
        "fluid": "water",
        "flow": "20 m3/h",
        "inlet": "15 C",
        "outlet": "80 C"
      },
      "U": "1500 W/m2K",
      "fouling": "0.0002 m2K/W"
    },
    {
      "title": "Plate exchanger rating",
      "type": "plate",
      "hot": {
        "fluid": "water",
        "flow": "10 m3/h",
        "inlet": "80 C"
      },
      "cold": {
        "fluid": "ethylene glycol 30%",
        "flow": "8 m3/h",
        "inlet": "10 C"
      },
      "U": "4000 W/m2K",
      "area": "2.5 m2"
    }
  ],
  "insulation": [
    {
      "title": "Steam line",
      "pipe": "4 in sch 40 steel",
      "processTemperature": "180 C",
      "ambientTemperature": "10 C",
      "location": "outdoor",
      "layers": [
        "50 mm mineral wool"
      ],
      "jacket": "aluminum",
      "length": "150 m",
      "energyPrice": "0.05 per kWh",
      "efficiency": "85%"
    },
    {
      "title": "Chilled water condensation check",
      "pipe": "2 in type L copper",
      "processTemperature": "6 C",
      "ambientTemperature": "30 C",
      "relativeHumidity": "80%",
      "layers": [
        {
          "material": "elastomeric foam",
          "thickness": "find"
        }
      ]
    },
    {
      "title": "Tank wall",
      "surface": "flat",
      "height": "4 m",
      "area": "60 m2",
      "processTemperature": "250 C",
      "ambientTemperature": "25 C",
      "layers": [
        {
          "material": "mineral wool",
          "thickness": "find"
        }
      ],
      "jacket": "aluminum",
      "maxSurfaceTemperature": "50 C"
    }
  ],
  "walls": [
    {
      "title": "Cavity wall",
      "layers": [
        "13 mm plaster",
        "100 mm lightweight block",
        "100 mm mineral wool batt",
        "50 mm air gap",
        "102 mm brick"
      ],
      "insideTemperature": "20 C",
      "outsideTemperature": "-5 C",
      "area": "80 m2",
      "insideHumidity": "60%"
    },
    {
      "title": "2x4 stud wall",
      "layers": [
        "0.5 in drywall",
        {
          "material": "fiberglass batt",
          "thickness": "3.5 in",
          "bridging": "15% softwood"
        },
        "0.5 in OSB",
        "R-1 siding"
      ],
      "insideTemperature": "70 F",
      "outsideTemperature": "10 F"
    },
    {
      "title": "Roof to U 0.15",
      "position": "roof",
      "layers": [
        "15 mm plasterboard",
        {
          "material": "PIR",
          "thickness": "find"
        },
        "18 mm plywood"
      ],
      "targetU": "0.15 W/m2K"
    }
  ],
  "units": "auto",
  "charts": true
}
```

# Actor output Schema

## `results` (type: `string`):

One row per request: the summary and chart.

## `output` (type: `string`):

The OUTPUT record: every result in one JSON object.

## `files` (type: `string`):

Charts (PNG and SVG) and Markdown reports in the run's key-value store.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "exchangers": [
        {
            "title": "Hydraulic oil cooler",
            "type": "shell and tube",
            "hot": {
                "fluid": "hydraulic oil ISO VG 46",
                "flow": "120 l/min",
                "inlet": "65 C",
                "outlet": "45 C"
            },
            "cold": {
                "fluid": "water",
                "flow": "60 l/min",
                "inlet": "25 C"
            },
            "U": "350 W/m2K"
        },
        {
            "title": "Steam water heater",
            "type": "shell and tube",
            "hot": {
                "fluid": "steam",
                "pressure": "3 barg"
            },
            "cold": {
                "fluid": "water",
                "flow": "20 m3/h",
                "inlet": "15 C",
                "outlet": "80 C"
            },
            "U": "1500 W/m2K",
            "fouling": "0.0002 m2K/W"
        },
        {
            "title": "Plate exchanger rating",
            "type": "plate",
            "hot": {
                "fluid": "water",
                "flow": "10 m3/h",
                "inlet": "80 C"
            },
            "cold": {
                "fluid": "ethylene glycol 30%",
                "flow": "8 m3/h",
                "inlet": "10 C"
            },
            "U": "4000 W/m2K",
            "area": "2.5 m2"
        }
    ],
    "insulation": [
        {
            "title": "Steam line",
            "pipe": "4 in sch 40 steel",
            "processTemperature": "180 C",
            "ambientTemperature": "10 C",
            "location": "outdoor",
            "layers": [
                "50 mm mineral wool"
            ],
            "jacket": "aluminum",
            "length": "150 m",
            "energyPrice": "0.05 per kWh",
            "efficiency": "85%"
        },
        {
            "title": "Chilled water condensation check",
            "pipe": "2 in type L copper",
            "processTemperature": "6 C",
            "ambientTemperature": "30 C",
            "relativeHumidity": "80%",
            "layers": [
                {
                    "material": "elastomeric foam",
                    "thickness": "find"
                }
            ]
        },
        {
            "title": "Tank wall",
            "surface": "flat",
            "height": "4 m",
            "area": "60 m2",
            "processTemperature": "250 C",
            "ambientTemperature": "25 C",
            "layers": [
                {
                    "material": "mineral wool",
                    "thickness": "find"
                }
            ],
            "jacket": "aluminum",
            "maxSurfaceTemperature": "50 C"
        }
    ],
    "walls": [
        {
            "title": "Cavity wall",
            "layers": [
                "13 mm plaster",
                "100 mm lightweight block",
                "100 mm mineral wool batt",
                "50 mm air gap",
                "102 mm brick"
            ],
            "insideTemperature": "20 C",
            "outsideTemperature": "-5 C",
            "area": "80 m2",
            "insideHumidity": "60%"
        },
        {
            "title": "2x4 stud wall",
            "layers": [
                "0.5 in drywall",
                {
                    "material": "fiberglass batt",
                    "thickness": "3.5 in",
                    "bridging": "15% softwood"
                },
                "0.5 in OSB",
                "R-1 siding"
            ],
            "insideTemperature": "70 F",
            "outsideTemperature": "10 F"
        },
        {
            "title": "Roof to U 0.15",
            "position": "roof",
            "layers": [
                "15 mm plasterboard",
                {
                    "material": "PIR",
                    "thickness": "find"
                },
                "18 mm plywood"
            ],
            "targetU": "0.15 W/m2K"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("jumblemog/heat-transfer-calculator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "exchangers": [
        {
            "title": "Hydraulic oil cooler",
            "type": "shell and tube",
            "hot": {
                "fluid": "hydraulic oil ISO VG 46",
                "flow": "120 l/min",
                "inlet": "65 C",
                "outlet": "45 C",
            },
            "cold": {
                "fluid": "water",
                "flow": "60 l/min",
                "inlet": "25 C",
            },
            "U": "350 W/m2K",
        },
        {
            "title": "Steam water heater",
            "type": "shell and tube",
            "hot": {
                "fluid": "steam",
                "pressure": "3 barg",
            },
            "cold": {
                "fluid": "water",
                "flow": "20 m3/h",
                "inlet": "15 C",
                "outlet": "80 C",
            },
            "U": "1500 W/m2K",
            "fouling": "0.0002 m2K/W",
        },
        {
            "title": "Plate exchanger rating",
            "type": "plate",
            "hot": {
                "fluid": "water",
                "flow": "10 m3/h",
                "inlet": "80 C",
            },
            "cold": {
                "fluid": "ethylene glycol 30%",
                "flow": "8 m3/h",
                "inlet": "10 C",
            },
            "U": "4000 W/m2K",
            "area": "2.5 m2",
        },
    ],
    "insulation": [
        {
            "title": "Steam line",
            "pipe": "4 in sch 40 steel",
            "processTemperature": "180 C",
            "ambientTemperature": "10 C",
            "location": "outdoor",
            "layers": ["50 mm mineral wool"],
            "jacket": "aluminum",
            "length": "150 m",
            "energyPrice": "0.05 per kWh",
            "efficiency": "85%",
        },
        {
            "title": "Chilled water condensation check",
            "pipe": "2 in type L copper",
            "processTemperature": "6 C",
            "ambientTemperature": "30 C",
            "relativeHumidity": "80%",
            "layers": [{
                    "material": "elastomeric foam",
                    "thickness": "find",
                }],
        },
        {
            "title": "Tank wall",
            "surface": "flat",
            "height": "4 m",
            "area": "60 m2",
            "processTemperature": "250 C",
            "ambientTemperature": "25 C",
            "layers": [{
                    "material": "mineral wool",
                    "thickness": "find",
                }],
            "jacket": "aluminum",
            "maxSurfaceTemperature": "50 C",
        },
    ],
    "walls": [
        {
            "title": "Cavity wall",
            "layers": [
                "13 mm plaster",
                "100 mm lightweight block",
                "100 mm mineral wool batt",
                "50 mm air gap",
                "102 mm brick",
            ],
            "insideTemperature": "20 C",
            "outsideTemperature": "-5 C",
            "area": "80 m2",
            "insideHumidity": "60%",
        },
        {
            "title": "2x4 stud wall",
            "layers": [
                "0.5 in drywall",
                {
                    "material": "fiberglass batt",
                    "thickness": "3.5 in",
                    "bridging": "15% softwood",
                },
                "0.5 in OSB",
                "R-1 siding",
            ],
            "insideTemperature": "70 F",
            "outsideTemperature": "10 F",
        },
        {
            "title": "Roof to U 0.15",
            "position": "roof",
            "layers": [
                "15 mm plasterboard",
                {
                    "material": "PIR",
                    "thickness": "find",
                },
                "18 mm plywood",
            ],
            "targetU": "0.15 W/m2K",
        },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("jumblemog/heat-transfer-calculator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "exchangers": [
    {
      "title": "Hydraulic oil cooler",
      "type": "shell and tube",
      "hot": {
        "fluid": "hydraulic oil ISO VG 46",
        "flow": "120 l/min",
        "inlet": "65 C",
        "outlet": "45 C"
      },
      "cold": {
        "fluid": "water",
        "flow": "60 l/min",
        "inlet": "25 C"
      },
      "U": "350 W/m2K"
    },
    {
      "title": "Steam water heater",
      "type": "shell and tube",
      "hot": {
        "fluid": "steam",
        "pressure": "3 barg"
      },
      "cold": {
        "fluid": "water",
        "flow": "20 m3/h",
        "inlet": "15 C",
        "outlet": "80 C"
      },
      "U": "1500 W/m2K",
      "fouling": "0.0002 m2K/W"
    },
    {
      "title": "Plate exchanger rating",
      "type": "plate",
      "hot": {
        "fluid": "water",
        "flow": "10 m3/h",
        "inlet": "80 C"
      },
      "cold": {
        "fluid": "ethylene glycol 30%",
        "flow": "8 m3/h",
        "inlet": "10 C"
      },
      "U": "4000 W/m2K",
      "area": "2.5 m2"
    }
  ],
  "insulation": [
    {
      "title": "Steam line",
      "pipe": "4 in sch 40 steel",
      "processTemperature": "180 C",
      "ambientTemperature": "10 C",
      "location": "outdoor",
      "layers": [
        "50 mm mineral wool"
      ],
      "jacket": "aluminum",
      "length": "150 m",
      "energyPrice": "0.05 per kWh",
      "efficiency": "85%"
    },
    {
      "title": "Chilled water condensation check",
      "pipe": "2 in type L copper",
      "processTemperature": "6 C",
      "ambientTemperature": "30 C",
      "relativeHumidity": "80%",
      "layers": [
        {
          "material": "elastomeric foam",
          "thickness": "find"
        }
      ]
    },
    {
      "title": "Tank wall",
      "surface": "flat",
      "height": "4 m",
      "area": "60 m2",
      "processTemperature": "250 C",
      "ambientTemperature": "25 C",
      "layers": [
        {
          "material": "mineral wool",
          "thickness": "find"
        }
      ],
      "jacket": "aluminum",
      "maxSurfaceTemperature": "50 C"
    }
  ],
  "walls": [
    {
      "title": "Cavity wall",
      "layers": [
        "13 mm plaster",
        "100 mm lightweight block",
        "100 mm mineral wool batt",
        "50 mm air gap",
        "102 mm brick"
      ],
      "insideTemperature": "20 C",
      "outsideTemperature": "-5 C",
      "area": "80 m2",
      "insideHumidity": "60%"
    },
    {
      "title": "2x4 stud wall",
      "layers": [
        "0.5 in drywall",
        {
          "material": "fiberglass batt",
          "thickness": "3.5 in",
          "bridging": "15% softwood"
        },
        "0.5 in OSB",
        "R-1 siding"
      ],
      "insideTemperature": "70 F",
      "outsideTemperature": "10 F"
    },
    {
      "title": "Roof to U 0.15",
      "position": "roof",
      "layers": [
        "15 mm plasterboard",
        {
          "material": "PIR",
          "thickness": "find"
        },
        "18 mm plywood"
      ],
      "targetU": "0.15 W/m2K"
    }
  ]
}' |
apify call jumblemog/heat-transfer-calculator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jumblemog/heat-transfer-calculator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/5Qd0wHNAOLrkj0TIw/builds/p163qc3CDt6ZLEPcL/openapi.json
