@datagrok/compute 1.17.4 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -10
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +1 -1
- package/scripts/object-cooling.js +5 -5
- package/src/package.ts +3 -1
package/package.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
//description: Uses Newton's law of cooling to simulate object cooling process. Default values are for cube of boiling water in air.
|
|
3
3
|
//language: javascript
|
|
4
4
|
//tags: simulation, demo
|
|
5
|
-
//input: double ambTemp = 22 {caption: Ambient temperature; units: C; category: Environment; block: 50;
|
|
6
|
-
//input: double initTemp = 100 {caption: Initial temperature; units: C; category: Environment; block: 50;
|
|
7
|
-
//input: double desiredTemp = 30 {caption: Desired temperature; units: C; category: Environment;
|
|
5
|
+
//input: double ambTemp = 22 {caption: Ambient temperature; units: C; category: Environment; block: 50; validatorFunc: Compute:AmbTempValidator; }
|
|
6
|
+
//input: double initTemp = 100 {caption: Initial temperature; units: C; category: Environment; block: 50; validatorFunc: Compute:InitialTempValidator; }
|
|
7
|
+
//input: double desiredTemp = 30 {caption: Desired temperature; units: C; category: Environment; validatorFunc: Compute:DesiredTempValidator; }
|
|
8
8
|
//input: double area = 0.06 {caption: Surface area; units: m²; category: Object properties}
|
|
9
|
-
//input: double heatCap = 4200 {caption: Heat capacity; units: J/C; category: Object properties;
|
|
9
|
+
//input: double heatCap = 4200 {caption: Heat capacity; units: J/C; category: Object properties; validatorFunc: Compute:HeatCapValidator; }
|
|
10
10
|
//input: double heatTransferCoeff = 8.3 {caption: Heat transfer coefficient; units: W/(m² * C); category: Object properties}
|
|
11
|
-
//input: int simTime = 21600 {caption: Simulation time; units: sec; category: Simulation;
|
|
11
|
+
//input: int simTime = 21600 {caption: Simulation time; units: sec; category: Simulation; validatorFunc: Compute:SimTimeValidator; validatorFuncOptions: { "reasonableMin": 10800, "reasonableMax": 100000} }
|
|
12
12
|
//output: dataframe simulation {caption: Temp. vs time; category: Output; viewer: Line chart(block: 75) | Grid(block: 25)}
|
|
13
13
|
//output: double timeToCool {caption: Time to cool; units: sec.; category: Output}
|
|
14
14
|
//output: double coolingFactor {caption: Cooling factor; units: 1 / sec.; category: Calculations}
|
package/src/package.ts
CHANGED
|
@@ -115,7 +115,7 @@ let startUriLoaded = false;
|
|
|
115
115
|
//tags: app
|
|
116
116
|
//sidebar: @compute
|
|
117
117
|
export function modelCatalog() {
|
|
118
|
-
ModelCatalogView.findOrCreateCatalogView('Model Catalog', 'modelCatalog', _package)
|
|
118
|
+
const view = ModelCatalogView.findOrCreateCatalogView('Model Catalog', 'modelCatalog', _package);
|
|
119
119
|
|
|
120
120
|
const optionalPart = grok.shell.startUri.indexOf('?');
|
|
121
121
|
const pathSegments = grok.shell.startUri
|
|
@@ -128,6 +128,8 @@ export function modelCatalog() {
|
|
|
128
128
|
startUriLoaded = true;
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
+
|
|
132
|
+
return view;
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
|