@dnv-plant/typescriptpws 1.0.86 → 1.0.88
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/.vscode/launch.json +16 -0
- package/azure-test-folder-job.yml +2 -2
- package/index.ts +3 -3
- package/package.json +7 -6
- package/src/calculations/applicationTools.ts +29 -36
- package/src/calculations/discharge.ts +423 -321
- package/src/calculations/dispersion.ts +52 -84
- package/src/calculations/dispersionView.ts +311 -549
- package/src/calculations/fireball.ts +45 -69
- package/src/calculations/jetFire.ts +80 -129
- package/src/calculations/lateExplosion.ts +120 -210
- package/src/calculations/linkedRunners.ts +727 -1275
- package/src/calculations/poolFire.ts +45 -69
- package/src/calculations/properties.ts +32 -42
- package/src/calculations/radiation.ts +415 -714
- package/src/calculations/standalones.ts +39 -57
- package/src/calculations/toxics.ts +50 -78
- package/src/calculations/utilities.ts +357 -588
- package/src/constants.ts +9 -3
- package/src/entities.ts +3 -3
- package/src/entity-schemas.ts +3 -3
- package/src/enums.ts +4 -27
- package/src/materials.ts +236 -75
- package/src/utilities.ts +40 -9
- package/tsconfig.json +0 -100
- package/vitest.config.ts +9 -0
|
@@ -6,12 +6,10 @@
|
|
|
6
6
|
* Editing it may lead to inconsistent results and limit DNV's ability to provide support.
|
|
7
7
|
* Please contact DNV if you believe changes are required.
|
|
8
8
|
*
|
|
9
|
-
* Version: 1.0.
|
|
10
|
-
* Date/time:
|
|
9
|
+
* Version: 1.0.89
|
|
10
|
+
* Date/time: 29 Jul 2025 17:59:11
|
|
11
11
|
* Template: templates/typescriptpws/calculations.razor.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
***********************************************************************/
|
|
15
13
|
|
|
16
14
|
import * as Enums from "../enums";
|
|
17
15
|
import * as Entities from "../entities";
|
|
@@ -36,12 +34,17 @@ class CalculationBase {
|
|
|
36
34
|
messages: string[] = [];
|
|
37
35
|
calculationElapsedTime?: number = 0.0;
|
|
38
36
|
operationId?: string = "";
|
|
37
|
+
controller?: AbortController;
|
|
38
|
+
|
|
39
|
+
constructor(controller?: AbortController) {
|
|
40
|
+
this.controller = controller;
|
|
41
|
+
}
|
|
39
42
|
|
|
40
43
|
/**
|
|
41
44
|
* Post JSON to URL and time the call
|
|
42
45
|
*/
|
|
43
46
|
async postRequest(url: string, data: string): Promise<AxiosResponse> {
|
|
44
|
-
return postRequest(url, data);
|
|
47
|
+
return postRequest(url, data, this.controller);
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
/**
|
|
@@ -167,19 +170,16 @@ class ConvertCompositionMassToMoleCalculationRequest extends CalculationRequestB
|
|
|
167
170
|
/**
|
|
168
171
|
* ConvertCompositionMassToMole calculation request class.
|
|
169
172
|
*
|
|
170
|
-
* @param {Entities.Material} mixture - a material entity with two or more material components to have composition converted.
|
|
171
|
-
* @param {number[]} compositionMass - Array of mass fractions.
|
|
172
|
-
* @param {number} compositionMassCount - Number of components in mixture.
|
|
173
173
|
*/
|
|
174
|
-
constructor(
|
|
174
|
+
constructor(data: {
|
|
175
175
|
mixture: Entities.Material,
|
|
176
176
|
compositionMass: number[],
|
|
177
177
|
compositionMassCount: number
|
|
178
|
-
) {
|
|
178
|
+
}) {
|
|
179
179
|
super();
|
|
180
|
-
this.mixture = mixture;
|
|
181
|
-
this.compositionMass = compositionMass;
|
|
182
|
-
this.compositionMassCount = compositionMassCount;
|
|
180
|
+
this.mixture = data.mixture;
|
|
181
|
+
this.compositionMass = data.compositionMass;
|
|
182
|
+
this.compositionMassCount = data.compositionMassCount;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
|
|
@@ -213,11 +213,7 @@ export class ConvertCompositionMassToMoleCalculationRequestSchema {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
makeCalculationRequest(data: ConvertCompositionMassToMoleCalculationRequestSchemaData): ConvertCompositionMassToMoleCalculationRequest {
|
|
216
|
-
return new ConvertCompositionMassToMoleCalculationRequest(
|
|
217
|
-
data.mixture,
|
|
218
|
-
data.compositionMass,
|
|
219
|
-
data.compositionMassCount
|
|
220
|
-
);
|
|
216
|
+
return new ConvertCompositionMassToMoleCalculationRequest(data);
|
|
221
217
|
}
|
|
222
218
|
}
|
|
223
219
|
|
|
@@ -230,28 +226,26 @@ export class ConvertCompositionMassToMoleCalculation extends CalculationBase {
|
|
|
230
226
|
/**
|
|
231
227
|
* Converts mixture composition from mass to mole basis.
|
|
232
228
|
*
|
|
233
|
-
* @param {Entities.Material} mixture - a material entity with two or more material components to have composition converted.
|
|
234
|
-
* @param {number[]} compositionMass - Array of mass fractions.
|
|
235
|
-
* @param {number} compositionMassCount - Number of components in mixture.
|
|
236
229
|
*/
|
|
237
|
-
constructor(
|
|
230
|
+
constructor(data: {
|
|
238
231
|
mixture: Entities.Material,
|
|
239
232
|
compositionMass: number[],
|
|
240
233
|
compositionMassCount: number
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
this.
|
|
245
|
-
this.
|
|
234
|
+
controller?: AbortController;
|
|
235
|
+
}) {
|
|
236
|
+
super(data.controller);
|
|
237
|
+
this.mixture = data.mixture;
|
|
238
|
+
this.compositionMass = data.compositionMass;
|
|
239
|
+
this.compositionMassCount = data.compositionMassCount;
|
|
246
240
|
}
|
|
247
241
|
|
|
248
242
|
async run() {
|
|
249
243
|
try {
|
|
250
|
-
const request = new ConvertCompositionMassToMoleCalculationRequest(
|
|
251
|
-
this.mixture,
|
|
252
|
-
this.compositionMass,
|
|
253
|
-
this.compositionMassCount
|
|
254
|
-
);
|
|
244
|
+
const request = new ConvertCompositionMassToMoleCalculationRequest({
|
|
245
|
+
mixture: this.mixture,
|
|
246
|
+
compositionMass: this.compositionMass,
|
|
247
|
+
compositionMassCount: this.compositionMassCount
|
|
248
|
+
});
|
|
255
249
|
|
|
256
250
|
const schema = new ConvertCompositionMassToMoleCalculationRequestSchema();
|
|
257
251
|
const validatedRequest = schema.validate(request);
|
|
@@ -315,21 +309,20 @@ export class ConvertCompositionMassToMoleCalculationResponse extends Calculation
|
|
|
315
309
|
/**
|
|
316
310
|
* ConvertCompositionMassToMole calculation response class.
|
|
317
311
|
*
|
|
318
|
-
* @param {number[]} compositionMole - Array of mole fractions.
|
|
319
312
|
*/
|
|
320
|
-
constructor(
|
|
313
|
+
constructor(data: {
|
|
321
314
|
compositionMole: number[],
|
|
322
315
|
resultCode: Enums.ResultCode,
|
|
323
316
|
messages: string[],
|
|
324
317
|
calculationElapsedTime: number,
|
|
325
318
|
operationId: string
|
|
326
|
-
) {
|
|
319
|
+
}) {
|
|
327
320
|
super();
|
|
328
|
-
this.compositionMole = compositionMole;
|
|
329
|
-
this.resultCode = resultCode;
|
|
330
|
-
this.messages = messages;
|
|
331
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
332
|
-
this.operationId = operationId;
|
|
321
|
+
this.compositionMole = data.compositionMole;
|
|
322
|
+
this.resultCode = data.resultCode;
|
|
323
|
+
this.messages = data.messages;
|
|
324
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
325
|
+
this.operationId = data.operationId;
|
|
333
326
|
}
|
|
334
327
|
|
|
335
328
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -390,13 +383,7 @@ export class ConvertCompositionMassToMoleCalculationResponseSchema {
|
|
|
390
383
|
}
|
|
391
384
|
|
|
392
385
|
makeCalculationResponse(data: ConvertCompositionMassToMoleCalculationResponseSchemaData): ConvertCompositionMassToMoleCalculationResponse {
|
|
393
|
-
return new ConvertCompositionMassToMoleCalculationResponse(
|
|
394
|
-
data.compositionMole,
|
|
395
|
-
data.resultCode,
|
|
396
|
-
data.messages,
|
|
397
|
-
data.calculationElapsedTime,
|
|
398
|
-
data.operationId
|
|
399
|
-
);
|
|
386
|
+
return new ConvertCompositionMassToMoleCalculationResponse(data);
|
|
400
387
|
}
|
|
401
388
|
}
|
|
402
389
|
|
|
@@ -414,19 +401,16 @@ class ConvertCompositionMoleToMassCalculationRequest extends CalculationRequestB
|
|
|
414
401
|
/**
|
|
415
402
|
* ConvertCompositionMoleToMass calculation request class.
|
|
416
403
|
*
|
|
417
|
-
* @param {Entities.Material} mixture - a material entity with two or more material components to have composition converted.
|
|
418
|
-
* @param {number[]} compositionMoles - Array of mole fractions.
|
|
419
|
-
* @param {number} compositionMolesCount - Number of components in mixture.
|
|
420
404
|
*/
|
|
421
|
-
constructor(
|
|
405
|
+
constructor(data: {
|
|
422
406
|
mixture: Entities.Material,
|
|
423
407
|
compositionMoles: number[],
|
|
424
408
|
compositionMolesCount: number
|
|
425
|
-
) {
|
|
409
|
+
}) {
|
|
426
410
|
super();
|
|
427
|
-
this.mixture = mixture;
|
|
428
|
-
this.compositionMoles = compositionMoles;
|
|
429
|
-
this.compositionMolesCount = compositionMolesCount;
|
|
411
|
+
this.mixture = data.mixture;
|
|
412
|
+
this.compositionMoles = data.compositionMoles;
|
|
413
|
+
this.compositionMolesCount = data.compositionMolesCount;
|
|
430
414
|
}
|
|
431
415
|
}
|
|
432
416
|
|
|
@@ -460,11 +444,7 @@ export class ConvertCompositionMoleToMassCalculationRequestSchema {
|
|
|
460
444
|
}
|
|
461
445
|
|
|
462
446
|
makeCalculationRequest(data: ConvertCompositionMoleToMassCalculationRequestSchemaData): ConvertCompositionMoleToMassCalculationRequest {
|
|
463
|
-
return new ConvertCompositionMoleToMassCalculationRequest(
|
|
464
|
-
data.mixture,
|
|
465
|
-
data.compositionMoles,
|
|
466
|
-
data.compositionMolesCount
|
|
467
|
-
);
|
|
447
|
+
return new ConvertCompositionMoleToMassCalculationRequest(data);
|
|
468
448
|
}
|
|
469
449
|
}
|
|
470
450
|
|
|
@@ -477,28 +457,26 @@ export class ConvertCompositionMoleToMassCalculation extends CalculationBase {
|
|
|
477
457
|
/**
|
|
478
458
|
* Converts mixture composition from mole to mass basis.
|
|
479
459
|
*
|
|
480
|
-
* @param {Entities.Material} mixture - a material entity with two or more material components to have composition converted.
|
|
481
|
-
* @param {number[]} compositionMoles - Array of mole fractions.
|
|
482
|
-
* @param {number} compositionMolesCount - Number of components in mixture.
|
|
483
460
|
*/
|
|
484
|
-
constructor(
|
|
461
|
+
constructor(data: {
|
|
485
462
|
mixture: Entities.Material,
|
|
486
463
|
compositionMoles: number[],
|
|
487
464
|
compositionMolesCount: number
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
this.
|
|
492
|
-
this.
|
|
465
|
+
controller?: AbortController;
|
|
466
|
+
}) {
|
|
467
|
+
super(data.controller);
|
|
468
|
+
this.mixture = data.mixture;
|
|
469
|
+
this.compositionMoles = data.compositionMoles;
|
|
470
|
+
this.compositionMolesCount = data.compositionMolesCount;
|
|
493
471
|
}
|
|
494
472
|
|
|
495
473
|
async run() {
|
|
496
474
|
try {
|
|
497
|
-
const request = new ConvertCompositionMoleToMassCalculationRequest(
|
|
498
|
-
this.mixture,
|
|
499
|
-
this.compositionMoles,
|
|
500
|
-
this.compositionMolesCount
|
|
501
|
-
);
|
|
475
|
+
const request = new ConvertCompositionMoleToMassCalculationRequest({
|
|
476
|
+
mixture: this.mixture,
|
|
477
|
+
compositionMoles: this.compositionMoles,
|
|
478
|
+
compositionMolesCount: this.compositionMolesCount
|
|
479
|
+
});
|
|
502
480
|
|
|
503
481
|
const schema = new ConvertCompositionMoleToMassCalculationRequestSchema();
|
|
504
482
|
const validatedRequest = schema.validate(request);
|
|
@@ -562,21 +540,20 @@ export class ConvertCompositionMoleToMassCalculationResponse extends Calculation
|
|
|
562
540
|
/**
|
|
563
541
|
* ConvertCompositionMoleToMass calculation response class.
|
|
564
542
|
*
|
|
565
|
-
* @param {number[]} compositionMass - Array of mass fractions.
|
|
566
543
|
*/
|
|
567
|
-
constructor(
|
|
544
|
+
constructor(data: {
|
|
568
545
|
compositionMass: number[],
|
|
569
546
|
resultCode: Enums.ResultCode,
|
|
570
547
|
messages: string[],
|
|
571
548
|
calculationElapsedTime: number,
|
|
572
549
|
operationId: string
|
|
573
|
-
) {
|
|
550
|
+
}) {
|
|
574
551
|
super();
|
|
575
|
-
this.compositionMass = compositionMass;
|
|
576
|
-
this.resultCode = resultCode;
|
|
577
|
-
this.messages = messages;
|
|
578
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
579
|
-
this.operationId = operationId;
|
|
552
|
+
this.compositionMass = data.compositionMass;
|
|
553
|
+
this.resultCode = data.resultCode;
|
|
554
|
+
this.messages = data.messages;
|
|
555
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
556
|
+
this.operationId = data.operationId;
|
|
580
557
|
}
|
|
581
558
|
|
|
582
559
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -637,13 +614,7 @@ export class ConvertCompositionMoleToMassCalculationResponseSchema {
|
|
|
637
614
|
}
|
|
638
615
|
|
|
639
616
|
makeCalculationResponse(data: ConvertCompositionMoleToMassCalculationResponseSchemaData): ConvertCompositionMoleToMassCalculationResponse {
|
|
640
|
-
return new ConvertCompositionMoleToMassCalculationResponse(
|
|
641
|
-
data.compositionMass,
|
|
642
|
-
data.resultCode,
|
|
643
|
-
data.messages,
|
|
644
|
-
data.calculationElapsedTime,
|
|
645
|
-
data.operationId
|
|
646
|
-
);
|
|
617
|
+
return new ConvertCompositionMoleToMassCalculationResponse(data);
|
|
647
618
|
}
|
|
648
619
|
}
|
|
649
620
|
|
|
@@ -657,13 +628,12 @@ class GetMassFromVesselCalculationRequest extends CalculationRequestBase {
|
|
|
657
628
|
/**
|
|
658
629
|
* GetMassFromVessel calculation request class.
|
|
659
630
|
*
|
|
660
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
661
631
|
*/
|
|
662
|
-
constructor(
|
|
632
|
+
constructor(data: {
|
|
663
633
|
vessel: Entities.Vessel
|
|
664
|
-
) {
|
|
634
|
+
}) {
|
|
665
635
|
super();
|
|
666
|
-
this.vessel = vessel;
|
|
636
|
+
this.vessel = data.vessel;
|
|
667
637
|
}
|
|
668
638
|
}
|
|
669
639
|
|
|
@@ -693,9 +663,7 @@ export class GetMassFromVesselCalculationRequestSchema {
|
|
|
693
663
|
}
|
|
694
664
|
|
|
695
665
|
makeCalculationRequest(data: GetMassFromVesselCalculationRequestSchemaData): GetMassFromVesselCalculationRequest {
|
|
696
|
-
return new GetMassFromVesselCalculationRequest(
|
|
697
|
-
data.vessel
|
|
698
|
-
);
|
|
666
|
+
return new GetMassFromVesselCalculationRequest(data);
|
|
699
667
|
}
|
|
700
668
|
}
|
|
701
669
|
|
|
@@ -706,20 +674,20 @@ export class GetMassFromVesselCalculation extends CalculationBase {
|
|
|
706
674
|
/**
|
|
707
675
|
* Calculates the mass in a vessel.
|
|
708
676
|
*
|
|
709
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
710
677
|
*/
|
|
711
|
-
constructor(
|
|
678
|
+
constructor(data: {
|
|
712
679
|
vessel: Entities.Vessel
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
680
|
+
controller?: AbortController;
|
|
681
|
+
}) {
|
|
682
|
+
super(data.controller);
|
|
683
|
+
this.vessel = data.vessel;
|
|
716
684
|
}
|
|
717
685
|
|
|
718
686
|
async run() {
|
|
719
687
|
try {
|
|
720
|
-
const request = new GetMassFromVesselCalculationRequest(
|
|
721
|
-
this.vessel
|
|
722
|
-
);
|
|
688
|
+
const request = new GetMassFromVesselCalculationRequest({
|
|
689
|
+
vessel: this.vessel
|
|
690
|
+
});
|
|
723
691
|
|
|
724
692
|
const schema = new GetMassFromVesselCalculationRequestSchema();
|
|
725
693
|
const validatedRequest = schema.validate(request);
|
|
@@ -778,21 +746,20 @@ export class GetMassFromVesselCalculationResponse extends CalculationResponseBas
|
|
|
778
746
|
/**
|
|
779
747
|
* GetMassFromVessel calculation response class.
|
|
780
748
|
*
|
|
781
|
-
* @param {number} massInventory - Mass inventory in the vessel (kg).
|
|
782
749
|
*/
|
|
783
|
-
constructor(
|
|
750
|
+
constructor(data: {
|
|
784
751
|
massInventory: number,
|
|
785
752
|
resultCode: Enums.ResultCode,
|
|
786
753
|
messages: string[],
|
|
787
754
|
calculationElapsedTime: number,
|
|
788
755
|
operationId: string
|
|
789
|
-
) {
|
|
756
|
+
}) {
|
|
790
757
|
super();
|
|
791
|
-
this.massInventory = massInventory;
|
|
792
|
-
this.resultCode = resultCode;
|
|
793
|
-
this.messages = messages;
|
|
794
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
795
|
-
this.operationId = operationId;
|
|
758
|
+
this.massInventory = data.massInventory;
|
|
759
|
+
this.resultCode = data.resultCode;
|
|
760
|
+
this.messages = data.messages;
|
|
761
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
762
|
+
this.operationId = data.operationId;
|
|
796
763
|
}
|
|
797
764
|
|
|
798
765
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -853,13 +820,7 @@ export class GetMassFromVesselCalculationResponseSchema {
|
|
|
853
820
|
}
|
|
854
821
|
|
|
855
822
|
makeCalculationResponse(data: GetMassFromVesselCalculationResponseSchemaData): GetMassFromVesselCalculationResponse {
|
|
856
|
-
return new GetMassFromVesselCalculationResponse(
|
|
857
|
-
data.massInventory,
|
|
858
|
-
data.resultCode,
|
|
859
|
-
data.messages,
|
|
860
|
-
data.calculationElapsedTime,
|
|
861
|
-
data.operationId
|
|
862
|
-
);
|
|
823
|
+
return new GetMassFromVesselCalculationResponse(data);
|
|
863
824
|
}
|
|
864
825
|
}
|
|
865
826
|
|
|
@@ -885,15 +846,8 @@ class LoadMassInventoryVesselForLeakScenarioCalculationRequest extends Calculati
|
|
|
885
846
|
/**
|
|
886
847
|
* LoadMassInventoryVesselForLeakScenario calculation request class.
|
|
887
848
|
*
|
|
888
|
-
* @param {Entities.Material} material - a material entity.
|
|
889
|
-
* @param {number} mass - Total vessel mass inventory.
|
|
890
|
-
* @param {number} pressure - Absolute pressure of the fluid.
|
|
891
|
-
* @param {number} temperature - Temperature of the fluid.
|
|
892
|
-
* @param {number} holeSize - The diameter of the equivalent circular orifice with the same area as the area of the leak.
|
|
893
|
-
* @param {number} releaseElevation - Elevation of the release above ground level.
|
|
894
|
-
* @param {number} releaseAngle - Angle of release above a horizontal plane.
|
|
895
849
|
*/
|
|
896
|
-
constructor(
|
|
850
|
+
constructor(data: {
|
|
897
851
|
material: Entities.Material,
|
|
898
852
|
mass: number,
|
|
899
853
|
pressure: number,
|
|
@@ -901,15 +855,15 @@ class LoadMassInventoryVesselForLeakScenarioCalculationRequest extends Calculati
|
|
|
901
855
|
holeSize: number,
|
|
902
856
|
releaseElevation: number,
|
|
903
857
|
releaseAngle: number
|
|
904
|
-
) {
|
|
858
|
+
}) {
|
|
905
859
|
super();
|
|
906
|
-
this.material = material;
|
|
907
|
-
this.mass = mass;
|
|
908
|
-
this.pressure = pressure;
|
|
909
|
-
this.temperature = temperature;
|
|
910
|
-
this.holeSize = holeSize;
|
|
911
|
-
this.releaseElevation = releaseElevation;
|
|
912
|
-
this.releaseAngle = releaseAngle;
|
|
860
|
+
this.material = data.material;
|
|
861
|
+
this.mass = data.mass;
|
|
862
|
+
this.pressure = data.pressure;
|
|
863
|
+
this.temperature = data.temperature;
|
|
864
|
+
this.holeSize = data.holeSize;
|
|
865
|
+
this.releaseElevation = data.releaseElevation;
|
|
866
|
+
this.releaseAngle = data.releaseAngle;
|
|
913
867
|
}
|
|
914
868
|
}
|
|
915
869
|
|
|
@@ -951,15 +905,7 @@ export class LoadMassInventoryVesselForLeakScenarioCalculationRequestSchema {
|
|
|
951
905
|
}
|
|
952
906
|
|
|
953
907
|
makeCalculationRequest(data: LoadMassInventoryVesselForLeakScenarioCalculationRequestSchemaData): LoadMassInventoryVesselForLeakScenarioCalculationRequest {
|
|
954
|
-
return new LoadMassInventoryVesselForLeakScenarioCalculationRequest(
|
|
955
|
-
data.material,
|
|
956
|
-
data.mass,
|
|
957
|
-
data.pressure,
|
|
958
|
-
data.temperature,
|
|
959
|
-
data.holeSize,
|
|
960
|
-
data.releaseElevation,
|
|
961
|
-
data.releaseAngle
|
|
962
|
-
);
|
|
908
|
+
return new LoadMassInventoryVesselForLeakScenarioCalculationRequest(data);
|
|
963
909
|
}
|
|
964
910
|
}
|
|
965
911
|
|
|
@@ -977,15 +923,8 @@ export class LoadMassInventoryVesselForLeakScenarioCalculation extends Calculati
|
|
|
977
923
|
/**
|
|
978
924
|
* Sets up a vessel and a leak scenario from a mass inventory, pressure, temperature and hole size specifications.
|
|
979
925
|
*
|
|
980
|
-
* @param {Entities.Material} material - a material entity.
|
|
981
|
-
* @param {number} mass - Total vessel mass inventory.
|
|
982
|
-
* @param {number} pressure - Absolute pressure of the fluid.
|
|
983
|
-
* @param {number} temperature - Temperature of the fluid.
|
|
984
|
-
* @param {number} holeSize - The diameter of the equivalent circular orifice with the same area as the area of the leak.
|
|
985
|
-
* @param {number} releaseElevation - Elevation of the release above ground level.
|
|
986
|
-
* @param {number} releaseAngle - Angle of release above a horizontal plane.
|
|
987
926
|
*/
|
|
988
|
-
constructor(
|
|
927
|
+
constructor(data: {
|
|
989
928
|
material: Entities.Material,
|
|
990
929
|
mass: number,
|
|
991
930
|
pressure: number,
|
|
@@ -993,28 +932,29 @@ export class LoadMassInventoryVesselForLeakScenarioCalculation extends Calculati
|
|
|
993
932
|
holeSize: number,
|
|
994
933
|
releaseElevation: number,
|
|
995
934
|
releaseAngle: number
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
this.
|
|
1000
|
-
this.
|
|
1001
|
-
this.
|
|
1002
|
-
this.
|
|
1003
|
-
this.
|
|
1004
|
-
this.
|
|
935
|
+
controller?: AbortController;
|
|
936
|
+
}) {
|
|
937
|
+
super(data.controller);
|
|
938
|
+
this.material = data.material;
|
|
939
|
+
this.mass = data.mass;
|
|
940
|
+
this.pressure = data.pressure;
|
|
941
|
+
this.temperature = data.temperature;
|
|
942
|
+
this.holeSize = data.holeSize;
|
|
943
|
+
this.releaseElevation = data.releaseElevation;
|
|
944
|
+
this.releaseAngle = data.releaseAngle;
|
|
1005
945
|
}
|
|
1006
946
|
|
|
1007
947
|
async run() {
|
|
1008
948
|
try {
|
|
1009
|
-
const request = new LoadMassInventoryVesselForLeakScenarioCalculationRequest(
|
|
1010
|
-
this.material,
|
|
1011
|
-
this.mass,
|
|
1012
|
-
this.pressure,
|
|
1013
|
-
this.temperature,
|
|
1014
|
-
this.holeSize,
|
|
1015
|
-
this.releaseElevation,
|
|
1016
|
-
this.releaseAngle
|
|
1017
|
-
);
|
|
949
|
+
const request = new LoadMassInventoryVesselForLeakScenarioCalculationRequest({
|
|
950
|
+
material: this.material,
|
|
951
|
+
mass: this.mass,
|
|
952
|
+
pressure: this.pressure,
|
|
953
|
+
temperature: this.temperature,
|
|
954
|
+
holeSize: this.holeSize,
|
|
955
|
+
releaseElevation: this.releaseElevation,
|
|
956
|
+
releaseAngle: this.releaseAngle
|
|
957
|
+
});
|
|
1018
958
|
|
|
1019
959
|
const schema = new LoadMassInventoryVesselForLeakScenarioCalculationRequestSchema();
|
|
1020
960
|
const validatedRequest = schema.validate(request);
|
|
@@ -1076,24 +1016,22 @@ export class LoadMassInventoryVesselForLeakScenarioCalculationResponse extends C
|
|
|
1076
1016
|
/**
|
|
1077
1017
|
* LoadMassInventoryVesselForLeakScenario calculation response class.
|
|
1078
1018
|
*
|
|
1079
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
1080
|
-
* @param {Entities.Leak} leak - a leak entity.
|
|
1081
1019
|
*/
|
|
1082
|
-
constructor(
|
|
1020
|
+
constructor(data: {
|
|
1083
1021
|
vessel: Entities.Vessel,
|
|
1084
1022
|
leak: Entities.Leak,
|
|
1085
1023
|
resultCode: Enums.ResultCode,
|
|
1086
1024
|
messages: string[],
|
|
1087
1025
|
calculationElapsedTime: number,
|
|
1088
1026
|
operationId: string
|
|
1089
|
-
) {
|
|
1027
|
+
}) {
|
|
1090
1028
|
super();
|
|
1091
|
-
this.vessel = vessel;
|
|
1092
|
-
this.leak = leak;
|
|
1093
|
-
this.resultCode = resultCode;
|
|
1094
|
-
this.messages = messages;
|
|
1095
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
1096
|
-
this.operationId = operationId;
|
|
1029
|
+
this.vessel = data.vessel;
|
|
1030
|
+
this.leak = data.leak;
|
|
1031
|
+
this.resultCode = data.resultCode;
|
|
1032
|
+
this.messages = data.messages;
|
|
1033
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
1034
|
+
this.operationId = data.operationId;
|
|
1097
1035
|
}
|
|
1098
1036
|
|
|
1099
1037
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -1162,14 +1100,7 @@ export class LoadMassInventoryVesselForLeakScenarioCalculationResponseSchema {
|
|
|
1162
1100
|
}
|
|
1163
1101
|
|
|
1164
1102
|
makeCalculationResponse(data: LoadMassInventoryVesselForLeakScenarioCalculationResponseSchemaData): LoadMassInventoryVesselForLeakScenarioCalculationResponse {
|
|
1165
|
-
return new LoadMassInventoryVesselForLeakScenarioCalculationResponse(
|
|
1166
|
-
data.vessel,
|
|
1167
|
-
data.leak,
|
|
1168
|
-
data.resultCode,
|
|
1169
|
-
data.messages,
|
|
1170
|
-
data.calculationElapsedTime,
|
|
1171
|
-
data.operationId
|
|
1172
|
-
);
|
|
1103
|
+
return new LoadMassInventoryVesselForLeakScenarioCalculationResponse(data);
|
|
1173
1104
|
}
|
|
1174
1105
|
}
|
|
1175
1106
|
|
|
@@ -1197,16 +1128,8 @@ class LoadMassInventoryVesselForLineRuptureScenarioCalculationRequest extends Ca
|
|
|
1197
1128
|
/**
|
|
1198
1129
|
* LoadMassInventoryVesselForLineRuptureScenario calculation request class.
|
|
1199
1130
|
*
|
|
1200
|
-
* @param {Entities.Material} material - a material entity.
|
|
1201
|
-
* @param {number} mass - Total vessel mass inventory.
|
|
1202
|
-
* @param {number} pressure - Absolute pressure of the fluid.
|
|
1203
|
-
* @param {number} temperature - Temperature of the fluid.
|
|
1204
|
-
* @param {number} pipeDiameter - Internal diameter of the pipe.
|
|
1205
|
-
* @param {number} pipeLength - Length of the pipe.
|
|
1206
|
-
* @param {number} releaseElevation - Elevation of the release above ground level.
|
|
1207
|
-
* @param {number} releaseAngle - Angle of release above a horizontal plane.
|
|
1208
1131
|
*/
|
|
1209
|
-
constructor(
|
|
1132
|
+
constructor(data: {
|
|
1210
1133
|
material: Entities.Material,
|
|
1211
1134
|
mass: number,
|
|
1212
1135
|
pressure: number,
|
|
@@ -1215,16 +1138,16 @@ class LoadMassInventoryVesselForLineRuptureScenarioCalculationRequest extends Ca
|
|
|
1215
1138
|
pipeLength: number,
|
|
1216
1139
|
releaseElevation: number,
|
|
1217
1140
|
releaseAngle: number
|
|
1218
|
-
) {
|
|
1141
|
+
}) {
|
|
1219
1142
|
super();
|
|
1220
|
-
this.material = material;
|
|
1221
|
-
this.mass = mass;
|
|
1222
|
-
this.pressure = pressure;
|
|
1223
|
-
this.temperature = temperature;
|
|
1224
|
-
this.pipeDiameter = pipeDiameter;
|
|
1225
|
-
this.pipeLength = pipeLength;
|
|
1226
|
-
this.releaseElevation = releaseElevation;
|
|
1227
|
-
this.releaseAngle = releaseAngle;
|
|
1143
|
+
this.material = data.material;
|
|
1144
|
+
this.mass = data.mass;
|
|
1145
|
+
this.pressure = data.pressure;
|
|
1146
|
+
this.temperature = data.temperature;
|
|
1147
|
+
this.pipeDiameter = data.pipeDiameter;
|
|
1148
|
+
this.pipeLength = data.pipeLength;
|
|
1149
|
+
this.releaseElevation = data.releaseElevation;
|
|
1150
|
+
this.releaseAngle = data.releaseAngle;
|
|
1228
1151
|
}
|
|
1229
1152
|
}
|
|
1230
1153
|
|
|
@@ -1268,16 +1191,7 @@ export class LoadMassInventoryVesselForLineRuptureScenarioCalculationRequestSche
|
|
|
1268
1191
|
}
|
|
1269
1192
|
|
|
1270
1193
|
makeCalculationRequest(data: LoadMassInventoryVesselForLineRuptureScenarioCalculationRequestSchemaData): LoadMassInventoryVesselForLineRuptureScenarioCalculationRequest {
|
|
1271
|
-
return new LoadMassInventoryVesselForLineRuptureScenarioCalculationRequest(
|
|
1272
|
-
data.material,
|
|
1273
|
-
data.mass,
|
|
1274
|
-
data.pressure,
|
|
1275
|
-
data.temperature,
|
|
1276
|
-
data.pipeDiameter,
|
|
1277
|
-
data.pipeLength,
|
|
1278
|
-
data.releaseElevation,
|
|
1279
|
-
data.releaseAngle
|
|
1280
|
-
);
|
|
1194
|
+
return new LoadMassInventoryVesselForLineRuptureScenarioCalculationRequest(data);
|
|
1281
1195
|
}
|
|
1282
1196
|
}
|
|
1283
1197
|
|
|
@@ -1296,16 +1210,8 @@ export class LoadMassInventoryVesselForLineRuptureScenarioCalculation extends Ca
|
|
|
1296
1210
|
/**
|
|
1297
1211
|
* Sets up a vessel and a line rupture scenario from a mass inventory, pressure, temperature pipe diameter and length specifications.
|
|
1298
1212
|
*
|
|
1299
|
-
* @param {Entities.Material} material - a material entity.
|
|
1300
|
-
* @param {number} mass - Total vessel mass inventory.
|
|
1301
|
-
* @param {number} pressure - Absolute pressure of the fluid.
|
|
1302
|
-
* @param {number} temperature - Temperature of the fluid.
|
|
1303
|
-
* @param {number} pipeDiameter - Internal diameter of the pipe.
|
|
1304
|
-
* @param {number} pipeLength - Length of the pipe.
|
|
1305
|
-
* @param {number} releaseElevation - Elevation of the release above ground level.
|
|
1306
|
-
* @param {number} releaseAngle - Angle of release above a horizontal plane.
|
|
1307
1213
|
*/
|
|
1308
|
-
constructor(
|
|
1214
|
+
constructor(data: {
|
|
1309
1215
|
material: Entities.Material,
|
|
1310
1216
|
mass: number,
|
|
1311
1217
|
pressure: number,
|
|
@@ -1314,30 +1220,31 @@ export class LoadMassInventoryVesselForLineRuptureScenarioCalculation extends Ca
|
|
|
1314
1220
|
pipeLength: number,
|
|
1315
1221
|
releaseElevation: number,
|
|
1316
1222
|
releaseAngle: number
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
this.
|
|
1321
|
-
this.
|
|
1322
|
-
this.
|
|
1323
|
-
this.
|
|
1324
|
-
this.
|
|
1325
|
-
this.
|
|
1326
|
-
this.
|
|
1223
|
+
controller?: AbortController;
|
|
1224
|
+
}) {
|
|
1225
|
+
super(data.controller);
|
|
1226
|
+
this.material = data.material;
|
|
1227
|
+
this.mass = data.mass;
|
|
1228
|
+
this.pressure = data.pressure;
|
|
1229
|
+
this.temperature = data.temperature;
|
|
1230
|
+
this.pipeDiameter = data.pipeDiameter;
|
|
1231
|
+
this.pipeLength = data.pipeLength;
|
|
1232
|
+
this.releaseElevation = data.releaseElevation;
|
|
1233
|
+
this.releaseAngle = data.releaseAngle;
|
|
1327
1234
|
}
|
|
1328
1235
|
|
|
1329
1236
|
async run() {
|
|
1330
1237
|
try {
|
|
1331
|
-
const request = new LoadMassInventoryVesselForLineRuptureScenarioCalculationRequest(
|
|
1332
|
-
this.material,
|
|
1333
|
-
this.mass,
|
|
1334
|
-
this.pressure,
|
|
1335
|
-
this.temperature,
|
|
1336
|
-
this.pipeDiameter,
|
|
1337
|
-
this.pipeLength,
|
|
1338
|
-
this.releaseElevation,
|
|
1339
|
-
this.releaseAngle
|
|
1340
|
-
);
|
|
1238
|
+
const request = new LoadMassInventoryVesselForLineRuptureScenarioCalculationRequest({
|
|
1239
|
+
material: this.material,
|
|
1240
|
+
mass: this.mass,
|
|
1241
|
+
pressure: this.pressure,
|
|
1242
|
+
temperature: this.temperature,
|
|
1243
|
+
pipeDiameter: this.pipeDiameter,
|
|
1244
|
+
pipeLength: this.pipeLength,
|
|
1245
|
+
releaseElevation: this.releaseElevation,
|
|
1246
|
+
releaseAngle: this.releaseAngle
|
|
1247
|
+
});
|
|
1341
1248
|
|
|
1342
1249
|
const schema = new LoadMassInventoryVesselForLineRuptureScenarioCalculationRequestSchema();
|
|
1343
1250
|
const validatedRequest = schema.validate(request);
|
|
@@ -1399,24 +1306,22 @@ export class LoadMassInventoryVesselForLineRuptureScenarioCalculationResponse ex
|
|
|
1399
1306
|
/**
|
|
1400
1307
|
* LoadMassInventoryVesselForLineRuptureScenario calculation response class.
|
|
1401
1308
|
*
|
|
1402
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
1403
|
-
* @param {Entities.LineRupture} lineRupture - a line rupture entity.
|
|
1404
1309
|
*/
|
|
1405
|
-
constructor(
|
|
1310
|
+
constructor(data: {
|
|
1406
1311
|
vessel: Entities.Vessel,
|
|
1407
1312
|
lineRupture: Entities.LineRupture,
|
|
1408
1313
|
resultCode: Enums.ResultCode,
|
|
1409
1314
|
messages: string[],
|
|
1410
1315
|
calculationElapsedTime: number,
|
|
1411
1316
|
operationId: string
|
|
1412
|
-
) {
|
|
1317
|
+
}) {
|
|
1413
1318
|
super();
|
|
1414
|
-
this.vessel = vessel;
|
|
1415
|
-
this.lineRupture = lineRupture;
|
|
1416
|
-
this.resultCode = resultCode;
|
|
1417
|
-
this.messages = messages;
|
|
1418
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
1419
|
-
this.operationId = operationId;
|
|
1319
|
+
this.vessel = data.vessel;
|
|
1320
|
+
this.lineRupture = data.lineRupture;
|
|
1321
|
+
this.resultCode = data.resultCode;
|
|
1322
|
+
this.messages = data.messages;
|
|
1323
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
1324
|
+
this.operationId = data.operationId;
|
|
1420
1325
|
}
|
|
1421
1326
|
|
|
1422
1327
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -1485,14 +1390,7 @@ export class LoadMassInventoryVesselForLineRuptureScenarioCalculationResponseSch
|
|
|
1485
1390
|
}
|
|
1486
1391
|
|
|
1487
1392
|
makeCalculationResponse(data: LoadMassInventoryVesselForLineRuptureScenarioCalculationResponseSchemaData): LoadMassInventoryVesselForLineRuptureScenarioCalculationResponse {
|
|
1488
|
-
return new LoadMassInventoryVesselForLineRuptureScenarioCalculationResponse(
|
|
1489
|
-
data.vessel,
|
|
1490
|
-
data.lineRupture,
|
|
1491
|
-
data.resultCode,
|
|
1492
|
-
data.messages,
|
|
1493
|
-
data.calculationElapsedTime,
|
|
1494
|
-
data.operationId
|
|
1495
|
-
);
|
|
1393
|
+
return new LoadMassInventoryVesselForLineRuptureScenarioCalculationResponse(data);
|
|
1496
1394
|
}
|
|
1497
1395
|
}
|
|
1498
1396
|
|
|
@@ -1522,17 +1420,8 @@ class LoadMassInventoryVesselForReliefValveScenarioCalculationRequest extends Ca
|
|
|
1522
1420
|
/**
|
|
1523
1421
|
* LoadMassInventoryVesselForReliefValveScenario calculation request class.
|
|
1524
1422
|
*
|
|
1525
|
-
* @param {Entities.Material} material - a material entity.
|
|
1526
|
-
* @param {number} mass - Total vessel mass inventory.
|
|
1527
|
-
* @param {number} pressure - Absolute pressure of the fluid.
|
|
1528
|
-
* @param {number} temperature - Tmperature of the fluid.
|
|
1529
|
-
* @param {number} constrictionSize - Constriction diameter at the upstream end of the pipe.
|
|
1530
|
-
* @param {number} pipeDiameter - Internal diameter of the pipe.
|
|
1531
|
-
* @param {number} pipeLength - Length of the pipe.
|
|
1532
|
-
* @param {number} releaseElevation - Elevation of the release above ground level.
|
|
1533
|
-
* @param {number} releaseAngle - Angle of release above a horizontal plane.
|
|
1534
1423
|
*/
|
|
1535
|
-
constructor(
|
|
1424
|
+
constructor(data: {
|
|
1536
1425
|
material: Entities.Material,
|
|
1537
1426
|
mass: number,
|
|
1538
1427
|
pressure: number,
|
|
@@ -1542,17 +1431,17 @@ class LoadMassInventoryVesselForReliefValveScenarioCalculationRequest extends Ca
|
|
|
1542
1431
|
pipeLength: number,
|
|
1543
1432
|
releaseElevation: number,
|
|
1544
1433
|
releaseAngle: number
|
|
1545
|
-
) {
|
|
1434
|
+
}) {
|
|
1546
1435
|
super();
|
|
1547
|
-
this.material = material;
|
|
1548
|
-
this.mass = mass;
|
|
1549
|
-
this.pressure = pressure;
|
|
1550
|
-
this.temperature = temperature;
|
|
1551
|
-
this.constrictionSize = constrictionSize;
|
|
1552
|
-
this.pipeDiameter = pipeDiameter;
|
|
1553
|
-
this.pipeLength = pipeLength;
|
|
1554
|
-
this.releaseElevation = releaseElevation;
|
|
1555
|
-
this.releaseAngle = releaseAngle;
|
|
1436
|
+
this.material = data.material;
|
|
1437
|
+
this.mass = data.mass;
|
|
1438
|
+
this.pressure = data.pressure;
|
|
1439
|
+
this.temperature = data.temperature;
|
|
1440
|
+
this.constrictionSize = data.constrictionSize;
|
|
1441
|
+
this.pipeDiameter = data.pipeDiameter;
|
|
1442
|
+
this.pipeLength = data.pipeLength;
|
|
1443
|
+
this.releaseElevation = data.releaseElevation;
|
|
1444
|
+
this.releaseAngle = data.releaseAngle;
|
|
1556
1445
|
}
|
|
1557
1446
|
}
|
|
1558
1447
|
|
|
@@ -1598,17 +1487,7 @@ export class LoadMassInventoryVesselForReliefValveScenarioCalculationRequestSche
|
|
|
1598
1487
|
}
|
|
1599
1488
|
|
|
1600
1489
|
makeCalculationRequest(data: LoadMassInventoryVesselForReliefValveScenarioCalculationRequestSchemaData): LoadMassInventoryVesselForReliefValveScenarioCalculationRequest {
|
|
1601
|
-
return new LoadMassInventoryVesselForReliefValveScenarioCalculationRequest(
|
|
1602
|
-
data.material,
|
|
1603
|
-
data.mass,
|
|
1604
|
-
data.pressure,
|
|
1605
|
-
data.temperature,
|
|
1606
|
-
data.constrictionSize,
|
|
1607
|
-
data.pipeDiameter,
|
|
1608
|
-
data.pipeLength,
|
|
1609
|
-
data.releaseElevation,
|
|
1610
|
-
data.releaseAngle
|
|
1611
|
-
);
|
|
1490
|
+
return new LoadMassInventoryVesselForReliefValveScenarioCalculationRequest(data);
|
|
1612
1491
|
}
|
|
1613
1492
|
}
|
|
1614
1493
|
|
|
@@ -1628,17 +1507,8 @@ export class LoadMassInventoryVesselForReliefValveScenarioCalculation extends Ca
|
|
|
1628
1507
|
/**
|
|
1629
1508
|
* Sets up a vessel and a relief valve scenario from a mass inventory, pressure, temperature pipe diameter, length and constriction size specifications.
|
|
1630
1509
|
*
|
|
1631
|
-
* @param {Entities.Material} material - a material entity.
|
|
1632
|
-
* @param {number} mass - Total vessel mass inventory.
|
|
1633
|
-
* @param {number} pressure - Absolute pressure of the fluid.
|
|
1634
|
-
* @param {number} temperature - Tmperature of the fluid.
|
|
1635
|
-
* @param {number} constrictionSize - Constriction diameter at the upstream end of the pipe.
|
|
1636
|
-
* @param {number} pipeDiameter - Internal diameter of the pipe.
|
|
1637
|
-
* @param {number} pipeLength - Length of the pipe.
|
|
1638
|
-
* @param {number} releaseElevation - Elevation of the release above ground level.
|
|
1639
|
-
* @param {number} releaseAngle - Angle of release above a horizontal plane.
|
|
1640
1510
|
*/
|
|
1641
|
-
constructor(
|
|
1511
|
+
constructor(data: {
|
|
1642
1512
|
material: Entities.Material,
|
|
1643
1513
|
mass: number,
|
|
1644
1514
|
pressure: number,
|
|
@@ -1648,32 +1518,33 @@ export class LoadMassInventoryVesselForReliefValveScenarioCalculation extends Ca
|
|
|
1648
1518
|
pipeLength: number,
|
|
1649
1519
|
releaseElevation: number,
|
|
1650
1520
|
releaseAngle: number
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
this.
|
|
1655
|
-
this.
|
|
1656
|
-
this.
|
|
1657
|
-
this.
|
|
1658
|
-
this.
|
|
1659
|
-
this.
|
|
1660
|
-
this.
|
|
1661
|
-
this.
|
|
1521
|
+
controller?: AbortController;
|
|
1522
|
+
}) {
|
|
1523
|
+
super(data.controller);
|
|
1524
|
+
this.material = data.material;
|
|
1525
|
+
this.mass = data.mass;
|
|
1526
|
+
this.pressure = data.pressure;
|
|
1527
|
+
this.temperature = data.temperature;
|
|
1528
|
+
this.constrictionSize = data.constrictionSize;
|
|
1529
|
+
this.pipeDiameter = data.pipeDiameter;
|
|
1530
|
+
this.pipeLength = data.pipeLength;
|
|
1531
|
+
this.releaseElevation = data.releaseElevation;
|
|
1532
|
+
this.releaseAngle = data.releaseAngle;
|
|
1662
1533
|
}
|
|
1663
1534
|
|
|
1664
1535
|
async run() {
|
|
1665
1536
|
try {
|
|
1666
|
-
const request = new LoadMassInventoryVesselForReliefValveScenarioCalculationRequest(
|
|
1667
|
-
this.material,
|
|
1668
|
-
this.mass,
|
|
1669
|
-
this.pressure,
|
|
1670
|
-
this.temperature,
|
|
1671
|
-
this.constrictionSize,
|
|
1672
|
-
this.pipeDiameter,
|
|
1673
|
-
this.pipeLength,
|
|
1674
|
-
this.releaseElevation,
|
|
1675
|
-
this.releaseAngle
|
|
1676
|
-
);
|
|
1537
|
+
const request = new LoadMassInventoryVesselForReliefValveScenarioCalculationRequest({
|
|
1538
|
+
material: this.material,
|
|
1539
|
+
mass: this.mass,
|
|
1540
|
+
pressure: this.pressure,
|
|
1541
|
+
temperature: this.temperature,
|
|
1542
|
+
constrictionSize: this.constrictionSize,
|
|
1543
|
+
pipeDiameter: this.pipeDiameter,
|
|
1544
|
+
pipeLength: this.pipeLength,
|
|
1545
|
+
releaseElevation: this.releaseElevation,
|
|
1546
|
+
releaseAngle: this.releaseAngle
|
|
1547
|
+
});
|
|
1677
1548
|
|
|
1678
1549
|
const schema = new LoadMassInventoryVesselForReliefValveScenarioCalculationRequestSchema();
|
|
1679
1550
|
const validatedRequest = schema.validate(request);
|
|
@@ -1735,24 +1606,22 @@ export class LoadMassInventoryVesselForReliefValveScenarioCalculationResponse ex
|
|
|
1735
1606
|
/**
|
|
1736
1607
|
* LoadMassInventoryVesselForReliefValveScenario calculation response class.
|
|
1737
1608
|
*
|
|
1738
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
1739
|
-
* @param {Entities.ReliefValve} reliefValve - a relief valve entity.
|
|
1740
1609
|
*/
|
|
1741
|
-
constructor(
|
|
1610
|
+
constructor(data: {
|
|
1742
1611
|
vessel: Entities.Vessel,
|
|
1743
1612
|
reliefValve: Entities.ReliefValve,
|
|
1744
1613
|
resultCode: Enums.ResultCode,
|
|
1745
1614
|
messages: string[],
|
|
1746
1615
|
calculationElapsedTime: number,
|
|
1747
1616
|
operationId: string
|
|
1748
|
-
) {
|
|
1617
|
+
}) {
|
|
1749
1618
|
super();
|
|
1750
|
-
this.vessel = vessel;
|
|
1751
|
-
this.reliefValve = reliefValve;
|
|
1752
|
-
this.resultCode = resultCode;
|
|
1753
|
-
this.messages = messages;
|
|
1754
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
1755
|
-
this.operationId = operationId;
|
|
1619
|
+
this.vessel = data.vessel;
|
|
1620
|
+
this.reliefValve = data.reliefValve;
|
|
1621
|
+
this.resultCode = data.resultCode;
|
|
1622
|
+
this.messages = data.messages;
|
|
1623
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
1624
|
+
this.operationId = data.operationId;
|
|
1756
1625
|
}
|
|
1757
1626
|
|
|
1758
1627
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -1821,14 +1690,7 @@ export class LoadMassInventoryVesselForReliefValveScenarioCalculationResponseSch
|
|
|
1821
1690
|
}
|
|
1822
1691
|
|
|
1823
1692
|
makeCalculationResponse(data: LoadMassInventoryVesselForReliefValveScenarioCalculationResponseSchemaData): LoadMassInventoryVesselForReliefValveScenarioCalculationResponse {
|
|
1824
|
-
return new LoadMassInventoryVesselForReliefValveScenarioCalculationResponse(
|
|
1825
|
-
data.vessel,
|
|
1826
|
-
data.reliefValve,
|
|
1827
|
-
data.resultCode,
|
|
1828
|
-
data.messages,
|
|
1829
|
-
data.calculationElapsedTime,
|
|
1830
|
-
data.operationId
|
|
1831
|
-
);
|
|
1693
|
+
return new LoadMassInventoryVesselForReliefValveScenarioCalculationResponse(data);
|
|
1832
1694
|
}
|
|
1833
1695
|
}
|
|
1834
1696
|
|
|
@@ -1844,16 +1706,14 @@ class ReliefValveMinTemperatureCalculationRequest extends CalculationRequestBase
|
|
|
1844
1706
|
/**
|
|
1845
1707
|
* ReliefValveMinTemperature calculation request class.
|
|
1846
1708
|
*
|
|
1847
|
-
* @param {Entities.Material} material - a material entity.
|
|
1848
|
-
* @param {number} pressure - Input pressure (absolute) at which to evaluate bubble point temperature.
|
|
1849
1709
|
*/
|
|
1850
|
-
constructor(
|
|
1710
|
+
constructor(data: {
|
|
1851
1711
|
material: Entities.Material,
|
|
1852
1712
|
pressure: number
|
|
1853
|
-
) {
|
|
1713
|
+
}) {
|
|
1854
1714
|
super();
|
|
1855
|
-
this.material = material;
|
|
1856
|
-
this.pressure = pressure;
|
|
1715
|
+
this.material = data.material;
|
|
1716
|
+
this.pressure = data.pressure;
|
|
1857
1717
|
}
|
|
1858
1718
|
}
|
|
1859
1719
|
|
|
@@ -1885,10 +1745,7 @@ export class ReliefValveMinTemperatureCalculationRequestSchema {
|
|
|
1885
1745
|
}
|
|
1886
1746
|
|
|
1887
1747
|
makeCalculationRequest(data: ReliefValveMinTemperatureCalculationRequestSchemaData): ReliefValveMinTemperatureCalculationRequest {
|
|
1888
|
-
return new ReliefValveMinTemperatureCalculationRequest(
|
|
1889
|
-
data.material,
|
|
1890
|
-
data.pressure
|
|
1891
|
-
);
|
|
1748
|
+
return new ReliefValveMinTemperatureCalculationRequest(data);
|
|
1892
1749
|
}
|
|
1893
1750
|
}
|
|
1894
1751
|
|
|
@@ -1900,24 +1757,23 @@ export class ReliefValveMinTemperatureCalculation extends CalculationBase {
|
|
|
1900
1757
|
/**
|
|
1901
1758
|
* The Relief Valve scenario does not allow fluid conditions to be liquid. As such, his method calculates the lower limit for the input temperature to ensure vapour or two-phase fluid state.
|
|
1902
1759
|
*
|
|
1903
|
-
* @param {Entities.Material} material - a material entity.
|
|
1904
|
-
* @param {number} pressure - Input pressure (absolute) at which to evaluate bubble point temperature.
|
|
1905
1760
|
*/
|
|
1906
|
-
constructor(
|
|
1761
|
+
constructor(data: {
|
|
1907
1762
|
material: Entities.Material,
|
|
1908
1763
|
pressure: number
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
this.
|
|
1764
|
+
controller?: AbortController;
|
|
1765
|
+
}) {
|
|
1766
|
+
super(data.controller);
|
|
1767
|
+
this.material = data.material;
|
|
1768
|
+
this.pressure = data.pressure;
|
|
1913
1769
|
}
|
|
1914
1770
|
|
|
1915
1771
|
async run() {
|
|
1916
1772
|
try {
|
|
1917
|
-
const request = new ReliefValveMinTemperatureCalculationRequest(
|
|
1918
|
-
this.material,
|
|
1919
|
-
this.pressure
|
|
1920
|
-
);
|
|
1773
|
+
const request = new ReliefValveMinTemperatureCalculationRequest({
|
|
1774
|
+
material: this.material,
|
|
1775
|
+
pressure: this.pressure
|
|
1776
|
+
});
|
|
1921
1777
|
|
|
1922
1778
|
const schema = new ReliefValveMinTemperatureCalculationRequestSchema();
|
|
1923
1779
|
const validatedRequest = schema.validate(request);
|
|
@@ -1976,21 +1832,20 @@ export class ReliefValveMinTemperatureCalculationResponse extends CalculationRes
|
|
|
1976
1832
|
/**
|
|
1977
1833
|
* ReliefValveMinTemperature calculation response class.
|
|
1978
1834
|
*
|
|
1979
|
-
* @param {number} minTemperature - Calculated lower temperature limit for relief valve scenario.
|
|
1980
1835
|
*/
|
|
1981
|
-
constructor(
|
|
1836
|
+
constructor(data: {
|
|
1982
1837
|
minTemperature: number,
|
|
1983
1838
|
resultCode: Enums.ResultCode,
|
|
1984
1839
|
messages: string[],
|
|
1985
1840
|
calculationElapsedTime: number,
|
|
1986
1841
|
operationId: string
|
|
1987
|
-
) {
|
|
1842
|
+
}) {
|
|
1988
1843
|
super();
|
|
1989
|
-
this.minTemperature = minTemperature;
|
|
1990
|
-
this.resultCode = resultCode;
|
|
1991
|
-
this.messages = messages;
|
|
1992
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
1993
|
-
this.operationId = operationId;
|
|
1844
|
+
this.minTemperature = data.minTemperature;
|
|
1845
|
+
this.resultCode = data.resultCode;
|
|
1846
|
+
this.messages = data.messages;
|
|
1847
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
1848
|
+
this.operationId = data.operationId;
|
|
1994
1849
|
}
|
|
1995
1850
|
|
|
1996
1851
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -2051,13 +1906,7 @@ export class ReliefValveMinTemperatureCalculationResponseSchema {
|
|
|
2051
1906
|
}
|
|
2052
1907
|
|
|
2053
1908
|
makeCalculationResponse(data: ReliefValveMinTemperatureCalculationResponseSchemaData): ReliefValveMinTemperatureCalculationResponse {
|
|
2054
|
-
return new ReliefValveMinTemperatureCalculationResponse(
|
|
2055
|
-
data.minTemperature,
|
|
2056
|
-
data.resultCode,
|
|
2057
|
-
data.messages,
|
|
2058
|
-
data.calculationElapsedTime,
|
|
2059
|
-
data.operationId
|
|
2060
|
-
);
|
|
1909
|
+
return new ReliefValveMinTemperatureCalculationResponse(data);
|
|
2061
1910
|
}
|
|
2062
1911
|
}
|
|
2063
1912
|
|
|
@@ -2071,13 +1920,12 @@ class SetMixingLayerHeightCalculationRequest extends CalculationRequestBase {
|
|
|
2071
1920
|
/**
|
|
2072
1921
|
* SetMixingLayerHeight calculation request class.
|
|
2073
1922
|
*
|
|
2074
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
2075
1923
|
*/
|
|
2076
|
-
constructor(
|
|
1924
|
+
constructor(data: {
|
|
2077
1925
|
weather: Entities.Weather
|
|
2078
|
-
) {
|
|
1926
|
+
}) {
|
|
2079
1927
|
super();
|
|
2080
|
-
this.weather = weather;
|
|
1928
|
+
this.weather = data.weather;
|
|
2081
1929
|
}
|
|
2082
1930
|
}
|
|
2083
1931
|
|
|
@@ -2107,9 +1955,7 @@ export class SetMixingLayerHeightCalculationRequestSchema {
|
|
|
2107
1955
|
}
|
|
2108
1956
|
|
|
2109
1957
|
makeCalculationRequest(data: SetMixingLayerHeightCalculationRequestSchemaData): SetMixingLayerHeightCalculationRequest {
|
|
2110
|
-
return new SetMixingLayerHeightCalculationRequest(
|
|
2111
|
-
data.weather
|
|
2112
|
-
);
|
|
1958
|
+
return new SetMixingLayerHeightCalculationRequest(data);
|
|
2113
1959
|
}
|
|
2114
1960
|
}
|
|
2115
1961
|
|
|
@@ -2120,20 +1966,20 @@ export class SetMixingLayerHeightCalculation extends CalculationBase {
|
|
|
2120
1966
|
/**
|
|
2121
1967
|
* Updates the mixing layer height in a weather according to the stability class,.
|
|
2122
1968
|
*
|
|
2123
|
-
* @param {Entities.Weather} weather - a weather entity.
|
|
2124
1969
|
*/
|
|
2125
|
-
constructor(
|
|
1970
|
+
constructor(data: {
|
|
2126
1971
|
weather: Entities.Weather
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
1972
|
+
controller?: AbortController;
|
|
1973
|
+
}) {
|
|
1974
|
+
super(data.controller);
|
|
1975
|
+
this.weather = data.weather;
|
|
2130
1976
|
}
|
|
2131
1977
|
|
|
2132
1978
|
async run() {
|
|
2133
1979
|
try {
|
|
2134
|
-
const request = new SetMixingLayerHeightCalculationRequest(
|
|
2135
|
-
this.weather
|
|
2136
|
-
);
|
|
1980
|
+
const request = new SetMixingLayerHeightCalculationRequest({
|
|
1981
|
+
weather: this.weather
|
|
1982
|
+
});
|
|
2137
1983
|
|
|
2138
1984
|
const schema = new SetMixingLayerHeightCalculationRequestSchema();
|
|
2139
1985
|
const validatedRequest = schema.validate(request);
|
|
@@ -2192,21 +2038,20 @@ export class SetMixingLayerHeightCalculationResponse extends CalculationResponse
|
|
|
2192
2038
|
/**
|
|
2193
2039
|
* SetMixingLayerHeight calculation response class.
|
|
2194
2040
|
*
|
|
2195
|
-
* @param {Entities.Weather} updatedWeather - Updated weather entity.
|
|
2196
2041
|
*/
|
|
2197
|
-
constructor(
|
|
2042
|
+
constructor(data: {
|
|
2198
2043
|
updatedWeather: Entities.Weather,
|
|
2199
2044
|
resultCode: Enums.ResultCode,
|
|
2200
2045
|
messages: string[],
|
|
2201
2046
|
calculationElapsedTime: number,
|
|
2202
2047
|
operationId: string
|
|
2203
|
-
) {
|
|
2048
|
+
}) {
|
|
2204
2049
|
super();
|
|
2205
|
-
this.updatedWeather = updatedWeather;
|
|
2206
|
-
this.resultCode = resultCode;
|
|
2207
|
-
this.messages = messages;
|
|
2208
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
2209
|
-
this.operationId = operationId;
|
|
2050
|
+
this.updatedWeather = data.updatedWeather;
|
|
2051
|
+
this.resultCode = data.resultCode;
|
|
2052
|
+
this.messages = data.messages;
|
|
2053
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
2054
|
+
this.operationId = data.operationId;
|
|
2210
2055
|
}
|
|
2211
2056
|
|
|
2212
2057
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -2268,13 +2113,7 @@ export class SetMixingLayerHeightCalculationResponseSchema {
|
|
|
2268
2113
|
}
|
|
2269
2114
|
|
|
2270
2115
|
makeCalculationResponse(data: SetMixingLayerHeightCalculationResponseSchemaData): SetMixingLayerHeightCalculationResponse {
|
|
2271
|
-
return new SetMixingLayerHeightCalculationResponse(
|
|
2272
|
-
data.updatedWeather,
|
|
2273
|
-
data.resultCode,
|
|
2274
|
-
data.messages,
|
|
2275
|
-
data.calculationElapsedTime,
|
|
2276
|
-
data.operationId
|
|
2277
|
-
);
|
|
2116
|
+
return new SetMixingLayerHeightCalculationResponse(data);
|
|
2278
2117
|
}
|
|
2279
2118
|
}
|
|
2280
2119
|
|
|
@@ -2292,19 +2131,16 @@ class SetPhaseToReleaseForLeakScenarioCalculationRequest extends CalculationRequ
|
|
|
2292
2131
|
/**
|
|
2293
2132
|
* SetPhaseToReleaseForLeakScenario calculation request class.
|
|
2294
2133
|
*
|
|
2295
|
-
* @param {Enums.Phase} phaseToRelease - Requested fluid phase to release.
|
|
2296
|
-
* @param {number} releaseElevation - Release point elevation above ground.
|
|
2297
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
2298
2134
|
*/
|
|
2299
|
-
constructor(
|
|
2135
|
+
constructor(data: {
|
|
2300
2136
|
phaseToRelease: Enums.Phase,
|
|
2301
2137
|
releaseElevation: number,
|
|
2302
2138
|
vessel: Entities.Vessel
|
|
2303
|
-
) {
|
|
2139
|
+
}) {
|
|
2304
2140
|
super();
|
|
2305
|
-
this.phaseToRelease = phaseToRelease;
|
|
2306
|
-
this.releaseElevation = releaseElevation;
|
|
2307
|
-
this.vessel = vessel;
|
|
2141
|
+
this.phaseToRelease = data.phaseToRelease;
|
|
2142
|
+
this.releaseElevation = data.releaseElevation;
|
|
2143
|
+
this.vessel = data.vessel;
|
|
2308
2144
|
}
|
|
2309
2145
|
}
|
|
2310
2146
|
|
|
@@ -2338,11 +2174,7 @@ export class SetPhaseToReleaseForLeakScenarioCalculationRequestSchema {
|
|
|
2338
2174
|
}
|
|
2339
2175
|
|
|
2340
2176
|
makeCalculationRequest(data: SetPhaseToReleaseForLeakScenarioCalculationRequestSchemaData): SetPhaseToReleaseForLeakScenarioCalculationRequest {
|
|
2341
|
-
return new SetPhaseToReleaseForLeakScenarioCalculationRequest(
|
|
2342
|
-
data.phaseToRelease,
|
|
2343
|
-
data.releaseElevation,
|
|
2344
|
-
data.vessel
|
|
2345
|
-
);
|
|
2177
|
+
return new SetPhaseToReleaseForLeakScenarioCalculationRequest(data);
|
|
2346
2178
|
}
|
|
2347
2179
|
}
|
|
2348
2180
|
|
|
@@ -2356,28 +2188,26 @@ export class SetPhaseToReleaseForLeakScenarioCalculation extends CalculationBase
|
|
|
2356
2188
|
/**
|
|
2357
2189
|
* Calculates the hole height fraction and vessel z coordinate to release the requested phase (vapour or liquid).
|
|
2358
2190
|
*
|
|
2359
|
-
* @param {Enums.Phase} phaseToRelease - Requested fluid phase to release.
|
|
2360
|
-
* @param {number} releaseElevation - Release point elevation above ground.
|
|
2361
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
2362
2191
|
*/
|
|
2363
|
-
constructor(
|
|
2192
|
+
constructor(data: {
|
|
2364
2193
|
phaseToRelease: Enums.Phase,
|
|
2365
2194
|
releaseElevation: number,
|
|
2366
2195
|
vessel: Entities.Vessel
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
this.
|
|
2371
|
-
this.
|
|
2196
|
+
controller?: AbortController;
|
|
2197
|
+
}) {
|
|
2198
|
+
super(data.controller);
|
|
2199
|
+
this.phaseToRelease = data.phaseToRelease;
|
|
2200
|
+
this.releaseElevation = data.releaseElevation;
|
|
2201
|
+
this.vessel = data.vessel;
|
|
2372
2202
|
}
|
|
2373
2203
|
|
|
2374
2204
|
async run() {
|
|
2375
2205
|
try {
|
|
2376
|
-
const request = new SetPhaseToReleaseForLeakScenarioCalculationRequest(
|
|
2377
|
-
this.phaseToRelease,
|
|
2378
|
-
this.releaseElevation,
|
|
2379
|
-
this.vessel
|
|
2380
|
-
);
|
|
2206
|
+
const request = new SetPhaseToReleaseForLeakScenarioCalculationRequest({
|
|
2207
|
+
phaseToRelease: this.phaseToRelease,
|
|
2208
|
+
releaseElevation: this.releaseElevation,
|
|
2209
|
+
vessel: this.vessel
|
|
2210
|
+
});
|
|
2381
2211
|
|
|
2382
2212
|
const schema = new SetPhaseToReleaseForLeakScenarioCalculationRequestSchema();
|
|
2383
2213
|
const validatedRequest = schema.validate(request);
|
|
@@ -2439,24 +2269,22 @@ export class SetPhaseToReleaseForLeakScenarioCalculationResponse extends Calcula
|
|
|
2439
2269
|
/**
|
|
2440
2270
|
* SetPhaseToReleaseForLeakScenario calculation response class.
|
|
2441
2271
|
*
|
|
2442
|
-
* @param {number} zCoordUpdated - Updated z-coordinate of vessel to accommodate requested phase to release.
|
|
2443
|
-
* @param {number} holeHeightFractionUpdated - Updated hole height fraction to accommodate requested phase to release.
|
|
2444
2272
|
*/
|
|
2445
|
-
constructor(
|
|
2273
|
+
constructor(data: {
|
|
2446
2274
|
zCoordUpdated: number,
|
|
2447
2275
|
holeHeightFractionUpdated: number,
|
|
2448
2276
|
resultCode: Enums.ResultCode,
|
|
2449
2277
|
messages: string[],
|
|
2450
2278
|
calculationElapsedTime: number,
|
|
2451
2279
|
operationId: string
|
|
2452
|
-
) {
|
|
2280
|
+
}) {
|
|
2453
2281
|
super();
|
|
2454
|
-
this.zCoordUpdated = zCoordUpdated;
|
|
2455
|
-
this.holeHeightFractionUpdated = holeHeightFractionUpdated;
|
|
2456
|
-
this.resultCode = resultCode;
|
|
2457
|
-
this.messages = messages;
|
|
2458
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
2459
|
-
this.operationId = operationId;
|
|
2282
|
+
this.zCoordUpdated = data.zCoordUpdated;
|
|
2283
|
+
this.holeHeightFractionUpdated = data.holeHeightFractionUpdated;
|
|
2284
|
+
this.resultCode = data.resultCode;
|
|
2285
|
+
this.messages = data.messages;
|
|
2286
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
2287
|
+
this.operationId = data.operationId;
|
|
2460
2288
|
}
|
|
2461
2289
|
|
|
2462
2290
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -2523,14 +2351,7 @@ export class SetPhaseToReleaseForLeakScenarioCalculationResponseSchema {
|
|
|
2523
2351
|
}
|
|
2524
2352
|
|
|
2525
2353
|
makeCalculationResponse(data: SetPhaseToReleaseForLeakScenarioCalculationResponseSchemaData): SetPhaseToReleaseForLeakScenarioCalculationResponse {
|
|
2526
|
-
return new SetPhaseToReleaseForLeakScenarioCalculationResponse(
|
|
2527
|
-
data.zCoordUpdated,
|
|
2528
|
-
data.holeHeightFractionUpdated,
|
|
2529
|
-
data.resultCode,
|
|
2530
|
-
data.messages,
|
|
2531
|
-
data.calculationElapsedTime,
|
|
2532
|
-
data.operationId
|
|
2533
|
-
);
|
|
2354
|
+
return new SetPhaseToReleaseForLeakScenarioCalculationResponse(data);
|
|
2534
2355
|
}
|
|
2535
2356
|
}
|
|
2536
2357
|
|
|
@@ -2548,19 +2369,16 @@ class SetPhaseToReleaseForLineRuptureScenarioCalculationRequest extends Calculat
|
|
|
2548
2369
|
/**
|
|
2549
2370
|
* SetPhaseToReleaseForLineRuptureScenario calculation request class.
|
|
2550
2371
|
*
|
|
2551
|
-
* @param {Enums.Phase} phaseToRelease - Requested fluid phase to release.
|
|
2552
|
-
* @param {number} releaseElevation - Release point elevation above ground.
|
|
2553
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
2554
2372
|
*/
|
|
2555
|
-
constructor(
|
|
2373
|
+
constructor(data: {
|
|
2556
2374
|
phaseToRelease: Enums.Phase,
|
|
2557
2375
|
releaseElevation: number,
|
|
2558
2376
|
vessel: Entities.Vessel
|
|
2559
|
-
) {
|
|
2377
|
+
}) {
|
|
2560
2378
|
super();
|
|
2561
|
-
this.phaseToRelease = phaseToRelease;
|
|
2562
|
-
this.releaseElevation = releaseElevation;
|
|
2563
|
-
this.vessel = vessel;
|
|
2379
|
+
this.phaseToRelease = data.phaseToRelease;
|
|
2380
|
+
this.releaseElevation = data.releaseElevation;
|
|
2381
|
+
this.vessel = data.vessel;
|
|
2564
2382
|
}
|
|
2565
2383
|
}
|
|
2566
2384
|
|
|
@@ -2594,11 +2412,7 @@ export class SetPhaseToReleaseForLineRuptureScenarioCalculationRequestSchema {
|
|
|
2594
2412
|
}
|
|
2595
2413
|
|
|
2596
2414
|
makeCalculationRequest(data: SetPhaseToReleaseForLineRuptureScenarioCalculationRequestSchemaData): SetPhaseToReleaseForLineRuptureScenarioCalculationRequest {
|
|
2597
|
-
return new SetPhaseToReleaseForLineRuptureScenarioCalculationRequest(
|
|
2598
|
-
data.phaseToRelease,
|
|
2599
|
-
data.releaseElevation,
|
|
2600
|
-
data.vessel
|
|
2601
|
-
);
|
|
2415
|
+
return new SetPhaseToReleaseForLineRuptureScenarioCalculationRequest(data);
|
|
2602
2416
|
}
|
|
2603
2417
|
}
|
|
2604
2418
|
|
|
@@ -2612,28 +2426,26 @@ export class SetPhaseToReleaseForLineRuptureScenarioCalculation extends Calculat
|
|
|
2612
2426
|
/**
|
|
2613
2427
|
* Calculates the pipe height fraction and vessel z coordinate to release the requested phase (vapour or liquid).
|
|
2614
2428
|
*
|
|
2615
|
-
* @param {Enums.Phase} phaseToRelease - Requested fluid phase to release.
|
|
2616
|
-
* @param {number} releaseElevation - Release point elevation above ground.
|
|
2617
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
2618
2429
|
*/
|
|
2619
|
-
constructor(
|
|
2430
|
+
constructor(data: {
|
|
2620
2431
|
phaseToRelease: Enums.Phase,
|
|
2621
2432
|
releaseElevation: number,
|
|
2622
2433
|
vessel: Entities.Vessel
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
this.
|
|
2627
|
-
this.
|
|
2434
|
+
controller?: AbortController;
|
|
2435
|
+
}) {
|
|
2436
|
+
super(data.controller);
|
|
2437
|
+
this.phaseToRelease = data.phaseToRelease;
|
|
2438
|
+
this.releaseElevation = data.releaseElevation;
|
|
2439
|
+
this.vessel = data.vessel;
|
|
2628
2440
|
}
|
|
2629
2441
|
|
|
2630
2442
|
async run() {
|
|
2631
2443
|
try {
|
|
2632
|
-
const request = new SetPhaseToReleaseForLineRuptureScenarioCalculationRequest(
|
|
2633
|
-
this.phaseToRelease,
|
|
2634
|
-
this.releaseElevation,
|
|
2635
|
-
this.vessel
|
|
2636
|
-
);
|
|
2444
|
+
const request = new SetPhaseToReleaseForLineRuptureScenarioCalculationRequest({
|
|
2445
|
+
phaseToRelease: this.phaseToRelease,
|
|
2446
|
+
releaseElevation: this.releaseElevation,
|
|
2447
|
+
vessel: this.vessel
|
|
2448
|
+
});
|
|
2637
2449
|
|
|
2638
2450
|
const schema = new SetPhaseToReleaseForLineRuptureScenarioCalculationRequestSchema();
|
|
2639
2451
|
const validatedRequest = schema.validate(request);
|
|
@@ -2695,24 +2507,22 @@ export class SetPhaseToReleaseForLineRuptureScenarioCalculationResponse extends
|
|
|
2695
2507
|
/**
|
|
2696
2508
|
* SetPhaseToReleaseForLineRuptureScenario calculation response class.
|
|
2697
2509
|
*
|
|
2698
|
-
* @param {number} zCoordUpdated - Updated z-coordinate of vessel to accommodate requested phase to release.
|
|
2699
|
-
* @param {number} pipeHeightFractionUpdated - Updated pipe height fraction to accommodate requested phase to release.
|
|
2700
2510
|
*/
|
|
2701
|
-
constructor(
|
|
2511
|
+
constructor(data: {
|
|
2702
2512
|
zCoordUpdated: number,
|
|
2703
2513
|
pipeHeightFractionUpdated: number,
|
|
2704
2514
|
resultCode: Enums.ResultCode,
|
|
2705
2515
|
messages: string[],
|
|
2706
2516
|
calculationElapsedTime: number,
|
|
2707
2517
|
operationId: string
|
|
2708
|
-
) {
|
|
2518
|
+
}) {
|
|
2709
2519
|
super();
|
|
2710
|
-
this.zCoordUpdated = zCoordUpdated;
|
|
2711
|
-
this.pipeHeightFractionUpdated = pipeHeightFractionUpdated;
|
|
2712
|
-
this.resultCode = resultCode;
|
|
2713
|
-
this.messages = messages;
|
|
2714
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
2715
|
-
this.operationId = operationId;
|
|
2520
|
+
this.zCoordUpdated = data.zCoordUpdated;
|
|
2521
|
+
this.pipeHeightFractionUpdated = data.pipeHeightFractionUpdated;
|
|
2522
|
+
this.resultCode = data.resultCode;
|
|
2523
|
+
this.messages = data.messages;
|
|
2524
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
2525
|
+
this.operationId = data.operationId;
|
|
2716
2526
|
}
|
|
2717
2527
|
|
|
2718
2528
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -2779,14 +2589,7 @@ export class SetPhaseToReleaseForLineRuptureScenarioCalculationResponseSchema {
|
|
|
2779
2589
|
}
|
|
2780
2590
|
|
|
2781
2591
|
makeCalculationResponse(data: SetPhaseToReleaseForLineRuptureScenarioCalculationResponseSchemaData): SetPhaseToReleaseForLineRuptureScenarioCalculationResponse {
|
|
2782
|
-
return new SetPhaseToReleaseForLineRuptureScenarioCalculationResponse(
|
|
2783
|
-
data.zCoordUpdated,
|
|
2784
|
-
data.pipeHeightFractionUpdated,
|
|
2785
|
-
data.resultCode,
|
|
2786
|
-
data.messages,
|
|
2787
|
-
data.calculationElapsedTime,
|
|
2788
|
-
data.operationId
|
|
2789
|
-
);
|
|
2592
|
+
return new SetPhaseToReleaseForLineRuptureScenarioCalculationResponse(data);
|
|
2790
2593
|
}
|
|
2791
2594
|
}
|
|
2792
2595
|
|
|
@@ -2804,19 +2607,16 @@ class SetPhaseToReleaseForReliefValveScenarioCalculationRequest extends Calculat
|
|
|
2804
2607
|
/**
|
|
2805
2608
|
* SetPhaseToReleaseForReliefValveScenario calculation request class.
|
|
2806
2609
|
*
|
|
2807
|
-
* @param {Enums.Phase} phaseToRelease - Requested fluid phase to release.
|
|
2808
|
-
* @param {number} releaseElevation - Release point elevation above ground.
|
|
2809
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
2810
2610
|
*/
|
|
2811
|
-
constructor(
|
|
2611
|
+
constructor(data: {
|
|
2812
2612
|
phaseToRelease: Enums.Phase,
|
|
2813
2613
|
releaseElevation: number,
|
|
2814
2614
|
vessel: Entities.Vessel
|
|
2815
|
-
) {
|
|
2615
|
+
}) {
|
|
2816
2616
|
super();
|
|
2817
|
-
this.phaseToRelease = phaseToRelease;
|
|
2818
|
-
this.releaseElevation = releaseElevation;
|
|
2819
|
-
this.vessel = vessel;
|
|
2617
|
+
this.phaseToRelease = data.phaseToRelease;
|
|
2618
|
+
this.releaseElevation = data.releaseElevation;
|
|
2619
|
+
this.vessel = data.vessel;
|
|
2820
2620
|
}
|
|
2821
2621
|
}
|
|
2822
2622
|
|
|
@@ -2850,11 +2650,7 @@ export class SetPhaseToReleaseForReliefValveScenarioCalculationRequestSchema {
|
|
|
2850
2650
|
}
|
|
2851
2651
|
|
|
2852
2652
|
makeCalculationRequest(data: SetPhaseToReleaseForReliefValveScenarioCalculationRequestSchemaData): SetPhaseToReleaseForReliefValveScenarioCalculationRequest {
|
|
2853
|
-
return new SetPhaseToReleaseForReliefValveScenarioCalculationRequest(
|
|
2854
|
-
data.phaseToRelease,
|
|
2855
|
-
data.releaseElevation,
|
|
2856
|
-
data.vessel
|
|
2857
|
-
);
|
|
2653
|
+
return new SetPhaseToReleaseForReliefValveScenarioCalculationRequest(data);
|
|
2858
2654
|
}
|
|
2859
2655
|
}
|
|
2860
2656
|
|
|
@@ -2868,28 +2664,26 @@ export class SetPhaseToReleaseForReliefValveScenarioCalculation extends Calculat
|
|
|
2868
2664
|
/**
|
|
2869
2665
|
* Calculates the pipe height fraction and vessel z coordinate to release the requested phase.
|
|
2870
2666
|
*
|
|
2871
|
-
* @param {Enums.Phase} phaseToRelease - Requested fluid phase to release.
|
|
2872
|
-
* @param {number} releaseElevation - Release point elevation above ground.
|
|
2873
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
2874
2667
|
*/
|
|
2875
|
-
constructor(
|
|
2668
|
+
constructor(data: {
|
|
2876
2669
|
phaseToRelease: Enums.Phase,
|
|
2877
2670
|
releaseElevation: number,
|
|
2878
2671
|
vessel: Entities.Vessel
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
this.
|
|
2883
|
-
this.
|
|
2672
|
+
controller?: AbortController;
|
|
2673
|
+
}) {
|
|
2674
|
+
super(data.controller);
|
|
2675
|
+
this.phaseToRelease = data.phaseToRelease;
|
|
2676
|
+
this.releaseElevation = data.releaseElevation;
|
|
2677
|
+
this.vessel = data.vessel;
|
|
2884
2678
|
}
|
|
2885
2679
|
|
|
2886
2680
|
async run() {
|
|
2887
2681
|
try {
|
|
2888
|
-
const request = new SetPhaseToReleaseForReliefValveScenarioCalculationRequest(
|
|
2889
|
-
this.phaseToRelease,
|
|
2890
|
-
this.releaseElevation,
|
|
2891
|
-
this.vessel
|
|
2892
|
-
);
|
|
2682
|
+
const request = new SetPhaseToReleaseForReliefValveScenarioCalculationRequest({
|
|
2683
|
+
phaseToRelease: this.phaseToRelease,
|
|
2684
|
+
releaseElevation: this.releaseElevation,
|
|
2685
|
+
vessel: this.vessel
|
|
2686
|
+
});
|
|
2893
2687
|
|
|
2894
2688
|
const schema = new SetPhaseToReleaseForReliefValveScenarioCalculationRequestSchema();
|
|
2895
2689
|
const validatedRequest = schema.validate(request);
|
|
@@ -2951,24 +2745,22 @@ export class SetPhaseToReleaseForReliefValveScenarioCalculationResponse extends
|
|
|
2951
2745
|
/**
|
|
2952
2746
|
* SetPhaseToReleaseForReliefValveScenario calculation response class.
|
|
2953
2747
|
*
|
|
2954
|
-
* @param {number} zCoordUpdated - Updated z-coordinate of vessel to accommodate requested phase to release.
|
|
2955
|
-
* @param {number} pipeHeightFractionUpdated - Updated pipe height fraction to accommodate requested phase to release.
|
|
2956
2748
|
*/
|
|
2957
|
-
constructor(
|
|
2749
|
+
constructor(data: {
|
|
2958
2750
|
zCoordUpdated: number,
|
|
2959
2751
|
pipeHeightFractionUpdated: number,
|
|
2960
2752
|
resultCode: Enums.ResultCode,
|
|
2961
2753
|
messages: string[],
|
|
2962
2754
|
calculationElapsedTime: number,
|
|
2963
2755
|
operationId: string
|
|
2964
|
-
) {
|
|
2756
|
+
}) {
|
|
2965
2757
|
super();
|
|
2966
|
-
this.zCoordUpdated = zCoordUpdated;
|
|
2967
|
-
this.pipeHeightFractionUpdated = pipeHeightFractionUpdated;
|
|
2968
|
-
this.resultCode = resultCode;
|
|
2969
|
-
this.messages = messages;
|
|
2970
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
2971
|
-
this.operationId = operationId;
|
|
2758
|
+
this.zCoordUpdated = data.zCoordUpdated;
|
|
2759
|
+
this.pipeHeightFractionUpdated = data.pipeHeightFractionUpdated;
|
|
2760
|
+
this.resultCode = data.resultCode;
|
|
2761
|
+
this.messages = data.messages;
|
|
2762
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
2763
|
+
this.operationId = data.operationId;
|
|
2972
2764
|
}
|
|
2973
2765
|
|
|
2974
2766
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -3035,14 +2827,7 @@ export class SetPhaseToReleaseForReliefValveScenarioCalculationResponseSchema {
|
|
|
3035
2827
|
}
|
|
3036
2828
|
|
|
3037
2829
|
makeCalculationResponse(data: SetPhaseToReleaseForReliefValveScenarioCalculationResponseSchemaData): SetPhaseToReleaseForReliefValveScenarioCalculationResponse {
|
|
3038
|
-
return new SetPhaseToReleaseForReliefValveScenarioCalculationResponse(
|
|
3039
|
-
data.zCoordUpdated,
|
|
3040
|
-
data.pipeHeightFractionUpdated,
|
|
3041
|
-
data.resultCode,
|
|
3042
|
-
data.messages,
|
|
3043
|
-
data.calculationElapsedTime,
|
|
3044
|
-
data.operationId
|
|
3045
|
-
);
|
|
2830
|
+
return new SetPhaseToReleaseForReliefValveScenarioCalculationResponse(data);
|
|
3046
2831
|
}
|
|
3047
2832
|
}
|
|
3048
2833
|
|
|
@@ -3060,19 +2845,16 @@ class SetReleaseElevationForScenarioCalculationRequest extends CalculationReques
|
|
|
3060
2845
|
/**
|
|
3061
2846
|
* SetReleaseElevationForScenario calculation request class.
|
|
3062
2847
|
*
|
|
3063
|
-
* @param {number} releaseElevation - Release point elevation above ground.
|
|
3064
|
-
* @param {number} releaseHeightFraction - Release height fraction of the total vessel height.
|
|
3065
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
3066
2848
|
*/
|
|
3067
|
-
constructor(
|
|
2849
|
+
constructor(data: {
|
|
3068
2850
|
releaseElevation: number,
|
|
3069
2851
|
releaseHeightFraction: number,
|
|
3070
2852
|
vessel: Entities.Vessel
|
|
3071
|
-
) {
|
|
2853
|
+
}) {
|
|
3072
2854
|
super();
|
|
3073
|
-
this.releaseElevation = releaseElevation;
|
|
3074
|
-
this.releaseHeightFraction = releaseHeightFraction;
|
|
3075
|
-
this.vessel = vessel;
|
|
2855
|
+
this.releaseElevation = data.releaseElevation;
|
|
2856
|
+
this.releaseHeightFraction = data.releaseHeightFraction;
|
|
2857
|
+
this.vessel = data.vessel;
|
|
3076
2858
|
}
|
|
3077
2859
|
}
|
|
3078
2860
|
|
|
@@ -3106,11 +2888,7 @@ export class SetReleaseElevationForScenarioCalculationRequestSchema {
|
|
|
3106
2888
|
}
|
|
3107
2889
|
|
|
3108
2890
|
makeCalculationRequest(data: SetReleaseElevationForScenarioCalculationRequestSchemaData): SetReleaseElevationForScenarioCalculationRequest {
|
|
3109
|
-
return new SetReleaseElevationForScenarioCalculationRequest(
|
|
3110
|
-
data.releaseElevation,
|
|
3111
|
-
data.releaseHeightFraction,
|
|
3112
|
-
data.vessel
|
|
3113
|
-
);
|
|
2891
|
+
return new SetReleaseElevationForScenarioCalculationRequest(data);
|
|
3114
2892
|
}
|
|
3115
2893
|
}
|
|
3116
2894
|
|
|
@@ -3123,28 +2901,26 @@ export class SetReleaseElevationForScenarioCalculation extends CalculationBase {
|
|
|
3123
2901
|
/**
|
|
3124
2902
|
* Calculates the vessel z coordinate to release at the requested elevation. The release elevation is the point above the ground from where the dispersion and downstream models start. This method sets the vessel defined by its dimensions and shape to be elevated at a particular height such as to guarantee that the discharge result height is at the requested elevation.
|
|
3125
2903
|
*
|
|
3126
|
-
* @param {number} releaseElevation - Release point elevation above ground.
|
|
3127
|
-
* @param {number} releaseHeightFraction - Release height fraction of the total vessel height.
|
|
3128
|
-
* @param {Entities.Vessel} vessel - a vessel entity.
|
|
3129
2904
|
*/
|
|
3130
|
-
constructor(
|
|
2905
|
+
constructor(data: {
|
|
3131
2906
|
releaseElevation: number,
|
|
3132
2907
|
releaseHeightFraction: number,
|
|
3133
2908
|
vessel: Entities.Vessel
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
this.
|
|
3138
|
-
this.
|
|
2909
|
+
controller?: AbortController;
|
|
2910
|
+
}) {
|
|
2911
|
+
super(data.controller);
|
|
2912
|
+
this.releaseElevation = data.releaseElevation;
|
|
2913
|
+
this.releaseHeightFraction = data.releaseHeightFraction;
|
|
2914
|
+
this.vessel = data.vessel;
|
|
3139
2915
|
}
|
|
3140
2916
|
|
|
3141
2917
|
async run() {
|
|
3142
2918
|
try {
|
|
3143
|
-
const request = new SetReleaseElevationForScenarioCalculationRequest(
|
|
3144
|
-
this.releaseElevation,
|
|
3145
|
-
this.releaseHeightFraction,
|
|
3146
|
-
this.vessel
|
|
3147
|
-
);
|
|
2919
|
+
const request = new SetReleaseElevationForScenarioCalculationRequest({
|
|
2920
|
+
releaseElevation: this.releaseElevation,
|
|
2921
|
+
releaseHeightFraction: this.releaseHeightFraction,
|
|
2922
|
+
vessel: this.vessel
|
|
2923
|
+
});
|
|
3148
2924
|
|
|
3149
2925
|
const schema = new SetReleaseElevationForScenarioCalculationRequestSchema();
|
|
3150
2926
|
const validatedRequest = schema.validate(request);
|
|
@@ -3203,21 +2979,20 @@ export class SetReleaseElevationForScenarioCalculationResponse extends Calculati
|
|
|
3203
2979
|
/**
|
|
3204
2980
|
* SetReleaseElevationForScenario calculation response class.
|
|
3205
2981
|
*
|
|
3206
|
-
* @param {Entities.Vessel} updatedVessel - Updated vessel entity with modified z coordinate.
|
|
3207
2982
|
*/
|
|
3208
|
-
constructor(
|
|
2983
|
+
constructor(data: {
|
|
3209
2984
|
updatedVessel: Entities.Vessel,
|
|
3210
2985
|
resultCode: Enums.ResultCode,
|
|
3211
2986
|
messages: string[],
|
|
3212
2987
|
calculationElapsedTime: number,
|
|
3213
2988
|
operationId: string
|
|
3214
|
-
) {
|
|
2989
|
+
}) {
|
|
3215
2990
|
super();
|
|
3216
|
-
this.updatedVessel = updatedVessel;
|
|
3217
|
-
this.resultCode = resultCode;
|
|
3218
|
-
this.messages = messages;
|
|
3219
|
-
this.calculationElapsedTime = calculationElapsedTime;
|
|
3220
|
-
this.operationId = operationId;
|
|
2991
|
+
this.updatedVessel = data.updatedVessel;
|
|
2992
|
+
this.resultCode = data.resultCode;
|
|
2993
|
+
this.messages = data.messages;
|
|
2994
|
+
this.calculationElapsedTime = data.calculationElapsedTime;
|
|
2995
|
+
this.operationId = data.operationId;
|
|
3221
2996
|
}
|
|
3222
2997
|
|
|
3223
2998
|
initialiseFromDictionary(data: { [key: string]: unknown }) {
|
|
@@ -3279,12 +3054,6 @@ export class SetReleaseElevationForScenarioCalculationResponseSchema {
|
|
|
3279
3054
|
}
|
|
3280
3055
|
|
|
3281
3056
|
makeCalculationResponse(data: SetReleaseElevationForScenarioCalculationResponseSchemaData): SetReleaseElevationForScenarioCalculationResponse {
|
|
3282
|
-
return new SetReleaseElevationForScenarioCalculationResponse(
|
|
3283
|
-
data.updatedVessel,
|
|
3284
|
-
data.resultCode,
|
|
3285
|
-
data.messages,
|
|
3286
|
-
data.calculationElapsedTime,
|
|
3287
|
-
data.operationId
|
|
3288
|
-
);
|
|
3057
|
+
return new SetReleaseElevationForScenarioCalculationResponse(data);
|
|
3289
3058
|
}
|
|
3290
3059
|
}
|