1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "requests": [
12 "size a round duct for 1000 cfm",
13 "500 L/s, 1 Pa/m, max height 300 mm",
14 "rectangular duct for 2000 cfm, max velocity 1000 fpm, max height 12 in",
15 "400 x 250 mm duct, 300 L/s",
16 "1200 cfm, 14 in round, 80 ft, 4 elbows, 1 tee, filter 0.3 in wc, diffuser 0.05 in wc",
17 "cooling load 24000 Btu/h, supply 55 F, room 75 F",
18 {
19 "type": "system",
20 "sections": [
21 {
22 "name": "Main",
23 "q": "2000 cfm",
24 "w": "24 in",
25 "h": "12 in",
26 "length": "60 ft",
27 "fittings": {
28 "vaned elbow": 2,
29 "tee straight": 1
30 }
31 },
32 {
33 "name": "Branch",
34 "q": "400 cfm",
35 "d": "10 in",
36 "length": "30 ft",
37 "fittings": {
38 "takeoff": 1,
39 "elbow": 2
40 },
41 "components": {
42 "diffuser": "0.08 in wc"
43 }
44 }
45 ]
46 }
47 ]
48};
49
50
51const run = await client.actor("jumblemog/duct-calculator").call(input);
52
53
54console.log('Results from dataset');
55console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
56const { items } = await client.dataset(run.defaultDatasetId).listItems();
57items.forEach((item) => {
58 console.dir(item);
59});
60
61