@dnv-plant/typescriptpws 1.0.97 → 1.0.98

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.
@@ -1,15 +1,19 @@
1
- /***********************************************************************
2
- * This file has been auto-generated by a code generation tool.
3
- *
4
- * DO NOT MODIFY THIS FILE
5
- * This file is maintained by DNV.
6
- * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
7
- * Please contact DNV if you believe changes are required.
8
- *
9
- * Version: 1.0.97
10
- * Date/time: 13 Apr 2026 17:02:52
11
- * Template: templates/typescriptpws/calculations.razor.
12
- ***********************************************************************/
1
+ // ************************************************************************************
2
+ // *
3
+ // * This file has been auto-generated by a code generation tool.
4
+ // *
5
+ // * DO NOT MODIFY THIS FILE
6
+ // * This file is maintained by DNV.
7
+ // * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
8
+ // * Please contact DNV if you believe changes are required.
9
+ // *
10
+ // * API version: 1.0.
11
+ // * MDE version: 9.3.8211.
12
+ // * Package version: 1.0.98
13
+ // * Date/time: 23 Jun 2026 12:11:11.
14
+ // * Template: TYPE_SCRIPT_PWS/calculations.sbn.
15
+ // *
16
+ // ************************************************************************************
13
17
 
14
18
  import * as Enums from '../enums';
15
19
  import * as Entities from '../entities';
@@ -124,9 +128,7 @@ export class DispersionCalculation extends CalculationBase {
124
128
  poolRecords?: Entities.PoolRecord[];
125
129
 
126
130
  /**
127
- * Calculates atmospheric dispersion of a source term (either instantaneous, fixed duration, or time-varying). Simulates the dispersion of one or more "observers", which are returned as outputs and can be used to obtain post-processed concentrations and other views of the dispersing cloud. Each observer is comprised of a number
128
- of DispersionRecords. The modelling includes rainout and re-evaporation for 2-phase releases.
129
- Time-varying scenarios with mixtures are not currently handled and will give an error. It is recommended therefore to use a continuous or instantaneous source for mixtures.
131
+ * Calculates atmospheric dispersion of a source term (either instantaneous, fixed duration, or time-varying). Simulates the dispersion of one or more 'observers', which are returned as outputs and can be used to obtain post-processed concentrations and other views of the dispersing cloud. Each observer is comprised of DispersionRecords. The modelling includes rainout and re-evaporation for two-phase releases. Time-varying scenarios with mixtures are not currently handled and will give an error. It is recommended to use a continuous or instantaneous source for mixtures.
130
132
  *
131
133
  */
132
134
  constructor(data: {
@@ -1,15 +1,19 @@
1
- /***********************************************************************
2
- * This file has been auto-generated by a code generation tool.
3
- *
4
- * DO NOT MODIFY THIS FILE
5
- * This file is maintained by DNV.
6
- * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
7
- * Please contact DNV if you believe changes are required.
8
- *
9
- * Version: 1.0.97
10
- * Date/time: 13 Apr 2026 17:02:52
11
- * Template: templates/typescriptpws/calculations.razor.
12
- ***********************************************************************/
1
+ // ************************************************************************************
2
+ // *
3
+ // * This file has been auto-generated by a code generation tool.
4
+ // *
5
+ // * DO NOT MODIFY THIS FILE
6
+ // * This file is maintained by DNV.
7
+ // * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
8
+ // * Please contact DNV if you believe changes are required.
9
+ // *
10
+ // * API version: 1.0.
11
+ // * MDE version: 9.3.8211.
12
+ // * Package version: 1.0.98
13
+ // * Date/time: 23 Jun 2026 12:11:11.
14
+ // * Template: TYPE_SCRIPT_PWS/calculations.sbn.
15
+ // *
16
+ // ************************************************************************************
13
17
 
14
18
  import * as Enums from '../enums';
15
19
  import * as Entities from '../entities';
@@ -403,7 +407,7 @@ export class DistancesAndFootprintsToConcentrationLevelsCalculation extends Calc
403
407
  contourPoints?: Entities.LocalPosition[];
404
408
 
405
409
  /**
406
- * Calculates the distances and maximum footprints to specified concentration of interest levels for the dispersion modelling.
410
+ * Calculates the distances and maximum footprints to specified concentration of interest levels, elevations and resolutions for the dispersion modelling.
407
411
  *
408
412
  */
409
413
  constructor(data: {
@@ -549,17 +553,17 @@ export class DistancesAndFootprintsToConcentrationLevelsCalculationResponse exte
549
553
  }
550
554
 
551
555
  initialiseFromDictionary(data: { [key: string]: unknown }) {
552
- if (data.concsUsed && Array.isArray(data.concsUsed)) {
553
- this.concsUsed = data.concsUsed.map((item) => parseFloat(item));
556
+ if (data.concsUsed !== undefined && Array.isArray(data.concsUsed)) {
557
+ this.concsUsed = data.concsUsed as number[];
554
558
  }
555
- if (data.nContourPoints && Array.isArray(data.nContourPoints)) {
556
- this.nContourPoints = data.nContourPoints.map((item) => parseInt(item));
559
+ if (data.nContourPoints !== undefined && Array.isArray(data.nContourPoints)) {
560
+ this.nContourPoints = data.nContourPoints as number[];
557
561
  }
558
- if (data.areasContour && Array.isArray(data.areasContour)) {
559
- this.areasContour = data.areasContour.map((item) => parseFloat(item));
562
+ if (data.areasContour !== undefined && Array.isArray(data.areasContour)) {
563
+ this.areasContour = data.areasContour as number[];
560
564
  }
561
- if (data.distancesConcentration && Array.isArray(data.distancesConcentration)) {
562
- this.distancesConcentration = data.distancesConcentration.map((item) => parseFloat(item));
565
+ if (data.distancesConcentration !== undefined && Array.isArray(data.distancesConcentration)) {
566
+ this.distancesConcentration = data.distancesConcentration as number[];
563
567
  }
564
568
  if (data.contourPoints && Array.isArray(data.contourPoints)) {
565
569
  this.contourPoints = data.contourPoints.map((item) => {
@@ -864,11 +868,11 @@ export class DistancesToConcLevelsCalculationResponse extends CalculationRespons
864
868
  }
865
869
 
866
870
  initialiseFromDictionary(data: { [key: string]: unknown }) {
867
- if (data.concUsed && Array.isArray(data.concUsed)) {
868
- this.concUsed = data.concUsed.map((item) => parseFloat(item));
871
+ if (data.concUsed !== undefined && Array.isArray(data.concUsed)) {
872
+ this.concUsed = data.concUsed as number[];
869
873
  }
870
- if (data.distances && Array.isArray(data.distances)) {
871
- this.distances = data.distances.map((item) => parseFloat(item));
874
+ if (data.distances !== undefined && Array.isArray(data.distances)) {
875
+ this.distances = data.distances as number[];
872
876
  }
873
877
  if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
874
878
  this.resultCode = data.resultCode as Enums.ResultCode;
@@ -1035,7 +1039,7 @@ export class MaxConcDistanceCalculation extends CalculationBase {
1035
1039
  concentrationRecords?: Entities.ConcentrationRecord[];
1036
1040
 
1037
1041
  /**
1038
- * Calculate the maximum concentration vs distance, i.e. the maximum concentration reached at points downwind out to the minimum concentration of interest. Dispersion results produced from a successful dispersion calculation are required as input. Include the effects of along-wind diffusion (AWD).
1042
+ * Calculate the maximum concentration vs distance, i.e. the maximum concentration reached at points downwind out to the minimum concentration of interest. Dispersion results produced from a successful dispersion calculation are required as input. Includes the effects of along-wind diffusion (AWD).
1039
1043
  *
1040
1044
  */
1041
1045
  constructor(data: {
@@ -1325,7 +1329,7 @@ export class MaxConcFootprintCalculation extends CalculationBase {
1325
1329
  contourPoints?: Entities.LocalPosition[];
1326
1330
 
1327
1331
  /**
1328
- * Calculate the maximum footprint of the cloud for a given concentration level. The output is a contour line defined by a set of x,y values.
1332
+ * Calculate the maximum footprint of the cloud for a given concentration level. The output is a contour line defined by a set of x,y values.
1329
1333
  *
1330
1334
  */
1331
1335
  constructor(data: {
@@ -1,15 +1,19 @@
1
- /***********************************************************************
2
- * This file has been auto-generated by a code generation tool.
3
- *
4
- * DO NOT MODIFY THIS FILE
5
- * This file is maintained by DNV.
6
- * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
7
- * Please contact DNV if you believe changes are required.
8
- *
9
- * Version: 1.0.97
10
- * Date/time: 13 Apr 2026 17:02:52
11
- * Template: templates/typescriptpws/calculations.razor.
12
- ***********************************************************************/
1
+ // ************************************************************************************
2
+ // *
3
+ // * This file has been auto-generated by a code generation tool.
4
+ // *
5
+ // * DO NOT MODIFY THIS FILE
6
+ // * This file is maintained by DNV.
7
+ // * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
8
+ // * Please contact DNV if you believe changes are required.
9
+ // *
10
+ // * API version: 1.0.
11
+ // * MDE version: 9.3.8211.
12
+ // * Package version: 1.0.98
13
+ // * Date/time: 23 Jun 2026 12:11:11.
14
+ // * Template: TYPE_SCRIPT_PWS/calculations.sbn.
15
+ // *
16
+ // ************************************************************************************
13
17
 
14
18
  import * as Enums from '../enums';
15
19
  import * as Entities from '../entities';
@@ -109,7 +113,7 @@ export class FireballCalculation extends CalculationBase {
109
113
  flameRecords?: Entities.FlameRecord[];
110
114
 
111
115
  /**
112
- * Calculates a fireball produced from an instantaneous or (short duration) time-varying source term. The output can be used can be used to run radiation models for prediction of thermal effects.
116
+ * Calculates a fireball produced from an instantaneous or (short duration) time-varying source term. The output can be used to run radiation models for prediction of thermal effects.
113
117
  *
114
118
  */
115
119
  constructor(data: {
@@ -0,0 +1,291 @@
1
+ // ************************************************************************************
2
+ // *
3
+ // * This file has been auto-generated by a code generation tool.
4
+ // *
5
+ // * DO NOT MODIFY THIS FILE
6
+ // * This file is maintained by DNV.
7
+ // * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
8
+ // * Please contact DNV if you believe changes are required.
9
+ // *
10
+ // * API version: 1.0.
11
+ // * MDE version: 9.3.8211.
12
+ // * Package version: 1.0.98
13
+ // * Date/time: 23 Jun 2026 12:11:11.
14
+ // * Template: TYPE_SCRIPT_PWS/calculations.sbn.
15
+ // *
16
+ // ************************************************************************************
17
+
18
+ import * as Enums from '../enums';
19
+ import * as Entities from '../entities';
20
+ import * as EntitySchemas from '../entity-schemas';
21
+ import { getAnalyticsApiTarget, getClientAliasId } from '../utilities';
22
+ import { CalculationRequestBase, CalculationBase, CalculationResponseBase } from './calculationBase';
23
+
24
+ import Joi from 'joi';
25
+
26
+ export interface VesselLeakMaxFlammableCloudCalculationRequestSchemaData {
27
+ vessel: Entities.Vessel;
28
+ leak: Entities.Leak;
29
+ weather: Entities.Weather;
30
+ substrate: Entities.Substrate;
31
+ dischargeParameters: Entities.DischargeParameters;
32
+ dispersionParameters: Entities.DispersionParameters;
33
+ dispersionOutputConfig: Entities.DispersionOutputConfig;
34
+ }
35
+
36
+ class VesselLeakMaxFlammableCloudCalculationRequest extends CalculationRequestBase {
37
+ vessel: Entities.Vessel;
38
+ leak: Entities.Leak;
39
+ weather: Entities.Weather;
40
+ substrate: Entities.Substrate;
41
+ dischargeParameters: Entities.DischargeParameters;
42
+ dispersionParameters: Entities.DispersionParameters;
43
+ dispersionOutputConfig: Entities.DispersionOutputConfig;
44
+
45
+ /**
46
+ * VesselLeakMaxFlammableCloud calculation request class.
47
+ *
48
+ */
49
+ constructor(data: {
50
+ vessel: Entities.Vessel;
51
+ leak: Entities.Leak;
52
+ weather: Entities.Weather;
53
+ substrate: Entities.Substrate;
54
+ dischargeParameters: Entities.DischargeParameters;
55
+ dispersionParameters: Entities.DispersionParameters;
56
+ dispersionOutputConfig: Entities.DispersionOutputConfig;
57
+ }) {
58
+ super();
59
+ this.vessel = data.vessel;
60
+ this.leak = data.leak;
61
+ this.weather = data.weather;
62
+ this.substrate = data.substrate;
63
+ this.dischargeParameters = data.dischargeParameters;
64
+ this.dispersionParameters = data.dispersionParameters;
65
+ this.dispersionOutputConfig = data.dispersionOutputConfig;
66
+ }
67
+ }
68
+
69
+ export class VesselLeakMaxFlammableCloudCalculationRequestSchema {
70
+ schema: Joi.ObjectSchema;
71
+ propertyTypes: Record<string, string>;
72
+
73
+ /**
74
+ * Schema for the VesselLeakMaxFlammableCloud calculation request.
75
+ */
76
+ constructor() {
77
+ this.schema = Joi.object({
78
+ vessel: new EntitySchemas.VesselSchema().schema,
79
+ leak: new EntitySchemas.LeakSchema().schema,
80
+ weather: new EntitySchemas.WeatherSchema().schema,
81
+ substrate: new EntitySchemas.SubstrateSchema().schema,
82
+ dischargeParameters: new EntitySchemas.DischargeParametersSchema().schema,
83
+ dispersionParameters: new EntitySchemas.DispersionParametersSchema().schema,
84
+ dispersionOutputConfig: new EntitySchemas.DispersionOutputConfigSchema().schema,
85
+ }).unknown(true);
86
+
87
+ this.propertyTypes = {
88
+ vessel: 'Entities.Vessel',
89
+ leak: 'Entities.Leak',
90
+ weather: 'Entities.Weather',
91
+ substrate: 'Entities.Substrate',
92
+ dischargeParameters: 'Entities.DischargeParameters',
93
+ dispersionParameters: 'Entities.DispersionParameters',
94
+ dispersionOutputConfig: 'Entities.DispersionOutputConfig',
95
+ };
96
+ }
97
+
98
+ validate(data: VesselLeakMaxFlammableCloudCalculationRequestSchemaData): VesselLeakMaxFlammableCloudCalculationRequest {
99
+ const { error, value } = this.schema.validate(data, { abortEarly: false });
100
+ if (error) {
101
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
102
+ }
103
+ return this.makeCalculationRequest(value);
104
+ }
105
+
106
+ makeCalculationRequest(data: VesselLeakMaxFlammableCloudCalculationRequestSchemaData): VesselLeakMaxFlammableCloudCalculationRequest {
107
+ return new VesselLeakMaxFlammableCloudCalculationRequest(data);
108
+ }
109
+ }
110
+
111
+ export class VesselLeakMaxFlammableCloudCalculation extends CalculationBase {
112
+ vessel: Entities.Vessel;
113
+ leak: Entities.Leak;
114
+ weather: Entities.Weather;
115
+ substrate: Entities.Substrate;
116
+ dischargeParameters: Entities.DischargeParameters;
117
+ dispersionParameters: Entities.DispersionParameters;
118
+ dispersionOutputConfig: Entities.DispersionOutputConfig;
119
+ vesselLeakMaxFlammableCloudResults?: Entities.VesselLeakMaxFlammableCloudResults;
120
+
121
+ /**
122
+ * Performs an end-to-end consequence calculation of a leak of flammable gas. It comprises a leak source term, dispersion, and calculation of max footprint and sideview information to determine the extent of the flammable cloud. Results are returned in a summary output structure which includes: maximum discharge rate, post-expansion fluid phase, post-expansion temperature, maximum downwind distance and height to LFL and LFL area.
123
+ *
124
+ */
125
+ constructor(data: {
126
+ vessel: Entities.Vessel;
127
+ leak: Entities.Leak;
128
+ weather: Entities.Weather;
129
+ substrate: Entities.Substrate;
130
+ dischargeParameters: Entities.DischargeParameters;
131
+ dispersionParameters: Entities.DispersionParameters;
132
+ dispersionOutputConfig: Entities.DispersionOutputConfig;
133
+ controller?: AbortController;
134
+ }) {
135
+ super(data.controller);
136
+ this.vessel = data.vessel;
137
+ this.leak = data.leak;
138
+ this.weather = data.weather;
139
+ this.substrate = data.substrate;
140
+ this.dischargeParameters = data.dischargeParameters;
141
+ this.dispersionParameters = data.dispersionParameters;
142
+ this.dispersionOutputConfig = data.dispersionOutputConfig;
143
+ }
144
+
145
+ async run() {
146
+ try {
147
+ const request = new VesselLeakMaxFlammableCloudCalculationRequest({
148
+ vessel: this.vessel,
149
+ leak: this.leak,
150
+ weather: this.weather,
151
+ substrate: this.substrate,
152
+ dischargeParameters: this.dischargeParameters,
153
+ dispersionParameters: this.dispersionParameters,
154
+ dispersionOutputConfig: this.dispersionOutputConfig,
155
+ });
156
+
157
+ const schema = new VesselLeakMaxFlammableCloudCalculationRequestSchema();
158
+ const validatedRequest = schema.validate(request);
159
+
160
+ const requestJson = JSON.stringify(validatedRequest);
161
+ const url = `${getAnalyticsApiTarget()}calculatevesselleakmaxflammablecloud?clientId=${getClientAliasId()}`;
162
+
163
+ this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
164
+
165
+ const { data } = await this.postRequest(url, requestJson);
166
+
167
+ const responseSchema = new VesselLeakMaxFlammableCloudCalculationResponseSchema();
168
+ const validatedResponse = responseSchema.validate(data);
169
+
170
+ this.resultCode = validatedResponse.resultCode;
171
+ if (this.resultCode === Enums.ResultCode.SUCCESS) {
172
+ Object.assign(this, {
173
+ vesselLeakMaxFlammableCloudResults: validatedResponse.vesselLeakMaxFlammableCloudResults,
174
+ resultCode: validatedResponse.resultCode,
175
+ messages: validatedResponse.messages ?? [],
176
+ calculationElapsedTime: validatedResponse.calculationElapsedTime,
177
+ operationId: validatedResponse.operationId,
178
+ });
179
+ } else {
180
+ this.messages.push(...(validatedResponse.messages ?? []));
181
+ }
182
+ } catch (err: any) {
183
+ if ((err as any)?.response) {
184
+ this.handleFailedResponse((err as any).response);
185
+ } else {
186
+ throw err;
187
+ }
188
+ console.error(err);
189
+ }
190
+
191
+ return this.resultCode;
192
+ }
193
+
194
+ toString() {
195
+ const parts = ['* VesselLeakMaxFlammableCloud'];
196
+
197
+ parts.push(`vesselLeakMaxFlammableCloudResults: ${String(this.vesselLeakMaxFlammableCloudResults)}`);
198
+ parts.push(`resultCode: ${String(this.resultCode)}`);
199
+ parts.push('*** messages:');
200
+ parts.push(`messages: ${this.messages !== undefined ? this.messages : '(None)'}`);
201
+ parts.push(`calculationElapsedTime: ${this.calculationElapsedTime !== undefined ? this.calculationElapsedTime : '(None)'}`);
202
+ parts.push(`operationId: ${this.operationId !== undefined ? this.operationId : '(None)'}`);
203
+
204
+ return parts.join('\n');
205
+ }
206
+ }
207
+
208
+ export class VesselLeakMaxFlammableCloudCalculationResponse extends CalculationResponseBase {
209
+ vesselLeakMaxFlammableCloudResults: Entities.VesselLeakMaxFlammableCloudResults;
210
+
211
+ /**
212
+ * VesselLeakMaxFlammableCloud calculation response class.
213
+ *
214
+ */
215
+ constructor(data: {
216
+ vesselLeakMaxFlammableCloudResults: Entities.VesselLeakMaxFlammableCloudResults;
217
+ resultCode: Enums.ResultCode;
218
+ messages: string[];
219
+ calculationElapsedTime: number;
220
+ operationId: string;
221
+ }) {
222
+ super();
223
+ this.vesselLeakMaxFlammableCloudResults = data.vesselLeakMaxFlammableCloudResults;
224
+ this.resultCode = data.resultCode;
225
+ this.messages = data.messages;
226
+ this.calculationElapsedTime = data.calculationElapsedTime;
227
+ this.operationId = data.operationId;
228
+ }
229
+
230
+ initialiseFromDictionary(data: { [key: string]: unknown }) {
231
+ if (data.vesselLeakMaxFlammableCloudResults) {
232
+ this.vesselLeakMaxFlammableCloudResults = new Entities.VesselLeakMaxFlammableCloudResults();
233
+ this.vesselLeakMaxFlammableCloudResults.initialiseFromDictionary(data.vesselLeakMaxFlammableCloudResults as { [key: string]: unknown });
234
+ }
235
+ if (data.resultCode !== undefined && (typeof data.resultCode === 'string' || typeof data.resultCode === 'number')) {
236
+ this.resultCode = data.resultCode as Enums.ResultCode;
237
+ }
238
+ this.messages = this.messages ?? [];
239
+ if (data.messages && Array.isArray(data.messages)) {
240
+ this.messages.push(...data.messages);
241
+ }
242
+ if (data.calculationElapsedTime !== undefined && typeof data.calculationElapsedTime === 'number') {
243
+ this.calculationElapsedTime = data.calculationElapsedTime as number;
244
+ }
245
+ if (data.operationId !== undefined && typeof data.operationId === 'string') {
246
+ this.operationId = data.operationId as string;
247
+ }
248
+ }
249
+ }
250
+
251
+ export interface VesselLeakMaxFlammableCloudCalculationResponseSchemaData {
252
+ vesselLeakMaxFlammableCloudResults: Entities.VesselLeakMaxFlammableCloudResults;
253
+ resultCode: Enums.ResultCode;
254
+ messages: string[];
255
+ calculationElapsedTime: number;
256
+ operationId: string;
257
+ }
258
+
259
+ export class VesselLeakMaxFlammableCloudCalculationResponseSchema {
260
+ schema: Joi.ObjectSchema;
261
+ propertyTypes: Record<string, string>;
262
+
263
+ /**
264
+ * Schema for the VesselLeakMaxFlammableCloud calculation response.
265
+ */
266
+ constructor() {
267
+ this.schema = Joi.object({
268
+ vesselLeakMaxFlammableCloudResults: new EntitySchemas.VesselLeakMaxFlammableCloudResultsSchema().schema,
269
+ resultCode: Joi.string().valid(...Object.values(Enums.ResultCode)),
270
+ messages: Joi.array().items(Joi.string()),
271
+ calculationElapsedTime: Joi.number().unsafe(),
272
+ operationId: Joi.string().uuid().allow(null),
273
+ }).unknown(true);
274
+
275
+ this.propertyTypes = {
276
+ vesselLeakMaxFlammableCloudResults: 'Entities.VesselLeakMaxFlammableCloudResults',
277
+ };
278
+ }
279
+
280
+ validate(data: VesselLeakMaxFlammableCloudCalculationResponseSchemaData): VesselLeakMaxFlammableCloudCalculationResponse {
281
+ const { error, value } = this.schema.validate(data, { abortEarly: false });
282
+ if (error) {
283
+ throw new Error(`Validation error: ${error.details.map((x) => x.message).join(', ')}`);
284
+ }
285
+ return this.makeCalculationResponse(value);
286
+ }
287
+
288
+ makeCalculationResponse(data: VesselLeakMaxFlammableCloudCalculationResponseSchemaData): VesselLeakMaxFlammableCloudCalculationResponse {
289
+ return new VesselLeakMaxFlammableCloudCalculationResponse(data);
290
+ }
291
+ }
@@ -1,15 +1,19 @@
1
- /***********************************************************************
2
- * This file has been auto-generated by a code generation tool.
3
- *
4
- * DO NOT MODIFY THIS FILE
5
- * This file is maintained by DNV.
6
- * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
7
- * Please contact DNV if you believe changes are required.
8
- *
9
- * Version: 1.0.97
10
- * Date/time: 13 Apr 2026 17:02:52
11
- * Template: templates/typescriptpws/calculations.razor.
12
- ***********************************************************************/
1
+ // ************************************************************************************
2
+ // *
3
+ // * This file has been auto-generated by a code generation tool.
4
+ // *
5
+ // * DO NOT MODIFY THIS FILE
6
+ // * This file is maintained by DNV.
7
+ // * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
8
+ // * Please contact DNV if you believe changes are required.
9
+ // *
10
+ // * API version: 1.0.
11
+ // * MDE version: 9.3.8211.
12
+ // * Package version: 1.0.98
13
+ // * Date/time: 23 Jun 2026 12:11:11.
14
+ // * Template: TYPE_SCRIPT_PWS/calculations.sbn.
15
+ // *
16
+ // ************************************************************************************
13
17
 
14
18
  import * as Enums from '../enums';
15
19
  import * as Entities from '../entities';
@@ -116,9 +120,7 @@ export class JetFireCalculation extends CalculationBase {
116
120
  flameRecords?: Entities.FlameRecord[];
117
121
 
118
122
  /**
119
- * Calculates the jet fire using the cone model from a continuous or time-varying release. It uses source terms as input, and the output can be used to run radiation models for prediction of thermal effects. For time-varying releases the jet fire model will
120
- use average discharge data based on the averaging time for jet fires of 20 s. For continuous releases the model will use the
121
- initial constant discharge data provided.
123
+ * Calculates the jet fire using the cone model from a continuous or time-varying release. Itu ses source terms as input, and the output can be used to run radiation models for prediction of thermal effects. For time-varying releases the jet fire model will use average discharge data based on the averaging time for jet fires of 20 s. For continuous releases the model will use the initial constant discharge data provided.
122
124
  *
123
125
  */
124
126
  constructor(data: {
@@ -387,12 +389,7 @@ export class ModifyFuelRateForJetFireCalculation extends CalculationBase {
387
389
  modDischargeRecords?: Entities.DischargeRecord[];
388
390
 
389
391
  /**
390
- * This method corrects the discharge records' mass flow prior to the jet fire model to account for the fraction of material that rains out in the case of delayed ignition. With delayed ignition it is assumed that the ignition happens after the pool has formed for
391
- the cases of two-phase or liquid releases. As a result it is more accurate to account for the portion of mass that rains out and doesn't form
392
- part of the jet fire. If we are modelling immediate ignition, the whole mass flow rate from the discharge calculation should be
393
- taken into account. In cases where 33% or more of the discharged mass vaporises, experimental data on fireballs
394
- (Hasegawa and Sato, 1977 and Roberts, 1982) found that the whole discharged mass should be the fuel mass used in fire models. CCPS later
395
- adapted this to a rule set of 33%. Thus, this correction only applies for cases where more than 67% of the mass rains out.
392
+ * This method corrects the discharge records' mass flow prior to the jet fire model to account for the fraction of material that rains out in the case of delayed ignition. With delayed ignition it is assumed that the ignition happens after the pool has formed for the cases of two-phase or liquid releases. As a result, it is more accurate to account for the portion of mass that rains out and doesn't form part of the jet fire. If we are modelling immediate ignition, the whole mass flow rate from the discharge calculation should be taken into account. In cases where 33% or more of the discharged mass vaporises, experimental data on fireballs (Hasegawa and Sato, 1977 and Roberts, 1982) found that the whole discharged mass should be the fuel mass used in fire models. CCPS later adapted this to a rule set of 33%. Thus, this correction only applies for cases where more than 67% of the mass rains out.
396
393
  *
397
394
  */
398
395
  constructor(data: {
@@ -425,7 +422,7 @@ adapted this to a rule set of 33%. Thus, this correction only applies for cases
425
422
  const validatedRequest = schema.validate(request);
426
423
 
427
424
  const requestJson = JSON.stringify(validatedRequest);
428
- const url = `${getAnalyticsApiTarget()}ModifyFuelRateForJetFire?clientId=${getClientAliasId()}`;
425
+ const url = `${getAnalyticsApiTarget()}modifyfuelrateforjetfire?clientId=${getClientAliasId()}`;
429
426
 
430
427
  this.resultCode = Enums.ResultCode.UNEXPECTED_APPLICATION_ERROR;
431
428
 
@@ -1,15 +1,19 @@
1
- /***********************************************************************
2
- * This file has been auto-generated by a code generation tool.
3
- *
4
- * DO NOT MODIFY THIS FILE
5
- * This file is maintained by DNV.
6
- * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
7
- * Please contact DNV if you believe changes are required.
8
- *
9
- * Version: 1.0.97
10
- * Date/time: 13 Apr 2026 17:02:52
11
- * Template: templates/typescriptpws/calculations.razor.
12
- ***********************************************************************/
1
+ // ************************************************************************************
2
+ // *
3
+ // * This file has been auto-generated by a code generation tool.
4
+ // *
5
+ // * DO NOT MODIFY THIS FILE
6
+ // * This file is maintained by DNV.
7
+ // * Editing it may lead to inconsistent results and limit DNV's ability to provide support.
8
+ // * Please contact DNV if you believe changes are required.
9
+ // *
10
+ // * API version: 1.0.
11
+ // * MDE version: 9.3.8211.
12
+ // * Package version: 1.0.98
13
+ // * Date/time: 23 Jun 2026 12:11:11.
14
+ // * Template: TYPE_SCRIPT_PWS/calculations.sbn.
15
+ // *
16
+ // ************************************************************************************
13
17
 
14
18
  import * as Enums from '../enums';
15
19
  import * as Entities from '../entities';