1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "exchangers": [
12 {
13 "title": "Hydraulic oil cooler",
14 "type": "shell and tube",
15 "hot": {
16 "fluid": "hydraulic oil ISO VG 46",
17 "flow": "120 l/min",
18 "inlet": "65 C",
19 "outlet": "45 C"
20 },
21 "cold": {
22 "fluid": "water",
23 "flow": "60 l/min",
24 "inlet": "25 C"
25 },
26 "U": "350 W/m2K"
27 },
28 {
29 "title": "Steam water heater",
30 "type": "shell and tube",
31 "hot": {
32 "fluid": "steam",
33 "pressure": "3 barg"
34 },
35 "cold": {
36 "fluid": "water",
37 "flow": "20 m3/h",
38 "inlet": "15 C",
39 "outlet": "80 C"
40 },
41 "U": "1500 W/m2K",
42 "fouling": "0.0002 m2K/W"
43 },
44 {
45 "title": "Plate exchanger rating",
46 "type": "plate",
47 "hot": {
48 "fluid": "water",
49 "flow": "10 m3/h",
50 "inlet": "80 C"
51 },
52 "cold": {
53 "fluid": "ethylene glycol 30%",
54 "flow": "8 m3/h",
55 "inlet": "10 C"
56 },
57 "U": "4000 W/m2K",
58 "area": "2.5 m2"
59 }
60 ],
61 "insulation": [
62 {
63 "title": "Steam line",
64 "pipe": "4 in sch 40 steel",
65 "processTemperature": "180 C",
66 "ambientTemperature": "10 C",
67 "location": "outdoor",
68 "layers": [
69 "50 mm mineral wool"
70 ],
71 "jacket": "aluminum",
72 "length": "150 m",
73 "energyPrice": "0.05 per kWh",
74 "efficiency": "85%"
75 },
76 {
77 "title": "Chilled water condensation check",
78 "pipe": "2 in type L copper",
79 "processTemperature": "6 C",
80 "ambientTemperature": "30 C",
81 "relativeHumidity": "80%",
82 "layers": [
83 {
84 "material": "elastomeric foam",
85 "thickness": "find"
86 }
87 ]
88 },
89 {
90 "title": "Tank wall",
91 "surface": "flat",
92 "height": "4 m",
93 "area": "60 m2",
94 "processTemperature": "250 C",
95 "ambientTemperature": "25 C",
96 "layers": [
97 {
98 "material": "mineral wool",
99 "thickness": "find"
100 }
101 ],
102 "jacket": "aluminum",
103 "maxSurfaceTemperature": "50 C"
104 }
105 ],
106 "walls": [
107 {
108 "title": "Cavity wall",
109 "layers": [
110 "13 mm plaster",
111 "100 mm lightweight block",
112 "100 mm mineral wool batt",
113 "50 mm air gap",
114 "102 mm brick"
115 ],
116 "insideTemperature": "20 C",
117 "outsideTemperature": "-5 C",
118 "area": "80 m2",
119 "insideHumidity": "60%"
120 },
121 {
122 "title": "2x4 stud wall",
123 "layers": [
124 "0.5 in drywall",
125 {
126 "material": "fiberglass batt",
127 "thickness": "3.5 in",
128 "bridging": "15% softwood"
129 },
130 "0.5 in OSB",
131 "R-1 siding"
132 ],
133 "insideTemperature": "70 F",
134 "outsideTemperature": "10 F"
135 },
136 {
137 "title": "Roof to U 0.15",
138 "position": "roof",
139 "layers": [
140 "15 mm plasterboard",
141 {
142 "material": "PIR",
143 "thickness": "find"
144 },
145 "18 mm plywood"
146 ],
147 "targetU": "0.15 W/m2K"
148 }
149 ]
150};
151
152
153const run = await client.actor("jumblemog/heat-transfer-calculator").call(input);
154
155
156console.log('Results from dataset');
157console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
158const { items } = await client.dataset(run.defaultDatasetId).listItems();
159items.forEach((item) => {
160 console.dir(item);
161});
162
163