@dnv-plant/typescriptpws 1.0.77 → 1.0.78
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 +22 -25
- package/src/calculations/discharge.ts +155 -176
- package/src/calculations/dispersion.ts +24 -27
- package/src/calculations/dispersionView.ts +151 -172
- package/src/calculations/fireball.ts +23 -26
- package/src/calculations/jetFire.ts +43 -49
- package/src/calculations/lateExplosion.ts +44 -50
- package/src/calculations/linkedRunners.ts +165 -177
- package/src/calculations/poolFire.ts +23 -26
- package/src/calculations/properties.ts +22 -25
- package/src/calculations/radiation.ts +228 -261
- package/src/calculations/standalones.ts +23 -26
- package/src/calculations/toxics.ts +22 -25
- package/src/calculations/utilities.ts +248 -284
- package/src/constants.ts +2 -2
- package/src/entities.ts +2 -2
- package/src/entity-schemas.ts +2 -2
- package/src/enums.ts +2 -2
- package/src/materials.ts +41 -73
- package/src/utilities.ts +36 -95
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time:
|
|
3
|
+
* Version: 1.0.78
|
|
4
|
+
* Date/time: 20 Jun 2025 16:35:08
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -373,34 +373,31 @@ export class LateExplosionCalculation extends CalculationBase {
|
|
|
373
373
|
|
|
374
374
|
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
375
375
|
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
this.messages.push(...(validatedResponse.messages ?? []));
|
|
392
|
-
}
|
|
376
|
+
const { data } = await this.postRequest(url, requestJson);
|
|
377
|
+
|
|
378
|
+
const responseSchema = new LateExplosionCalculationResponseSchema();
|
|
379
|
+
const validatedResponse = responseSchema.validate(data);
|
|
380
|
+
|
|
381
|
+
this.resultCode = validatedResponse.resultCode;
|
|
382
|
+
if (this.resultCode === Enums.ResultCode.SUCCESS) {
|
|
383
|
+
Object.assign(this, {
|
|
384
|
+
explosionUnifConfOverpressureResult: validatedResponse.explosionUnifConfOverpressureResult,
|
|
385
|
+
explosionUnconfOverpressureResult: validatedResponse.explosionUnconfOverpressureResult,
|
|
386
|
+
resultCode: validatedResponse.resultCode,
|
|
387
|
+
messages: validatedResponse.messages ?? [],
|
|
388
|
+
calculationElapsedTime: validatedResponse.calculationElapsedTime,
|
|
389
|
+
operationId: validatedResponse.operationId,
|
|
390
|
+
});
|
|
393
391
|
} else {
|
|
394
|
-
this.
|
|
392
|
+
this.messages.push(...(validatedResponse.messages ?? []));
|
|
395
393
|
}
|
|
396
|
-
} catch (
|
|
397
|
-
if (
|
|
398
|
-
this.
|
|
394
|
+
} catch (err: any) {
|
|
395
|
+
if ((err as any)?.response) {
|
|
396
|
+
this.handleFailedResponse((err as any).response);
|
|
399
397
|
} else {
|
|
400
|
-
|
|
398
|
+
throw err;
|
|
401
399
|
}
|
|
402
|
-
console.error(
|
|
403
|
-
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
400
|
+
console.error(err);
|
|
404
401
|
}
|
|
405
402
|
|
|
406
403
|
return this.resultCode;
|
|
@@ -764,34 +761,31 @@ export class LateExplosionToOPLevelsCalculation extends CalculationBase {
|
|
|
764
761
|
|
|
765
762
|
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
766
763
|
|
|
767
|
-
const
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
}
|
|
782
|
-
this.messages.push(...(validatedResponse.messages ?? []));
|
|
783
|
-
}
|
|
764
|
+
const { data } = await this.postRequest(url, requestJson);
|
|
765
|
+
|
|
766
|
+
const responseSchema = new LateExplosionToOPLevelsCalculationResponseSchema();
|
|
767
|
+
const validatedResponse = responseSchema.validate(data);
|
|
768
|
+
|
|
769
|
+
this.resultCode = validatedResponse.resultCode;
|
|
770
|
+
if (this.resultCode === Enums.ResultCode.SUCCESS) {
|
|
771
|
+
Object.assign(this, {
|
|
772
|
+
explosionUnifConfOverpressureResults: validatedResponse.explosionUnifConfOverpressureResults,
|
|
773
|
+
explosionUnconfOverpressureResults: validatedResponse.explosionUnconfOverpressureResults,
|
|
774
|
+
resultCode: validatedResponse.resultCode,
|
|
775
|
+
messages: validatedResponse.messages ?? [],
|
|
776
|
+
calculationElapsedTime: validatedResponse.calculationElapsedTime,
|
|
777
|
+
operationId: validatedResponse.operationId,
|
|
778
|
+
});
|
|
784
779
|
} else {
|
|
785
|
-
this.
|
|
780
|
+
this.messages.push(...(validatedResponse.messages ?? []));
|
|
786
781
|
}
|
|
787
|
-
} catch (
|
|
788
|
-
if (
|
|
789
|
-
this.
|
|
782
|
+
} catch (err: any) {
|
|
783
|
+
if ((err as any)?.response) {
|
|
784
|
+
this.handleFailedResponse((err as any).response);
|
|
790
785
|
} else {
|
|
791
|
-
|
|
786
|
+
throw err;
|
|
792
787
|
}
|
|
793
|
-
console.error(
|
|
794
|
-
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
788
|
+
console.error(err);
|
|
795
789
|
}
|
|
796
790
|
|
|
797
791
|
return this.resultCode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time:
|
|
3
|
+
* Version: 1.0.78
|
|
4
|
+
* Date/time: 20 Jun 2025 16:35:08
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -535,53 +535,50 @@ export class UserDefinedSourceLinkedRunCalculation extends CalculationBase {
|
|
|
535
535
|
|
|
536
536
|
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
537
537
|
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
}
|
|
572
|
-
this.messages.push(...(validatedResponse.messages ?? []));
|
|
573
|
-
}
|
|
538
|
+
const { data } = await this.postRequest(url, requestJson);
|
|
539
|
+
|
|
540
|
+
const responseSchema = new UserDefinedSourceLinkedRunCalculationResponseSchema();
|
|
541
|
+
const validatedResponse = responseSchema.validate(data);
|
|
542
|
+
|
|
543
|
+
this.resultCode = validatedResponse.resultCode;
|
|
544
|
+
if (this.resultCode === Enums.ResultCode.SUCCESS) {
|
|
545
|
+
Object.assign(this, {
|
|
546
|
+
distancesToJetFireRadiation: validatedResponse.distancesToJetFireRadiation,
|
|
547
|
+
jetContourPoints: validatedResponse.jetContourPoints,
|
|
548
|
+
nJetContourPoints: validatedResponse.nJetContourPoints,
|
|
549
|
+
areaContourJet: validatedResponse.areaContourJet,
|
|
550
|
+
distancesToFlamConcentration: validatedResponse.distancesToFlamConcentration,
|
|
551
|
+
flamConcentrationsUsed: validatedResponse.flamConcentrationsUsed,
|
|
552
|
+
flamConcContourPoints: validatedResponse.flamConcContourPoints,
|
|
553
|
+
nFlamConcContourPoints: validatedResponse.nFlamConcContourPoints,
|
|
554
|
+
areaFootprintFlamConc: validatedResponse.areaFootprintFlamConc,
|
|
555
|
+
distancesToPoolFireRadiation: validatedResponse.distancesToPoolFireRadiation,
|
|
556
|
+
poolContourPoints: validatedResponse.poolContourPoints,
|
|
557
|
+
nPoolContourPoints: validatedResponse.nPoolContourPoints,
|
|
558
|
+
areaContourPool: validatedResponse.areaContourPool,
|
|
559
|
+
explosionOverpressureResults: validatedResponse.explosionOverpressureResults,
|
|
560
|
+
distancesToToxicConcentration: validatedResponse.distancesToToxicConcentration,
|
|
561
|
+
toxicConcentrationUsed: validatedResponse.toxicConcentrationUsed,
|
|
562
|
+
toxicConcContourPoints: validatedResponse.toxicConcContourPoints,
|
|
563
|
+
nToxicConcContourPoints: validatedResponse.nToxicConcContourPoints,
|
|
564
|
+
areaFootprintToxicConc: validatedResponse.areaFootprintToxicConc,
|
|
565
|
+
jetFireFlameResult: validatedResponse.jetFireFlameResult,
|
|
566
|
+
poolFireFlameResult: validatedResponse.poolFireFlameResult,
|
|
567
|
+
resultCode: validatedResponse.resultCode,
|
|
568
|
+
messages: validatedResponse.messages ?? [],
|
|
569
|
+
calculationElapsedTime: validatedResponse.calculationElapsedTime,
|
|
570
|
+
operationId: validatedResponse.operationId,
|
|
571
|
+
});
|
|
574
572
|
} else {
|
|
575
|
-
this.
|
|
573
|
+
this.messages.push(...(validatedResponse.messages ?? []));
|
|
576
574
|
}
|
|
577
|
-
} catch (
|
|
578
|
-
if (
|
|
579
|
-
this.
|
|
575
|
+
} catch (err: any) {
|
|
576
|
+
if ((err as any)?.response) {
|
|
577
|
+
this.handleFailedResponse((err as any).response);
|
|
580
578
|
} else {
|
|
581
|
-
|
|
579
|
+
throw err;
|
|
582
580
|
}
|
|
583
|
-
console.error(
|
|
584
|
-
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
581
|
+
console.error(err);
|
|
585
582
|
}
|
|
586
583
|
|
|
587
584
|
return this.resultCode;
|
|
@@ -1409,54 +1406,51 @@ export class VesselLeakLinkedRunCalculation extends CalculationBase {
|
|
|
1409
1406
|
|
|
1410
1407
|
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
1411
1408
|
|
|
1412
|
-
const
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
}
|
|
1447
|
-
this.messages.push(...(validatedResponse.messages ?? []));
|
|
1448
|
-
}
|
|
1409
|
+
const { data } = await this.postRequest(url, requestJson);
|
|
1410
|
+
|
|
1411
|
+
const responseSchema = new VesselLeakLinkedRunCalculationResponseSchema();
|
|
1412
|
+
const validatedResponse = responseSchema.validate(data);
|
|
1413
|
+
|
|
1414
|
+
this.resultCode = validatedResponse.resultCode;
|
|
1415
|
+
if (this.resultCode === Enums.ResultCode.SUCCESS) {
|
|
1416
|
+
Object.assign(this, {
|
|
1417
|
+
dischargeRecord: validatedResponse.dischargeRecord,
|
|
1418
|
+
distancesToJetFireRadiation: validatedResponse.distancesToJetFireRadiation,
|
|
1419
|
+
jetContourPoints: validatedResponse.jetContourPoints,
|
|
1420
|
+
nJetContourPoints: validatedResponse.nJetContourPoints,
|
|
1421
|
+
areaContourJet: validatedResponse.areaContourJet,
|
|
1422
|
+
distancesToFlamConcentration: validatedResponse.distancesToFlamConcentration,
|
|
1423
|
+
flamConcentrationsUsed: validatedResponse.flamConcentrationsUsed,
|
|
1424
|
+
flamConcContourPoints: validatedResponse.flamConcContourPoints,
|
|
1425
|
+
nFlamConcContourPoints: validatedResponse.nFlamConcContourPoints,
|
|
1426
|
+
areaFootprintFlamConc: validatedResponse.areaFootprintFlamConc,
|
|
1427
|
+
distancesToPoolFireRadiation: validatedResponse.distancesToPoolFireRadiation,
|
|
1428
|
+
poolContourPoints: validatedResponse.poolContourPoints,
|
|
1429
|
+
nPoolContourPoints: validatedResponse.nPoolContourPoints,
|
|
1430
|
+
areaContourPool: validatedResponse.areaContourPool,
|
|
1431
|
+
explosionOverpressureResults: validatedResponse.explosionOverpressureResults,
|
|
1432
|
+
distancesToToxicConcentration: validatedResponse.distancesToToxicConcentration,
|
|
1433
|
+
toxicConcentrationUsed: validatedResponse.toxicConcentrationUsed,
|
|
1434
|
+
toxicConcContourPoints: validatedResponse.toxicConcContourPoints,
|
|
1435
|
+
nToxicConcContourPoints: validatedResponse.nToxicConcContourPoints,
|
|
1436
|
+
areaFootprintToxicConc: validatedResponse.areaFootprintToxicConc,
|
|
1437
|
+
jetFireFlameResult: validatedResponse.jetFireFlameResult,
|
|
1438
|
+
poolFireFlameResult: validatedResponse.poolFireFlameResult,
|
|
1439
|
+
resultCode: validatedResponse.resultCode,
|
|
1440
|
+
messages: validatedResponse.messages ?? [],
|
|
1441
|
+
calculationElapsedTime: validatedResponse.calculationElapsedTime,
|
|
1442
|
+
operationId: validatedResponse.operationId,
|
|
1443
|
+
});
|
|
1449
1444
|
} else {
|
|
1450
|
-
this.
|
|
1445
|
+
this.messages.push(...(validatedResponse.messages ?? []));
|
|
1451
1446
|
}
|
|
1452
|
-
} catch (
|
|
1453
|
-
if (
|
|
1454
|
-
this.
|
|
1447
|
+
} catch (err: any) {
|
|
1448
|
+
if ((err as any)?.response) {
|
|
1449
|
+
this.handleFailedResponse((err as any).response);
|
|
1455
1450
|
} else {
|
|
1456
|
-
|
|
1451
|
+
throw err;
|
|
1457
1452
|
}
|
|
1458
|
-
console.error(
|
|
1459
|
-
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
1453
|
+
console.error(err);
|
|
1460
1454
|
}
|
|
1461
1455
|
|
|
1462
1456
|
return this.resultCode;
|
|
@@ -2297,54 +2291,51 @@ export class VesselLineRuptureLinkedRunCalculation extends CalculationBase {
|
|
|
2297
2291
|
|
|
2298
2292
|
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
2299
2293
|
|
|
2300
|
-
const
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
}
|
|
2335
|
-
this.messages.push(...(validatedResponse.messages ?? []));
|
|
2336
|
-
}
|
|
2294
|
+
const { data } = await this.postRequest(url, requestJson);
|
|
2295
|
+
|
|
2296
|
+
const responseSchema = new VesselLineRuptureLinkedRunCalculationResponseSchema();
|
|
2297
|
+
const validatedResponse = responseSchema.validate(data);
|
|
2298
|
+
|
|
2299
|
+
this.resultCode = validatedResponse.resultCode;
|
|
2300
|
+
if (this.resultCode === Enums.ResultCode.SUCCESS) {
|
|
2301
|
+
Object.assign(this, {
|
|
2302
|
+
dischargeRecord: validatedResponse.dischargeRecord,
|
|
2303
|
+
distancesToJetFireRadiation: validatedResponse.distancesToJetFireRadiation,
|
|
2304
|
+
jetContourPoints: validatedResponse.jetContourPoints,
|
|
2305
|
+
nJetContourPoints: validatedResponse.nJetContourPoints,
|
|
2306
|
+
areaContourJet: validatedResponse.areaContourJet,
|
|
2307
|
+
distancesToFlamConcentration: validatedResponse.distancesToFlamConcentration,
|
|
2308
|
+
flamConcentrationsUsed: validatedResponse.flamConcentrationsUsed,
|
|
2309
|
+
flamConcContourPoints: validatedResponse.flamConcContourPoints,
|
|
2310
|
+
nFlamConcContourPoints: validatedResponse.nFlamConcContourPoints,
|
|
2311
|
+
areaFootprintFlamConc: validatedResponse.areaFootprintFlamConc,
|
|
2312
|
+
distancesToPoolFireRadiation: validatedResponse.distancesToPoolFireRadiation,
|
|
2313
|
+
poolContourPoints: validatedResponse.poolContourPoints,
|
|
2314
|
+
nPoolContourPoints: validatedResponse.nPoolContourPoints,
|
|
2315
|
+
areaContourPool: validatedResponse.areaContourPool,
|
|
2316
|
+
explosionOverpressureResults: validatedResponse.explosionOverpressureResults,
|
|
2317
|
+
distancesToToxicConcentration: validatedResponse.distancesToToxicConcentration,
|
|
2318
|
+
toxicConcentrationUsed: validatedResponse.toxicConcentrationUsed,
|
|
2319
|
+
toxicConcContourPoints: validatedResponse.toxicConcContourPoints,
|
|
2320
|
+
nToxicConcContourPoints: validatedResponse.nToxicConcContourPoints,
|
|
2321
|
+
areaFootprintToxicConc: validatedResponse.areaFootprintToxicConc,
|
|
2322
|
+
jetFireFlameResult: validatedResponse.jetFireFlameResult,
|
|
2323
|
+
poolFireFlameResult: validatedResponse.poolFireFlameResult,
|
|
2324
|
+
resultCode: validatedResponse.resultCode,
|
|
2325
|
+
messages: validatedResponse.messages ?? [],
|
|
2326
|
+
calculationElapsedTime: validatedResponse.calculationElapsedTime,
|
|
2327
|
+
operationId: validatedResponse.operationId,
|
|
2328
|
+
});
|
|
2337
2329
|
} else {
|
|
2338
|
-
this.
|
|
2330
|
+
this.messages.push(...(validatedResponse.messages ?? []));
|
|
2339
2331
|
}
|
|
2340
|
-
} catch (
|
|
2341
|
-
if (
|
|
2342
|
-
this.
|
|
2332
|
+
} catch (err: any) {
|
|
2333
|
+
if ((err as any)?.response) {
|
|
2334
|
+
this.handleFailedResponse((err as any).response);
|
|
2343
2335
|
} else {
|
|
2344
|
-
|
|
2336
|
+
throw err;
|
|
2345
2337
|
}
|
|
2346
|
-
console.error(
|
|
2347
|
-
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
2338
|
+
console.error(err);
|
|
2348
2339
|
}
|
|
2349
2340
|
|
|
2350
2341
|
return this.resultCode;
|
|
@@ -3185,54 +3176,51 @@ export class VesselReliefValveLinkedRunCalculation extends CalculationBase {
|
|
|
3185
3176
|
|
|
3186
3177
|
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
3187
3178
|
|
|
3188
|
-
const
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
}
|
|
3223
|
-
this.messages.push(...(validatedResponse.messages ?? []));
|
|
3224
|
-
}
|
|
3179
|
+
const { data } = await this.postRequest(url, requestJson);
|
|
3180
|
+
|
|
3181
|
+
const responseSchema = new VesselReliefValveLinkedRunCalculationResponseSchema();
|
|
3182
|
+
const validatedResponse = responseSchema.validate(data);
|
|
3183
|
+
|
|
3184
|
+
this.resultCode = validatedResponse.resultCode;
|
|
3185
|
+
if (this.resultCode === Enums.ResultCode.SUCCESS) {
|
|
3186
|
+
Object.assign(this, {
|
|
3187
|
+
dischargeRecord: validatedResponse.dischargeRecord,
|
|
3188
|
+
distancesToJetFireRadiation: validatedResponse.distancesToJetFireRadiation,
|
|
3189
|
+
jetContourPoints: validatedResponse.jetContourPoints,
|
|
3190
|
+
nJetContourPoints: validatedResponse.nJetContourPoints,
|
|
3191
|
+
areaContourJet: validatedResponse.areaContourJet,
|
|
3192
|
+
distancesToFlamConcentration: validatedResponse.distancesToFlamConcentration,
|
|
3193
|
+
flamConcentrationsUsed: validatedResponse.flamConcentrationsUsed,
|
|
3194
|
+
flamConcContourPoints: validatedResponse.flamConcContourPoints,
|
|
3195
|
+
nFlamConcContourPoints: validatedResponse.nFlamConcContourPoints,
|
|
3196
|
+
areaFootprintFlamConc: validatedResponse.areaFootprintFlamConc,
|
|
3197
|
+
distancesToPoolFireRadiation: validatedResponse.distancesToPoolFireRadiation,
|
|
3198
|
+
poolContourPoints: validatedResponse.poolContourPoints,
|
|
3199
|
+
nPoolContourPoints: validatedResponse.nPoolContourPoints,
|
|
3200
|
+
areaContourPool: validatedResponse.areaContourPool,
|
|
3201
|
+
explosionOverpressureResults: validatedResponse.explosionOverpressureResults,
|
|
3202
|
+
distancesToToxicConcentration: validatedResponse.distancesToToxicConcentration,
|
|
3203
|
+
toxicConcentrationUsed: validatedResponse.toxicConcentrationUsed,
|
|
3204
|
+
toxicConcContourPoints: validatedResponse.toxicConcContourPoints,
|
|
3205
|
+
nToxicConcContourPoints: validatedResponse.nToxicConcContourPoints,
|
|
3206
|
+
areaFootprintToxicConc: validatedResponse.areaFootprintToxicConc,
|
|
3207
|
+
jetFireFlameResult: validatedResponse.jetFireFlameResult,
|
|
3208
|
+
poolFireFlameResult: validatedResponse.poolFireFlameResult,
|
|
3209
|
+
resultCode: validatedResponse.resultCode,
|
|
3210
|
+
messages: validatedResponse.messages ?? [],
|
|
3211
|
+
calculationElapsedTime: validatedResponse.calculationElapsedTime,
|
|
3212
|
+
operationId: validatedResponse.operationId,
|
|
3213
|
+
});
|
|
3225
3214
|
} else {
|
|
3226
|
-
this.
|
|
3215
|
+
this.messages.push(...(validatedResponse.messages ?? []));
|
|
3227
3216
|
}
|
|
3228
|
-
} catch (
|
|
3229
|
-
if (
|
|
3230
|
-
this.
|
|
3217
|
+
} catch (err: any) {
|
|
3218
|
+
if ((err as any)?.response) {
|
|
3219
|
+
this.handleFailedResponse((err as any).response);
|
|
3231
3220
|
} else {
|
|
3232
|
-
|
|
3221
|
+
throw err;
|
|
3233
3222
|
}
|
|
3234
|
-
console.error(
|
|
3235
|
-
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
3223
|
+
console.error(err);
|
|
3236
3224
|
}
|
|
3237
3225
|
|
|
3238
3226
|
return this.resultCode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/***********************************************************************
|
|
2
2
|
* This file has been auto-generated by a code generation tool.
|
|
3
|
-
* Version: 1.0.
|
|
4
|
-
* Date/time:
|
|
3
|
+
* Version: 1.0.78
|
|
4
|
+
* Date/time: 20 Jun 2025 16:35:08
|
|
5
5
|
* Template: templates/typescriptpws/calculations.razor.
|
|
6
6
|
***********************************************************************/
|
|
7
7
|
|
|
@@ -295,34 +295,31 @@ export class PoolFireCalculation extends CalculationBase {
|
|
|
295
295
|
|
|
296
296
|
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
297
297
|
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
this.messages.push(...(validatedResponse.messages ?? []));
|
|
314
|
-
}
|
|
298
|
+
const { data } = await this.postRequest(url, requestJson);
|
|
299
|
+
|
|
300
|
+
const responseSchema = new PoolFireCalculationResponseSchema();
|
|
301
|
+
const validatedResponse = responseSchema.validate(data);
|
|
302
|
+
|
|
303
|
+
this.resultCode = validatedResponse.resultCode;
|
|
304
|
+
if (this.resultCode === Enums.ResultCode.SUCCESS) {
|
|
305
|
+
Object.assign(this, {
|
|
306
|
+
poolFireFlameResult: validatedResponse.poolFireFlameResult,
|
|
307
|
+
flameRecords: validatedResponse.flameRecords,
|
|
308
|
+
resultCode: validatedResponse.resultCode,
|
|
309
|
+
messages: validatedResponse.messages ?? [],
|
|
310
|
+
calculationElapsedTime: validatedResponse.calculationElapsedTime,
|
|
311
|
+
operationId: validatedResponse.operationId,
|
|
312
|
+
});
|
|
315
313
|
} else {
|
|
316
|
-
this.
|
|
314
|
+
this.messages.push(...(validatedResponse.messages ?? []));
|
|
317
315
|
}
|
|
318
|
-
} catch (
|
|
319
|
-
if (
|
|
320
|
-
this.
|
|
316
|
+
} catch (err: any) {
|
|
317
|
+
if ((err as any)?.response) {
|
|
318
|
+
this.handleFailedResponse((err as any).response);
|
|
321
319
|
} else {
|
|
322
|
-
|
|
320
|
+
throw err;
|
|
323
321
|
}
|
|
324
|
-
console.error(
|
|
325
|
-
this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
|
|
322
|
+
console.error(err);
|
|
326
323
|
}
|
|
327
324
|
|
|
328
325
|
return this.resultCode;
|