@dnv-plant/typescriptpws 1.0.95 → 1.0.96
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/index.ts +2 -2
- package/package.json +1 -1
- package/src/calculations/applicationTools.ts +36 -47
- package/src/calculations/calculationBase.ts +27 -61
- package/src/calculations/discharge.ts +274 -364
- package/src/calculations/dispersion.ts +80 -88
- package/src/calculations/dispersionView.ts +360 -439
- package/src/calculations/fireball.ts +64 -70
- package/src/calculations/jetFire.ts +104 -118
- package/src/calculations/lateExplosion.ts +150 -154
- package/src/calculations/linkedRunners.ts +1025 -1095
- package/src/calculations/poolFire.ts +64 -70
- package/src/calculations/properties.ts +37 -50
- package/src/calculations/radiation.ts +467 -575
- package/src/calculations/standalones.ts +55 -66
- package/src/calculations/toxics.ts +65 -77
- package/src/calculations/utilities.ts +322 -479
- package/src/constants.ts +14 -14
- package/src/entities.ts +752 -1000
- package/src/entity-schemas.ts +1279 -1286
- package/src/enums.ts +11 -11
- package/src/materials.ts +86 -256
- package/src/utilities.ts +41 -50
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
|
-
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
*
|
|
4
|
-
* DO NOT MODIFY THIS FILE
|
|
5
|
-
* This file is maintained by DNV.
|
|
6
|
-
* Editing it may lead to inconsistent results and limit DNV's ability to provide support.
|
|
7
|
-
* Please contact DNV if you believe changes are required.
|
|
8
|
-
*
|
|
9
|
-
* Version: 1.0.
|
|
10
|
-
* Date/time:
|
|
11
|
-
* Template: templates/typescriptpws/calculations.razor.
|
|
12
|
-
***********************************************************************/
|
|
13
|
-
|
|
14
|
-
import * as Enums from
|
|
15
|
-
import * as Entities from
|
|
16
|
-
import * as EntitySchemas from
|
|
17
|
-
import { getAnalyticsApiTarget, getClientAliasId } from
|
|
18
|
-
import { CalculationRequestBase, CalculationBase, CalculationResponseBase } from
|
|
19
|
-
|
|
20
|
-
import Joi from
|
|
2
|
+
* This file has been auto-generated by a code generation tool.
|
|
3
|
+
*
|
|
4
|
+
* DO NOT MODIFY THIS FILE
|
|
5
|
+
* This file is maintained by DNV.
|
|
6
|
+
* Editing it may lead to inconsistent results and limit DNV's ability to provide support.
|
|
7
|
+
* Please contact DNV if you believe changes are required.
|
|
8
|
+
*
|
|
9
|
+
* Version: 1.0.96
|
|
10
|
+
* Date/time: 4 Apr 2026 08:17:52
|
|
11
|
+
* Template: templates/typescriptpws/calculations.razor.
|
|
12
|
+
***********************************************************************/
|
|
13
|
+
|
|
14
|
+
import * as Enums from '../enums';
|
|
15
|
+
import * as Entities from '../entities';
|
|
16
|
+
import * as EntitySchemas from '../entity-schemas';
|
|
17
|
+
import { getAnalyticsApiTarget, getClientAliasId } from '../utilities';
|
|
18
|
+
import { CalculationRequestBase, CalculationBase, CalculationResponseBase } from './calculationBase';
|
|
19
|
+
|
|
20
|
+
import Joi from 'joi';
|
|
21
21
|
|
|
22
22
|
export interface BESSLinkedRunnerCalculationRequestSchemaData {
|
|
23
23
|
bessUnit: Entities.BESSUnit;
|
|
@@ -67,25 +67,25 @@ class BESSLinkedRunnerCalculationRequest extends CalculationRequestBase {
|
|
|
67
67
|
*
|
|
68
68
|
*/
|
|
69
69
|
constructor(data: {
|
|
70
|
-
bessUnit: Entities.BESSUnit
|
|
71
|
-
bessRelease: Entities.BESSRelease
|
|
72
|
-
weather: Entities.Weather
|
|
73
|
-
substrate: Entities.Substrate
|
|
74
|
-
dispersionParameters: Entities.DispersionParameters[]
|
|
75
|
-
dispersionParameterCount: number
|
|
76
|
-
endPointConcentration: number
|
|
77
|
-
flammableParameters: Entities.FlammableParameters
|
|
78
|
-
explosionParameters: Entities.ExplosionParameters
|
|
79
|
-
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[]
|
|
80
|
-
dispersionFlamOutputConfigCount: number
|
|
81
|
-
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[]
|
|
82
|
-
dispersionToxicOutputConfigCount: number
|
|
83
|
-
flammableOutputConfigs: Entities.FlammableOutputConfig[]
|
|
84
|
-
flammableOutputConfigCount: number
|
|
85
|
-
explosionOutputConfigs: Entities.ExplosionOutputConfig[]
|
|
86
|
-
explosionOutputConfigCount: number
|
|
87
|
-
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[]
|
|
88
|
-
explosionConfinedVolumeCount: number
|
|
70
|
+
bessUnit: Entities.BESSUnit;
|
|
71
|
+
bessRelease: Entities.BESSRelease;
|
|
72
|
+
weather: Entities.Weather;
|
|
73
|
+
substrate: Entities.Substrate;
|
|
74
|
+
dispersionParameters: Entities.DispersionParameters[];
|
|
75
|
+
dispersionParameterCount: number;
|
|
76
|
+
endPointConcentration: number;
|
|
77
|
+
flammableParameters: Entities.FlammableParameters;
|
|
78
|
+
explosionParameters: Entities.ExplosionParameters;
|
|
79
|
+
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[];
|
|
80
|
+
dispersionFlamOutputConfigCount: number;
|
|
81
|
+
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[];
|
|
82
|
+
dispersionToxicOutputConfigCount: number;
|
|
83
|
+
flammableOutputConfigs: Entities.FlammableOutputConfig[];
|
|
84
|
+
flammableOutputConfigCount: number;
|
|
85
|
+
explosionOutputConfigs: Entities.ExplosionOutputConfig[];
|
|
86
|
+
explosionOutputConfigCount: number;
|
|
87
|
+
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[];
|
|
88
|
+
explosionConfinedVolumeCount: number;
|
|
89
89
|
}) {
|
|
90
90
|
super();
|
|
91
91
|
this.bessUnit = data.bessUnit;
|
|
@@ -141,32 +141,32 @@ export class BESSLinkedRunnerCalculationRequestSchema {
|
|
|
141
141
|
}).unknown(true);
|
|
142
142
|
|
|
143
143
|
this.propertyTypes = {
|
|
144
|
-
bessUnit:
|
|
145
|
-
bessRelease:
|
|
146
|
-
weather:
|
|
147
|
-
substrate:
|
|
148
|
-
dispersionParameters:
|
|
149
|
-
dispersionParameterCount:
|
|
150
|
-
endPointConcentration:
|
|
151
|
-
flammableParameters:
|
|
152
|
-
explosionParameters:
|
|
153
|
-
dispersionFlamOutputConfigs:
|
|
154
|
-
dispersionFlamOutputConfigCount:
|
|
155
|
-
dispersionToxicOutputConfigs:
|
|
156
|
-
dispersionToxicOutputConfigCount:
|
|
157
|
-
flammableOutputConfigs:
|
|
158
|
-
flammableOutputConfigCount:
|
|
159
|
-
explosionOutputConfigs:
|
|
160
|
-
explosionOutputConfigCount:
|
|
161
|
-
explosionConfinedVolumes:
|
|
162
|
-
explosionConfinedVolumeCount:
|
|
144
|
+
bessUnit: 'Entities.BESSUnit',
|
|
145
|
+
bessRelease: 'Entities.BESSRelease',
|
|
146
|
+
weather: 'Entities.Weather',
|
|
147
|
+
substrate: 'Entities.Substrate',
|
|
148
|
+
dispersionParameters: 'Entities.DispersionParameters[]',
|
|
149
|
+
dispersionParameterCount: 'number',
|
|
150
|
+
endPointConcentration: 'number',
|
|
151
|
+
flammableParameters: 'Entities.FlammableParameters',
|
|
152
|
+
explosionParameters: 'Entities.ExplosionParameters',
|
|
153
|
+
dispersionFlamOutputConfigs: 'Entities.DispersionOutputConfig[]',
|
|
154
|
+
dispersionFlamOutputConfigCount: 'number',
|
|
155
|
+
dispersionToxicOutputConfigs: 'Entities.DispersionOutputConfig[]',
|
|
156
|
+
dispersionToxicOutputConfigCount: 'number',
|
|
157
|
+
flammableOutputConfigs: 'Entities.FlammableOutputConfig[]',
|
|
158
|
+
flammableOutputConfigCount: 'number',
|
|
159
|
+
explosionOutputConfigs: 'Entities.ExplosionOutputConfig[]',
|
|
160
|
+
explosionOutputConfigCount: 'number',
|
|
161
|
+
explosionConfinedVolumes: 'Entities.ExplosionConfinedVolume[]',
|
|
162
|
+
explosionConfinedVolumeCount: 'number',
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
validate(data: BESSLinkedRunnerCalculationRequestSchemaData): BESSLinkedRunnerCalculationRequest {
|
|
167
167
|
const { error, value } = this.schema.validate(data, { abortEarly: false });
|
|
168
168
|
if (error) {
|
|
169
|
-
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(
|
|
169
|
+
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
|
|
170
170
|
}
|
|
171
171
|
return this.makeCalculationRequest(value);
|
|
172
172
|
}
|
|
@@ -225,25 +225,25 @@ export class BESSLinkedRunnerCalculation extends CalculationBase {
|
|
|
225
225
|
*
|
|
226
226
|
*/
|
|
227
227
|
constructor(data: {
|
|
228
|
-
bessUnit: Entities.BESSUnit
|
|
229
|
-
bessRelease: Entities.BESSRelease
|
|
230
|
-
weather: Entities.Weather
|
|
231
|
-
substrate: Entities.Substrate
|
|
232
|
-
dispersionParameters: Entities.DispersionParameters[]
|
|
233
|
-
dispersionParameterCount: number
|
|
234
|
-
endPointConcentration: number
|
|
235
|
-
flammableParameters: Entities.FlammableParameters
|
|
236
|
-
explosionParameters: Entities.ExplosionParameters
|
|
237
|
-
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[]
|
|
238
|
-
dispersionFlamOutputConfigCount: number
|
|
239
|
-
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[]
|
|
240
|
-
dispersionToxicOutputConfigCount: number
|
|
241
|
-
flammableOutputConfigs: Entities.FlammableOutputConfig[]
|
|
242
|
-
flammableOutputConfigCount: number
|
|
243
|
-
explosionOutputConfigs: Entities.ExplosionOutputConfig[]
|
|
244
|
-
explosionOutputConfigCount: number
|
|
245
|
-
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[]
|
|
246
|
-
explosionConfinedVolumeCount: number
|
|
228
|
+
bessUnit: Entities.BESSUnit;
|
|
229
|
+
bessRelease: Entities.BESSRelease;
|
|
230
|
+
weather: Entities.Weather;
|
|
231
|
+
substrate: Entities.Substrate;
|
|
232
|
+
dispersionParameters: Entities.DispersionParameters[];
|
|
233
|
+
dispersionParameterCount: number;
|
|
234
|
+
endPointConcentration: number;
|
|
235
|
+
flammableParameters: Entities.FlammableParameters;
|
|
236
|
+
explosionParameters: Entities.ExplosionParameters;
|
|
237
|
+
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[];
|
|
238
|
+
dispersionFlamOutputConfigCount: number;
|
|
239
|
+
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[];
|
|
240
|
+
dispersionToxicOutputConfigCount: number;
|
|
241
|
+
flammableOutputConfigs: Entities.FlammableOutputConfig[];
|
|
242
|
+
flammableOutputConfigCount: number;
|
|
243
|
+
explosionOutputConfigs: Entities.ExplosionOutputConfig[];
|
|
244
|
+
explosionOutputConfigCount: number;
|
|
245
|
+
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[];
|
|
246
|
+
explosionConfinedVolumeCount: number;
|
|
247
247
|
controller?: AbortController;
|
|
248
248
|
}) {
|
|
249
249
|
super(data.controller);
|
|
@@ -289,7 +289,7 @@ export class BESSLinkedRunnerCalculation extends CalculationBase {
|
|
|
289
289
|
explosionOutputConfigs: this.explosionOutputConfigs,
|
|
290
290
|
explosionOutputConfigCount: this.explosionOutputConfigCount,
|
|
291
291
|
explosionConfinedVolumes: this.explosionConfinedVolumes,
|
|
292
|
-
explosionConfinedVolumeCount: this.explosionConfinedVolumeCount
|
|
292
|
+
explosionConfinedVolumeCount: this.explosionConfinedVolumeCount,
|
|
293
293
|
});
|
|
294
294
|
|
|
295
295
|
const schema = new BESSLinkedRunnerCalculationRequestSchema();
|
|
@@ -352,133 +352,129 @@ export class BESSLinkedRunnerCalculation extends CalculationBase {
|
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
toString() {
|
|
355
|
-
const parts = [
|
|
355
|
+
const parts = ['* BESSLinkedRunner'];
|
|
356
356
|
|
|
357
357
|
parts.push(`exitMaterial: ${String(this.exitMaterial)}`);
|
|
358
358
|
parts.push(`dischargeRecord: ${String(this.dischargeRecord)}`);
|
|
359
|
-
parts.push(
|
|
359
|
+
parts.push('*** distancesToJetFireRadiation:');
|
|
360
360
|
parts.push(
|
|
361
361
|
this.distancesToJetFireRadiation && this.distancesToJetFireRadiation.length > 0
|
|
362
|
-
? this.distancesToJetFireRadiation.map((point) => `distancesToJetFireRadiationElement: ${point}`).join(
|
|
363
|
-
:
|
|
362
|
+
? this.distancesToJetFireRadiation.map((point) => `distancesToJetFireRadiationElement: ${point}`).join('\n')
|
|
363
|
+
: 'distancesToJetFireRadiation does not contain any elements',
|
|
364
364
|
);
|
|
365
|
-
parts.push(
|
|
365
|
+
parts.push('*** jetContourPoints:');
|
|
366
366
|
parts.push(
|
|
367
367
|
this.jetContourPoints && this.jetContourPoints.length > 0
|
|
368
|
-
? this.jetContourPoints.map((point) => `jetContourPointsElement: ${point}`).join(
|
|
369
|
-
:
|
|
368
|
+
? this.jetContourPoints.map((point) => `jetContourPointsElement: ${point}`).join('\n')
|
|
369
|
+
: 'jetContourPoints does not contain any elements',
|
|
370
370
|
);
|
|
371
|
-
parts.push(
|
|
371
|
+
parts.push('*** nJetContourPoints:');
|
|
372
372
|
parts.push(
|
|
373
373
|
this.nJetContourPoints && this.nJetContourPoints.length > 0
|
|
374
|
-
? this.nJetContourPoints.map((point) => `nJetContourPointsElement: ${point}`).join(
|
|
375
|
-
:
|
|
374
|
+
? this.nJetContourPoints.map((point) => `nJetContourPointsElement: ${point}`).join('\n')
|
|
375
|
+
: 'nJetContourPoints does not contain any elements',
|
|
376
376
|
);
|
|
377
|
-
parts.push(
|
|
377
|
+
parts.push('*** areaContourJet:');
|
|
378
378
|
parts.push(
|
|
379
|
-
this.areaContourJet && this.areaContourJet.length > 0
|
|
380
|
-
? this.areaContourJet.map((point) => `areaContourJetElement: ${point}`).join("\n")
|
|
381
|
-
: "areaContourJet does not contain any elements"
|
|
379
|
+
this.areaContourJet && this.areaContourJet.length > 0 ? this.areaContourJet.map((point) => `areaContourJetElement: ${point}`).join('\n') : 'areaContourJet does not contain any elements',
|
|
382
380
|
);
|
|
383
|
-
parts.push(
|
|
381
|
+
parts.push('*** distancesToFlamConcentration:');
|
|
384
382
|
parts.push(
|
|
385
383
|
this.distancesToFlamConcentration && this.distancesToFlamConcentration.length > 0
|
|
386
|
-
? this.distancesToFlamConcentration.map((point) => `distancesToFlamConcentrationElement: ${point}`).join(
|
|
387
|
-
:
|
|
384
|
+
? this.distancesToFlamConcentration.map((point) => `distancesToFlamConcentrationElement: ${point}`).join('\n')
|
|
385
|
+
: 'distancesToFlamConcentration does not contain any elements',
|
|
388
386
|
);
|
|
389
|
-
parts.push(
|
|
387
|
+
parts.push('*** flamConcentrationsUsed:');
|
|
390
388
|
parts.push(
|
|
391
389
|
this.flamConcentrationsUsed && this.flamConcentrationsUsed.length > 0
|
|
392
|
-
? this.flamConcentrationsUsed.map((point) => `flamConcentrationsUsedElement: ${point}`).join(
|
|
393
|
-
:
|
|
390
|
+
? this.flamConcentrationsUsed.map((point) => `flamConcentrationsUsedElement: ${point}`).join('\n')
|
|
391
|
+
: 'flamConcentrationsUsed does not contain any elements',
|
|
394
392
|
);
|
|
395
|
-
parts.push(
|
|
393
|
+
parts.push('*** flamConcContourPoints:');
|
|
396
394
|
parts.push(
|
|
397
395
|
this.flamConcContourPoints && this.flamConcContourPoints.length > 0
|
|
398
|
-
? this.flamConcContourPoints.map((point) => `flamConcContourPointsElement: ${point}`).join(
|
|
399
|
-
:
|
|
396
|
+
? this.flamConcContourPoints.map((point) => `flamConcContourPointsElement: ${point}`).join('\n')
|
|
397
|
+
: 'flamConcContourPoints does not contain any elements',
|
|
400
398
|
);
|
|
401
|
-
parts.push(
|
|
399
|
+
parts.push('*** nFlamConcContourPoints:');
|
|
402
400
|
parts.push(
|
|
403
401
|
this.nFlamConcContourPoints && this.nFlamConcContourPoints.length > 0
|
|
404
|
-
? this.nFlamConcContourPoints.map((point) => `nFlamConcContourPointsElement: ${point}`).join(
|
|
405
|
-
:
|
|
402
|
+
? this.nFlamConcContourPoints.map((point) => `nFlamConcContourPointsElement: ${point}`).join('\n')
|
|
403
|
+
: 'nFlamConcContourPoints does not contain any elements',
|
|
406
404
|
);
|
|
407
|
-
parts.push(
|
|
405
|
+
parts.push('*** areaFootprintFlamConc:');
|
|
408
406
|
parts.push(
|
|
409
407
|
this.areaFootprintFlamConc && this.areaFootprintFlamConc.length > 0
|
|
410
|
-
? this.areaFootprintFlamConc.map((point) => `areaFootprintFlamConcElement: ${point}`).join(
|
|
411
|
-
:
|
|
408
|
+
? this.areaFootprintFlamConc.map((point) => `areaFootprintFlamConcElement: ${point}`).join('\n')
|
|
409
|
+
: 'areaFootprintFlamConc does not contain any elements',
|
|
412
410
|
);
|
|
413
|
-
parts.push(
|
|
411
|
+
parts.push('*** distancesToPoolFireRadiation:');
|
|
414
412
|
parts.push(
|
|
415
413
|
this.distancesToPoolFireRadiation && this.distancesToPoolFireRadiation.length > 0
|
|
416
|
-
? this.distancesToPoolFireRadiation.map((point) => `distancesToPoolFireRadiationElement: ${point}`).join(
|
|
417
|
-
:
|
|
414
|
+
? this.distancesToPoolFireRadiation.map((point) => `distancesToPoolFireRadiationElement: ${point}`).join('\n')
|
|
415
|
+
: 'distancesToPoolFireRadiation does not contain any elements',
|
|
418
416
|
);
|
|
419
|
-
parts.push(
|
|
417
|
+
parts.push('*** poolContourPoints:');
|
|
420
418
|
parts.push(
|
|
421
419
|
this.poolContourPoints && this.poolContourPoints.length > 0
|
|
422
|
-
? this.poolContourPoints.map((point) => `poolContourPointsElement: ${point}`).join(
|
|
423
|
-
:
|
|
420
|
+
? this.poolContourPoints.map((point) => `poolContourPointsElement: ${point}`).join('\n')
|
|
421
|
+
: 'poolContourPoints does not contain any elements',
|
|
424
422
|
);
|
|
425
|
-
parts.push(
|
|
423
|
+
parts.push('*** nPoolContourPoints:');
|
|
426
424
|
parts.push(
|
|
427
425
|
this.nPoolContourPoints && this.nPoolContourPoints.length > 0
|
|
428
|
-
? this.nPoolContourPoints.map((point) => `nPoolContourPointsElement: ${point}`).join(
|
|
429
|
-
:
|
|
426
|
+
? this.nPoolContourPoints.map((point) => `nPoolContourPointsElement: ${point}`).join('\n')
|
|
427
|
+
: 'nPoolContourPoints does not contain any elements',
|
|
430
428
|
);
|
|
431
|
-
parts.push(
|
|
429
|
+
parts.push('*** areaContourPool:');
|
|
432
430
|
parts.push(
|
|
433
|
-
this.areaContourPool && this.areaContourPool.length > 0
|
|
434
|
-
? this.areaContourPool.map((point) => `areaContourPoolElement: ${point}`).join("\n")
|
|
435
|
-
: "areaContourPool does not contain any elements"
|
|
431
|
+
this.areaContourPool && this.areaContourPool.length > 0 ? this.areaContourPool.map((point) => `areaContourPoolElement: ${point}`).join('\n') : 'areaContourPool does not contain any elements',
|
|
436
432
|
);
|
|
437
|
-
parts.push(
|
|
433
|
+
parts.push('*** explosionOverpressureResults:');
|
|
438
434
|
parts.push(
|
|
439
435
|
this.explosionOverpressureResults && this.explosionOverpressureResults.length > 0
|
|
440
|
-
? this.explosionOverpressureResults.map((point) => `explosionOverpressureResultsElement: ${point}`).join(
|
|
441
|
-
:
|
|
436
|
+
? this.explosionOverpressureResults.map((point) => `explosionOverpressureResultsElement: ${point}`).join('\n')
|
|
437
|
+
: 'explosionOverpressureResults does not contain any elements',
|
|
442
438
|
);
|
|
443
|
-
parts.push(
|
|
439
|
+
parts.push('*** distancesToToxicConcentration:');
|
|
444
440
|
parts.push(
|
|
445
441
|
this.distancesToToxicConcentration && this.distancesToToxicConcentration.length > 0
|
|
446
|
-
? this.distancesToToxicConcentration.map((point) => `distancesToToxicConcentrationElement: ${point}`).join(
|
|
447
|
-
:
|
|
442
|
+
? this.distancesToToxicConcentration.map((point) => `distancesToToxicConcentrationElement: ${point}`).join('\n')
|
|
443
|
+
: 'distancesToToxicConcentration does not contain any elements',
|
|
448
444
|
);
|
|
449
|
-
parts.push(
|
|
445
|
+
parts.push('*** toxicConcentrationUsed:');
|
|
450
446
|
parts.push(
|
|
451
447
|
this.toxicConcentrationUsed && this.toxicConcentrationUsed.length > 0
|
|
452
|
-
? this.toxicConcentrationUsed.map((point) => `toxicConcentrationUsedElement: ${point}`).join(
|
|
453
|
-
:
|
|
448
|
+
? this.toxicConcentrationUsed.map((point) => `toxicConcentrationUsedElement: ${point}`).join('\n')
|
|
449
|
+
: 'toxicConcentrationUsed does not contain any elements',
|
|
454
450
|
);
|
|
455
|
-
parts.push(
|
|
451
|
+
parts.push('*** toxicConcContourPoints:');
|
|
456
452
|
parts.push(
|
|
457
453
|
this.toxicConcContourPoints && this.toxicConcContourPoints.length > 0
|
|
458
|
-
? this.toxicConcContourPoints.map((point) => `toxicConcContourPointsElement: ${point}`).join(
|
|
459
|
-
:
|
|
454
|
+
? this.toxicConcContourPoints.map((point) => `toxicConcContourPointsElement: ${point}`).join('\n')
|
|
455
|
+
: 'toxicConcContourPoints does not contain any elements',
|
|
460
456
|
);
|
|
461
|
-
parts.push(
|
|
457
|
+
parts.push('*** nToxicConcContourPoints:');
|
|
462
458
|
parts.push(
|
|
463
459
|
this.nToxicConcContourPoints && this.nToxicConcContourPoints.length > 0
|
|
464
|
-
? this.nToxicConcContourPoints.map((point) => `nToxicConcContourPointsElement: ${point}`).join(
|
|
465
|
-
:
|
|
460
|
+
? this.nToxicConcContourPoints.map((point) => `nToxicConcContourPointsElement: ${point}`).join('\n')
|
|
461
|
+
: 'nToxicConcContourPoints does not contain any elements',
|
|
466
462
|
);
|
|
467
|
-
parts.push(
|
|
463
|
+
parts.push('*** areaFootprintToxicConc:');
|
|
468
464
|
parts.push(
|
|
469
465
|
this.areaFootprintToxicConc && this.areaFootprintToxicConc.length > 0
|
|
470
|
-
? this.areaFootprintToxicConc.map((point) => `areaFootprintToxicConcElement: ${point}`).join(
|
|
471
|
-
:
|
|
466
|
+
? this.areaFootprintToxicConc.map((point) => `areaFootprintToxicConcElement: ${point}`).join('\n')
|
|
467
|
+
: 'areaFootprintToxicConc does not contain any elements',
|
|
472
468
|
);
|
|
473
469
|
parts.push(`jetFireFlameResult: ${String(this.jetFireFlameResult)}`);
|
|
474
470
|
parts.push(`poolFireFlameResult: ${String(this.poolFireFlameResult)}`);
|
|
475
471
|
parts.push(`resultCode: ${String(this.resultCode)}`);
|
|
476
|
-
parts.push(
|
|
477
|
-
parts.push(`messages: ${this.messages !== undefined ? this.messages :
|
|
478
|
-
parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime :
|
|
479
|
-
parts.push(`operationId: ${this.operationId !== undefined ? this.operationId :
|
|
472
|
+
parts.push('*** messages:');
|
|
473
|
+
parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
|
|
474
|
+
parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
|
|
475
|
+
parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
|
|
480
476
|
|
|
481
|
-
return parts.join(
|
|
477
|
+
return parts.join('\n');
|
|
482
478
|
}
|
|
483
479
|
}
|
|
484
480
|
|
|
@@ -512,33 +508,33 @@ export class BESSLinkedRunnerCalculationResponse extends CalculationResponseBase
|
|
|
512
508
|
*
|
|
513
509
|
*/
|
|
514
510
|
constructor(data: {
|
|
515
|
-
exitMaterial: Entities.Material
|
|
516
|
-
dischargeRecord: Entities.DischargeRecord
|
|
517
|
-
distancesToJetFireRadiation: number[]
|
|
518
|
-
jetContourPoints: Entities.LocalPosition[]
|
|
519
|
-
nJetContourPoints: number[]
|
|
520
|
-
areaContourJet: number[]
|
|
521
|
-
distancesToFlamConcentration: number[]
|
|
522
|
-
flamConcentrationsUsed: number[]
|
|
523
|
-
flamConcContourPoints: Entities.LocalPosition[]
|
|
524
|
-
nFlamConcContourPoints: number[]
|
|
525
|
-
areaFootprintFlamConc: number[]
|
|
526
|
-
distancesToPoolFireRadiation: number[]
|
|
527
|
-
poolContourPoints: Entities.LocalPosition[]
|
|
528
|
-
nPoolContourPoints: number[]
|
|
529
|
-
areaContourPool: number[]
|
|
530
|
-
explosionOverpressureResults: Entities.ExplosionOverpressureResult[]
|
|
531
|
-
distancesToToxicConcentration: number[]
|
|
532
|
-
toxicConcentrationUsed: number[]
|
|
533
|
-
toxicConcContourPoints: Entities.LocalPosition[]
|
|
534
|
-
nToxicConcContourPoints: number[]
|
|
535
|
-
areaFootprintToxicConc: number[]
|
|
536
|
-
jetFireFlameResult: Entities.FlameResult
|
|
537
|
-
poolFireFlameResult: Entities.PoolFireFlameResult
|
|
538
|
-
resultCode: Enums.ResultCode
|
|
539
|
-
messages: string[]
|
|
540
|
-
calculationElapsedTime: number
|
|
541
|
-
operationId: string
|
|
511
|
+
exitMaterial: Entities.Material;
|
|
512
|
+
dischargeRecord: Entities.DischargeRecord;
|
|
513
|
+
distancesToJetFireRadiation: number[];
|
|
514
|
+
jetContourPoints: Entities.LocalPosition[];
|
|
515
|
+
nJetContourPoints: number[];
|
|
516
|
+
areaContourJet: number[];
|
|
517
|
+
distancesToFlamConcentration: number[];
|
|
518
|
+
flamConcentrationsUsed: number[];
|
|
519
|
+
flamConcContourPoints: Entities.LocalPosition[];
|
|
520
|
+
nFlamConcContourPoints: number[];
|
|
521
|
+
areaFootprintFlamConc: number[];
|
|
522
|
+
distancesToPoolFireRadiation: number[];
|
|
523
|
+
poolContourPoints: Entities.LocalPosition[];
|
|
524
|
+
nPoolContourPoints: number[];
|
|
525
|
+
areaContourPool: number[];
|
|
526
|
+
explosionOverpressureResults: Entities.ExplosionOverpressureResult[];
|
|
527
|
+
distancesToToxicConcentration: number[];
|
|
528
|
+
toxicConcentrationUsed: number[];
|
|
529
|
+
toxicConcContourPoints: Entities.LocalPosition[];
|
|
530
|
+
nToxicConcContourPoints: number[];
|
|
531
|
+
areaFootprintToxicConc: number[];
|
|
532
|
+
jetFireFlameResult: Entities.FlameResult;
|
|
533
|
+
poolFireFlameResult: Entities.PoolFireFlameResult;
|
|
534
|
+
resultCode: Enums.ResultCode;
|
|
535
|
+
messages: string[];
|
|
536
|
+
calculationElapsedTime: number;
|
|
537
|
+
operationId: string;
|
|
542
538
|
}) {
|
|
543
539
|
super();
|
|
544
540
|
this.exitMaterial = data.exitMaterial;
|
|
@@ -583,13 +579,11 @@ export class BESSLinkedRunnerCalculationResponse extends CalculationResponseBase
|
|
|
583
579
|
this.distancesToJetFireRadiation = data.distancesToJetFireRadiation.map((item) => parseFloat(item));
|
|
584
580
|
}
|
|
585
581
|
if (data.jetContourPoints && Array.isArray(data.jetContourPoints)) {
|
|
586
|
-
this.jetContourPoints = data.jetContourPoints.map(
|
|
587
|
-
(
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
}
|
|
592
|
-
);
|
|
582
|
+
this.jetContourPoints = data.jetContourPoints.map((item) => {
|
|
583
|
+
const record = new Entities.LocalPosition();
|
|
584
|
+
record.initialiseFromDictionary(item);
|
|
585
|
+
return record;
|
|
586
|
+
});
|
|
593
587
|
}
|
|
594
588
|
if (data.nJetContourPoints && Array.isArray(data.nJetContourPoints)) {
|
|
595
589
|
this.nJetContourPoints = data.nJetContourPoints.map((item) => parseInt(item));
|
|
@@ -604,13 +598,11 @@ export class BESSLinkedRunnerCalculationResponse extends CalculationResponseBase
|
|
|
604
598
|
this.flamConcentrationsUsed = data.flamConcentrationsUsed.map((item) => parseFloat(item));
|
|
605
599
|
}
|
|
606
600
|
if (data.flamConcContourPoints && Array.isArray(data.flamConcContourPoints)) {
|
|
607
|
-
this.flamConcContourPoints = data.flamConcContourPoints.map(
|
|
608
|
-
(
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
}
|
|
613
|
-
);
|
|
601
|
+
this.flamConcContourPoints = data.flamConcContourPoints.map((item) => {
|
|
602
|
+
const record = new Entities.LocalPosition();
|
|
603
|
+
record.initialiseFromDictionary(item);
|
|
604
|
+
return record;
|
|
605
|
+
});
|
|
614
606
|
}
|
|
615
607
|
if (data.nFlamConcContourPoints && Array.isArray(data.nFlamConcContourPoints)) {
|
|
616
608
|
this.nFlamConcContourPoints = data.nFlamConcContourPoints.map((item) => parseInt(item));
|
|
@@ -622,13 +614,11 @@ export class BESSLinkedRunnerCalculationResponse extends CalculationResponseBase
|
|
|
622
614
|
this.distancesToPoolFireRadiation = data.distancesToPoolFireRadiation.map((item) => parseFloat(item));
|
|
623
615
|
}
|
|
624
616
|
if (data.poolContourPoints && Array.isArray(data.poolContourPoints)) {
|
|
625
|
-
this.poolContourPoints = data.poolContourPoints.map(
|
|
626
|
-
(
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
}
|
|
631
|
-
);
|
|
617
|
+
this.poolContourPoints = data.poolContourPoints.map((item) => {
|
|
618
|
+
const record = new Entities.LocalPosition();
|
|
619
|
+
record.initialiseFromDictionary(item);
|
|
620
|
+
return record;
|
|
621
|
+
});
|
|
632
622
|
}
|
|
633
623
|
if (data.nPoolContourPoints && Array.isArray(data.nPoolContourPoints)) {
|
|
634
624
|
this.nPoolContourPoints = data.nPoolContourPoints.map((item) => parseInt(item));
|
|
@@ -637,13 +627,11 @@ export class BESSLinkedRunnerCalculationResponse extends CalculationResponseBase
|
|
|
637
627
|
this.areaContourPool = data.areaContourPool.map((item) => parseFloat(item));
|
|
638
628
|
}
|
|
639
629
|
if (data.explosionOverpressureResults && Array.isArray(data.explosionOverpressureResults)) {
|
|
640
|
-
this.explosionOverpressureResults = data.explosionOverpressureResults.map(
|
|
641
|
-
(
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
}
|
|
646
|
-
);
|
|
630
|
+
this.explosionOverpressureResults = data.explosionOverpressureResults.map((item) => {
|
|
631
|
+
const record = new Entities.ExplosionOverpressureResult();
|
|
632
|
+
record.initialiseFromDictionary(item);
|
|
633
|
+
return record;
|
|
634
|
+
});
|
|
647
635
|
}
|
|
648
636
|
if (data.distancesToToxicConcentration && Array.isArray(data.distancesToToxicConcentration)) {
|
|
649
637
|
this.distancesToToxicConcentration = data.distancesToToxicConcentration.map((item) => parseFloat(item));
|
|
@@ -652,13 +640,11 @@ export class BESSLinkedRunnerCalculationResponse extends CalculationResponseBase
|
|
|
652
640
|
this.toxicConcentrationUsed = data.toxicConcentrationUsed.map((item) => parseFloat(item));
|
|
653
641
|
}
|
|
654
642
|
if (data.toxicConcContourPoints && Array.isArray(data.toxicConcContourPoints)) {
|
|
655
|
-
this.toxicConcContourPoints = data.toxicConcContourPoints.map(
|
|
656
|
-
(
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
}
|
|
661
|
-
);
|
|
643
|
+
this.toxicConcContourPoints = data.toxicConcContourPoints.map((item) => {
|
|
644
|
+
const record = new Entities.LocalPosition();
|
|
645
|
+
record.initialiseFromDictionary(item);
|
|
646
|
+
return record;
|
|
647
|
+
});
|
|
662
648
|
}
|
|
663
649
|
if (data.nToxicConcContourPoints && Array.isArray(data.nToxicConcContourPoints)) {
|
|
664
650
|
this.nToxicConcContourPoints = data.nToxicConcContourPoints.map((item) => parseInt(item));
|
|
@@ -674,17 +660,17 @@ export class BESSLinkedRunnerCalculationResponse extends CalculationResponseBase
|
|
|
674
660
|
this.poolFireFlameResult = new Entities.PoolFireFlameResult();
|
|
675
661
|
this.poolFireFlameResult.initialiseFromDictionary(data.poolFireFlameResult as { [key: string]: unknown });
|
|
676
662
|
}
|
|
677
|
-
if (data.resultCode !== undefined && (typeof data.resultCode ===
|
|
663
|
+
if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
|
|
678
664
|
this.resultCode = data.resultCode as Enums.ResultCode;
|
|
679
665
|
}
|
|
680
666
|
this.messages = this.messages ?? [];
|
|
681
667
|
if (data.messages && Array.isArray(data.messages)) {
|
|
682
668
|
this.messages.push(...data.messages);
|
|
683
669
|
}
|
|
684
|
-
if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime ===
|
|
670
|
+
if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
|
|
685
671
|
this.calculationElapsedTime = data.calculationElapsedTime as number;
|
|
686
672
|
}
|
|
687
|
-
if (data.operationId !== undefined && typeof data.operationId ===
|
|
673
|
+
if (data.operationId !== undefined && typeof data.operationId === 'string') {
|
|
688
674
|
this.operationId = data.operationId as string;
|
|
689
675
|
}
|
|
690
676
|
}
|
|
@@ -759,36 +745,36 @@ export class BESSLinkedRunnerCalculationResponseSchema {
|
|
|
759
745
|
}).unknown(true);
|
|
760
746
|
|
|
761
747
|
this.propertyTypes = {
|
|
762
|
-
exitMaterial:
|
|
763
|
-
dischargeRecord:
|
|
764
|
-
distancesToJetFireRadiation:
|
|
765
|
-
jetContourPoints:
|
|
766
|
-
nJetContourPoints:
|
|
767
|
-
areaContourJet:
|
|
768
|
-
distancesToFlamConcentration:
|
|
769
|
-
flamConcentrationsUsed:
|
|
770
|
-
flamConcContourPoints:
|
|
771
|
-
nFlamConcContourPoints:
|
|
772
|
-
areaFootprintFlamConc:
|
|
773
|
-
distancesToPoolFireRadiation:
|
|
774
|
-
poolContourPoints:
|
|
775
|
-
nPoolContourPoints:
|
|
776
|
-
areaContourPool:
|
|
777
|
-
explosionOverpressureResults:
|
|
778
|
-
distancesToToxicConcentration:
|
|
779
|
-
toxicConcentrationUsed:
|
|
780
|
-
toxicConcContourPoints:
|
|
781
|
-
nToxicConcContourPoints:
|
|
782
|
-
areaFootprintToxicConc:
|
|
783
|
-
jetFireFlameResult:
|
|
784
|
-
poolFireFlameResult:
|
|
748
|
+
exitMaterial: 'Entities.Material',
|
|
749
|
+
dischargeRecord: 'Entities.DischargeRecord',
|
|
750
|
+
distancesToJetFireRadiation: 'number[]',
|
|
751
|
+
jetContourPoints: 'Entities.LocalPosition[]',
|
|
752
|
+
nJetContourPoints: 'number[]',
|
|
753
|
+
areaContourJet: 'number[]',
|
|
754
|
+
distancesToFlamConcentration: 'number[]',
|
|
755
|
+
flamConcentrationsUsed: 'number[]',
|
|
756
|
+
flamConcContourPoints: 'Entities.LocalPosition[]',
|
|
757
|
+
nFlamConcContourPoints: 'number[]',
|
|
758
|
+
areaFootprintFlamConc: 'number[]',
|
|
759
|
+
distancesToPoolFireRadiation: 'number[]',
|
|
760
|
+
poolContourPoints: 'Entities.LocalPosition[]',
|
|
761
|
+
nPoolContourPoints: 'number[]',
|
|
762
|
+
areaContourPool: 'number[]',
|
|
763
|
+
explosionOverpressureResults: 'Entities.ExplosionOverpressureResult[]',
|
|
764
|
+
distancesToToxicConcentration: 'number[]',
|
|
765
|
+
toxicConcentrationUsed: 'number[]',
|
|
766
|
+
toxicConcContourPoints: 'Entities.LocalPosition[]',
|
|
767
|
+
nToxicConcContourPoints: 'number[]',
|
|
768
|
+
areaFootprintToxicConc: 'number[]',
|
|
769
|
+
jetFireFlameResult: 'Entities.FlameResult',
|
|
770
|
+
poolFireFlameResult: 'Entities.PoolFireFlameResult',
|
|
785
771
|
};
|
|
786
772
|
}
|
|
787
773
|
|
|
788
774
|
validate(data: BESSLinkedRunnerCalculationResponseSchemaData): BESSLinkedRunnerCalculationResponse {
|
|
789
775
|
const { error, value } = this.schema.validate(data, { abortEarly: false });
|
|
790
776
|
if (error) {
|
|
791
|
-
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(
|
|
777
|
+
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
|
|
792
778
|
}
|
|
793
779
|
return this.makeCalculationResponse(value);
|
|
794
780
|
}
|
|
@@ -854,29 +840,29 @@ class UserDefinedSourceLinkedRunCalculationRequest extends CalculationRequestBas
|
|
|
854
840
|
*
|
|
855
841
|
*/
|
|
856
842
|
constructor(data: {
|
|
857
|
-
material: Entities.Material
|
|
858
|
-
dischargeResult: Entities.DischargeResult
|
|
859
|
-
dischargeRecords: Entities.DischargeRecord[]
|
|
860
|
-
dischargeRecordCount: number
|
|
861
|
-
phaseToBeReleased: Enums.Phase
|
|
862
|
-
dischargeParameters: Entities.DischargeParameters
|
|
863
|
-
substrate: Entities.Substrate
|
|
864
|
-
weather: Entities.Weather
|
|
865
|
-
dispersionParameters: Entities.DispersionParameters[]
|
|
866
|
-
dispersionParameterCount: number
|
|
867
|
-
endPointConcentration: number
|
|
868
|
-
flammableParameters: Entities.FlammableParameters
|
|
869
|
-
explosionParameters: Entities.ExplosionParameters
|
|
870
|
-
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[]
|
|
871
|
-
dispersionFlamOutputConfigCount: number
|
|
872
|
-
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[]
|
|
873
|
-
dispersionToxicOutputConfigCount: number
|
|
874
|
-
flammableOutputConfigs: Entities.FlammableOutputConfig[]
|
|
875
|
-
flammableOutputConfigCount: number
|
|
876
|
-
explosionOutputConfigs: Entities.ExplosionOutputConfig[]
|
|
877
|
-
explosionOutputConfigCount: number
|
|
878
|
-
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[]
|
|
879
|
-
explosionConfinedVolumeCount: number
|
|
843
|
+
material: Entities.Material;
|
|
844
|
+
dischargeResult: Entities.DischargeResult;
|
|
845
|
+
dischargeRecords: Entities.DischargeRecord[];
|
|
846
|
+
dischargeRecordCount: number;
|
|
847
|
+
phaseToBeReleased: Enums.Phase;
|
|
848
|
+
dischargeParameters: Entities.DischargeParameters;
|
|
849
|
+
substrate: Entities.Substrate;
|
|
850
|
+
weather: Entities.Weather;
|
|
851
|
+
dispersionParameters: Entities.DispersionParameters[];
|
|
852
|
+
dispersionParameterCount: number;
|
|
853
|
+
endPointConcentration: number;
|
|
854
|
+
flammableParameters: Entities.FlammableParameters;
|
|
855
|
+
explosionParameters: Entities.ExplosionParameters;
|
|
856
|
+
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[];
|
|
857
|
+
dispersionFlamOutputConfigCount: number;
|
|
858
|
+
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[];
|
|
859
|
+
dispersionToxicOutputConfigCount: number;
|
|
860
|
+
flammableOutputConfigs: Entities.FlammableOutputConfig[];
|
|
861
|
+
flammableOutputConfigCount: number;
|
|
862
|
+
explosionOutputConfigs: Entities.ExplosionOutputConfig[];
|
|
863
|
+
explosionOutputConfigCount: number;
|
|
864
|
+
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[];
|
|
865
|
+
explosionConfinedVolumeCount: number;
|
|
880
866
|
}) {
|
|
881
867
|
super();
|
|
882
868
|
this.material = data.material;
|
|
@@ -940,36 +926,36 @@ export class UserDefinedSourceLinkedRunCalculationRequestSchema {
|
|
|
940
926
|
}).unknown(true);
|
|
941
927
|
|
|
942
928
|
this.propertyTypes = {
|
|
943
|
-
material:
|
|
944
|
-
dischargeResult:
|
|
945
|
-
dischargeRecords:
|
|
946
|
-
dischargeRecordCount:
|
|
947
|
-
phaseToBeReleased:
|
|
948
|
-
dischargeParameters:
|
|
949
|
-
substrate:
|
|
950
|
-
weather:
|
|
951
|
-
dispersionParameters:
|
|
952
|
-
dispersionParameterCount:
|
|
953
|
-
endPointConcentration:
|
|
954
|
-
flammableParameters:
|
|
955
|
-
explosionParameters:
|
|
956
|
-
dispersionFlamOutputConfigs:
|
|
957
|
-
dispersionFlamOutputConfigCount:
|
|
958
|
-
dispersionToxicOutputConfigs:
|
|
959
|
-
dispersionToxicOutputConfigCount:
|
|
960
|
-
flammableOutputConfigs:
|
|
961
|
-
flammableOutputConfigCount:
|
|
962
|
-
explosionOutputConfigs:
|
|
963
|
-
explosionOutputConfigCount:
|
|
964
|
-
explosionConfinedVolumes:
|
|
965
|
-
explosionConfinedVolumeCount:
|
|
929
|
+
material: 'Entities.Material',
|
|
930
|
+
dischargeResult: 'Entities.DischargeResult',
|
|
931
|
+
dischargeRecords: 'Entities.DischargeRecord[]',
|
|
932
|
+
dischargeRecordCount: 'number',
|
|
933
|
+
phaseToBeReleased: 'Enums.Phase',
|
|
934
|
+
dischargeParameters: 'Entities.DischargeParameters',
|
|
935
|
+
substrate: 'Entities.Substrate',
|
|
936
|
+
weather: 'Entities.Weather',
|
|
937
|
+
dispersionParameters: 'Entities.DispersionParameters[]',
|
|
938
|
+
dispersionParameterCount: 'number',
|
|
939
|
+
endPointConcentration: 'number',
|
|
940
|
+
flammableParameters: 'Entities.FlammableParameters',
|
|
941
|
+
explosionParameters: 'Entities.ExplosionParameters',
|
|
942
|
+
dispersionFlamOutputConfigs: 'Entities.DispersionOutputConfig[]',
|
|
943
|
+
dispersionFlamOutputConfigCount: 'number',
|
|
944
|
+
dispersionToxicOutputConfigs: 'Entities.DispersionOutputConfig[]',
|
|
945
|
+
dispersionToxicOutputConfigCount: 'number',
|
|
946
|
+
flammableOutputConfigs: 'Entities.FlammableOutputConfig[]',
|
|
947
|
+
flammableOutputConfigCount: 'number',
|
|
948
|
+
explosionOutputConfigs: 'Entities.ExplosionOutputConfig[]',
|
|
949
|
+
explosionOutputConfigCount: 'number',
|
|
950
|
+
explosionConfinedVolumes: 'Entities.ExplosionConfinedVolume[]',
|
|
951
|
+
explosionConfinedVolumeCount: 'number',
|
|
966
952
|
};
|
|
967
953
|
}
|
|
968
954
|
|
|
969
955
|
validate(data: UserDefinedSourceLinkedRunCalculationRequestSchemaData): UserDefinedSourceLinkedRunCalculationRequest {
|
|
970
956
|
const { error, value } = this.schema.validate(data, { abortEarly: false });
|
|
971
957
|
if (error) {
|
|
972
|
-
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(
|
|
958
|
+
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
|
|
973
959
|
}
|
|
974
960
|
return this.makeCalculationRequest(value);
|
|
975
961
|
}
|
|
@@ -1030,29 +1016,29 @@ export class UserDefinedSourceLinkedRunCalculation extends CalculationBase {
|
|
|
1030
1016
|
*
|
|
1031
1017
|
*/
|
|
1032
1018
|
constructor(data: {
|
|
1033
|
-
material: Entities.Material
|
|
1034
|
-
dischargeResult: Entities.DischargeResult
|
|
1035
|
-
dischargeRecords: Entities.DischargeRecord[]
|
|
1036
|
-
dischargeRecordCount: number
|
|
1037
|
-
phaseToBeReleased: Enums.Phase
|
|
1038
|
-
dischargeParameters: Entities.DischargeParameters
|
|
1039
|
-
substrate: Entities.Substrate
|
|
1040
|
-
weather: Entities.Weather
|
|
1041
|
-
dispersionParameters: Entities.DispersionParameters[]
|
|
1042
|
-
dispersionParameterCount: number
|
|
1043
|
-
endPointConcentration: number
|
|
1044
|
-
flammableParameters: Entities.FlammableParameters
|
|
1045
|
-
explosionParameters: Entities.ExplosionParameters
|
|
1046
|
-
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[]
|
|
1047
|
-
dispersionFlamOutputConfigCount: number
|
|
1048
|
-
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[]
|
|
1049
|
-
dispersionToxicOutputConfigCount: number
|
|
1050
|
-
flammableOutputConfigs: Entities.FlammableOutputConfig[]
|
|
1051
|
-
flammableOutputConfigCount: number
|
|
1052
|
-
explosionOutputConfigs: Entities.ExplosionOutputConfig[]
|
|
1053
|
-
explosionOutputConfigCount: number
|
|
1054
|
-
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[]
|
|
1055
|
-
explosionConfinedVolumeCount: number
|
|
1019
|
+
material: Entities.Material;
|
|
1020
|
+
dischargeResult: Entities.DischargeResult;
|
|
1021
|
+
dischargeRecords: Entities.DischargeRecord[];
|
|
1022
|
+
dischargeRecordCount: number;
|
|
1023
|
+
phaseToBeReleased: Enums.Phase;
|
|
1024
|
+
dischargeParameters: Entities.DischargeParameters;
|
|
1025
|
+
substrate: Entities.Substrate;
|
|
1026
|
+
weather: Entities.Weather;
|
|
1027
|
+
dispersionParameters: Entities.DispersionParameters[];
|
|
1028
|
+
dispersionParameterCount: number;
|
|
1029
|
+
endPointConcentration: number;
|
|
1030
|
+
flammableParameters: Entities.FlammableParameters;
|
|
1031
|
+
explosionParameters: Entities.ExplosionParameters;
|
|
1032
|
+
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[];
|
|
1033
|
+
dispersionFlamOutputConfigCount: number;
|
|
1034
|
+
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[];
|
|
1035
|
+
dispersionToxicOutputConfigCount: number;
|
|
1036
|
+
flammableOutputConfigs: Entities.FlammableOutputConfig[];
|
|
1037
|
+
flammableOutputConfigCount: number;
|
|
1038
|
+
explosionOutputConfigs: Entities.ExplosionOutputConfig[];
|
|
1039
|
+
explosionOutputConfigCount: number;
|
|
1040
|
+
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[];
|
|
1041
|
+
explosionConfinedVolumeCount: number;
|
|
1056
1042
|
controller?: AbortController;
|
|
1057
1043
|
}) {
|
|
1058
1044
|
super(data.controller);
|
|
@@ -1106,7 +1092,7 @@ export class UserDefinedSourceLinkedRunCalculation extends CalculationBase {
|
|
|
1106
1092
|
explosionOutputConfigs: this.explosionOutputConfigs,
|
|
1107
1093
|
explosionOutputConfigCount: this.explosionOutputConfigCount,
|
|
1108
1094
|
explosionConfinedVolumes: this.explosionConfinedVolumes,
|
|
1109
|
-
explosionConfinedVolumeCount: this.explosionConfinedVolumeCount
|
|
1095
|
+
explosionConfinedVolumeCount: this.explosionConfinedVolumeCount,
|
|
1110
1096
|
});
|
|
1111
1097
|
|
|
1112
1098
|
const schema = new UserDefinedSourceLinkedRunCalculationRequestSchema();
|
|
@@ -1167,131 +1153,127 @@ export class UserDefinedSourceLinkedRunCalculation extends CalculationBase {
|
|
|
1167
1153
|
}
|
|
1168
1154
|
|
|
1169
1155
|
toString() {
|
|
1170
|
-
const parts = [
|
|
1156
|
+
const parts = ['* UserDefinedSourceLinkedRun'];
|
|
1171
1157
|
|
|
1172
|
-
parts.push(
|
|
1158
|
+
parts.push('*** distancesToJetFireRadiation:');
|
|
1173
1159
|
parts.push(
|
|
1174
1160
|
this.distancesToJetFireRadiation && this.distancesToJetFireRadiation.length > 0
|
|
1175
|
-
? this.distancesToJetFireRadiation.map((point) => `distancesToJetFireRadiationElement: ${point}`).join(
|
|
1176
|
-
:
|
|
1161
|
+
? this.distancesToJetFireRadiation.map((point) => `distancesToJetFireRadiationElement: ${point}`).join('\n')
|
|
1162
|
+
: 'distancesToJetFireRadiation does not contain any elements',
|
|
1177
1163
|
);
|
|
1178
|
-
parts.push(
|
|
1164
|
+
parts.push('*** jetContourPoints:');
|
|
1179
1165
|
parts.push(
|
|
1180
1166
|
this.jetContourPoints && this.jetContourPoints.length > 0
|
|
1181
|
-
? this.jetContourPoints.map((point) => `jetContourPointsElement: ${point}`).join(
|
|
1182
|
-
:
|
|
1167
|
+
? this.jetContourPoints.map((point) => `jetContourPointsElement: ${point}`).join('\n')
|
|
1168
|
+
: 'jetContourPoints does not contain any elements',
|
|
1183
1169
|
);
|
|
1184
|
-
parts.push(
|
|
1170
|
+
parts.push('*** nJetContourPoints:');
|
|
1185
1171
|
parts.push(
|
|
1186
1172
|
this.nJetContourPoints && this.nJetContourPoints.length > 0
|
|
1187
|
-
? this.nJetContourPoints.map((point) => `nJetContourPointsElement: ${point}`).join(
|
|
1188
|
-
:
|
|
1173
|
+
? this.nJetContourPoints.map((point) => `nJetContourPointsElement: ${point}`).join('\n')
|
|
1174
|
+
: 'nJetContourPoints does not contain any elements',
|
|
1189
1175
|
);
|
|
1190
|
-
parts.push(
|
|
1176
|
+
parts.push('*** areaContourJet:');
|
|
1191
1177
|
parts.push(
|
|
1192
|
-
this.areaContourJet && this.areaContourJet.length > 0
|
|
1193
|
-
? this.areaContourJet.map((point) => `areaContourJetElement: ${point}`).join("\n")
|
|
1194
|
-
: "areaContourJet does not contain any elements"
|
|
1178
|
+
this.areaContourJet && this.areaContourJet.length > 0 ? this.areaContourJet.map((point) => `areaContourJetElement: ${point}`).join('\n') : 'areaContourJet does not contain any elements',
|
|
1195
1179
|
);
|
|
1196
|
-
parts.push(
|
|
1180
|
+
parts.push('*** distancesToFlamConcentration:');
|
|
1197
1181
|
parts.push(
|
|
1198
1182
|
this.distancesToFlamConcentration && this.distancesToFlamConcentration.length > 0
|
|
1199
|
-
? this.distancesToFlamConcentration.map((point) => `distancesToFlamConcentrationElement: ${point}`).join(
|
|
1200
|
-
:
|
|
1183
|
+
? this.distancesToFlamConcentration.map((point) => `distancesToFlamConcentrationElement: ${point}`).join('\n')
|
|
1184
|
+
: 'distancesToFlamConcentration does not contain any elements',
|
|
1201
1185
|
);
|
|
1202
|
-
parts.push(
|
|
1186
|
+
parts.push('*** flamConcentrationsUsed:');
|
|
1203
1187
|
parts.push(
|
|
1204
1188
|
this.flamConcentrationsUsed && this.flamConcentrationsUsed.length > 0
|
|
1205
|
-
? this.flamConcentrationsUsed.map((point) => `flamConcentrationsUsedElement: ${point}`).join(
|
|
1206
|
-
:
|
|
1189
|
+
? this.flamConcentrationsUsed.map((point) => `flamConcentrationsUsedElement: ${point}`).join('\n')
|
|
1190
|
+
: 'flamConcentrationsUsed does not contain any elements',
|
|
1207
1191
|
);
|
|
1208
|
-
parts.push(
|
|
1192
|
+
parts.push('*** flamConcContourPoints:');
|
|
1209
1193
|
parts.push(
|
|
1210
1194
|
this.flamConcContourPoints && this.flamConcContourPoints.length > 0
|
|
1211
|
-
? this.flamConcContourPoints.map((point) => `flamConcContourPointsElement: ${point}`).join(
|
|
1212
|
-
:
|
|
1195
|
+
? this.flamConcContourPoints.map((point) => `flamConcContourPointsElement: ${point}`).join('\n')
|
|
1196
|
+
: 'flamConcContourPoints does not contain any elements',
|
|
1213
1197
|
);
|
|
1214
|
-
parts.push(
|
|
1198
|
+
parts.push('*** nFlamConcContourPoints:');
|
|
1215
1199
|
parts.push(
|
|
1216
1200
|
this.nFlamConcContourPoints && this.nFlamConcContourPoints.length > 0
|
|
1217
|
-
? this.nFlamConcContourPoints.map((point) => `nFlamConcContourPointsElement: ${point}`).join(
|
|
1218
|
-
:
|
|
1201
|
+
? this.nFlamConcContourPoints.map((point) => `nFlamConcContourPointsElement: ${point}`).join('\n')
|
|
1202
|
+
: 'nFlamConcContourPoints does not contain any elements',
|
|
1219
1203
|
);
|
|
1220
|
-
parts.push(
|
|
1204
|
+
parts.push('*** areaFootprintFlamConc:');
|
|
1221
1205
|
parts.push(
|
|
1222
1206
|
this.areaFootprintFlamConc && this.areaFootprintFlamConc.length > 0
|
|
1223
|
-
? this.areaFootprintFlamConc.map((point) => `areaFootprintFlamConcElement: ${point}`).join(
|
|
1224
|
-
:
|
|
1207
|
+
? this.areaFootprintFlamConc.map((point) => `areaFootprintFlamConcElement: ${point}`).join('\n')
|
|
1208
|
+
: 'areaFootprintFlamConc does not contain any elements',
|
|
1225
1209
|
);
|
|
1226
|
-
parts.push(
|
|
1210
|
+
parts.push('*** distancesToPoolFireRadiation:');
|
|
1227
1211
|
parts.push(
|
|
1228
1212
|
this.distancesToPoolFireRadiation && this.distancesToPoolFireRadiation.length > 0
|
|
1229
|
-
? this.distancesToPoolFireRadiation.map((point) => `distancesToPoolFireRadiationElement: ${point}`).join(
|
|
1230
|
-
:
|
|
1213
|
+
? this.distancesToPoolFireRadiation.map((point) => `distancesToPoolFireRadiationElement: ${point}`).join('\n')
|
|
1214
|
+
: 'distancesToPoolFireRadiation does not contain any elements',
|
|
1231
1215
|
);
|
|
1232
|
-
parts.push(
|
|
1216
|
+
parts.push('*** poolContourPoints:');
|
|
1233
1217
|
parts.push(
|
|
1234
1218
|
this.poolContourPoints && this.poolContourPoints.length > 0
|
|
1235
|
-
? this.poolContourPoints.map((point) => `poolContourPointsElement: ${point}`).join(
|
|
1236
|
-
:
|
|
1219
|
+
? this.poolContourPoints.map((point) => `poolContourPointsElement: ${point}`).join('\n')
|
|
1220
|
+
: 'poolContourPoints does not contain any elements',
|
|
1237
1221
|
);
|
|
1238
|
-
parts.push(
|
|
1222
|
+
parts.push('*** nPoolContourPoints:');
|
|
1239
1223
|
parts.push(
|
|
1240
1224
|
this.nPoolContourPoints && this.nPoolContourPoints.length > 0
|
|
1241
|
-
? this.nPoolContourPoints.map((point) => `nPoolContourPointsElement: ${point}`).join(
|
|
1242
|
-
:
|
|
1225
|
+
? this.nPoolContourPoints.map((point) => `nPoolContourPointsElement: ${point}`).join('\n')
|
|
1226
|
+
: 'nPoolContourPoints does not contain any elements',
|
|
1243
1227
|
);
|
|
1244
|
-
parts.push(
|
|
1228
|
+
parts.push('*** areaContourPool:');
|
|
1245
1229
|
parts.push(
|
|
1246
|
-
this.areaContourPool && this.areaContourPool.length > 0
|
|
1247
|
-
? this.areaContourPool.map((point) => `areaContourPoolElement: ${point}`).join("\n")
|
|
1248
|
-
: "areaContourPool does not contain any elements"
|
|
1230
|
+
this.areaContourPool && this.areaContourPool.length > 0 ? this.areaContourPool.map((point) => `areaContourPoolElement: ${point}`).join('\n') : 'areaContourPool does not contain any elements',
|
|
1249
1231
|
);
|
|
1250
|
-
parts.push(
|
|
1232
|
+
parts.push('*** explosionOverpressureResults:');
|
|
1251
1233
|
parts.push(
|
|
1252
1234
|
this.explosionOverpressureResults && this.explosionOverpressureResults.length > 0
|
|
1253
|
-
? this.explosionOverpressureResults.map((point) => `explosionOverpressureResultsElement: ${point}`).join(
|
|
1254
|
-
:
|
|
1235
|
+
? this.explosionOverpressureResults.map((point) => `explosionOverpressureResultsElement: ${point}`).join('\n')
|
|
1236
|
+
: 'explosionOverpressureResults does not contain any elements',
|
|
1255
1237
|
);
|
|
1256
|
-
parts.push(
|
|
1238
|
+
parts.push('*** distancesToToxicConcentration:');
|
|
1257
1239
|
parts.push(
|
|
1258
1240
|
this.distancesToToxicConcentration && this.distancesToToxicConcentration.length > 0
|
|
1259
|
-
? this.distancesToToxicConcentration.map((point) => `distancesToToxicConcentrationElement: ${point}`).join(
|
|
1260
|
-
:
|
|
1241
|
+
? this.distancesToToxicConcentration.map((point) => `distancesToToxicConcentrationElement: ${point}`).join('\n')
|
|
1242
|
+
: 'distancesToToxicConcentration does not contain any elements',
|
|
1261
1243
|
);
|
|
1262
|
-
parts.push(
|
|
1244
|
+
parts.push('*** toxicConcentrationUsed:');
|
|
1263
1245
|
parts.push(
|
|
1264
1246
|
this.toxicConcentrationUsed && this.toxicConcentrationUsed.length > 0
|
|
1265
|
-
? this.toxicConcentrationUsed.map((point) => `toxicConcentrationUsedElement: ${point}`).join(
|
|
1266
|
-
:
|
|
1247
|
+
? this.toxicConcentrationUsed.map((point) => `toxicConcentrationUsedElement: ${point}`).join('\n')
|
|
1248
|
+
: 'toxicConcentrationUsed does not contain any elements',
|
|
1267
1249
|
);
|
|
1268
|
-
parts.push(
|
|
1250
|
+
parts.push('*** toxicConcContourPoints:');
|
|
1269
1251
|
parts.push(
|
|
1270
1252
|
this.toxicConcContourPoints && this.toxicConcContourPoints.length > 0
|
|
1271
|
-
? this.toxicConcContourPoints.map((point) => `toxicConcContourPointsElement: ${point}`).join(
|
|
1272
|
-
:
|
|
1253
|
+
? this.toxicConcContourPoints.map((point) => `toxicConcContourPointsElement: ${point}`).join('\n')
|
|
1254
|
+
: 'toxicConcContourPoints does not contain any elements',
|
|
1273
1255
|
);
|
|
1274
|
-
parts.push(
|
|
1256
|
+
parts.push('*** nToxicConcContourPoints:');
|
|
1275
1257
|
parts.push(
|
|
1276
1258
|
this.nToxicConcContourPoints && this.nToxicConcContourPoints.length > 0
|
|
1277
|
-
? this.nToxicConcContourPoints.map((point) => `nToxicConcContourPointsElement: ${point}`).join(
|
|
1278
|
-
:
|
|
1259
|
+
? this.nToxicConcContourPoints.map((point) => `nToxicConcContourPointsElement: ${point}`).join('\n')
|
|
1260
|
+
: 'nToxicConcContourPoints does not contain any elements',
|
|
1279
1261
|
);
|
|
1280
|
-
parts.push(
|
|
1262
|
+
parts.push('*** areaFootprintToxicConc:');
|
|
1281
1263
|
parts.push(
|
|
1282
1264
|
this.areaFootprintToxicConc && this.areaFootprintToxicConc.length > 0
|
|
1283
|
-
? this.areaFootprintToxicConc.map((point) => `areaFootprintToxicConcElement: ${point}`).join(
|
|
1284
|
-
:
|
|
1265
|
+
? this.areaFootprintToxicConc.map((point) => `areaFootprintToxicConcElement: ${point}`).join('\n')
|
|
1266
|
+
: 'areaFootprintToxicConc does not contain any elements',
|
|
1285
1267
|
);
|
|
1286
1268
|
parts.push(`jetFireFlameResult: ${String(this.jetFireFlameResult)}`);
|
|
1287
1269
|
parts.push(`poolFireFlameResult: ${String(this.poolFireFlameResult)}`);
|
|
1288
1270
|
parts.push(`resultCode: ${String(this.resultCode)}`);
|
|
1289
|
-
parts.push(
|
|
1290
|
-
parts.push(`messages: ${this.messages !== undefined ? this.messages :
|
|
1291
|
-
parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime :
|
|
1292
|
-
parts.push(`operationId: ${this.operationId !== undefined ? this.operationId :
|
|
1271
|
+
parts.push('*** messages:');
|
|
1272
|
+
parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
|
|
1273
|
+
parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
|
|
1274
|
+
parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
|
|
1293
1275
|
|
|
1294
|
-
return parts.join(
|
|
1276
|
+
return parts.join('\n');
|
|
1295
1277
|
}
|
|
1296
1278
|
}
|
|
1297
1279
|
|
|
@@ -1323,31 +1305,31 @@ export class UserDefinedSourceLinkedRunCalculationResponse extends CalculationRe
|
|
|
1323
1305
|
*
|
|
1324
1306
|
*/
|
|
1325
1307
|
constructor(data: {
|
|
1326
|
-
distancesToJetFireRadiation: number[]
|
|
1327
|
-
jetContourPoints: Entities.LocalPosition[]
|
|
1328
|
-
nJetContourPoints: number[]
|
|
1329
|
-
areaContourJet: number[]
|
|
1330
|
-
distancesToFlamConcentration: number[]
|
|
1331
|
-
flamConcentrationsUsed: number[]
|
|
1332
|
-
flamConcContourPoints: Entities.LocalPosition[]
|
|
1333
|
-
nFlamConcContourPoints: number[]
|
|
1334
|
-
areaFootprintFlamConc: number[]
|
|
1335
|
-
distancesToPoolFireRadiation: number[]
|
|
1336
|
-
poolContourPoints: Entities.LocalPosition[]
|
|
1337
|
-
nPoolContourPoints: number[]
|
|
1338
|
-
areaContourPool: number[]
|
|
1339
|
-
explosionOverpressureResults: Entities.ExplosionOverpressureResult[]
|
|
1340
|
-
distancesToToxicConcentration: number[]
|
|
1341
|
-
toxicConcentrationUsed: number[]
|
|
1342
|
-
toxicConcContourPoints: Entities.LocalPosition[]
|
|
1343
|
-
nToxicConcContourPoints: number[]
|
|
1344
|
-
areaFootprintToxicConc: number[]
|
|
1345
|
-
jetFireFlameResult: Entities.FlameResult
|
|
1346
|
-
poolFireFlameResult: Entities.PoolFireFlameResult
|
|
1347
|
-
resultCode: Enums.ResultCode
|
|
1348
|
-
messages: string[]
|
|
1349
|
-
calculationElapsedTime: number
|
|
1350
|
-
operationId: string
|
|
1308
|
+
distancesToJetFireRadiation: number[];
|
|
1309
|
+
jetContourPoints: Entities.LocalPosition[];
|
|
1310
|
+
nJetContourPoints: number[];
|
|
1311
|
+
areaContourJet: number[];
|
|
1312
|
+
distancesToFlamConcentration: number[];
|
|
1313
|
+
flamConcentrationsUsed: number[];
|
|
1314
|
+
flamConcContourPoints: Entities.LocalPosition[];
|
|
1315
|
+
nFlamConcContourPoints: number[];
|
|
1316
|
+
areaFootprintFlamConc: number[];
|
|
1317
|
+
distancesToPoolFireRadiation: number[];
|
|
1318
|
+
poolContourPoints: Entities.LocalPosition[];
|
|
1319
|
+
nPoolContourPoints: number[];
|
|
1320
|
+
areaContourPool: number[];
|
|
1321
|
+
explosionOverpressureResults: Entities.ExplosionOverpressureResult[];
|
|
1322
|
+
distancesToToxicConcentration: number[];
|
|
1323
|
+
toxicConcentrationUsed: number[];
|
|
1324
|
+
toxicConcContourPoints: Entities.LocalPosition[];
|
|
1325
|
+
nToxicConcContourPoints: number[];
|
|
1326
|
+
areaFootprintToxicConc: number[];
|
|
1327
|
+
jetFireFlameResult: Entities.FlameResult;
|
|
1328
|
+
poolFireFlameResult: Entities.PoolFireFlameResult;
|
|
1329
|
+
resultCode: Enums.ResultCode;
|
|
1330
|
+
messages: string[];
|
|
1331
|
+
calculationElapsedTime: number;
|
|
1332
|
+
operationId: string;
|
|
1351
1333
|
}) {
|
|
1352
1334
|
super();
|
|
1353
1335
|
this.distancesToJetFireRadiation = data.distancesToJetFireRadiation;
|
|
@@ -1382,13 +1364,11 @@ export class UserDefinedSourceLinkedRunCalculationResponse extends CalculationRe
|
|
|
1382
1364
|
this.distancesToJetFireRadiation = data.distancesToJetFireRadiation.map((item) => parseFloat(item));
|
|
1383
1365
|
}
|
|
1384
1366
|
if (data.jetContourPoints && Array.isArray(data.jetContourPoints)) {
|
|
1385
|
-
this.jetContourPoints = data.jetContourPoints.map(
|
|
1386
|
-
(
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
}
|
|
1391
|
-
);
|
|
1367
|
+
this.jetContourPoints = data.jetContourPoints.map((item) => {
|
|
1368
|
+
const record = new Entities.LocalPosition();
|
|
1369
|
+
record.initialiseFromDictionary(item);
|
|
1370
|
+
return record;
|
|
1371
|
+
});
|
|
1392
1372
|
}
|
|
1393
1373
|
if (data.nJetContourPoints && Array.isArray(data.nJetContourPoints)) {
|
|
1394
1374
|
this.nJetContourPoints = data.nJetContourPoints.map((item) => parseInt(item));
|
|
@@ -1403,13 +1383,11 @@ export class UserDefinedSourceLinkedRunCalculationResponse extends CalculationRe
|
|
|
1403
1383
|
this.flamConcentrationsUsed = data.flamConcentrationsUsed.map((item) => parseFloat(item));
|
|
1404
1384
|
}
|
|
1405
1385
|
if (data.flamConcContourPoints && Array.isArray(data.flamConcContourPoints)) {
|
|
1406
|
-
this.flamConcContourPoints = data.flamConcContourPoints.map(
|
|
1407
|
-
(
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
}
|
|
1412
|
-
);
|
|
1386
|
+
this.flamConcContourPoints = data.flamConcContourPoints.map((item) => {
|
|
1387
|
+
const record = new Entities.LocalPosition();
|
|
1388
|
+
record.initialiseFromDictionary(item);
|
|
1389
|
+
return record;
|
|
1390
|
+
});
|
|
1413
1391
|
}
|
|
1414
1392
|
if (data.nFlamConcContourPoints && Array.isArray(data.nFlamConcContourPoints)) {
|
|
1415
1393
|
this.nFlamConcContourPoints = data.nFlamConcContourPoints.map((item) => parseInt(item));
|
|
@@ -1421,13 +1399,11 @@ export class UserDefinedSourceLinkedRunCalculationResponse extends CalculationRe
|
|
|
1421
1399
|
this.distancesToPoolFireRadiation = data.distancesToPoolFireRadiation.map((item) => parseFloat(item));
|
|
1422
1400
|
}
|
|
1423
1401
|
if (data.poolContourPoints && Array.isArray(data.poolContourPoints)) {
|
|
1424
|
-
this.poolContourPoints = data.poolContourPoints.map(
|
|
1425
|
-
(
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
}
|
|
1430
|
-
);
|
|
1402
|
+
this.poolContourPoints = data.poolContourPoints.map((item) => {
|
|
1403
|
+
const record = new Entities.LocalPosition();
|
|
1404
|
+
record.initialiseFromDictionary(item);
|
|
1405
|
+
return record;
|
|
1406
|
+
});
|
|
1431
1407
|
}
|
|
1432
1408
|
if (data.nPoolContourPoints && Array.isArray(data.nPoolContourPoints)) {
|
|
1433
1409
|
this.nPoolContourPoints = data.nPoolContourPoints.map((item) => parseInt(item));
|
|
@@ -1436,13 +1412,11 @@ export class UserDefinedSourceLinkedRunCalculationResponse extends CalculationRe
|
|
|
1436
1412
|
this.areaContourPool = data.areaContourPool.map((item) => parseFloat(item));
|
|
1437
1413
|
}
|
|
1438
1414
|
if (data.explosionOverpressureResults && Array.isArray(data.explosionOverpressureResults)) {
|
|
1439
|
-
this.explosionOverpressureResults = data.explosionOverpressureResults.map(
|
|
1440
|
-
(
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
}
|
|
1445
|
-
);
|
|
1415
|
+
this.explosionOverpressureResults = data.explosionOverpressureResults.map((item) => {
|
|
1416
|
+
const record = new Entities.ExplosionOverpressureResult();
|
|
1417
|
+
record.initialiseFromDictionary(item);
|
|
1418
|
+
return record;
|
|
1419
|
+
});
|
|
1446
1420
|
}
|
|
1447
1421
|
if (data.distancesToToxicConcentration && Array.isArray(data.distancesToToxicConcentration)) {
|
|
1448
1422
|
this.distancesToToxicConcentration = data.distancesToToxicConcentration.map((item) => parseFloat(item));
|
|
@@ -1451,13 +1425,11 @@ export class UserDefinedSourceLinkedRunCalculationResponse extends CalculationRe
|
|
|
1451
1425
|
this.toxicConcentrationUsed = data.toxicConcentrationUsed.map((item) => parseFloat(item));
|
|
1452
1426
|
}
|
|
1453
1427
|
if (data.toxicConcContourPoints && Array.isArray(data.toxicConcContourPoints)) {
|
|
1454
|
-
this.toxicConcContourPoints = data.toxicConcContourPoints.map(
|
|
1455
|
-
(
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
}
|
|
1460
|
-
);
|
|
1428
|
+
this.toxicConcContourPoints = data.toxicConcContourPoints.map((item) => {
|
|
1429
|
+
const record = new Entities.LocalPosition();
|
|
1430
|
+
record.initialiseFromDictionary(item);
|
|
1431
|
+
return record;
|
|
1432
|
+
});
|
|
1461
1433
|
}
|
|
1462
1434
|
if (data.nToxicConcContourPoints && Array.isArray(data.nToxicConcContourPoints)) {
|
|
1463
1435
|
this.nToxicConcContourPoints = data.nToxicConcContourPoints.map((item) => parseInt(item));
|
|
@@ -1473,17 +1445,17 @@ export class UserDefinedSourceLinkedRunCalculationResponse extends CalculationRe
|
|
|
1473
1445
|
this.poolFireFlameResult = new Entities.PoolFireFlameResult();
|
|
1474
1446
|
this.poolFireFlameResult.initialiseFromDictionary(data.poolFireFlameResult as { [key: string]: unknown });
|
|
1475
1447
|
}
|
|
1476
|
-
if (data.resultCode !== undefined && (typeof data.resultCode ===
|
|
1448
|
+
if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
|
|
1477
1449
|
this.resultCode = data.resultCode as Enums.ResultCode;
|
|
1478
1450
|
}
|
|
1479
1451
|
this.messages = this.messages ?? [];
|
|
1480
1452
|
if (data.messages && Array.isArray(data.messages)) {
|
|
1481
1453
|
this.messages.push(...data.messages);
|
|
1482
1454
|
}
|
|
1483
|
-
if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime ===
|
|
1455
|
+
if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
|
|
1484
1456
|
this.calculationElapsedTime = data.calculationElapsedTime as number;
|
|
1485
1457
|
}
|
|
1486
|
-
if (data.operationId !== undefined && typeof data.operationId ===
|
|
1458
|
+
if (data.operationId !== undefined && typeof data.operationId === 'string') {
|
|
1487
1459
|
this.operationId = data.operationId as string;
|
|
1488
1460
|
}
|
|
1489
1461
|
}
|
|
@@ -1554,34 +1526,34 @@ export class UserDefinedSourceLinkedRunCalculationResponseSchema {
|
|
|
1554
1526
|
}).unknown(true);
|
|
1555
1527
|
|
|
1556
1528
|
this.propertyTypes = {
|
|
1557
|
-
distancesToJetFireRadiation:
|
|
1558
|
-
jetContourPoints:
|
|
1559
|
-
nJetContourPoints:
|
|
1560
|
-
areaContourJet:
|
|
1561
|
-
distancesToFlamConcentration:
|
|
1562
|
-
flamConcentrationsUsed:
|
|
1563
|
-
flamConcContourPoints:
|
|
1564
|
-
nFlamConcContourPoints:
|
|
1565
|
-
areaFootprintFlamConc:
|
|
1566
|
-
distancesToPoolFireRadiation:
|
|
1567
|
-
poolContourPoints:
|
|
1568
|
-
nPoolContourPoints:
|
|
1569
|
-
areaContourPool:
|
|
1570
|
-
explosionOverpressureResults:
|
|
1571
|
-
distancesToToxicConcentration:
|
|
1572
|
-
toxicConcentrationUsed:
|
|
1573
|
-
toxicConcContourPoints:
|
|
1574
|
-
nToxicConcContourPoints:
|
|
1575
|
-
areaFootprintToxicConc:
|
|
1576
|
-
jetFireFlameResult:
|
|
1577
|
-
poolFireFlameResult:
|
|
1529
|
+
distancesToJetFireRadiation: 'number[]',
|
|
1530
|
+
jetContourPoints: 'Entities.LocalPosition[]',
|
|
1531
|
+
nJetContourPoints: 'number[]',
|
|
1532
|
+
areaContourJet: 'number[]',
|
|
1533
|
+
distancesToFlamConcentration: 'number[]',
|
|
1534
|
+
flamConcentrationsUsed: 'number[]',
|
|
1535
|
+
flamConcContourPoints: 'Entities.LocalPosition[]',
|
|
1536
|
+
nFlamConcContourPoints: 'number[]',
|
|
1537
|
+
areaFootprintFlamConc: 'number[]',
|
|
1538
|
+
distancesToPoolFireRadiation: 'number[]',
|
|
1539
|
+
poolContourPoints: 'Entities.LocalPosition[]',
|
|
1540
|
+
nPoolContourPoints: 'number[]',
|
|
1541
|
+
areaContourPool: 'number[]',
|
|
1542
|
+
explosionOverpressureResults: 'Entities.ExplosionOverpressureResult[]',
|
|
1543
|
+
distancesToToxicConcentration: 'number[]',
|
|
1544
|
+
toxicConcentrationUsed: 'number[]',
|
|
1545
|
+
toxicConcContourPoints: 'Entities.LocalPosition[]',
|
|
1546
|
+
nToxicConcContourPoints: 'number[]',
|
|
1547
|
+
areaFootprintToxicConc: 'number[]',
|
|
1548
|
+
jetFireFlameResult: 'Entities.FlameResult',
|
|
1549
|
+
poolFireFlameResult: 'Entities.PoolFireFlameResult',
|
|
1578
1550
|
};
|
|
1579
1551
|
}
|
|
1580
1552
|
|
|
1581
1553
|
validate(data: UserDefinedSourceLinkedRunCalculationResponseSchemaData): UserDefinedSourceLinkedRunCalculationResponse {
|
|
1582
1554
|
const { error, value } = this.schema.validate(data, { abortEarly: false });
|
|
1583
1555
|
if (error) {
|
|
1584
|
-
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(
|
|
1556
|
+
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
|
|
1585
1557
|
}
|
|
1586
1558
|
return this.makeCalculationResponse(value);
|
|
1587
1559
|
}
|
|
@@ -1641,26 +1613,26 @@ class VesselLeakLinkedRunCalculationRequest extends CalculationRequestBase {
|
|
|
1641
1613
|
*
|
|
1642
1614
|
*/
|
|
1643
1615
|
constructor(data: {
|
|
1644
|
-
vessel: Entities.Vessel
|
|
1645
|
-
leak: Entities.Leak
|
|
1646
|
-
dischargeParameters: Entities.DischargeParameters
|
|
1647
|
-
substrate: Entities.Substrate
|
|
1648
|
-
weather: Entities.Weather
|
|
1649
|
-
dispersionParameters: Entities.DispersionParameters[]
|
|
1650
|
-
dispersionParameterCount: number
|
|
1651
|
-
endPointConcentration: number
|
|
1652
|
-
flammableParameters: Entities.FlammableParameters
|
|
1653
|
-
explosionParameters: Entities.ExplosionParameters
|
|
1654
|
-
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[]
|
|
1655
|
-
dispersionFlamOutputConfigCount: number
|
|
1656
|
-
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[]
|
|
1657
|
-
dispersionToxicOutputConfigCount: number
|
|
1658
|
-
flammableOutputConfigs: Entities.FlammableOutputConfig[]
|
|
1659
|
-
flammableOutputConfigCount: number
|
|
1660
|
-
explosionOutputConfigs: Entities.ExplosionOutputConfig[]
|
|
1661
|
-
explosionOutputConfigCount: number
|
|
1662
|
-
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[]
|
|
1663
|
-
explosionConfinedVolumeCount: number
|
|
1616
|
+
vessel: Entities.Vessel;
|
|
1617
|
+
leak: Entities.Leak;
|
|
1618
|
+
dischargeParameters: Entities.DischargeParameters;
|
|
1619
|
+
substrate: Entities.Substrate;
|
|
1620
|
+
weather: Entities.Weather;
|
|
1621
|
+
dispersionParameters: Entities.DispersionParameters[];
|
|
1622
|
+
dispersionParameterCount: number;
|
|
1623
|
+
endPointConcentration: number;
|
|
1624
|
+
flammableParameters: Entities.FlammableParameters;
|
|
1625
|
+
explosionParameters: Entities.ExplosionParameters;
|
|
1626
|
+
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[];
|
|
1627
|
+
dispersionFlamOutputConfigCount: number;
|
|
1628
|
+
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[];
|
|
1629
|
+
dispersionToxicOutputConfigCount: number;
|
|
1630
|
+
flammableOutputConfigs: Entities.FlammableOutputConfig[];
|
|
1631
|
+
flammableOutputConfigCount: number;
|
|
1632
|
+
explosionOutputConfigs: Entities.ExplosionOutputConfig[];
|
|
1633
|
+
explosionOutputConfigCount: number;
|
|
1634
|
+
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[];
|
|
1635
|
+
explosionConfinedVolumeCount: number;
|
|
1664
1636
|
}) {
|
|
1665
1637
|
super();
|
|
1666
1638
|
this.vessel = data.vessel;
|
|
@@ -1718,33 +1690,33 @@ export class VesselLeakLinkedRunCalculationRequestSchema {
|
|
|
1718
1690
|
}).unknown(true);
|
|
1719
1691
|
|
|
1720
1692
|
this.propertyTypes = {
|
|
1721
|
-
vessel:
|
|
1722
|
-
leak:
|
|
1723
|
-
dischargeParameters:
|
|
1724
|
-
substrate:
|
|
1725
|
-
weather:
|
|
1726
|
-
dispersionParameters:
|
|
1727
|
-
dispersionParameterCount:
|
|
1728
|
-
endPointConcentration:
|
|
1729
|
-
flammableParameters:
|
|
1730
|
-
explosionParameters:
|
|
1731
|
-
dispersionFlamOutputConfigs:
|
|
1732
|
-
dispersionFlamOutputConfigCount:
|
|
1733
|
-
dispersionToxicOutputConfigs:
|
|
1734
|
-
dispersionToxicOutputConfigCount:
|
|
1735
|
-
flammableOutputConfigs:
|
|
1736
|
-
flammableOutputConfigCount:
|
|
1737
|
-
explosionOutputConfigs:
|
|
1738
|
-
explosionOutputConfigCount:
|
|
1739
|
-
explosionConfinedVolumes:
|
|
1740
|
-
explosionConfinedVolumeCount:
|
|
1693
|
+
vessel: 'Entities.Vessel',
|
|
1694
|
+
leak: 'Entities.Leak',
|
|
1695
|
+
dischargeParameters: 'Entities.DischargeParameters',
|
|
1696
|
+
substrate: 'Entities.Substrate',
|
|
1697
|
+
weather: 'Entities.Weather',
|
|
1698
|
+
dispersionParameters: 'Entities.DispersionParameters[]',
|
|
1699
|
+
dispersionParameterCount: 'number',
|
|
1700
|
+
endPointConcentration: 'number',
|
|
1701
|
+
flammableParameters: 'Entities.FlammableParameters',
|
|
1702
|
+
explosionParameters: 'Entities.ExplosionParameters',
|
|
1703
|
+
dispersionFlamOutputConfigs: 'Entities.DispersionOutputConfig[]',
|
|
1704
|
+
dispersionFlamOutputConfigCount: 'number',
|
|
1705
|
+
dispersionToxicOutputConfigs: 'Entities.DispersionOutputConfig[]',
|
|
1706
|
+
dispersionToxicOutputConfigCount: 'number',
|
|
1707
|
+
flammableOutputConfigs: 'Entities.FlammableOutputConfig[]',
|
|
1708
|
+
flammableOutputConfigCount: 'number',
|
|
1709
|
+
explosionOutputConfigs: 'Entities.ExplosionOutputConfig[]',
|
|
1710
|
+
explosionOutputConfigCount: 'number',
|
|
1711
|
+
explosionConfinedVolumes: 'Entities.ExplosionConfinedVolume[]',
|
|
1712
|
+
explosionConfinedVolumeCount: 'number',
|
|
1741
1713
|
};
|
|
1742
1714
|
}
|
|
1743
1715
|
|
|
1744
1716
|
validate(data: VesselLeakLinkedRunCalculationRequestSchemaData): VesselLeakLinkedRunCalculationRequest {
|
|
1745
1717
|
const { error, value } = this.schema.validate(data, { abortEarly: false });
|
|
1746
1718
|
if (error) {
|
|
1747
|
-
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(
|
|
1719
|
+
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
|
|
1748
1720
|
}
|
|
1749
1721
|
return this.makeCalculationRequest(value);
|
|
1750
1722
|
}
|
|
@@ -1803,26 +1775,26 @@ export class VesselLeakLinkedRunCalculation extends CalculationBase {
|
|
|
1803
1775
|
*
|
|
1804
1776
|
*/
|
|
1805
1777
|
constructor(data: {
|
|
1806
|
-
vessel: Entities.Vessel
|
|
1807
|
-
leak: Entities.Leak
|
|
1808
|
-
dischargeParameters: Entities.DischargeParameters
|
|
1809
|
-
substrate: Entities.Substrate
|
|
1810
|
-
weather: Entities.Weather
|
|
1811
|
-
dispersionParameters: Entities.DispersionParameters[]
|
|
1812
|
-
dispersionParameterCount: number
|
|
1813
|
-
endPointConcentration: number
|
|
1814
|
-
flammableParameters: Entities.FlammableParameters
|
|
1815
|
-
explosionParameters: Entities.ExplosionParameters
|
|
1816
|
-
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[]
|
|
1817
|
-
dispersionFlamOutputConfigCount: number
|
|
1818
|
-
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[]
|
|
1819
|
-
dispersionToxicOutputConfigCount: number
|
|
1820
|
-
flammableOutputConfigs: Entities.FlammableOutputConfig[]
|
|
1821
|
-
flammableOutputConfigCount: number
|
|
1822
|
-
explosionOutputConfigs: Entities.ExplosionOutputConfig[]
|
|
1823
|
-
explosionOutputConfigCount: number
|
|
1824
|
-
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[]
|
|
1825
|
-
explosionConfinedVolumeCount: number
|
|
1778
|
+
vessel: Entities.Vessel;
|
|
1779
|
+
leak: Entities.Leak;
|
|
1780
|
+
dischargeParameters: Entities.DischargeParameters;
|
|
1781
|
+
substrate: Entities.Substrate;
|
|
1782
|
+
weather: Entities.Weather;
|
|
1783
|
+
dispersionParameters: Entities.DispersionParameters[];
|
|
1784
|
+
dispersionParameterCount: number;
|
|
1785
|
+
endPointConcentration: number;
|
|
1786
|
+
flammableParameters: Entities.FlammableParameters;
|
|
1787
|
+
explosionParameters: Entities.ExplosionParameters;
|
|
1788
|
+
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[];
|
|
1789
|
+
dispersionFlamOutputConfigCount: number;
|
|
1790
|
+
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[];
|
|
1791
|
+
dispersionToxicOutputConfigCount: number;
|
|
1792
|
+
flammableOutputConfigs: Entities.FlammableOutputConfig[];
|
|
1793
|
+
flammableOutputConfigCount: number;
|
|
1794
|
+
explosionOutputConfigs: Entities.ExplosionOutputConfig[];
|
|
1795
|
+
explosionOutputConfigCount: number;
|
|
1796
|
+
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[];
|
|
1797
|
+
explosionConfinedVolumeCount: number;
|
|
1826
1798
|
controller?: AbortController;
|
|
1827
1799
|
}) {
|
|
1828
1800
|
super(data.controller);
|
|
@@ -1870,7 +1842,7 @@ export class VesselLeakLinkedRunCalculation extends CalculationBase {
|
|
|
1870
1842
|
explosionOutputConfigs: this.explosionOutputConfigs,
|
|
1871
1843
|
explosionOutputConfigCount: this.explosionOutputConfigCount,
|
|
1872
1844
|
explosionConfinedVolumes: this.explosionConfinedVolumes,
|
|
1873
|
-
explosionConfinedVolumeCount: this.explosionConfinedVolumeCount
|
|
1845
|
+
explosionConfinedVolumeCount: this.explosionConfinedVolumeCount,
|
|
1874
1846
|
});
|
|
1875
1847
|
|
|
1876
1848
|
const schema = new VesselLeakLinkedRunCalculationRequestSchema();
|
|
@@ -1932,132 +1904,128 @@ export class VesselLeakLinkedRunCalculation extends CalculationBase {
|
|
|
1932
1904
|
}
|
|
1933
1905
|
|
|
1934
1906
|
toString() {
|
|
1935
|
-
const parts = [
|
|
1907
|
+
const parts = ['* VesselLeakLinkedRun'];
|
|
1936
1908
|
|
|
1937
1909
|
parts.push(`dischargeRecord: ${String(this.dischargeRecord)}`);
|
|
1938
|
-
parts.push(
|
|
1910
|
+
parts.push('*** distancesToJetFireRadiation:');
|
|
1939
1911
|
parts.push(
|
|
1940
1912
|
this.distancesToJetFireRadiation && this.distancesToJetFireRadiation.length > 0
|
|
1941
|
-
? this.distancesToJetFireRadiation.map((point) => `distancesToJetFireRadiationElement: ${point}`).join(
|
|
1942
|
-
:
|
|
1913
|
+
? this.distancesToJetFireRadiation.map((point) => `distancesToJetFireRadiationElement: ${point}`).join('\n')
|
|
1914
|
+
: 'distancesToJetFireRadiation does not contain any elements',
|
|
1943
1915
|
);
|
|
1944
|
-
parts.push(
|
|
1916
|
+
parts.push('*** jetContourPoints:');
|
|
1945
1917
|
parts.push(
|
|
1946
1918
|
this.jetContourPoints && this.jetContourPoints.length > 0
|
|
1947
|
-
? this.jetContourPoints.map((point) => `jetContourPointsElement: ${point}`).join(
|
|
1948
|
-
:
|
|
1919
|
+
? this.jetContourPoints.map((point) => `jetContourPointsElement: ${point}`).join('\n')
|
|
1920
|
+
: 'jetContourPoints does not contain any elements',
|
|
1949
1921
|
);
|
|
1950
|
-
parts.push(
|
|
1922
|
+
parts.push('*** nJetContourPoints:');
|
|
1951
1923
|
parts.push(
|
|
1952
1924
|
this.nJetContourPoints && this.nJetContourPoints.length > 0
|
|
1953
|
-
? this.nJetContourPoints.map((point) => `nJetContourPointsElement: ${point}`).join(
|
|
1954
|
-
:
|
|
1925
|
+
? this.nJetContourPoints.map((point) => `nJetContourPointsElement: ${point}`).join('\n')
|
|
1926
|
+
: 'nJetContourPoints does not contain any elements',
|
|
1955
1927
|
);
|
|
1956
|
-
parts.push(
|
|
1928
|
+
parts.push('*** areaContourJet:');
|
|
1957
1929
|
parts.push(
|
|
1958
|
-
this.areaContourJet && this.areaContourJet.length > 0
|
|
1959
|
-
? this.areaContourJet.map((point) => `areaContourJetElement: ${point}`).join("\n")
|
|
1960
|
-
: "areaContourJet does not contain any elements"
|
|
1930
|
+
this.areaContourJet && this.areaContourJet.length > 0 ? this.areaContourJet.map((point) => `areaContourJetElement: ${point}`).join('\n') : 'areaContourJet does not contain any elements',
|
|
1961
1931
|
);
|
|
1962
|
-
parts.push(
|
|
1932
|
+
parts.push('*** distancesToFlamConcentration:');
|
|
1963
1933
|
parts.push(
|
|
1964
1934
|
this.distancesToFlamConcentration && this.distancesToFlamConcentration.length > 0
|
|
1965
|
-
? this.distancesToFlamConcentration.map((point) => `distancesToFlamConcentrationElement: ${point}`).join(
|
|
1966
|
-
:
|
|
1935
|
+
? this.distancesToFlamConcentration.map((point) => `distancesToFlamConcentrationElement: ${point}`).join('\n')
|
|
1936
|
+
: 'distancesToFlamConcentration does not contain any elements',
|
|
1967
1937
|
);
|
|
1968
|
-
parts.push(
|
|
1938
|
+
parts.push('*** flamConcentrationsUsed:');
|
|
1969
1939
|
parts.push(
|
|
1970
1940
|
this.flamConcentrationsUsed && this.flamConcentrationsUsed.length > 0
|
|
1971
|
-
? this.flamConcentrationsUsed.map((point) => `flamConcentrationsUsedElement: ${point}`).join(
|
|
1972
|
-
:
|
|
1941
|
+
? this.flamConcentrationsUsed.map((point) => `flamConcentrationsUsedElement: ${point}`).join('\n')
|
|
1942
|
+
: 'flamConcentrationsUsed does not contain any elements',
|
|
1973
1943
|
);
|
|
1974
|
-
parts.push(
|
|
1944
|
+
parts.push('*** flamConcContourPoints:');
|
|
1975
1945
|
parts.push(
|
|
1976
1946
|
this.flamConcContourPoints && this.flamConcContourPoints.length > 0
|
|
1977
|
-
? this.flamConcContourPoints.map((point) => `flamConcContourPointsElement: ${point}`).join(
|
|
1978
|
-
:
|
|
1947
|
+
? this.flamConcContourPoints.map((point) => `flamConcContourPointsElement: ${point}`).join('\n')
|
|
1948
|
+
: 'flamConcContourPoints does not contain any elements',
|
|
1979
1949
|
);
|
|
1980
|
-
parts.push(
|
|
1950
|
+
parts.push('*** nFlamConcContourPoints:');
|
|
1981
1951
|
parts.push(
|
|
1982
1952
|
this.nFlamConcContourPoints && this.nFlamConcContourPoints.length > 0
|
|
1983
|
-
? this.nFlamConcContourPoints.map((point) => `nFlamConcContourPointsElement: ${point}`).join(
|
|
1984
|
-
:
|
|
1953
|
+
? this.nFlamConcContourPoints.map((point) => `nFlamConcContourPointsElement: ${point}`).join('\n')
|
|
1954
|
+
: 'nFlamConcContourPoints does not contain any elements',
|
|
1985
1955
|
);
|
|
1986
|
-
parts.push(
|
|
1956
|
+
parts.push('*** areaFootprintFlamConc:');
|
|
1987
1957
|
parts.push(
|
|
1988
1958
|
this.areaFootprintFlamConc && this.areaFootprintFlamConc.length > 0
|
|
1989
|
-
? this.areaFootprintFlamConc.map((point) => `areaFootprintFlamConcElement: ${point}`).join(
|
|
1990
|
-
:
|
|
1959
|
+
? this.areaFootprintFlamConc.map((point) => `areaFootprintFlamConcElement: ${point}`).join('\n')
|
|
1960
|
+
: 'areaFootprintFlamConc does not contain any elements',
|
|
1991
1961
|
);
|
|
1992
|
-
parts.push(
|
|
1962
|
+
parts.push('*** distancesToPoolFireRadiation:');
|
|
1993
1963
|
parts.push(
|
|
1994
1964
|
this.distancesToPoolFireRadiation && this.distancesToPoolFireRadiation.length > 0
|
|
1995
|
-
? this.distancesToPoolFireRadiation.map((point) => `distancesToPoolFireRadiationElement: ${point}`).join(
|
|
1996
|
-
:
|
|
1965
|
+
? this.distancesToPoolFireRadiation.map((point) => `distancesToPoolFireRadiationElement: ${point}`).join('\n')
|
|
1966
|
+
: 'distancesToPoolFireRadiation does not contain any elements',
|
|
1997
1967
|
);
|
|
1998
|
-
parts.push(
|
|
1968
|
+
parts.push('*** poolContourPoints:');
|
|
1999
1969
|
parts.push(
|
|
2000
1970
|
this.poolContourPoints && this.poolContourPoints.length > 0
|
|
2001
|
-
? this.poolContourPoints.map((point) => `poolContourPointsElement: ${point}`).join(
|
|
2002
|
-
:
|
|
1971
|
+
? this.poolContourPoints.map((point) => `poolContourPointsElement: ${point}`).join('\n')
|
|
1972
|
+
: 'poolContourPoints does not contain any elements',
|
|
2003
1973
|
);
|
|
2004
|
-
parts.push(
|
|
1974
|
+
parts.push('*** nPoolContourPoints:');
|
|
2005
1975
|
parts.push(
|
|
2006
1976
|
this.nPoolContourPoints && this.nPoolContourPoints.length > 0
|
|
2007
|
-
? this.nPoolContourPoints.map((point) => `nPoolContourPointsElement: ${point}`).join(
|
|
2008
|
-
:
|
|
1977
|
+
? this.nPoolContourPoints.map((point) => `nPoolContourPointsElement: ${point}`).join('\n')
|
|
1978
|
+
: 'nPoolContourPoints does not contain any elements',
|
|
2009
1979
|
);
|
|
2010
|
-
parts.push(
|
|
1980
|
+
parts.push('*** areaContourPool:');
|
|
2011
1981
|
parts.push(
|
|
2012
|
-
this.areaContourPool && this.areaContourPool.length > 0
|
|
2013
|
-
? this.areaContourPool.map((point) => `areaContourPoolElement: ${point}`).join("\n")
|
|
2014
|
-
: "areaContourPool does not contain any elements"
|
|
1982
|
+
this.areaContourPool && this.areaContourPool.length > 0 ? this.areaContourPool.map((point) => `areaContourPoolElement: ${point}`).join('\n') : 'areaContourPool does not contain any elements',
|
|
2015
1983
|
);
|
|
2016
|
-
parts.push(
|
|
1984
|
+
parts.push('*** explosionOverpressureResults:');
|
|
2017
1985
|
parts.push(
|
|
2018
1986
|
this.explosionOverpressureResults && this.explosionOverpressureResults.length > 0
|
|
2019
|
-
? this.explosionOverpressureResults.map((point) => `explosionOverpressureResultsElement: ${point}`).join(
|
|
2020
|
-
:
|
|
1987
|
+
? this.explosionOverpressureResults.map((point) => `explosionOverpressureResultsElement: ${point}`).join('\n')
|
|
1988
|
+
: 'explosionOverpressureResults does not contain any elements',
|
|
2021
1989
|
);
|
|
2022
|
-
parts.push(
|
|
1990
|
+
parts.push('*** distancesToToxicConcentration:');
|
|
2023
1991
|
parts.push(
|
|
2024
1992
|
this.distancesToToxicConcentration && this.distancesToToxicConcentration.length > 0
|
|
2025
|
-
? this.distancesToToxicConcentration.map((point) => `distancesToToxicConcentrationElement: ${point}`).join(
|
|
2026
|
-
:
|
|
1993
|
+
? this.distancesToToxicConcentration.map((point) => `distancesToToxicConcentrationElement: ${point}`).join('\n')
|
|
1994
|
+
: 'distancesToToxicConcentration does not contain any elements',
|
|
2027
1995
|
);
|
|
2028
|
-
parts.push(
|
|
1996
|
+
parts.push('*** toxicConcentrationUsed:');
|
|
2029
1997
|
parts.push(
|
|
2030
1998
|
this.toxicConcentrationUsed && this.toxicConcentrationUsed.length > 0
|
|
2031
|
-
? this.toxicConcentrationUsed.map((point) => `toxicConcentrationUsedElement: ${point}`).join(
|
|
2032
|
-
:
|
|
1999
|
+
? this.toxicConcentrationUsed.map((point) => `toxicConcentrationUsedElement: ${point}`).join('\n')
|
|
2000
|
+
: 'toxicConcentrationUsed does not contain any elements',
|
|
2033
2001
|
);
|
|
2034
|
-
parts.push(
|
|
2002
|
+
parts.push('*** toxicConcContourPoints:');
|
|
2035
2003
|
parts.push(
|
|
2036
2004
|
this.toxicConcContourPoints && this.toxicConcContourPoints.length > 0
|
|
2037
|
-
? this.toxicConcContourPoints.map((point) => `toxicConcContourPointsElement: ${point}`).join(
|
|
2038
|
-
:
|
|
2005
|
+
? this.toxicConcContourPoints.map((point) => `toxicConcContourPointsElement: ${point}`).join('\n')
|
|
2006
|
+
: 'toxicConcContourPoints does not contain any elements',
|
|
2039
2007
|
);
|
|
2040
|
-
parts.push(
|
|
2008
|
+
parts.push('*** nToxicConcContourPoints:');
|
|
2041
2009
|
parts.push(
|
|
2042
2010
|
this.nToxicConcContourPoints && this.nToxicConcContourPoints.length > 0
|
|
2043
|
-
? this.nToxicConcContourPoints.map((point) => `nToxicConcContourPointsElement: ${point}`).join(
|
|
2044
|
-
:
|
|
2011
|
+
? this.nToxicConcContourPoints.map((point) => `nToxicConcContourPointsElement: ${point}`).join('\n')
|
|
2012
|
+
: 'nToxicConcContourPoints does not contain any elements',
|
|
2045
2013
|
);
|
|
2046
|
-
parts.push(
|
|
2014
|
+
parts.push('*** areaFootprintToxicConc:');
|
|
2047
2015
|
parts.push(
|
|
2048
2016
|
this.areaFootprintToxicConc && this.areaFootprintToxicConc.length > 0
|
|
2049
|
-
? this.areaFootprintToxicConc.map((point) => `areaFootprintToxicConcElement: ${point}`).join(
|
|
2050
|
-
:
|
|
2017
|
+
? this.areaFootprintToxicConc.map((point) => `areaFootprintToxicConcElement: ${point}`).join('\n')
|
|
2018
|
+
: 'areaFootprintToxicConc does not contain any elements',
|
|
2051
2019
|
);
|
|
2052
2020
|
parts.push(`jetFireFlameResult: ${String(this.jetFireFlameResult)}`);
|
|
2053
2021
|
parts.push(`poolFireFlameResult: ${String(this.poolFireFlameResult)}`);
|
|
2054
2022
|
parts.push(`resultCode: ${String(this.resultCode)}`);
|
|
2055
|
-
parts.push(
|
|
2056
|
-
parts.push(`messages: ${this.messages !== undefined ? this.messages :
|
|
2057
|
-
parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime :
|
|
2058
|
-
parts.push(`operationId: ${this.operationId !== undefined ? this.operationId :
|
|
2023
|
+
parts.push('*** messages:');
|
|
2024
|
+
parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
|
|
2025
|
+
parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
|
|
2026
|
+
parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
|
|
2059
2027
|
|
|
2060
|
-
return parts.join(
|
|
2028
|
+
return parts.join('\n');
|
|
2061
2029
|
}
|
|
2062
2030
|
}
|
|
2063
2031
|
|
|
@@ -2090,32 +2058,32 @@ export class VesselLeakLinkedRunCalculationResponse extends CalculationResponseB
|
|
|
2090
2058
|
*
|
|
2091
2059
|
*/
|
|
2092
2060
|
constructor(data: {
|
|
2093
|
-
dischargeRecord: Entities.DischargeRecord
|
|
2094
|
-
distancesToJetFireRadiation: number[]
|
|
2095
|
-
jetContourPoints: Entities.LocalPosition[]
|
|
2096
|
-
nJetContourPoints: number[]
|
|
2097
|
-
areaContourJet: number[]
|
|
2098
|
-
distancesToFlamConcentration: number[]
|
|
2099
|
-
flamConcentrationsUsed: number[]
|
|
2100
|
-
flamConcContourPoints: Entities.LocalPosition[]
|
|
2101
|
-
nFlamConcContourPoints: number[]
|
|
2102
|
-
areaFootprintFlamConc: number[]
|
|
2103
|
-
distancesToPoolFireRadiation: number[]
|
|
2104
|
-
poolContourPoints: Entities.LocalPosition[]
|
|
2105
|
-
nPoolContourPoints: number[]
|
|
2106
|
-
areaContourPool: number[]
|
|
2107
|
-
explosionOverpressureResults: Entities.ExplosionOverpressureResult[]
|
|
2108
|
-
distancesToToxicConcentration: number[]
|
|
2109
|
-
toxicConcentrationUsed: number[]
|
|
2110
|
-
toxicConcContourPoints: Entities.LocalPosition[]
|
|
2111
|
-
nToxicConcContourPoints: number[]
|
|
2112
|
-
areaFootprintToxicConc: number[]
|
|
2113
|
-
jetFireFlameResult: Entities.FlameResult
|
|
2114
|
-
poolFireFlameResult: Entities.PoolFireFlameResult
|
|
2115
|
-
resultCode: Enums.ResultCode
|
|
2116
|
-
messages: string[]
|
|
2117
|
-
calculationElapsedTime: number
|
|
2118
|
-
operationId: string
|
|
2061
|
+
dischargeRecord: Entities.DischargeRecord;
|
|
2062
|
+
distancesToJetFireRadiation: number[];
|
|
2063
|
+
jetContourPoints: Entities.LocalPosition[];
|
|
2064
|
+
nJetContourPoints: number[];
|
|
2065
|
+
areaContourJet: number[];
|
|
2066
|
+
distancesToFlamConcentration: number[];
|
|
2067
|
+
flamConcentrationsUsed: number[];
|
|
2068
|
+
flamConcContourPoints: Entities.LocalPosition[];
|
|
2069
|
+
nFlamConcContourPoints: number[];
|
|
2070
|
+
areaFootprintFlamConc: number[];
|
|
2071
|
+
distancesToPoolFireRadiation: number[];
|
|
2072
|
+
poolContourPoints: Entities.LocalPosition[];
|
|
2073
|
+
nPoolContourPoints: number[];
|
|
2074
|
+
areaContourPool: number[];
|
|
2075
|
+
explosionOverpressureResults: Entities.ExplosionOverpressureResult[];
|
|
2076
|
+
distancesToToxicConcentration: number[];
|
|
2077
|
+
toxicConcentrationUsed: number[];
|
|
2078
|
+
toxicConcContourPoints: Entities.LocalPosition[];
|
|
2079
|
+
nToxicConcContourPoints: number[];
|
|
2080
|
+
areaFootprintToxicConc: number[];
|
|
2081
|
+
jetFireFlameResult: Entities.FlameResult;
|
|
2082
|
+
poolFireFlameResult: Entities.PoolFireFlameResult;
|
|
2083
|
+
resultCode: Enums.ResultCode;
|
|
2084
|
+
messages: string[];
|
|
2085
|
+
calculationElapsedTime: number;
|
|
2086
|
+
operationId: string;
|
|
2119
2087
|
}) {
|
|
2120
2088
|
super();
|
|
2121
2089
|
this.dischargeRecord = data.dischargeRecord;
|
|
@@ -2155,13 +2123,11 @@ export class VesselLeakLinkedRunCalculationResponse extends CalculationResponseB
|
|
|
2155
2123
|
this.distancesToJetFireRadiation = data.distancesToJetFireRadiation.map((item) => parseFloat(item));
|
|
2156
2124
|
}
|
|
2157
2125
|
if (data.jetContourPoints && Array.isArray(data.jetContourPoints)) {
|
|
2158
|
-
this.jetContourPoints = data.jetContourPoints.map(
|
|
2159
|
-
(
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
}
|
|
2164
|
-
);
|
|
2126
|
+
this.jetContourPoints = data.jetContourPoints.map((item) => {
|
|
2127
|
+
const record = new Entities.LocalPosition();
|
|
2128
|
+
record.initialiseFromDictionary(item);
|
|
2129
|
+
return record;
|
|
2130
|
+
});
|
|
2165
2131
|
}
|
|
2166
2132
|
if (data.nJetContourPoints && Array.isArray(data.nJetContourPoints)) {
|
|
2167
2133
|
this.nJetContourPoints = data.nJetContourPoints.map((item) => parseInt(item));
|
|
@@ -2176,13 +2142,11 @@ export class VesselLeakLinkedRunCalculationResponse extends CalculationResponseB
|
|
|
2176
2142
|
this.flamConcentrationsUsed = data.flamConcentrationsUsed.map((item) => parseFloat(item));
|
|
2177
2143
|
}
|
|
2178
2144
|
if (data.flamConcContourPoints && Array.isArray(data.flamConcContourPoints)) {
|
|
2179
|
-
this.flamConcContourPoints = data.flamConcContourPoints.map(
|
|
2180
|
-
(
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
}
|
|
2185
|
-
);
|
|
2145
|
+
this.flamConcContourPoints = data.flamConcContourPoints.map((item) => {
|
|
2146
|
+
const record = new Entities.LocalPosition();
|
|
2147
|
+
record.initialiseFromDictionary(item);
|
|
2148
|
+
return record;
|
|
2149
|
+
});
|
|
2186
2150
|
}
|
|
2187
2151
|
if (data.nFlamConcContourPoints && Array.isArray(data.nFlamConcContourPoints)) {
|
|
2188
2152
|
this.nFlamConcContourPoints = data.nFlamConcContourPoints.map((item) => parseInt(item));
|
|
@@ -2194,13 +2158,11 @@ export class VesselLeakLinkedRunCalculationResponse extends CalculationResponseB
|
|
|
2194
2158
|
this.distancesToPoolFireRadiation = data.distancesToPoolFireRadiation.map((item) => parseFloat(item));
|
|
2195
2159
|
}
|
|
2196
2160
|
if (data.poolContourPoints && Array.isArray(data.poolContourPoints)) {
|
|
2197
|
-
this.poolContourPoints = data.poolContourPoints.map(
|
|
2198
|
-
(
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
}
|
|
2203
|
-
);
|
|
2161
|
+
this.poolContourPoints = data.poolContourPoints.map((item) => {
|
|
2162
|
+
const record = new Entities.LocalPosition();
|
|
2163
|
+
record.initialiseFromDictionary(item);
|
|
2164
|
+
return record;
|
|
2165
|
+
});
|
|
2204
2166
|
}
|
|
2205
2167
|
if (data.nPoolContourPoints && Array.isArray(data.nPoolContourPoints)) {
|
|
2206
2168
|
this.nPoolContourPoints = data.nPoolContourPoints.map((item) => parseInt(item));
|
|
@@ -2209,13 +2171,11 @@ export class VesselLeakLinkedRunCalculationResponse extends CalculationResponseB
|
|
|
2209
2171
|
this.areaContourPool = data.areaContourPool.map((item) => parseFloat(item));
|
|
2210
2172
|
}
|
|
2211
2173
|
if (data.explosionOverpressureResults && Array.isArray(data.explosionOverpressureResults)) {
|
|
2212
|
-
this.explosionOverpressureResults = data.explosionOverpressureResults.map(
|
|
2213
|
-
(
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
}
|
|
2218
|
-
);
|
|
2174
|
+
this.explosionOverpressureResults = data.explosionOverpressureResults.map((item) => {
|
|
2175
|
+
const record = new Entities.ExplosionOverpressureResult();
|
|
2176
|
+
record.initialiseFromDictionary(item);
|
|
2177
|
+
return record;
|
|
2178
|
+
});
|
|
2219
2179
|
}
|
|
2220
2180
|
if (data.distancesToToxicConcentration && Array.isArray(data.distancesToToxicConcentration)) {
|
|
2221
2181
|
this.distancesToToxicConcentration = data.distancesToToxicConcentration.map((item) => parseFloat(item));
|
|
@@ -2224,13 +2184,11 @@ export class VesselLeakLinkedRunCalculationResponse extends CalculationResponseB
|
|
|
2224
2184
|
this.toxicConcentrationUsed = data.toxicConcentrationUsed.map((item) => parseFloat(item));
|
|
2225
2185
|
}
|
|
2226
2186
|
if (data.toxicConcContourPoints && Array.isArray(data.toxicConcContourPoints)) {
|
|
2227
|
-
this.toxicConcContourPoints = data.toxicConcContourPoints.map(
|
|
2228
|
-
(
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
}
|
|
2233
|
-
);
|
|
2187
|
+
this.toxicConcContourPoints = data.toxicConcContourPoints.map((item) => {
|
|
2188
|
+
const record = new Entities.LocalPosition();
|
|
2189
|
+
record.initialiseFromDictionary(item);
|
|
2190
|
+
return record;
|
|
2191
|
+
});
|
|
2234
2192
|
}
|
|
2235
2193
|
if (data.nToxicConcContourPoints && Array.isArray(data.nToxicConcContourPoints)) {
|
|
2236
2194
|
this.nToxicConcContourPoints = data.nToxicConcContourPoints.map((item) => parseInt(item));
|
|
@@ -2246,17 +2204,17 @@ export class VesselLeakLinkedRunCalculationResponse extends CalculationResponseB
|
|
|
2246
2204
|
this.poolFireFlameResult = new Entities.PoolFireFlameResult();
|
|
2247
2205
|
this.poolFireFlameResult.initialiseFromDictionary(data.poolFireFlameResult as { [key: string]: unknown });
|
|
2248
2206
|
}
|
|
2249
|
-
if (data.resultCode !== undefined && (typeof data.resultCode ===
|
|
2207
|
+
if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
|
|
2250
2208
|
this.resultCode = data.resultCode as Enums.ResultCode;
|
|
2251
2209
|
}
|
|
2252
2210
|
this.messages = this.messages ?? [];
|
|
2253
2211
|
if (data.messages && Array.isArray(data.messages)) {
|
|
2254
2212
|
this.messages.push(...data.messages);
|
|
2255
2213
|
}
|
|
2256
|
-
if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime ===
|
|
2214
|
+
if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
|
|
2257
2215
|
this.calculationElapsedTime = data.calculationElapsedTime as number;
|
|
2258
2216
|
}
|
|
2259
|
-
if (data.operationId !== undefined && typeof data.operationId ===
|
|
2217
|
+
if (data.operationId !== undefined && typeof data.operationId === 'string') {
|
|
2260
2218
|
this.operationId = data.operationId as string;
|
|
2261
2219
|
}
|
|
2262
2220
|
}
|
|
@@ -2329,35 +2287,35 @@ export class VesselLeakLinkedRunCalculationResponseSchema {
|
|
|
2329
2287
|
}).unknown(true);
|
|
2330
2288
|
|
|
2331
2289
|
this.propertyTypes = {
|
|
2332
|
-
dischargeRecord:
|
|
2333
|
-
distancesToJetFireRadiation:
|
|
2334
|
-
jetContourPoints:
|
|
2335
|
-
nJetContourPoints:
|
|
2336
|
-
areaContourJet:
|
|
2337
|
-
distancesToFlamConcentration:
|
|
2338
|
-
flamConcentrationsUsed:
|
|
2339
|
-
flamConcContourPoints:
|
|
2340
|
-
nFlamConcContourPoints:
|
|
2341
|
-
areaFootprintFlamConc:
|
|
2342
|
-
distancesToPoolFireRadiation:
|
|
2343
|
-
poolContourPoints:
|
|
2344
|
-
nPoolContourPoints:
|
|
2345
|
-
areaContourPool:
|
|
2346
|
-
explosionOverpressureResults:
|
|
2347
|
-
distancesToToxicConcentration:
|
|
2348
|
-
toxicConcentrationUsed:
|
|
2349
|
-
toxicConcContourPoints:
|
|
2350
|
-
nToxicConcContourPoints:
|
|
2351
|
-
areaFootprintToxicConc:
|
|
2352
|
-
jetFireFlameResult:
|
|
2353
|
-
poolFireFlameResult:
|
|
2290
|
+
dischargeRecord: 'Entities.DischargeRecord',
|
|
2291
|
+
distancesToJetFireRadiation: 'number[]',
|
|
2292
|
+
jetContourPoints: 'Entities.LocalPosition[]',
|
|
2293
|
+
nJetContourPoints: 'number[]',
|
|
2294
|
+
areaContourJet: 'number[]',
|
|
2295
|
+
distancesToFlamConcentration: 'number[]',
|
|
2296
|
+
flamConcentrationsUsed: 'number[]',
|
|
2297
|
+
flamConcContourPoints: 'Entities.LocalPosition[]',
|
|
2298
|
+
nFlamConcContourPoints: 'number[]',
|
|
2299
|
+
areaFootprintFlamConc: 'number[]',
|
|
2300
|
+
distancesToPoolFireRadiation: 'number[]',
|
|
2301
|
+
poolContourPoints: 'Entities.LocalPosition[]',
|
|
2302
|
+
nPoolContourPoints: 'number[]',
|
|
2303
|
+
areaContourPool: 'number[]',
|
|
2304
|
+
explosionOverpressureResults: 'Entities.ExplosionOverpressureResult[]',
|
|
2305
|
+
distancesToToxicConcentration: 'number[]',
|
|
2306
|
+
toxicConcentrationUsed: 'number[]',
|
|
2307
|
+
toxicConcContourPoints: 'Entities.LocalPosition[]',
|
|
2308
|
+
nToxicConcContourPoints: 'number[]',
|
|
2309
|
+
areaFootprintToxicConc: 'number[]',
|
|
2310
|
+
jetFireFlameResult: 'Entities.FlameResult',
|
|
2311
|
+
poolFireFlameResult: 'Entities.PoolFireFlameResult',
|
|
2354
2312
|
};
|
|
2355
2313
|
}
|
|
2356
2314
|
|
|
2357
2315
|
validate(data: VesselLeakLinkedRunCalculationResponseSchemaData): VesselLeakLinkedRunCalculationResponse {
|
|
2358
2316
|
const { error, value } = this.schema.validate(data, { abortEarly: false });
|
|
2359
2317
|
if (error) {
|
|
2360
|
-
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(
|
|
2318
|
+
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
|
|
2361
2319
|
}
|
|
2362
2320
|
return this.makeCalculationResponse(value);
|
|
2363
2321
|
}
|
|
@@ -2417,26 +2375,26 @@ class VesselLineRuptureLinkedRunCalculationRequest extends CalculationRequestBas
|
|
|
2417
2375
|
*
|
|
2418
2376
|
*/
|
|
2419
2377
|
constructor(data: {
|
|
2420
|
-
vessel: Entities.Vessel
|
|
2421
|
-
lineRupture: Entities.LineRupture
|
|
2422
|
-
dischargeParameters: Entities.DischargeParameters
|
|
2423
|
-
substrate: Entities.Substrate
|
|
2424
|
-
weather: Entities.Weather
|
|
2425
|
-
dispersionParameters: Entities.DispersionParameters[]
|
|
2426
|
-
dispersionParameterCount: number
|
|
2427
|
-
endPointConcentration: number
|
|
2428
|
-
flammableParameters: Entities.FlammableParameters
|
|
2429
|
-
explosionParameters: Entities.ExplosionParameters
|
|
2430
|
-
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[]
|
|
2431
|
-
dispersionFlamOutputConfigCount: number
|
|
2432
|
-
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[]
|
|
2433
|
-
dispersionToxicOutputConfigCount: number
|
|
2434
|
-
flammableOutputConfigs: Entities.FlammableOutputConfig[]
|
|
2435
|
-
flammableOutputConfigCount: number
|
|
2436
|
-
explosionOutputConfigs: Entities.ExplosionOutputConfig[]
|
|
2437
|
-
explosionOutputConfigCount: number
|
|
2438
|
-
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[]
|
|
2439
|
-
explosionConfinedVolumeCount: number
|
|
2378
|
+
vessel: Entities.Vessel;
|
|
2379
|
+
lineRupture: Entities.LineRupture;
|
|
2380
|
+
dischargeParameters: Entities.DischargeParameters;
|
|
2381
|
+
substrate: Entities.Substrate;
|
|
2382
|
+
weather: Entities.Weather;
|
|
2383
|
+
dispersionParameters: Entities.DispersionParameters[];
|
|
2384
|
+
dispersionParameterCount: number;
|
|
2385
|
+
endPointConcentration: number;
|
|
2386
|
+
flammableParameters: Entities.FlammableParameters;
|
|
2387
|
+
explosionParameters: Entities.ExplosionParameters;
|
|
2388
|
+
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[];
|
|
2389
|
+
dispersionFlamOutputConfigCount: number;
|
|
2390
|
+
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[];
|
|
2391
|
+
dispersionToxicOutputConfigCount: number;
|
|
2392
|
+
flammableOutputConfigs: Entities.FlammableOutputConfig[];
|
|
2393
|
+
flammableOutputConfigCount: number;
|
|
2394
|
+
explosionOutputConfigs: Entities.ExplosionOutputConfig[];
|
|
2395
|
+
explosionOutputConfigCount: number;
|
|
2396
|
+
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[];
|
|
2397
|
+
explosionConfinedVolumeCount: number;
|
|
2440
2398
|
}) {
|
|
2441
2399
|
super();
|
|
2442
2400
|
this.vessel = data.vessel;
|
|
@@ -2494,33 +2452,33 @@ export class VesselLineRuptureLinkedRunCalculationRequestSchema {
|
|
|
2494
2452
|
}).unknown(true);
|
|
2495
2453
|
|
|
2496
2454
|
this.propertyTypes = {
|
|
2497
|
-
vessel:
|
|
2498
|
-
lineRupture:
|
|
2499
|
-
dischargeParameters:
|
|
2500
|
-
substrate:
|
|
2501
|
-
weather:
|
|
2502
|
-
dispersionParameters:
|
|
2503
|
-
dispersionParameterCount:
|
|
2504
|
-
endPointConcentration:
|
|
2505
|
-
flammableParameters:
|
|
2506
|
-
explosionParameters:
|
|
2507
|
-
dispersionFlamOutputConfigs:
|
|
2508
|
-
dispersionFlamOutputConfigCount:
|
|
2509
|
-
dispersionToxicOutputConfigs:
|
|
2510
|
-
dispersionToxicOutputConfigCount:
|
|
2511
|
-
flammableOutputConfigs:
|
|
2512
|
-
flammableOutputConfigCount:
|
|
2513
|
-
explosionOutputConfigs:
|
|
2514
|
-
explosionOutputConfigCount:
|
|
2515
|
-
explosionConfinedVolumes:
|
|
2516
|
-
explosionConfinedVolumeCount:
|
|
2455
|
+
vessel: 'Entities.Vessel',
|
|
2456
|
+
lineRupture: 'Entities.LineRupture',
|
|
2457
|
+
dischargeParameters: 'Entities.DischargeParameters',
|
|
2458
|
+
substrate: 'Entities.Substrate',
|
|
2459
|
+
weather: 'Entities.Weather',
|
|
2460
|
+
dispersionParameters: 'Entities.DispersionParameters[]',
|
|
2461
|
+
dispersionParameterCount: 'number',
|
|
2462
|
+
endPointConcentration: 'number',
|
|
2463
|
+
flammableParameters: 'Entities.FlammableParameters',
|
|
2464
|
+
explosionParameters: 'Entities.ExplosionParameters',
|
|
2465
|
+
dispersionFlamOutputConfigs: 'Entities.DispersionOutputConfig[]',
|
|
2466
|
+
dispersionFlamOutputConfigCount: 'number',
|
|
2467
|
+
dispersionToxicOutputConfigs: 'Entities.DispersionOutputConfig[]',
|
|
2468
|
+
dispersionToxicOutputConfigCount: 'number',
|
|
2469
|
+
flammableOutputConfigs: 'Entities.FlammableOutputConfig[]',
|
|
2470
|
+
flammableOutputConfigCount: 'number',
|
|
2471
|
+
explosionOutputConfigs: 'Entities.ExplosionOutputConfig[]',
|
|
2472
|
+
explosionOutputConfigCount: 'number',
|
|
2473
|
+
explosionConfinedVolumes: 'Entities.ExplosionConfinedVolume[]',
|
|
2474
|
+
explosionConfinedVolumeCount: 'number',
|
|
2517
2475
|
};
|
|
2518
2476
|
}
|
|
2519
2477
|
|
|
2520
2478
|
validate(data: VesselLineRuptureLinkedRunCalculationRequestSchemaData): VesselLineRuptureLinkedRunCalculationRequest {
|
|
2521
2479
|
const { error, value } = this.schema.validate(data, { abortEarly: false });
|
|
2522
2480
|
if (error) {
|
|
2523
|
-
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(
|
|
2481
|
+
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
|
|
2524
2482
|
}
|
|
2525
2483
|
return this.makeCalculationRequest(value);
|
|
2526
2484
|
}
|
|
@@ -2579,26 +2537,26 @@ export class VesselLineRuptureLinkedRunCalculation extends CalculationBase {
|
|
|
2579
2537
|
*
|
|
2580
2538
|
*/
|
|
2581
2539
|
constructor(data: {
|
|
2582
|
-
vessel: Entities.Vessel
|
|
2583
|
-
lineRupture: Entities.LineRupture
|
|
2584
|
-
dischargeParameters: Entities.DischargeParameters
|
|
2585
|
-
substrate: Entities.Substrate
|
|
2586
|
-
weather: Entities.Weather
|
|
2587
|
-
dispersionParameters: Entities.DispersionParameters[]
|
|
2588
|
-
dispersionParameterCount: number
|
|
2589
|
-
endPointConcentration: number
|
|
2590
|
-
flammableParameters: Entities.FlammableParameters
|
|
2591
|
-
explosionParameters: Entities.ExplosionParameters
|
|
2592
|
-
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[]
|
|
2593
|
-
dispersionFlamOutputConfigCount: number
|
|
2594
|
-
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[]
|
|
2595
|
-
dispersionToxicOutputConfigCount: number
|
|
2596
|
-
flammableOutputConfigs: Entities.FlammableOutputConfig[]
|
|
2597
|
-
flammableOutputConfigCount: number
|
|
2598
|
-
explosionOutputConfigs: Entities.ExplosionOutputConfig[]
|
|
2599
|
-
explosionOutputConfigCount: number
|
|
2600
|
-
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[]
|
|
2601
|
-
explosionConfinedVolumeCount: number
|
|
2540
|
+
vessel: Entities.Vessel;
|
|
2541
|
+
lineRupture: Entities.LineRupture;
|
|
2542
|
+
dischargeParameters: Entities.DischargeParameters;
|
|
2543
|
+
substrate: Entities.Substrate;
|
|
2544
|
+
weather: Entities.Weather;
|
|
2545
|
+
dispersionParameters: Entities.DispersionParameters[];
|
|
2546
|
+
dispersionParameterCount: number;
|
|
2547
|
+
endPointConcentration: number;
|
|
2548
|
+
flammableParameters: Entities.FlammableParameters;
|
|
2549
|
+
explosionParameters: Entities.ExplosionParameters;
|
|
2550
|
+
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[];
|
|
2551
|
+
dispersionFlamOutputConfigCount: number;
|
|
2552
|
+
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[];
|
|
2553
|
+
dispersionToxicOutputConfigCount: number;
|
|
2554
|
+
flammableOutputConfigs: Entities.FlammableOutputConfig[];
|
|
2555
|
+
flammableOutputConfigCount: number;
|
|
2556
|
+
explosionOutputConfigs: Entities.ExplosionOutputConfig[];
|
|
2557
|
+
explosionOutputConfigCount: number;
|
|
2558
|
+
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[];
|
|
2559
|
+
explosionConfinedVolumeCount: number;
|
|
2602
2560
|
controller?: AbortController;
|
|
2603
2561
|
}) {
|
|
2604
2562
|
super(data.controller);
|
|
@@ -2646,7 +2604,7 @@ export class VesselLineRuptureLinkedRunCalculation extends CalculationBase {
|
|
|
2646
2604
|
explosionOutputConfigs: this.explosionOutputConfigs,
|
|
2647
2605
|
explosionOutputConfigCount: this.explosionOutputConfigCount,
|
|
2648
2606
|
explosionConfinedVolumes: this.explosionConfinedVolumes,
|
|
2649
|
-
explosionConfinedVolumeCount: this.explosionConfinedVolumeCount
|
|
2607
|
+
explosionConfinedVolumeCount: this.explosionConfinedVolumeCount,
|
|
2650
2608
|
});
|
|
2651
2609
|
|
|
2652
2610
|
const schema = new VesselLineRuptureLinkedRunCalculationRequestSchema();
|
|
@@ -2708,132 +2666,128 @@ export class VesselLineRuptureLinkedRunCalculation extends CalculationBase {
|
|
|
2708
2666
|
}
|
|
2709
2667
|
|
|
2710
2668
|
toString() {
|
|
2711
|
-
const parts = [
|
|
2669
|
+
const parts = ['* VesselLineRuptureLinkedRun'];
|
|
2712
2670
|
|
|
2713
2671
|
parts.push(`dischargeRecord: ${String(this.dischargeRecord)}`);
|
|
2714
|
-
parts.push(
|
|
2672
|
+
parts.push('*** distancesToJetFireRadiation:');
|
|
2715
2673
|
parts.push(
|
|
2716
2674
|
this.distancesToJetFireRadiation && this.distancesToJetFireRadiation.length > 0
|
|
2717
|
-
? this.distancesToJetFireRadiation.map((point) => `distancesToJetFireRadiationElement: ${point}`).join(
|
|
2718
|
-
:
|
|
2675
|
+
? this.distancesToJetFireRadiation.map((point) => `distancesToJetFireRadiationElement: ${point}`).join('\n')
|
|
2676
|
+
: 'distancesToJetFireRadiation does not contain any elements',
|
|
2719
2677
|
);
|
|
2720
|
-
parts.push(
|
|
2678
|
+
parts.push('*** jetContourPoints:');
|
|
2721
2679
|
parts.push(
|
|
2722
2680
|
this.jetContourPoints && this.jetContourPoints.length > 0
|
|
2723
|
-
? this.jetContourPoints.map((point) => `jetContourPointsElement: ${point}`).join(
|
|
2724
|
-
:
|
|
2681
|
+
? this.jetContourPoints.map((point) => `jetContourPointsElement: ${point}`).join('\n')
|
|
2682
|
+
: 'jetContourPoints does not contain any elements',
|
|
2725
2683
|
);
|
|
2726
|
-
parts.push(
|
|
2684
|
+
parts.push('*** nJetContourPoints:');
|
|
2727
2685
|
parts.push(
|
|
2728
2686
|
this.nJetContourPoints && this.nJetContourPoints.length > 0
|
|
2729
|
-
? this.nJetContourPoints.map((point) => `nJetContourPointsElement: ${point}`).join(
|
|
2730
|
-
:
|
|
2687
|
+
? this.nJetContourPoints.map((point) => `nJetContourPointsElement: ${point}`).join('\n')
|
|
2688
|
+
: 'nJetContourPoints does not contain any elements',
|
|
2731
2689
|
);
|
|
2732
|
-
parts.push(
|
|
2690
|
+
parts.push('*** areaContourJet:');
|
|
2733
2691
|
parts.push(
|
|
2734
|
-
this.areaContourJet && this.areaContourJet.length > 0
|
|
2735
|
-
? this.areaContourJet.map((point) => `areaContourJetElement: ${point}`).join("\n")
|
|
2736
|
-
: "areaContourJet does not contain any elements"
|
|
2692
|
+
this.areaContourJet && this.areaContourJet.length > 0 ? this.areaContourJet.map((point) => `areaContourJetElement: ${point}`).join('\n') : 'areaContourJet does not contain any elements',
|
|
2737
2693
|
);
|
|
2738
|
-
parts.push(
|
|
2694
|
+
parts.push('*** distancesToFlamConcentration:');
|
|
2739
2695
|
parts.push(
|
|
2740
2696
|
this.distancesToFlamConcentration && this.distancesToFlamConcentration.length > 0
|
|
2741
|
-
? this.distancesToFlamConcentration.map((point) => `distancesToFlamConcentrationElement: ${point}`).join(
|
|
2742
|
-
:
|
|
2697
|
+
? this.distancesToFlamConcentration.map((point) => `distancesToFlamConcentrationElement: ${point}`).join('\n')
|
|
2698
|
+
: 'distancesToFlamConcentration does not contain any elements',
|
|
2743
2699
|
);
|
|
2744
|
-
parts.push(
|
|
2700
|
+
parts.push('*** flamConcentrationsUsed:');
|
|
2745
2701
|
parts.push(
|
|
2746
2702
|
this.flamConcentrationsUsed && this.flamConcentrationsUsed.length > 0
|
|
2747
|
-
? this.flamConcentrationsUsed.map((point) => `flamConcentrationsUsedElement: ${point}`).join(
|
|
2748
|
-
:
|
|
2703
|
+
? this.flamConcentrationsUsed.map((point) => `flamConcentrationsUsedElement: ${point}`).join('\n')
|
|
2704
|
+
: 'flamConcentrationsUsed does not contain any elements',
|
|
2749
2705
|
);
|
|
2750
|
-
parts.push(
|
|
2706
|
+
parts.push('*** flamConcContourPoints:');
|
|
2751
2707
|
parts.push(
|
|
2752
2708
|
this.flamConcContourPoints && this.flamConcContourPoints.length > 0
|
|
2753
|
-
? this.flamConcContourPoints.map((point) => `flamConcContourPointsElement: ${point}`).join(
|
|
2754
|
-
:
|
|
2709
|
+
? this.flamConcContourPoints.map((point) => `flamConcContourPointsElement: ${point}`).join('\n')
|
|
2710
|
+
: 'flamConcContourPoints does not contain any elements',
|
|
2755
2711
|
);
|
|
2756
|
-
parts.push(
|
|
2712
|
+
parts.push('*** nFlamConcContourPoints:');
|
|
2757
2713
|
parts.push(
|
|
2758
2714
|
this.nFlamConcContourPoints && this.nFlamConcContourPoints.length > 0
|
|
2759
|
-
? this.nFlamConcContourPoints.map((point) => `nFlamConcContourPointsElement: ${point}`).join(
|
|
2760
|
-
:
|
|
2715
|
+
? this.nFlamConcContourPoints.map((point) => `nFlamConcContourPointsElement: ${point}`).join('\n')
|
|
2716
|
+
: 'nFlamConcContourPoints does not contain any elements',
|
|
2761
2717
|
);
|
|
2762
|
-
parts.push(
|
|
2718
|
+
parts.push('*** areaFootprintFlamConc:');
|
|
2763
2719
|
parts.push(
|
|
2764
2720
|
this.areaFootprintFlamConc && this.areaFootprintFlamConc.length > 0
|
|
2765
|
-
? this.areaFootprintFlamConc.map((point) => `areaFootprintFlamConcElement: ${point}`).join(
|
|
2766
|
-
:
|
|
2721
|
+
? this.areaFootprintFlamConc.map((point) => `areaFootprintFlamConcElement: ${point}`).join('\n')
|
|
2722
|
+
: 'areaFootprintFlamConc does not contain any elements',
|
|
2767
2723
|
);
|
|
2768
|
-
parts.push(
|
|
2724
|
+
parts.push('*** distancesToPoolFireRadiation:');
|
|
2769
2725
|
parts.push(
|
|
2770
2726
|
this.distancesToPoolFireRadiation && this.distancesToPoolFireRadiation.length > 0
|
|
2771
|
-
? this.distancesToPoolFireRadiation.map((point) => `distancesToPoolFireRadiationElement: ${point}`).join(
|
|
2772
|
-
:
|
|
2727
|
+
? this.distancesToPoolFireRadiation.map((point) => `distancesToPoolFireRadiationElement: ${point}`).join('\n')
|
|
2728
|
+
: 'distancesToPoolFireRadiation does not contain any elements',
|
|
2773
2729
|
);
|
|
2774
|
-
parts.push(
|
|
2730
|
+
parts.push('*** poolContourPoints:');
|
|
2775
2731
|
parts.push(
|
|
2776
2732
|
this.poolContourPoints && this.poolContourPoints.length > 0
|
|
2777
|
-
? this.poolContourPoints.map((point) => `poolContourPointsElement: ${point}`).join(
|
|
2778
|
-
:
|
|
2733
|
+
? this.poolContourPoints.map((point) => `poolContourPointsElement: ${point}`).join('\n')
|
|
2734
|
+
: 'poolContourPoints does not contain any elements',
|
|
2779
2735
|
);
|
|
2780
|
-
parts.push(
|
|
2736
|
+
parts.push('*** nPoolContourPoints:');
|
|
2781
2737
|
parts.push(
|
|
2782
2738
|
this.nPoolContourPoints && this.nPoolContourPoints.length > 0
|
|
2783
|
-
? this.nPoolContourPoints.map((point) => `nPoolContourPointsElement: ${point}`).join(
|
|
2784
|
-
:
|
|
2739
|
+
? this.nPoolContourPoints.map((point) => `nPoolContourPointsElement: ${point}`).join('\n')
|
|
2740
|
+
: 'nPoolContourPoints does not contain any elements',
|
|
2785
2741
|
);
|
|
2786
|
-
parts.push(
|
|
2742
|
+
parts.push('*** areaContourPool:');
|
|
2787
2743
|
parts.push(
|
|
2788
|
-
this.areaContourPool && this.areaContourPool.length > 0
|
|
2789
|
-
? this.areaContourPool.map((point) => `areaContourPoolElement: ${point}`).join("\n")
|
|
2790
|
-
: "areaContourPool does not contain any elements"
|
|
2744
|
+
this.areaContourPool && this.areaContourPool.length > 0 ? this.areaContourPool.map((point) => `areaContourPoolElement: ${point}`).join('\n') : 'areaContourPool does not contain any elements',
|
|
2791
2745
|
);
|
|
2792
|
-
parts.push(
|
|
2746
|
+
parts.push('*** explosionOverpressureResults:');
|
|
2793
2747
|
parts.push(
|
|
2794
2748
|
this.explosionOverpressureResults && this.explosionOverpressureResults.length > 0
|
|
2795
|
-
? this.explosionOverpressureResults.map((point) => `explosionOverpressureResultsElement: ${point}`).join(
|
|
2796
|
-
:
|
|
2749
|
+
? this.explosionOverpressureResults.map((point) => `explosionOverpressureResultsElement: ${point}`).join('\n')
|
|
2750
|
+
: 'explosionOverpressureResults does not contain any elements',
|
|
2797
2751
|
);
|
|
2798
|
-
parts.push(
|
|
2752
|
+
parts.push('*** distancesToToxicConcentration:');
|
|
2799
2753
|
parts.push(
|
|
2800
2754
|
this.distancesToToxicConcentration && this.distancesToToxicConcentration.length > 0
|
|
2801
|
-
? this.distancesToToxicConcentration.map((point) => `distancesToToxicConcentrationElement: ${point}`).join(
|
|
2802
|
-
:
|
|
2755
|
+
? this.distancesToToxicConcentration.map((point) => `distancesToToxicConcentrationElement: ${point}`).join('\n')
|
|
2756
|
+
: 'distancesToToxicConcentration does not contain any elements',
|
|
2803
2757
|
);
|
|
2804
|
-
parts.push(
|
|
2758
|
+
parts.push('*** toxicConcentrationUsed:');
|
|
2805
2759
|
parts.push(
|
|
2806
2760
|
this.toxicConcentrationUsed && this.toxicConcentrationUsed.length > 0
|
|
2807
|
-
? this.toxicConcentrationUsed.map((point) => `toxicConcentrationUsedElement: ${point}`).join(
|
|
2808
|
-
:
|
|
2761
|
+
? this.toxicConcentrationUsed.map((point) => `toxicConcentrationUsedElement: ${point}`).join('\n')
|
|
2762
|
+
: 'toxicConcentrationUsed does not contain any elements',
|
|
2809
2763
|
);
|
|
2810
|
-
parts.push(
|
|
2764
|
+
parts.push('*** toxicConcContourPoints:');
|
|
2811
2765
|
parts.push(
|
|
2812
2766
|
this.toxicConcContourPoints && this.toxicConcContourPoints.length > 0
|
|
2813
|
-
? this.toxicConcContourPoints.map((point) => `toxicConcContourPointsElement: ${point}`).join(
|
|
2814
|
-
:
|
|
2767
|
+
? this.toxicConcContourPoints.map((point) => `toxicConcContourPointsElement: ${point}`).join('\n')
|
|
2768
|
+
: 'toxicConcContourPoints does not contain any elements',
|
|
2815
2769
|
);
|
|
2816
|
-
parts.push(
|
|
2770
|
+
parts.push('*** nToxicConcContourPoints:');
|
|
2817
2771
|
parts.push(
|
|
2818
2772
|
this.nToxicConcContourPoints && this.nToxicConcContourPoints.length > 0
|
|
2819
|
-
? this.nToxicConcContourPoints.map((point) => `nToxicConcContourPointsElement: ${point}`).join(
|
|
2820
|
-
:
|
|
2773
|
+
? this.nToxicConcContourPoints.map((point) => `nToxicConcContourPointsElement: ${point}`).join('\n')
|
|
2774
|
+
: 'nToxicConcContourPoints does not contain any elements',
|
|
2821
2775
|
);
|
|
2822
|
-
parts.push(
|
|
2776
|
+
parts.push('*** areaFootprintToxicConc:');
|
|
2823
2777
|
parts.push(
|
|
2824
2778
|
this.areaFootprintToxicConc && this.areaFootprintToxicConc.length > 0
|
|
2825
|
-
? this.areaFootprintToxicConc.map((point) => `areaFootprintToxicConcElement: ${point}`).join(
|
|
2826
|
-
:
|
|
2779
|
+
? this.areaFootprintToxicConc.map((point) => `areaFootprintToxicConcElement: ${point}`).join('\n')
|
|
2780
|
+
: 'areaFootprintToxicConc does not contain any elements',
|
|
2827
2781
|
);
|
|
2828
2782
|
parts.push(`jetFireFlameResult: ${String(this.jetFireFlameResult)}`);
|
|
2829
2783
|
parts.push(`poolFireFlameResult: ${String(this.poolFireFlameResult)}`);
|
|
2830
2784
|
parts.push(`resultCode: ${String(this.resultCode)}`);
|
|
2831
|
-
parts.push(
|
|
2832
|
-
parts.push(`messages: ${this.messages !== undefined ? this.messages :
|
|
2833
|
-
parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime :
|
|
2834
|
-
parts.push(`operationId: ${this.operationId !== undefined ? this.operationId :
|
|
2785
|
+
parts.push('*** messages:');
|
|
2786
|
+
parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
|
|
2787
|
+
parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
|
|
2788
|
+
parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
|
|
2835
2789
|
|
|
2836
|
-
return parts.join(
|
|
2790
|
+
return parts.join('\n');
|
|
2837
2791
|
}
|
|
2838
2792
|
}
|
|
2839
2793
|
|
|
@@ -2866,32 +2820,32 @@ export class VesselLineRuptureLinkedRunCalculationResponse extends CalculationRe
|
|
|
2866
2820
|
*
|
|
2867
2821
|
*/
|
|
2868
2822
|
constructor(data: {
|
|
2869
|
-
dischargeRecord: Entities.DischargeRecord
|
|
2870
|
-
distancesToJetFireRadiation: number[]
|
|
2871
|
-
jetContourPoints: Entities.LocalPosition[]
|
|
2872
|
-
nJetContourPoints: number[]
|
|
2873
|
-
areaContourJet: number[]
|
|
2874
|
-
distancesToFlamConcentration: number[]
|
|
2875
|
-
flamConcentrationsUsed: number[]
|
|
2876
|
-
flamConcContourPoints: Entities.LocalPosition[]
|
|
2877
|
-
nFlamConcContourPoints: number[]
|
|
2878
|
-
areaFootprintFlamConc: number[]
|
|
2879
|
-
distancesToPoolFireRadiation: number[]
|
|
2880
|
-
poolContourPoints: Entities.LocalPosition[]
|
|
2881
|
-
nPoolContourPoints: number[]
|
|
2882
|
-
areaContourPool: number[]
|
|
2883
|
-
explosionOverpressureResults: Entities.ExplosionOverpressureResult[]
|
|
2884
|
-
distancesToToxicConcentration: number[]
|
|
2885
|
-
toxicConcentrationUsed: number[]
|
|
2886
|
-
toxicConcContourPoints: Entities.LocalPosition[]
|
|
2887
|
-
nToxicConcContourPoints: number[]
|
|
2888
|
-
areaFootprintToxicConc: number[]
|
|
2889
|
-
jetFireFlameResult: Entities.FlameResult
|
|
2890
|
-
poolFireFlameResult: Entities.PoolFireFlameResult
|
|
2891
|
-
resultCode: Enums.ResultCode
|
|
2892
|
-
messages: string[]
|
|
2893
|
-
calculationElapsedTime: number
|
|
2894
|
-
operationId: string
|
|
2823
|
+
dischargeRecord: Entities.DischargeRecord;
|
|
2824
|
+
distancesToJetFireRadiation: number[];
|
|
2825
|
+
jetContourPoints: Entities.LocalPosition[];
|
|
2826
|
+
nJetContourPoints: number[];
|
|
2827
|
+
areaContourJet: number[];
|
|
2828
|
+
distancesToFlamConcentration: number[];
|
|
2829
|
+
flamConcentrationsUsed: number[];
|
|
2830
|
+
flamConcContourPoints: Entities.LocalPosition[];
|
|
2831
|
+
nFlamConcContourPoints: number[];
|
|
2832
|
+
areaFootprintFlamConc: number[];
|
|
2833
|
+
distancesToPoolFireRadiation: number[];
|
|
2834
|
+
poolContourPoints: Entities.LocalPosition[];
|
|
2835
|
+
nPoolContourPoints: number[];
|
|
2836
|
+
areaContourPool: number[];
|
|
2837
|
+
explosionOverpressureResults: Entities.ExplosionOverpressureResult[];
|
|
2838
|
+
distancesToToxicConcentration: number[];
|
|
2839
|
+
toxicConcentrationUsed: number[];
|
|
2840
|
+
toxicConcContourPoints: Entities.LocalPosition[];
|
|
2841
|
+
nToxicConcContourPoints: number[];
|
|
2842
|
+
areaFootprintToxicConc: number[];
|
|
2843
|
+
jetFireFlameResult: Entities.FlameResult;
|
|
2844
|
+
poolFireFlameResult: Entities.PoolFireFlameResult;
|
|
2845
|
+
resultCode: Enums.ResultCode;
|
|
2846
|
+
messages: string[];
|
|
2847
|
+
calculationElapsedTime: number;
|
|
2848
|
+
operationId: string;
|
|
2895
2849
|
}) {
|
|
2896
2850
|
super();
|
|
2897
2851
|
this.dischargeRecord = data.dischargeRecord;
|
|
@@ -2931,13 +2885,11 @@ export class VesselLineRuptureLinkedRunCalculationResponse extends CalculationRe
|
|
|
2931
2885
|
this.distancesToJetFireRadiation = data.distancesToJetFireRadiation.map((item) => parseFloat(item));
|
|
2932
2886
|
}
|
|
2933
2887
|
if (data.jetContourPoints && Array.isArray(data.jetContourPoints)) {
|
|
2934
|
-
this.jetContourPoints = data.jetContourPoints.map(
|
|
2935
|
-
(
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
}
|
|
2940
|
-
);
|
|
2888
|
+
this.jetContourPoints = data.jetContourPoints.map((item) => {
|
|
2889
|
+
const record = new Entities.LocalPosition();
|
|
2890
|
+
record.initialiseFromDictionary(item);
|
|
2891
|
+
return record;
|
|
2892
|
+
});
|
|
2941
2893
|
}
|
|
2942
2894
|
if (data.nJetContourPoints && Array.isArray(data.nJetContourPoints)) {
|
|
2943
2895
|
this.nJetContourPoints = data.nJetContourPoints.map((item) => parseInt(item));
|
|
@@ -2952,13 +2904,11 @@ export class VesselLineRuptureLinkedRunCalculationResponse extends CalculationRe
|
|
|
2952
2904
|
this.flamConcentrationsUsed = data.flamConcentrationsUsed.map((item) => parseFloat(item));
|
|
2953
2905
|
}
|
|
2954
2906
|
if (data.flamConcContourPoints && Array.isArray(data.flamConcContourPoints)) {
|
|
2955
|
-
this.flamConcContourPoints = data.flamConcContourPoints.map(
|
|
2956
|
-
(
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
}
|
|
2961
|
-
);
|
|
2907
|
+
this.flamConcContourPoints = data.flamConcContourPoints.map((item) => {
|
|
2908
|
+
const record = new Entities.LocalPosition();
|
|
2909
|
+
record.initialiseFromDictionary(item);
|
|
2910
|
+
return record;
|
|
2911
|
+
});
|
|
2962
2912
|
}
|
|
2963
2913
|
if (data.nFlamConcContourPoints && Array.isArray(data.nFlamConcContourPoints)) {
|
|
2964
2914
|
this.nFlamConcContourPoints = data.nFlamConcContourPoints.map((item) => parseInt(item));
|
|
@@ -2970,13 +2920,11 @@ export class VesselLineRuptureLinkedRunCalculationResponse extends CalculationRe
|
|
|
2970
2920
|
this.distancesToPoolFireRadiation = data.distancesToPoolFireRadiation.map((item) => parseFloat(item));
|
|
2971
2921
|
}
|
|
2972
2922
|
if (data.poolContourPoints && Array.isArray(data.poolContourPoints)) {
|
|
2973
|
-
this.poolContourPoints = data.poolContourPoints.map(
|
|
2974
|
-
(
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
}
|
|
2979
|
-
);
|
|
2923
|
+
this.poolContourPoints = data.poolContourPoints.map((item) => {
|
|
2924
|
+
const record = new Entities.LocalPosition();
|
|
2925
|
+
record.initialiseFromDictionary(item);
|
|
2926
|
+
return record;
|
|
2927
|
+
});
|
|
2980
2928
|
}
|
|
2981
2929
|
if (data.nPoolContourPoints && Array.isArray(data.nPoolContourPoints)) {
|
|
2982
2930
|
this.nPoolContourPoints = data.nPoolContourPoints.map((item) => parseInt(item));
|
|
@@ -2985,13 +2933,11 @@ export class VesselLineRuptureLinkedRunCalculationResponse extends CalculationRe
|
|
|
2985
2933
|
this.areaContourPool = data.areaContourPool.map((item) => parseFloat(item));
|
|
2986
2934
|
}
|
|
2987
2935
|
if (data.explosionOverpressureResults && Array.isArray(data.explosionOverpressureResults)) {
|
|
2988
|
-
this.explosionOverpressureResults = data.explosionOverpressureResults.map(
|
|
2989
|
-
(
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
}
|
|
2994
|
-
);
|
|
2936
|
+
this.explosionOverpressureResults = data.explosionOverpressureResults.map((item) => {
|
|
2937
|
+
const record = new Entities.ExplosionOverpressureResult();
|
|
2938
|
+
record.initialiseFromDictionary(item);
|
|
2939
|
+
return record;
|
|
2940
|
+
});
|
|
2995
2941
|
}
|
|
2996
2942
|
if (data.distancesToToxicConcentration && Array.isArray(data.distancesToToxicConcentration)) {
|
|
2997
2943
|
this.distancesToToxicConcentration = data.distancesToToxicConcentration.map((item) => parseFloat(item));
|
|
@@ -3000,13 +2946,11 @@ export class VesselLineRuptureLinkedRunCalculationResponse extends CalculationRe
|
|
|
3000
2946
|
this.toxicConcentrationUsed = data.toxicConcentrationUsed.map((item) => parseFloat(item));
|
|
3001
2947
|
}
|
|
3002
2948
|
if (data.toxicConcContourPoints && Array.isArray(data.toxicConcContourPoints)) {
|
|
3003
|
-
this.toxicConcContourPoints = data.toxicConcContourPoints.map(
|
|
3004
|
-
(
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
}
|
|
3009
|
-
);
|
|
2949
|
+
this.toxicConcContourPoints = data.toxicConcContourPoints.map((item) => {
|
|
2950
|
+
const record = new Entities.LocalPosition();
|
|
2951
|
+
record.initialiseFromDictionary(item);
|
|
2952
|
+
return record;
|
|
2953
|
+
});
|
|
3010
2954
|
}
|
|
3011
2955
|
if (data.nToxicConcContourPoints && Array.isArray(data.nToxicConcContourPoints)) {
|
|
3012
2956
|
this.nToxicConcContourPoints = data.nToxicConcContourPoints.map((item) => parseInt(item));
|
|
@@ -3022,17 +2966,17 @@ export class VesselLineRuptureLinkedRunCalculationResponse extends CalculationRe
|
|
|
3022
2966
|
this.poolFireFlameResult = new Entities.PoolFireFlameResult();
|
|
3023
2967
|
this.poolFireFlameResult.initialiseFromDictionary(data.poolFireFlameResult as { [key: string]: unknown });
|
|
3024
2968
|
}
|
|
3025
|
-
if (data.resultCode !== undefined && (typeof data.resultCode ===
|
|
2969
|
+
if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
|
|
3026
2970
|
this.resultCode = data.resultCode as Enums.ResultCode;
|
|
3027
2971
|
}
|
|
3028
2972
|
this.messages = this.messages ?? [];
|
|
3029
2973
|
if (data.messages && Array.isArray(data.messages)) {
|
|
3030
2974
|
this.messages.push(...data.messages);
|
|
3031
2975
|
}
|
|
3032
|
-
if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime ===
|
|
2976
|
+
if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
|
|
3033
2977
|
this.calculationElapsedTime = data.calculationElapsedTime as number;
|
|
3034
2978
|
}
|
|
3035
|
-
if (data.operationId !== undefined && typeof data.operationId ===
|
|
2979
|
+
if (data.operationId !== undefined && typeof data.operationId === 'string') {
|
|
3036
2980
|
this.operationId = data.operationId as string;
|
|
3037
2981
|
}
|
|
3038
2982
|
}
|
|
@@ -3105,35 +3049,35 @@ export class VesselLineRuptureLinkedRunCalculationResponseSchema {
|
|
|
3105
3049
|
}).unknown(true);
|
|
3106
3050
|
|
|
3107
3051
|
this.propertyTypes = {
|
|
3108
|
-
dischargeRecord:
|
|
3109
|
-
distancesToJetFireRadiation:
|
|
3110
|
-
jetContourPoints:
|
|
3111
|
-
nJetContourPoints:
|
|
3112
|
-
areaContourJet:
|
|
3113
|
-
distancesToFlamConcentration:
|
|
3114
|
-
flamConcentrationsUsed:
|
|
3115
|
-
flamConcContourPoints:
|
|
3116
|
-
nFlamConcContourPoints:
|
|
3117
|
-
areaFootprintFlamConc:
|
|
3118
|
-
distancesToPoolFireRadiation:
|
|
3119
|
-
poolContourPoints:
|
|
3120
|
-
nPoolContourPoints:
|
|
3121
|
-
areaContourPool:
|
|
3122
|
-
explosionOverpressureResults:
|
|
3123
|
-
distancesToToxicConcentration:
|
|
3124
|
-
toxicConcentrationUsed:
|
|
3125
|
-
toxicConcContourPoints:
|
|
3126
|
-
nToxicConcContourPoints:
|
|
3127
|
-
areaFootprintToxicConc:
|
|
3128
|
-
jetFireFlameResult:
|
|
3129
|
-
poolFireFlameResult:
|
|
3052
|
+
dischargeRecord: 'Entities.DischargeRecord',
|
|
3053
|
+
distancesToJetFireRadiation: 'number[]',
|
|
3054
|
+
jetContourPoints: 'Entities.LocalPosition[]',
|
|
3055
|
+
nJetContourPoints: 'number[]',
|
|
3056
|
+
areaContourJet: 'number[]',
|
|
3057
|
+
distancesToFlamConcentration: 'number[]',
|
|
3058
|
+
flamConcentrationsUsed: 'number[]',
|
|
3059
|
+
flamConcContourPoints: 'Entities.LocalPosition[]',
|
|
3060
|
+
nFlamConcContourPoints: 'number[]',
|
|
3061
|
+
areaFootprintFlamConc: 'number[]',
|
|
3062
|
+
distancesToPoolFireRadiation: 'number[]',
|
|
3063
|
+
poolContourPoints: 'Entities.LocalPosition[]',
|
|
3064
|
+
nPoolContourPoints: 'number[]',
|
|
3065
|
+
areaContourPool: 'number[]',
|
|
3066
|
+
explosionOverpressureResults: 'Entities.ExplosionOverpressureResult[]',
|
|
3067
|
+
distancesToToxicConcentration: 'number[]',
|
|
3068
|
+
toxicConcentrationUsed: 'number[]',
|
|
3069
|
+
toxicConcContourPoints: 'Entities.LocalPosition[]',
|
|
3070
|
+
nToxicConcContourPoints: 'number[]',
|
|
3071
|
+
areaFootprintToxicConc: 'number[]',
|
|
3072
|
+
jetFireFlameResult: 'Entities.FlameResult',
|
|
3073
|
+
poolFireFlameResult: 'Entities.PoolFireFlameResult',
|
|
3130
3074
|
};
|
|
3131
3075
|
}
|
|
3132
3076
|
|
|
3133
3077
|
validate(data: VesselLineRuptureLinkedRunCalculationResponseSchemaData): VesselLineRuptureLinkedRunCalculationResponse {
|
|
3134
3078
|
const { error, value } = this.schema.validate(data, { abortEarly: false });
|
|
3135
3079
|
if (error) {
|
|
3136
|
-
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(
|
|
3080
|
+
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
|
|
3137
3081
|
}
|
|
3138
3082
|
return this.makeCalculationResponse(value);
|
|
3139
3083
|
}
|
|
@@ -3193,26 +3137,26 @@ class VesselReliefValveLinkedRunCalculationRequest extends CalculationRequestBas
|
|
|
3193
3137
|
*
|
|
3194
3138
|
*/
|
|
3195
3139
|
constructor(data: {
|
|
3196
|
-
vessel: Entities.Vessel
|
|
3197
|
-
reliefValve: Entities.ReliefValve
|
|
3198
|
-
dischargeParameters: Entities.DischargeParameters
|
|
3199
|
-
substrate: Entities.Substrate
|
|
3200
|
-
weather: Entities.Weather
|
|
3201
|
-
dispersionParameters: Entities.DispersionParameters[]
|
|
3202
|
-
dispersionParameterCount: number
|
|
3203
|
-
endPointConcentration: number
|
|
3204
|
-
flammableParameters: Entities.FlammableParameters
|
|
3205
|
-
explosionParameters: Entities.ExplosionParameters
|
|
3206
|
-
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[]
|
|
3207
|
-
dispersionFlamOutputConfigCount: number
|
|
3208
|
-
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[]
|
|
3209
|
-
dispersionToxicOutputConfigCount: number
|
|
3210
|
-
flammableOutputConfigs: Entities.FlammableOutputConfig[]
|
|
3211
|
-
flammableOutputConfigCount: number
|
|
3212
|
-
explosionOutputConfigs: Entities.ExplosionOutputConfig[]
|
|
3213
|
-
explosionOutputConfigCount: number
|
|
3214
|
-
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[]
|
|
3215
|
-
explosionConfinedVolumeCount: number
|
|
3140
|
+
vessel: Entities.Vessel;
|
|
3141
|
+
reliefValve: Entities.ReliefValve;
|
|
3142
|
+
dischargeParameters: Entities.DischargeParameters;
|
|
3143
|
+
substrate: Entities.Substrate;
|
|
3144
|
+
weather: Entities.Weather;
|
|
3145
|
+
dispersionParameters: Entities.DispersionParameters[];
|
|
3146
|
+
dispersionParameterCount: number;
|
|
3147
|
+
endPointConcentration: number;
|
|
3148
|
+
flammableParameters: Entities.FlammableParameters;
|
|
3149
|
+
explosionParameters: Entities.ExplosionParameters;
|
|
3150
|
+
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[];
|
|
3151
|
+
dispersionFlamOutputConfigCount: number;
|
|
3152
|
+
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[];
|
|
3153
|
+
dispersionToxicOutputConfigCount: number;
|
|
3154
|
+
flammableOutputConfigs: Entities.FlammableOutputConfig[];
|
|
3155
|
+
flammableOutputConfigCount: number;
|
|
3156
|
+
explosionOutputConfigs: Entities.ExplosionOutputConfig[];
|
|
3157
|
+
explosionOutputConfigCount: number;
|
|
3158
|
+
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[];
|
|
3159
|
+
explosionConfinedVolumeCount: number;
|
|
3216
3160
|
}) {
|
|
3217
3161
|
super();
|
|
3218
3162
|
this.vessel = data.vessel;
|
|
@@ -3270,33 +3214,33 @@ export class VesselReliefValveLinkedRunCalculationRequestSchema {
|
|
|
3270
3214
|
}).unknown(true);
|
|
3271
3215
|
|
|
3272
3216
|
this.propertyTypes = {
|
|
3273
|
-
vessel:
|
|
3274
|
-
reliefValve:
|
|
3275
|
-
dischargeParameters:
|
|
3276
|
-
substrate:
|
|
3277
|
-
weather:
|
|
3278
|
-
dispersionParameters:
|
|
3279
|
-
dispersionParameterCount:
|
|
3280
|
-
endPointConcentration:
|
|
3281
|
-
flammableParameters:
|
|
3282
|
-
explosionParameters:
|
|
3283
|
-
dispersionFlamOutputConfigs:
|
|
3284
|
-
dispersionFlamOutputConfigCount:
|
|
3285
|
-
dispersionToxicOutputConfigs:
|
|
3286
|
-
dispersionToxicOutputConfigCount:
|
|
3287
|
-
flammableOutputConfigs:
|
|
3288
|
-
flammableOutputConfigCount:
|
|
3289
|
-
explosionOutputConfigs:
|
|
3290
|
-
explosionOutputConfigCount:
|
|
3291
|
-
explosionConfinedVolumes:
|
|
3292
|
-
explosionConfinedVolumeCount:
|
|
3217
|
+
vessel: 'Entities.Vessel',
|
|
3218
|
+
reliefValve: 'Entities.ReliefValve',
|
|
3219
|
+
dischargeParameters: 'Entities.DischargeParameters',
|
|
3220
|
+
substrate: 'Entities.Substrate',
|
|
3221
|
+
weather: 'Entities.Weather',
|
|
3222
|
+
dispersionParameters: 'Entities.DispersionParameters[]',
|
|
3223
|
+
dispersionParameterCount: 'number',
|
|
3224
|
+
endPointConcentration: 'number',
|
|
3225
|
+
flammableParameters: 'Entities.FlammableParameters',
|
|
3226
|
+
explosionParameters: 'Entities.ExplosionParameters',
|
|
3227
|
+
dispersionFlamOutputConfigs: 'Entities.DispersionOutputConfig[]',
|
|
3228
|
+
dispersionFlamOutputConfigCount: 'number',
|
|
3229
|
+
dispersionToxicOutputConfigs: 'Entities.DispersionOutputConfig[]',
|
|
3230
|
+
dispersionToxicOutputConfigCount: 'number',
|
|
3231
|
+
flammableOutputConfigs: 'Entities.FlammableOutputConfig[]',
|
|
3232
|
+
flammableOutputConfigCount: 'number',
|
|
3233
|
+
explosionOutputConfigs: 'Entities.ExplosionOutputConfig[]',
|
|
3234
|
+
explosionOutputConfigCount: 'number',
|
|
3235
|
+
explosionConfinedVolumes: 'Entities.ExplosionConfinedVolume[]',
|
|
3236
|
+
explosionConfinedVolumeCount: 'number',
|
|
3293
3237
|
};
|
|
3294
3238
|
}
|
|
3295
3239
|
|
|
3296
3240
|
validate(data: VesselReliefValveLinkedRunCalculationRequestSchemaData): VesselReliefValveLinkedRunCalculationRequest {
|
|
3297
3241
|
const { error, value } = this.schema.validate(data, { abortEarly: false });
|
|
3298
3242
|
if (error) {
|
|
3299
|
-
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(
|
|
3243
|
+
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
|
|
3300
3244
|
}
|
|
3301
3245
|
return this.makeCalculationRequest(value);
|
|
3302
3246
|
}
|
|
@@ -3355,26 +3299,26 @@ export class VesselReliefValveLinkedRunCalculation extends CalculationBase {
|
|
|
3355
3299
|
*
|
|
3356
3300
|
*/
|
|
3357
3301
|
constructor(data: {
|
|
3358
|
-
vessel: Entities.Vessel
|
|
3359
|
-
reliefValve: Entities.ReliefValve
|
|
3360
|
-
dischargeParameters: Entities.DischargeParameters
|
|
3361
|
-
substrate: Entities.Substrate
|
|
3362
|
-
weather: Entities.Weather
|
|
3363
|
-
dispersionParameters: Entities.DispersionParameters[]
|
|
3364
|
-
dispersionParameterCount: number
|
|
3365
|
-
endPointConcentration: number
|
|
3366
|
-
flammableParameters: Entities.FlammableParameters
|
|
3367
|
-
explosionParameters: Entities.ExplosionParameters
|
|
3368
|
-
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[]
|
|
3369
|
-
dispersionFlamOutputConfigCount: number
|
|
3370
|
-
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[]
|
|
3371
|
-
dispersionToxicOutputConfigCount: number
|
|
3372
|
-
flammableOutputConfigs: Entities.FlammableOutputConfig[]
|
|
3373
|
-
flammableOutputConfigCount: number
|
|
3374
|
-
explosionOutputConfigs: Entities.ExplosionOutputConfig[]
|
|
3375
|
-
explosionOutputConfigCount: number
|
|
3376
|
-
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[]
|
|
3377
|
-
explosionConfinedVolumeCount: number
|
|
3302
|
+
vessel: Entities.Vessel;
|
|
3303
|
+
reliefValve: Entities.ReliefValve;
|
|
3304
|
+
dischargeParameters: Entities.DischargeParameters;
|
|
3305
|
+
substrate: Entities.Substrate;
|
|
3306
|
+
weather: Entities.Weather;
|
|
3307
|
+
dispersionParameters: Entities.DispersionParameters[];
|
|
3308
|
+
dispersionParameterCount: number;
|
|
3309
|
+
endPointConcentration: number;
|
|
3310
|
+
flammableParameters: Entities.FlammableParameters;
|
|
3311
|
+
explosionParameters: Entities.ExplosionParameters;
|
|
3312
|
+
dispersionFlamOutputConfigs: Entities.DispersionOutputConfig[];
|
|
3313
|
+
dispersionFlamOutputConfigCount: number;
|
|
3314
|
+
dispersionToxicOutputConfigs: Entities.DispersionOutputConfig[];
|
|
3315
|
+
dispersionToxicOutputConfigCount: number;
|
|
3316
|
+
flammableOutputConfigs: Entities.FlammableOutputConfig[];
|
|
3317
|
+
flammableOutputConfigCount: number;
|
|
3318
|
+
explosionOutputConfigs: Entities.ExplosionOutputConfig[];
|
|
3319
|
+
explosionOutputConfigCount: number;
|
|
3320
|
+
explosionConfinedVolumes: Entities.ExplosionConfinedVolume[];
|
|
3321
|
+
explosionConfinedVolumeCount: number;
|
|
3378
3322
|
controller?: AbortController;
|
|
3379
3323
|
}) {
|
|
3380
3324
|
super(data.controller);
|
|
@@ -3422,7 +3366,7 @@ export class VesselReliefValveLinkedRunCalculation extends CalculationBase {
|
|
|
3422
3366
|
explosionOutputConfigs: this.explosionOutputConfigs,
|
|
3423
3367
|
explosionOutputConfigCount: this.explosionOutputConfigCount,
|
|
3424
3368
|
explosionConfinedVolumes: this.explosionConfinedVolumes,
|
|
3425
|
-
explosionConfinedVolumeCount: this.explosionConfinedVolumeCount
|
|
3369
|
+
explosionConfinedVolumeCount: this.explosionConfinedVolumeCount,
|
|
3426
3370
|
});
|
|
3427
3371
|
|
|
3428
3372
|
const schema = new VesselReliefValveLinkedRunCalculationRequestSchema();
|
|
@@ -3484,132 +3428,128 @@ export class VesselReliefValveLinkedRunCalculation extends CalculationBase {
|
|
|
3484
3428
|
}
|
|
3485
3429
|
|
|
3486
3430
|
toString() {
|
|
3487
|
-
const parts = [
|
|
3431
|
+
const parts = ['* VesselReliefValveLinkedRun'];
|
|
3488
3432
|
|
|
3489
3433
|
parts.push(`dischargeRecord: ${String(this.dischargeRecord)}`);
|
|
3490
|
-
parts.push(
|
|
3434
|
+
parts.push('*** distancesToJetFireRadiation:');
|
|
3491
3435
|
parts.push(
|
|
3492
3436
|
this.distancesToJetFireRadiation && this.distancesToJetFireRadiation.length > 0
|
|
3493
|
-
? this.distancesToJetFireRadiation.map((point) => `distancesToJetFireRadiationElement: ${point}`).join(
|
|
3494
|
-
:
|
|
3437
|
+
? this.distancesToJetFireRadiation.map((point) => `distancesToJetFireRadiationElement: ${point}`).join('\n')
|
|
3438
|
+
: 'distancesToJetFireRadiation does not contain any elements',
|
|
3495
3439
|
);
|
|
3496
|
-
parts.push(
|
|
3440
|
+
parts.push('*** jetContourPoints:');
|
|
3497
3441
|
parts.push(
|
|
3498
3442
|
this.jetContourPoints && this.jetContourPoints.length > 0
|
|
3499
|
-
? this.jetContourPoints.map((point) => `jetContourPointsElement: ${point}`).join(
|
|
3500
|
-
:
|
|
3443
|
+
? this.jetContourPoints.map((point) => `jetContourPointsElement: ${point}`).join('\n')
|
|
3444
|
+
: 'jetContourPoints does not contain any elements',
|
|
3501
3445
|
);
|
|
3502
|
-
parts.push(
|
|
3446
|
+
parts.push('*** nJetContourPoints:');
|
|
3503
3447
|
parts.push(
|
|
3504
3448
|
this.nJetContourPoints && this.nJetContourPoints.length > 0
|
|
3505
|
-
? this.nJetContourPoints.map((point) => `nJetContourPointsElement: ${point}`).join(
|
|
3506
|
-
:
|
|
3449
|
+
? this.nJetContourPoints.map((point) => `nJetContourPointsElement: ${point}`).join('\n')
|
|
3450
|
+
: 'nJetContourPoints does not contain any elements',
|
|
3507
3451
|
);
|
|
3508
|
-
parts.push(
|
|
3452
|
+
parts.push('*** areaContourJet:');
|
|
3509
3453
|
parts.push(
|
|
3510
|
-
this.areaContourJet && this.areaContourJet.length > 0
|
|
3511
|
-
? this.areaContourJet.map((point) => `areaContourJetElement: ${point}`).join("\n")
|
|
3512
|
-
: "areaContourJet does not contain any elements"
|
|
3454
|
+
this.areaContourJet && this.areaContourJet.length > 0 ? this.areaContourJet.map((point) => `areaContourJetElement: ${point}`).join('\n') : 'areaContourJet does not contain any elements',
|
|
3513
3455
|
);
|
|
3514
|
-
parts.push(
|
|
3456
|
+
parts.push('*** distancesToFlamConcentration:');
|
|
3515
3457
|
parts.push(
|
|
3516
3458
|
this.distancesToFlamConcentration && this.distancesToFlamConcentration.length > 0
|
|
3517
|
-
? this.distancesToFlamConcentration.map((point) => `distancesToFlamConcentrationElement: ${point}`).join(
|
|
3518
|
-
:
|
|
3459
|
+
? this.distancesToFlamConcentration.map((point) => `distancesToFlamConcentrationElement: ${point}`).join('\n')
|
|
3460
|
+
: 'distancesToFlamConcentration does not contain any elements',
|
|
3519
3461
|
);
|
|
3520
|
-
parts.push(
|
|
3462
|
+
parts.push('*** flamConcentrationsUsed:');
|
|
3521
3463
|
parts.push(
|
|
3522
3464
|
this.flamConcentrationsUsed && this.flamConcentrationsUsed.length > 0
|
|
3523
|
-
? this.flamConcentrationsUsed.map((point) => `flamConcentrationsUsedElement: ${point}`).join(
|
|
3524
|
-
:
|
|
3465
|
+
? this.flamConcentrationsUsed.map((point) => `flamConcentrationsUsedElement: ${point}`).join('\n')
|
|
3466
|
+
: 'flamConcentrationsUsed does not contain any elements',
|
|
3525
3467
|
);
|
|
3526
|
-
parts.push(
|
|
3468
|
+
parts.push('*** flamConcContourPoints:');
|
|
3527
3469
|
parts.push(
|
|
3528
3470
|
this.flamConcContourPoints && this.flamConcContourPoints.length > 0
|
|
3529
|
-
? this.flamConcContourPoints.map((point) => `flamConcContourPointsElement: ${point}`).join(
|
|
3530
|
-
:
|
|
3471
|
+
? this.flamConcContourPoints.map((point) => `flamConcContourPointsElement: ${point}`).join('\n')
|
|
3472
|
+
: 'flamConcContourPoints does not contain any elements',
|
|
3531
3473
|
);
|
|
3532
|
-
parts.push(
|
|
3474
|
+
parts.push('*** nFlamConcContourPoints:');
|
|
3533
3475
|
parts.push(
|
|
3534
3476
|
this.nFlamConcContourPoints && this.nFlamConcContourPoints.length > 0
|
|
3535
|
-
? this.nFlamConcContourPoints.map((point) => `nFlamConcContourPointsElement: ${point}`).join(
|
|
3536
|
-
:
|
|
3477
|
+
? this.nFlamConcContourPoints.map((point) => `nFlamConcContourPointsElement: ${point}`).join('\n')
|
|
3478
|
+
: 'nFlamConcContourPoints does not contain any elements',
|
|
3537
3479
|
);
|
|
3538
|
-
parts.push(
|
|
3480
|
+
parts.push('*** areaFootprintFlamConc:');
|
|
3539
3481
|
parts.push(
|
|
3540
3482
|
this.areaFootprintFlamConc && this.areaFootprintFlamConc.length > 0
|
|
3541
|
-
? this.areaFootprintFlamConc.map((point) => `areaFootprintFlamConcElement: ${point}`).join(
|
|
3542
|
-
:
|
|
3483
|
+
? this.areaFootprintFlamConc.map((point) => `areaFootprintFlamConcElement: ${point}`).join('\n')
|
|
3484
|
+
: 'areaFootprintFlamConc does not contain any elements',
|
|
3543
3485
|
);
|
|
3544
|
-
parts.push(
|
|
3486
|
+
parts.push('*** distancesToPoolFireRadiation:');
|
|
3545
3487
|
parts.push(
|
|
3546
3488
|
this.distancesToPoolFireRadiation && this.distancesToPoolFireRadiation.length > 0
|
|
3547
|
-
? this.distancesToPoolFireRadiation.map((point) => `distancesToPoolFireRadiationElement: ${point}`).join(
|
|
3548
|
-
:
|
|
3489
|
+
? this.distancesToPoolFireRadiation.map((point) => `distancesToPoolFireRadiationElement: ${point}`).join('\n')
|
|
3490
|
+
: 'distancesToPoolFireRadiation does not contain any elements',
|
|
3549
3491
|
);
|
|
3550
|
-
parts.push(
|
|
3492
|
+
parts.push('*** poolContourPoints:');
|
|
3551
3493
|
parts.push(
|
|
3552
3494
|
this.poolContourPoints && this.poolContourPoints.length > 0
|
|
3553
|
-
? this.poolContourPoints.map((point) => `poolContourPointsElement: ${point}`).join(
|
|
3554
|
-
:
|
|
3495
|
+
? this.poolContourPoints.map((point) => `poolContourPointsElement: ${point}`).join('\n')
|
|
3496
|
+
: 'poolContourPoints does not contain any elements',
|
|
3555
3497
|
);
|
|
3556
|
-
parts.push(
|
|
3498
|
+
parts.push('*** nPoolContourPoints:');
|
|
3557
3499
|
parts.push(
|
|
3558
3500
|
this.nPoolContourPoints && this.nPoolContourPoints.length > 0
|
|
3559
|
-
? this.nPoolContourPoints.map((point) => `nPoolContourPointsElement: ${point}`).join(
|
|
3560
|
-
:
|
|
3501
|
+
? this.nPoolContourPoints.map((point) => `nPoolContourPointsElement: ${point}`).join('\n')
|
|
3502
|
+
: 'nPoolContourPoints does not contain any elements',
|
|
3561
3503
|
);
|
|
3562
|
-
parts.push(
|
|
3504
|
+
parts.push('*** areaContourPool:');
|
|
3563
3505
|
parts.push(
|
|
3564
|
-
this.areaContourPool && this.areaContourPool.length > 0
|
|
3565
|
-
? this.areaContourPool.map((point) => `areaContourPoolElement: ${point}`).join("\n")
|
|
3566
|
-
: "areaContourPool does not contain any elements"
|
|
3506
|
+
this.areaContourPool && this.areaContourPool.length > 0 ? this.areaContourPool.map((point) => `areaContourPoolElement: ${point}`).join('\n') : 'areaContourPool does not contain any elements',
|
|
3567
3507
|
);
|
|
3568
|
-
parts.push(
|
|
3508
|
+
parts.push('*** explosionOverpressureResults:');
|
|
3569
3509
|
parts.push(
|
|
3570
3510
|
this.explosionOverpressureResults && this.explosionOverpressureResults.length > 0
|
|
3571
|
-
? this.explosionOverpressureResults.map((point) => `explosionOverpressureResultsElement: ${point}`).join(
|
|
3572
|
-
:
|
|
3511
|
+
? this.explosionOverpressureResults.map((point) => `explosionOverpressureResultsElement: ${point}`).join('\n')
|
|
3512
|
+
: 'explosionOverpressureResults does not contain any elements',
|
|
3573
3513
|
);
|
|
3574
|
-
parts.push(
|
|
3514
|
+
parts.push('*** distancesToToxicConcentration:');
|
|
3575
3515
|
parts.push(
|
|
3576
3516
|
this.distancesToToxicConcentration && this.distancesToToxicConcentration.length > 0
|
|
3577
|
-
? this.distancesToToxicConcentration.map((point) => `distancesToToxicConcentrationElement: ${point}`).join(
|
|
3578
|
-
:
|
|
3517
|
+
? this.distancesToToxicConcentration.map((point) => `distancesToToxicConcentrationElement: ${point}`).join('\n')
|
|
3518
|
+
: 'distancesToToxicConcentration does not contain any elements',
|
|
3579
3519
|
);
|
|
3580
|
-
parts.push(
|
|
3520
|
+
parts.push('*** toxicConcentrationUsed:');
|
|
3581
3521
|
parts.push(
|
|
3582
3522
|
this.toxicConcentrationUsed && this.toxicConcentrationUsed.length > 0
|
|
3583
|
-
? this.toxicConcentrationUsed.map((point) => `toxicConcentrationUsedElement: ${point}`).join(
|
|
3584
|
-
:
|
|
3523
|
+
? this.toxicConcentrationUsed.map((point) => `toxicConcentrationUsedElement: ${point}`).join('\n')
|
|
3524
|
+
: 'toxicConcentrationUsed does not contain any elements',
|
|
3585
3525
|
);
|
|
3586
|
-
parts.push(
|
|
3526
|
+
parts.push('*** toxicConcContourPoints:');
|
|
3587
3527
|
parts.push(
|
|
3588
3528
|
this.toxicConcContourPoints && this.toxicConcContourPoints.length > 0
|
|
3589
|
-
? this.toxicConcContourPoints.map((point) => `toxicConcContourPointsElement: ${point}`).join(
|
|
3590
|
-
:
|
|
3529
|
+
? this.toxicConcContourPoints.map((point) => `toxicConcContourPointsElement: ${point}`).join('\n')
|
|
3530
|
+
: 'toxicConcContourPoints does not contain any elements',
|
|
3591
3531
|
);
|
|
3592
|
-
parts.push(
|
|
3532
|
+
parts.push('*** nToxicConcContourPoints:');
|
|
3593
3533
|
parts.push(
|
|
3594
3534
|
this.nToxicConcContourPoints && this.nToxicConcContourPoints.length > 0
|
|
3595
|
-
? this.nToxicConcContourPoints.map((point) => `nToxicConcContourPointsElement: ${point}`).join(
|
|
3596
|
-
:
|
|
3535
|
+
? this.nToxicConcContourPoints.map((point) => `nToxicConcContourPointsElement: ${point}`).join('\n')
|
|
3536
|
+
: 'nToxicConcContourPoints does not contain any elements',
|
|
3597
3537
|
);
|
|
3598
|
-
parts.push(
|
|
3538
|
+
parts.push('*** areaFootprintToxicConc:');
|
|
3599
3539
|
parts.push(
|
|
3600
3540
|
this.areaFootprintToxicConc && this.areaFootprintToxicConc.length > 0
|
|
3601
|
-
? this.areaFootprintToxicConc.map((point) => `areaFootprintToxicConcElement: ${point}`).join(
|
|
3602
|
-
:
|
|
3541
|
+
? this.areaFootprintToxicConc.map((point) => `areaFootprintToxicConcElement: ${point}`).join('\n')
|
|
3542
|
+
: 'areaFootprintToxicConc does not contain any elements',
|
|
3603
3543
|
);
|
|
3604
3544
|
parts.push(`jetFireFlameResult: ${String(this.jetFireFlameResult)}`);
|
|
3605
3545
|
parts.push(`poolFireFlameResult: ${String(this.poolFireFlameResult)}`);
|
|
3606
3546
|
parts.push(`resultCode: ${String(this.resultCode)}`);
|
|
3607
|
-
parts.push(
|
|
3608
|
-
parts.push(`messages: ${this.messages !== undefined ? this.messages :
|
|
3609
|
-
parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime :
|
|
3610
|
-
parts.push(`operationId: ${this.operationId !== undefined ? this.operationId :
|
|
3547
|
+
parts.push('*** messages:');
|
|
3548
|
+
parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
|
|
3549
|
+
parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
|
|
3550
|
+
parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
|
|
3611
3551
|
|
|
3612
|
-
return parts.join(
|
|
3552
|
+
return parts.join('\n');
|
|
3613
3553
|
}
|
|
3614
3554
|
}
|
|
3615
3555
|
|
|
@@ -3642,32 +3582,32 @@ export class VesselReliefValveLinkedRunCalculationResponse extends CalculationRe
|
|
|
3642
3582
|
*
|
|
3643
3583
|
*/
|
|
3644
3584
|
constructor(data: {
|
|
3645
|
-
dischargeRecord: Entities.DischargeRecord
|
|
3646
|
-
distancesToJetFireRadiation: number[]
|
|
3647
|
-
jetContourPoints: Entities.LocalPosition[]
|
|
3648
|
-
nJetContourPoints: number[]
|
|
3649
|
-
areaContourJet: number[]
|
|
3650
|
-
distancesToFlamConcentration: number[]
|
|
3651
|
-
flamConcentrationsUsed: number[]
|
|
3652
|
-
flamConcContourPoints: Entities.LocalPosition[]
|
|
3653
|
-
nFlamConcContourPoints: number[]
|
|
3654
|
-
areaFootprintFlamConc: number[]
|
|
3655
|
-
distancesToPoolFireRadiation: number[]
|
|
3656
|
-
poolContourPoints: Entities.LocalPosition[]
|
|
3657
|
-
nPoolContourPoints: number[]
|
|
3658
|
-
areaContourPool: number[]
|
|
3659
|
-
explosionOverpressureResults: Entities.ExplosionOverpressureResult[]
|
|
3660
|
-
distancesToToxicConcentration: number[]
|
|
3661
|
-
toxicConcentrationUsed: number[]
|
|
3662
|
-
toxicConcContourPoints: Entities.LocalPosition[]
|
|
3663
|
-
nToxicConcContourPoints: number[]
|
|
3664
|
-
areaFootprintToxicConc: number[]
|
|
3665
|
-
jetFireFlameResult: Entities.FlameResult
|
|
3666
|
-
poolFireFlameResult: Entities.PoolFireFlameResult
|
|
3667
|
-
resultCode: Enums.ResultCode
|
|
3668
|
-
messages: string[]
|
|
3669
|
-
calculationElapsedTime: number
|
|
3670
|
-
operationId: string
|
|
3585
|
+
dischargeRecord: Entities.DischargeRecord;
|
|
3586
|
+
distancesToJetFireRadiation: number[];
|
|
3587
|
+
jetContourPoints: Entities.LocalPosition[];
|
|
3588
|
+
nJetContourPoints: number[];
|
|
3589
|
+
areaContourJet: number[];
|
|
3590
|
+
distancesToFlamConcentration: number[];
|
|
3591
|
+
flamConcentrationsUsed: number[];
|
|
3592
|
+
flamConcContourPoints: Entities.LocalPosition[];
|
|
3593
|
+
nFlamConcContourPoints: number[];
|
|
3594
|
+
areaFootprintFlamConc: number[];
|
|
3595
|
+
distancesToPoolFireRadiation: number[];
|
|
3596
|
+
poolContourPoints: Entities.LocalPosition[];
|
|
3597
|
+
nPoolContourPoints: number[];
|
|
3598
|
+
areaContourPool: number[];
|
|
3599
|
+
explosionOverpressureResults: Entities.ExplosionOverpressureResult[];
|
|
3600
|
+
distancesToToxicConcentration: number[];
|
|
3601
|
+
toxicConcentrationUsed: number[];
|
|
3602
|
+
toxicConcContourPoints: Entities.LocalPosition[];
|
|
3603
|
+
nToxicConcContourPoints: number[];
|
|
3604
|
+
areaFootprintToxicConc: number[];
|
|
3605
|
+
jetFireFlameResult: Entities.FlameResult;
|
|
3606
|
+
poolFireFlameResult: Entities.PoolFireFlameResult;
|
|
3607
|
+
resultCode: Enums.ResultCode;
|
|
3608
|
+
messages: string[];
|
|
3609
|
+
calculationElapsedTime: number;
|
|
3610
|
+
operationId: string;
|
|
3671
3611
|
}) {
|
|
3672
3612
|
super();
|
|
3673
3613
|
this.dischargeRecord = data.dischargeRecord;
|
|
@@ -3707,13 +3647,11 @@ export class VesselReliefValveLinkedRunCalculationResponse extends CalculationRe
|
|
|
3707
3647
|
this.distancesToJetFireRadiation = data.distancesToJetFireRadiation.map((item) => parseFloat(item));
|
|
3708
3648
|
}
|
|
3709
3649
|
if (data.jetContourPoints && Array.isArray(data.jetContourPoints)) {
|
|
3710
|
-
this.jetContourPoints = data.jetContourPoints.map(
|
|
3711
|
-
(
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
}
|
|
3716
|
-
);
|
|
3650
|
+
this.jetContourPoints = data.jetContourPoints.map((item) => {
|
|
3651
|
+
const record = new Entities.LocalPosition();
|
|
3652
|
+
record.initialiseFromDictionary(item);
|
|
3653
|
+
return record;
|
|
3654
|
+
});
|
|
3717
3655
|
}
|
|
3718
3656
|
if (data.nJetContourPoints && Array.isArray(data.nJetContourPoints)) {
|
|
3719
3657
|
this.nJetContourPoints = data.nJetContourPoints.map((item) => parseInt(item));
|
|
@@ -3728,13 +3666,11 @@ export class VesselReliefValveLinkedRunCalculationResponse extends CalculationRe
|
|
|
3728
3666
|
this.flamConcentrationsUsed = data.flamConcentrationsUsed.map((item) => parseFloat(item));
|
|
3729
3667
|
}
|
|
3730
3668
|
if (data.flamConcContourPoints && Array.isArray(data.flamConcContourPoints)) {
|
|
3731
|
-
this.flamConcContourPoints = data.flamConcContourPoints.map(
|
|
3732
|
-
(
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
}
|
|
3737
|
-
);
|
|
3669
|
+
this.flamConcContourPoints = data.flamConcContourPoints.map((item) => {
|
|
3670
|
+
const record = new Entities.LocalPosition();
|
|
3671
|
+
record.initialiseFromDictionary(item);
|
|
3672
|
+
return record;
|
|
3673
|
+
});
|
|
3738
3674
|
}
|
|
3739
3675
|
if (data.nFlamConcContourPoints && Array.isArray(data.nFlamConcContourPoints)) {
|
|
3740
3676
|
this.nFlamConcContourPoints = data.nFlamConcContourPoints.map((item) => parseInt(item));
|
|
@@ -3746,13 +3682,11 @@ export class VesselReliefValveLinkedRunCalculationResponse extends CalculationRe
|
|
|
3746
3682
|
this.distancesToPoolFireRadiation = data.distancesToPoolFireRadiation.map((item) => parseFloat(item));
|
|
3747
3683
|
}
|
|
3748
3684
|
if (data.poolContourPoints && Array.isArray(data.poolContourPoints)) {
|
|
3749
|
-
this.poolContourPoints = data.poolContourPoints.map(
|
|
3750
|
-
(
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
}
|
|
3755
|
-
);
|
|
3685
|
+
this.poolContourPoints = data.poolContourPoints.map((item) => {
|
|
3686
|
+
const record = new Entities.LocalPosition();
|
|
3687
|
+
record.initialiseFromDictionary(item);
|
|
3688
|
+
return record;
|
|
3689
|
+
});
|
|
3756
3690
|
}
|
|
3757
3691
|
if (data.nPoolContourPoints && Array.isArray(data.nPoolContourPoints)) {
|
|
3758
3692
|
this.nPoolContourPoints = data.nPoolContourPoints.map((item) => parseInt(item));
|
|
@@ -3761,13 +3695,11 @@ export class VesselReliefValveLinkedRunCalculationResponse extends CalculationRe
|
|
|
3761
3695
|
this.areaContourPool = data.areaContourPool.map((item) => parseFloat(item));
|
|
3762
3696
|
}
|
|
3763
3697
|
if (data.explosionOverpressureResults && Array.isArray(data.explosionOverpressureResults)) {
|
|
3764
|
-
this.explosionOverpressureResults = data.explosionOverpressureResults.map(
|
|
3765
|
-
(
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
}
|
|
3770
|
-
);
|
|
3698
|
+
this.explosionOverpressureResults = data.explosionOverpressureResults.map((item) => {
|
|
3699
|
+
const record = new Entities.ExplosionOverpressureResult();
|
|
3700
|
+
record.initialiseFromDictionary(item);
|
|
3701
|
+
return record;
|
|
3702
|
+
});
|
|
3771
3703
|
}
|
|
3772
3704
|
if (data.distancesToToxicConcentration && Array.isArray(data.distancesToToxicConcentration)) {
|
|
3773
3705
|
this.distancesToToxicConcentration = data.distancesToToxicConcentration.map((item) => parseFloat(item));
|
|
@@ -3776,13 +3708,11 @@ export class VesselReliefValveLinkedRunCalculationResponse extends CalculationRe
|
|
|
3776
3708
|
this.toxicConcentrationUsed = data.toxicConcentrationUsed.map((item) => parseFloat(item));
|
|
3777
3709
|
}
|
|
3778
3710
|
if (data.toxicConcContourPoints && Array.isArray(data.toxicConcContourPoints)) {
|
|
3779
|
-
this.toxicConcContourPoints = data.toxicConcContourPoints.map(
|
|
3780
|
-
(
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
}
|
|
3785
|
-
);
|
|
3711
|
+
this.toxicConcContourPoints = data.toxicConcContourPoints.map((item) => {
|
|
3712
|
+
const record = new Entities.LocalPosition();
|
|
3713
|
+
record.initialiseFromDictionary(item);
|
|
3714
|
+
return record;
|
|
3715
|
+
});
|
|
3786
3716
|
}
|
|
3787
3717
|
if (data.nToxicConcContourPoints && Array.isArray(data.nToxicConcContourPoints)) {
|
|
3788
3718
|
this.nToxicConcContourPoints = data.nToxicConcContourPoints.map((item) => parseInt(item));
|
|
@@ -3798,17 +3728,17 @@ export class VesselReliefValveLinkedRunCalculationResponse extends CalculationRe
|
|
|
3798
3728
|
this.poolFireFlameResult = new Entities.PoolFireFlameResult();
|
|
3799
3729
|
this.poolFireFlameResult.initialiseFromDictionary(data.poolFireFlameResult as { [key: string]: unknown });
|
|
3800
3730
|
}
|
|
3801
|
-
if (data.resultCode !== undefined && (typeof data.resultCode ===
|
|
3731
|
+
if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
|
|
3802
3732
|
this.resultCode = data.resultCode as Enums.ResultCode;
|
|
3803
3733
|
}
|
|
3804
3734
|
this.messages = this.messages ?? [];
|
|
3805
3735
|
if (data.messages && Array.isArray(data.messages)) {
|
|
3806
3736
|
this.messages.push(...data.messages);
|
|
3807
3737
|
}
|
|
3808
|
-
if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime ===
|
|
3738
|
+
if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
|
|
3809
3739
|
this.calculationElapsedTime = data.calculationElapsedTime as number;
|
|
3810
3740
|
}
|
|
3811
|
-
if (data.operationId !== undefined && typeof data.operationId ===
|
|
3741
|
+
if (data.operationId !== undefined && typeof data.operationId === 'string') {
|
|
3812
3742
|
this.operationId = data.operationId as string;
|
|
3813
3743
|
}
|
|
3814
3744
|
}
|
|
@@ -3881,35 +3811,35 @@ export class VesselReliefValveLinkedRunCalculationResponseSchema {
|
|
|
3881
3811
|
}).unknown(true);
|
|
3882
3812
|
|
|
3883
3813
|
this.propertyTypes = {
|
|
3884
|
-
dischargeRecord:
|
|
3885
|
-
distancesToJetFireRadiation:
|
|
3886
|
-
jetContourPoints:
|
|
3887
|
-
nJetContourPoints:
|
|
3888
|
-
areaContourJet:
|
|
3889
|
-
distancesToFlamConcentration:
|
|
3890
|
-
flamConcentrationsUsed:
|
|
3891
|
-
flamConcContourPoints:
|
|
3892
|
-
nFlamConcContourPoints:
|
|
3893
|
-
areaFootprintFlamConc:
|
|
3894
|
-
distancesToPoolFireRadiation:
|
|
3895
|
-
poolContourPoints:
|
|
3896
|
-
nPoolContourPoints:
|
|
3897
|
-
areaContourPool:
|
|
3898
|
-
explosionOverpressureResults:
|
|
3899
|
-
distancesToToxicConcentration:
|
|
3900
|
-
toxicConcentrationUsed:
|
|
3901
|
-
toxicConcContourPoints:
|
|
3902
|
-
nToxicConcContourPoints:
|
|
3903
|
-
areaFootprintToxicConc:
|
|
3904
|
-
jetFireFlameResult:
|
|
3905
|
-
poolFireFlameResult:
|
|
3814
|
+
dischargeRecord: 'Entities.DischargeRecord',
|
|
3815
|
+
distancesToJetFireRadiation: 'number[]',
|
|
3816
|
+
jetContourPoints: 'Entities.LocalPosition[]',
|
|
3817
|
+
nJetContourPoints: 'number[]',
|
|
3818
|
+
areaContourJet: 'number[]',
|
|
3819
|
+
distancesToFlamConcentration: 'number[]',
|
|
3820
|
+
flamConcentrationsUsed: 'number[]',
|
|
3821
|
+
flamConcContourPoints: 'Entities.LocalPosition[]',
|
|
3822
|
+
nFlamConcContourPoints: 'number[]',
|
|
3823
|
+
areaFootprintFlamConc: 'number[]',
|
|
3824
|
+
distancesToPoolFireRadiation: 'number[]',
|
|
3825
|
+
poolContourPoints: 'Entities.LocalPosition[]',
|
|
3826
|
+
nPoolContourPoints: 'number[]',
|
|
3827
|
+
areaContourPool: 'number[]',
|
|
3828
|
+
explosionOverpressureResults: 'Entities.ExplosionOverpressureResult[]',
|
|
3829
|
+
distancesToToxicConcentration: 'number[]',
|
|
3830
|
+
toxicConcentrationUsed: 'number[]',
|
|
3831
|
+
toxicConcContourPoints: 'Entities.LocalPosition[]',
|
|
3832
|
+
nToxicConcContourPoints: 'number[]',
|
|
3833
|
+
areaFootprintToxicConc: 'number[]',
|
|
3834
|
+
jetFireFlameResult: 'Entities.FlameResult',
|
|
3835
|
+
poolFireFlameResult: 'Entities.PoolFireFlameResult',
|
|
3906
3836
|
};
|
|
3907
3837
|
}
|
|
3908
3838
|
|
|
3909
3839
|
validate(data: VesselReliefValveLinkedRunCalculationResponseSchemaData): VesselReliefValveLinkedRunCalculationResponse {
|
|
3910
3840
|
const { error, value } = this.schema.validate(data, { abortEarly: false });
|
|
3911
3841
|
if (error) {
|
|
3912
|
-
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(
|
|
3842
|
+
throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
|
|
3913
3843
|
}
|
|
3914
3844
|
return this.makeCalculationResponse(value);
|
|
3915
3845
|
}
|