api581-engine 0.1.4__py3-none-any.whl
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.
- api581/__init__.py +80 -0
- api581/_amine_tables.py +105 -0
- api581/_h2sh2_tables.py +161 -0
- api581/_slabx_worker.py +174 -0
- api581/_sulfidic_tables.py +517 -0
- api581/_sulfuric_tables.py +328 -0
- api581/acid_sour_water.py +238 -0
- api581/acscc_screening.py +88 -0
- api581/alkaline_sour_water.py +267 -0
- api581/amine_corrosion.py +277 -0
- api581/amine_screening.py +103 -0
- api581/api/__init__.py +4 -0
- api581/api/api520.py +88 -0
- api581/api/bundle.py +121 -0
- api581/api/consequence.py +102 -0
- api581/api/damage.py +1831 -0
- api581/api/dispersion.py +121 -0
- api581/api/effects.py +318 -0
- api581/api/events.py +96 -0
- api581/api/financial.py +115 -0
- api581/api/frequency.py +40 -0
- api581/api/inspection.py +96 -0
- api581/api/level1.py +238 -0
- api581/api/level2.py +74 -0
- api581/api/planning.py +17 -0
- api581/api/prd.py +190 -0
- api581/api/properties.py +130 -0
- api581/api/release.py +252 -0
- api581/api/reliability.py +40 -0
- api581/api/risk.py +71 -0
- api581/api/tank.py +490 -0
- api581/api520.py +205 -0
- api581/area_contribution.py +72 -0
- api581/blast.py +232 -0
- api581/brittle.py +205 -0
- api581/bundle.py +300 -0
- api581/catalog.py +442 -0
- api581/caustic_screening.py +103 -0
- api581/clad_thinning.py +146 -0
- api581/clscc_screening.py +55 -0
- api581/co2_corrosion.py +313 -0
- api581/co2_screening.py +205 -0
- api581/consequences.py +250 -0
- api581/contracts.py +1038 -0
- api581/cooling_selection.py +204 -0
- api581/cooling_water.py +305 -0
- api581/core.py +126 -0
- api581/corrosion_rate.py +38 -0
- api581/cost_tables.py +175 -0
- api581/cracking.py +74 -0
- api581/data/coverage.json +21361 -0
- api581/data/digital-twin.schema.json +538 -0
- api581/data/direct-test-queue.json +7 -0
- api581/data/native-engine-evidence.json +44 -0
- api581/data/python-api.schema.json +92706 -0
- api581/data/reference-fixture-evidence.json +2956 -0
- api581/data/scope-boundaries.schema.json +58 -0
- api581/data/software-test-evidence.json +4278 -0
- api581/data/standard-metadata.json +1328 -0
- api581/data/standard.schema.json +233 -0
- api581/data/supporting-text-review.json +1319 -0
- api581/digital_twin.py +491 -0
- api581/dispersion.py +45 -0
- api581/effects.py +232 -0
- api581/evaporation.py +181 -0
- api581/evidence.py +81 -0
- api581/external_corrosion.py +148 -0
- api581/external_cracking.py +63 -0
- api581/fatigue.py +56 -0
- api581/fireball.py +163 -0
- api581/flash_pool.py +111 -0
- api581/flash_solver.py +122 -0
- api581/groundwater.py +101 -0
- api581/h2sh2_corrosion.py +128 -0
- api581/hic_screened.py +89 -0
- api581/htha.py +45 -0
- api581/hydrochloric_acid.py +272 -0
- api581/hydrofluoric_acid.py +236 -0
- api581/ignition.py +204 -0
- api581/inspection_effectiveness.py +601 -0
- api581/jet_handoff.py +60 -0
- api581/level1.py +311 -0
- api581/level1_summary.py +35 -0
- api581/level1_toxic.py +313 -0
- api581/level1_type1.py +91 -0
- api581/level2_summary.py +237 -0
- api581/lining.py +173 -0
- api581/native_toxic.py +67 -0
- api581/outputs.py +5672 -0
- api581/oxidation.py +145 -0
- api581/pascc_screening.py +78 -0
- api581/physical_explosion.py +190 -0
- api581/pof.py +207 -0
- api581/pool_fire.py +273 -0
- api581/portfolio.py +68 -0
- api581/prd.py +204 -0
- api581/prd_consequences.py +245 -0
- api581/prd_history.py +44 -0
- api581/py.typed +0 -0
- api581/release.py +307 -0
- api581/representative_fluids.py +172 -0
- api581/result.py +50 -0
- api581/risk.py +191 -0
- api581/saturation.py +66 -0
- api581/scc_mechanisms.py +242 -0
- api581/schema.py +45 -0
- api581/slabx_adapter.py +261 -0
- api581/soil_corrosion.py +191 -0
- api581/source_partition.py +169 -0
- api581/spatial.py +87 -0
- api581/ssc_screening.py +77 -0
- api581/standard.py +281 -0
- api581/storage.py +42 -0
- api581/sulfidic_corrosion.py +197 -0
- api581/sulfuric_acid.py +209 -0
- api581/tank.py +260 -0
- api581/tank_corrosion.py +256 -0
- api581/tank_environment.py +186 -0
- api581/tank_financial.py +202 -0
- api581/tank_integrated.py +51 -0
- api581/tank_shell.py +141 -0
- api581/tank_source.py +152 -0
- api581/tank_thinning.py +204 -0
- api581/temper.py +105 -0
- api581/thinning.py +172 -0
- api581/thinning_conditions.py +212 -0
- api581/thinning_history.py +118 -0
- api581/thinning_selection.py +81 -0
- api581/thinning_type.py +34 -0
- api581/toxic_criteria.py +111 -0
- api581/toxic_level2.py +233 -0
- api581/two_phase_events.py +120 -0
- api581/workflow.py +42 -0
- api581_engine-0.1.4.dist-info/METADATA +419 -0
- api581_engine-0.1.4.dist-info/RECORD +139 -0
- api581_engine-0.1.4.dist-info/WHEEL +5 -0
- api581_engine-0.1.4.dist-info/licenses/LICENSE +161 -0
- api581_engine-0.1.4.dist-info/licenses/NOTICE.md +18 -0
- api581_engine-0.1.4.dist-info/top_level.txt +1 -0
api581/api/prd.py
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"""Public prd calculations. Inputs and outputs use named SI units.
|
|
2
|
+
Generated by scripts/build_python_api.py; inspect the request model for fields.
|
|
3
|
+
"""
|
|
4
|
+
from ..core import Context
|
|
5
|
+
from ..result import CalculationResult, calculate
|
|
6
|
+
|
|
7
|
+
from ..prd import DemandCase as DemandCaseInput
|
|
8
|
+
from ..prd_consequences import FailRiskCase as FailRiskCaseInput
|
|
9
|
+
from ..prd import PrdDefaults as PrdDefaultsInput
|
|
10
|
+
from ..prd import PrdEnvironment as PrdEnvironmentInput
|
|
11
|
+
from ..prd_consequences import ProtectedRisk as ProtectedRiskInput
|
|
12
|
+
from ..prd_history import ServiceEvent as ServiceEventInput
|
|
13
|
+
|
|
14
|
+
from ..prd import PrdDefaults as DefaultWeibullInput
|
|
15
|
+
from ..outputs import PrdDefaultWeibullOutput as DefaultWeibullOutput
|
|
16
|
+
|
|
17
|
+
def default_weibull(inputs: DefaultWeibullInput, *, context: Context | None = None) -> CalculationResult[DefaultWeibullOutput]:
|
|
18
|
+
'PRD default Weibull parameters and design modifiers'
|
|
19
|
+
return calculate('prd/default-weibull', inputs, output_type=DefaultWeibullOutput, context=context)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
from ..prd import PrdEnvironment as EnvironmentFactorInput
|
|
23
|
+
from ..outputs import PrdEnvironmentFactorOutput as EnvironmentFactorOutput
|
|
24
|
+
|
|
25
|
+
def environment_factor(inputs: EnvironmentFactorInput, *, context: Context | None = None) -> CalculationResult[EnvironmentFactorOutput]:
|
|
26
|
+
'PRD environmental characteristic-life modifier'
|
|
27
|
+
return calculate('prd/environment-factor', inputs, output_type=EnvironmentFactorOutput, context=context)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
from ..prd import PrdSetPressure as SetPressureFactorInput
|
|
31
|
+
from ..outputs import PrdSetPressureFactorOutput as SetPressureFactorOutput
|
|
32
|
+
|
|
33
|
+
def set_pressure_factor(inputs: SetPressureFactorInput, *, context: Context | None = None) -> CalculationResult[SetPressureFactorOutput]:
|
|
34
|
+
'PRD leakage set-pressure probability modifier'
|
|
35
|
+
return calculate('prd/set-pressure-factor', inputs, output_type=SetPressureFactorOutput, context=context)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
from ..prd import PrdOverpressure as OverpressureFactorInput
|
|
39
|
+
from ..outputs import PrdOverpressureFactorOutput as OverpressureFactorOutput
|
|
40
|
+
|
|
41
|
+
def overpressure_factor(inputs: OverpressureFactorInput, *, context: Context | None = None) -> CalculationResult[OverpressureFactorOutput]:
|
|
42
|
+
'PRD fail-to-open overpressure modifier'
|
|
43
|
+
return calculate('prd/overpressure-factor', inputs, output_type=OverpressureFactorOutput, context=context)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
from ..prd import PrdDemand as DemandRateInput
|
|
47
|
+
from ..outputs import PrdDemandRateOutput as DemandRateOutput
|
|
48
|
+
|
|
49
|
+
def demand_rate(inputs: DemandRateInput, *, context: Context | None = None) -> CalculationResult[DemandRateOutput]:
|
|
50
|
+
'PRD case and total demand rates'
|
|
51
|
+
return calculate('prd/demand-rate', inputs, output_type=DemandRateOutput, context=context)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
from ..prd import InspectionUpdate as InspectionUpdateInput
|
|
55
|
+
from ..outputs import PrdInspectionUpdateOutput as InspectionUpdateOutput
|
|
56
|
+
|
|
57
|
+
def inspection_update(inputs: InspectionUpdateInput, *, context: Context | None = None) -> CalculationResult[InspectionUpdateOutput]:
|
|
58
|
+
'PRD single inspection characteristic-life update'
|
|
59
|
+
return calculate('prd/inspection-update', inputs, output_type=InspectionUpdateOutput, context=context)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
from ..prd import ProtectedEquipment as ProtectedEquipmentInput
|
|
63
|
+
from ..outputs import PrdProtectedEquipmentOutput as ProtectedEquipmentOutput
|
|
64
|
+
|
|
65
|
+
def protected_equipment(inputs: ProtectedEquipmentInput, *, context: Context | None = None) -> CalculationResult[ProtectedEquipmentOutput]:
|
|
66
|
+
'Protected equipment overpressure loss-of-containment model'
|
|
67
|
+
return calculate('prd/protected-equipment', inputs, output_type=ProtectedEquipmentOutput, context=context)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
from ..prd import PrdFailFrequency as FailFrequencyInput
|
|
71
|
+
from ..outputs import PrdFailFrequencyOutput as FailFrequencyOutput
|
|
72
|
+
|
|
73
|
+
def fail_frequency(inputs: FailFrequencyInput, *, context: Context | None = None) -> CalculationResult[FailFrequencyOutput]:
|
|
74
|
+
'PRD fail-to-open loss-of-containment scenario frequency'
|
|
75
|
+
return calculate('prd/fail-frequency', inputs, output_type=FailFrequencyOutput, context=context)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
from ..prd import BaseReliability as BaseReliabilityInput
|
|
79
|
+
from ..outputs import PrdBaseReliabilityOutput as BaseReliabilityOutput
|
|
80
|
+
|
|
81
|
+
def base_reliability(inputs: BaseReliabilityInput, *, context: Context | None = None) -> CalculationResult[BaseReliabilityOutput]:
|
|
82
|
+
'PRD default/design/environment/scenario probability'
|
|
83
|
+
return calculate('prd/base-reliability', inputs, output_type=BaseReliabilityOutput, context=context)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
from ..prd_consequences import LeakageRates as LeakageRatesInput
|
|
87
|
+
from ..outputs import PrdLeakageRatesOutput as LeakageRatesOutput
|
|
88
|
+
|
|
89
|
+
def leakage_rates(inputs: LeakageRatesInput, *, context: Context | None = None) -> CalculationResult[LeakageRatesOutput]:
|
|
90
|
+
'PRD minor/moderate/combined/stuck-open leakage rates'
|
|
91
|
+
return calculate('prd/leakage-rates', inputs, output_type=LeakageRatesOutput, context=context)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
from ..prd_consequences import LeakageDuration as LeakageDurationInput
|
|
95
|
+
from ..outputs import PrdLeakageDurationOutput as LeakageDurationOutput
|
|
96
|
+
|
|
97
|
+
def leakage_duration(inputs: LeakageDurationInput, *, context: Context | None = None) -> CalculationResult[LeakageDurationOutput]:
|
|
98
|
+
'PRD size/discharge leakage duration'
|
|
99
|
+
return calculate('prd/leakage-duration', inputs, output_type=LeakageDurationOutput, context=context)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
from ..prd_consequences import InventoryRecovery as InventoryLossFactorInput
|
|
103
|
+
from ..outputs import PrdInventoryLossFactorOutput as InventoryLossFactorOutput
|
|
104
|
+
|
|
105
|
+
def inventory_loss_factor(inputs: InventoryLossFactorInput, *, context: Context | None = None) -> CalculationResult[InventoryLossFactorOutput]:
|
|
106
|
+
'PRD residual inventory loss factor after recovery'
|
|
107
|
+
return calculate('prd/inventory-loss-factor', inputs, output_type=InventoryLossFactorOutput, context=context)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
from ..prd_consequences import InventoryLoss as InventoryLossInput
|
|
111
|
+
from ..outputs import PrdInventoryLossOutput as InventoryLossOutput
|
|
112
|
+
|
|
113
|
+
def inventory_loss(inputs: InventoryLossInput, *, context: Context | None = None) -> CalculationResult[InventoryLossOutput]:
|
|
114
|
+
'PRD leakage inventory mass and financial loss'
|
|
115
|
+
return calculate('prd/inventory-loss', inputs, output_type=InventoryLossOutput, context=context)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
from ..prd_consequences import ReferenceRepair as RepairCostInput
|
|
119
|
+
from ..outputs import PrdRepairCostOutput as RepairCostOutput
|
|
120
|
+
|
|
121
|
+
def repair_cost(inputs: RepairCostInput, *, context: Context | None = None) -> CalculationResult[RepairCostOutput]:
|
|
122
|
+
'PRD reference repair quote adjusted to declared price basis'
|
|
123
|
+
return calculate('prd/repair-cost', inputs, output_type=RepairCostOutput, context=context)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
from ..prd_consequences import ProductionLoss as ProductionLossInput
|
|
127
|
+
from ..outputs import PrdProductionLossOutput as ProductionLossOutput
|
|
128
|
+
|
|
129
|
+
def production_loss(inputs: ProductionLossInput, *, context: Context | None = None) -> CalculationResult[ProductionLossOutput]:
|
|
130
|
+
'PRD leakage shutdown production loss'
|
|
131
|
+
return calculate('prd/production-loss', inputs, output_type=ProductionLossOutput, context=context)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
from ..prd_consequences import LeakageConsequence as LeakageConsequenceInput
|
|
135
|
+
from ..outputs import PrdLeakageConsequenceOutput as LeakageConsequenceOutput
|
|
136
|
+
|
|
137
|
+
def leakage_consequence(inputs: LeakageConsequenceInput, *, context: Context | None = None) -> CalculationResult[LeakageConsequenceOutput]:
|
|
138
|
+
'PRD two/three-case leakage financial consequence'
|
|
139
|
+
return calculate('prd/leakage-consequence', inputs, output_type=LeakageConsequenceOutput, context=context)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
from ..prd_consequences import MultipleDevicePressure as MultipleDevicePressureInput
|
|
143
|
+
from ..outputs import PrdMultipleDevicePressureOutput as MultipleDevicePressureOutput
|
|
144
|
+
|
|
145
|
+
def multiple_device_pressure(inputs: MultipleDevicePressureInput, *, context: Context | None = None) -> CalculationResult[MultipleDevicePressureOutput]:
|
|
146
|
+
'Multiple PRD area-based protected-equipment pressure adjustment'
|
|
147
|
+
return calculate('prd/multiple-device-pressure', inputs, output_type=MultipleDevicePressureOutput, context=context)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
from ..prd_consequences import FailRisk as FailRiskInput
|
|
151
|
+
from ..outputs import PrdFailRiskOutput as FailRiskOutput
|
|
152
|
+
|
|
153
|
+
def fail_risk(inputs: FailRiskInput, *, context: Context | None = None) -> CalculationResult[FailRiskOutput]:
|
|
154
|
+
'PRD fail-to-open case sum and protected-equipment maximum risk'
|
|
155
|
+
return calculate('prd/fail-risk', inputs, output_type=FailRiskOutput, context=context)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
from ..prd_consequences import LeakageRisk as LeakageRiskInput
|
|
159
|
+
from ..outputs import PrdLeakageRiskOutput as LeakageRiskOutput
|
|
160
|
+
|
|
161
|
+
def leakage_risk(inputs: LeakageRiskInput, *, context: Context | None = None) -> CalculationResult[LeakageRiskOutput]:
|
|
162
|
+
'PRD leakage consequence weighted by declared probability/frequency basis'
|
|
163
|
+
return calculate('prd/leakage-risk', inputs, output_type=LeakageRiskOutput, context=context)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
from ..prd_consequences import TotalRisk as TotalRiskInput
|
|
167
|
+
from ..outputs import PrdTotalRiskOutput as TotalRiskOutput
|
|
168
|
+
|
|
169
|
+
def total_risk(inputs: TotalRiskInput, *, context: Context | None = None) -> CalculationResult[TotalRiskOutput]:
|
|
170
|
+
'PRD combined risk with explicit dimensional basis'
|
|
171
|
+
return calculate('prd/total-risk', inputs, output_type=TotalRiskOutput, context=context)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
from ..prd_consequences import RiskAssessment as RiskAssessmentInput
|
|
175
|
+
from ..outputs import PrdRiskAssessmentOutput as RiskAssessmentOutput
|
|
176
|
+
|
|
177
|
+
def risk_assessment(inputs: RiskAssessmentInput, *, context: Context | None = None) -> CalculationResult[RiskAssessmentOutput]:
|
|
178
|
+
'Compose protected-item fail risk and PRD leakage risk'
|
|
179
|
+
return calculate('prd/risk-assessment', inputs, output_type=RiskAssessmentOutput, context=context)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
from ..prd_history import ServiceAge as ServiceAgeInput
|
|
183
|
+
from ..outputs import PrdServiceAgeOutput as ServiceAgeOutput
|
|
184
|
+
|
|
185
|
+
def service_age(inputs: ServiceAgeInput, *, context: Context | None = None) -> CalculationResult[ServiceAgeOutput]:
|
|
186
|
+
'PRD as-new service age and valid-history start boundary'
|
|
187
|
+
return calculate('prd/service-age', inputs, output_type=ServiceAgeOutput, context=context)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
__all__ = ['DemandCaseInput', 'FailRiskCaseInput', 'PrdDefaultsInput', 'PrdEnvironmentInput', 'ProtectedRiskInput', 'ServiceEventInput', 'default_weibull', 'DefaultWeibullInput', 'DefaultWeibullOutput', 'environment_factor', 'EnvironmentFactorInput', 'EnvironmentFactorOutput', 'set_pressure_factor', 'SetPressureFactorInput', 'SetPressureFactorOutput', 'overpressure_factor', 'OverpressureFactorInput', 'OverpressureFactorOutput', 'demand_rate', 'DemandRateInput', 'DemandRateOutput', 'inspection_update', 'InspectionUpdateInput', 'InspectionUpdateOutput', 'protected_equipment', 'ProtectedEquipmentInput', 'ProtectedEquipmentOutput', 'fail_frequency', 'FailFrequencyInput', 'FailFrequencyOutput', 'base_reliability', 'BaseReliabilityInput', 'BaseReliabilityOutput', 'leakage_rates', 'LeakageRatesInput', 'LeakageRatesOutput', 'leakage_duration', 'LeakageDurationInput', 'LeakageDurationOutput', 'inventory_loss_factor', 'InventoryLossFactorInput', 'InventoryLossFactorOutput', 'inventory_loss', 'InventoryLossInput', 'InventoryLossOutput', 'repair_cost', 'RepairCostInput', 'RepairCostOutput', 'production_loss', 'ProductionLossInput', 'ProductionLossOutput', 'leakage_consequence', 'LeakageConsequenceInput', 'LeakageConsequenceOutput', 'multiple_device_pressure', 'MultipleDevicePressureInput', 'MultipleDevicePressureOutput', 'fail_risk', 'FailRiskInput', 'FailRiskOutput', 'leakage_risk', 'LeakageRiskInput', 'LeakageRiskOutput', 'total_risk', 'TotalRiskInput', 'TotalRiskOutput', 'risk_assessment', 'RiskAssessmentInput', 'RiskAssessmentOutput', 'service_age', 'ServiceAgeInput', 'ServiceAgeOutput']
|
api581/api/properties.py
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"""Public properties calculations. Inputs and outputs use named SI units.
|
|
2
|
+
Generated by scripts/build_python_api.py; inspect the request model for fields.
|
|
3
|
+
"""
|
|
4
|
+
from ..core import Context
|
|
5
|
+
from ..result import CalculationResult, calculate
|
|
6
|
+
|
|
7
|
+
from ..release import MixtureComponent as MixtureComponentInput
|
|
8
|
+
from ..representative_fluids import MixturePropertyComponent as MixturePropertyComponentInput
|
|
9
|
+
|
|
10
|
+
from ..release import HeatCapacity as HeatCapacityRatioInput
|
|
11
|
+
from ..outputs import PropertiesHeatCapacityRatioOutput as HeatCapacityRatioOutput
|
|
12
|
+
|
|
13
|
+
def heat_capacity_ratio(inputs: HeatCapacityRatioInput, *, context: Context | None = None) -> CalculationResult[HeatCapacityRatioOutput]:
|
|
14
|
+
'Ideal-gas specific heat ratio'
|
|
15
|
+
return calculate('properties/heat-capacity-ratio', inputs, output_type=HeatCapacityRatioOutput, context=context)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
from ..release import Mixture as MixtureMolecularWeightInput
|
|
19
|
+
from ..outputs import PropertiesMixtureMolecularWeightOutput as MixtureMolecularWeightOutput
|
|
20
|
+
|
|
21
|
+
def mixture_molecular_weight(inputs: MixtureMolecularWeightInput, *, context: Context | None = None) -> CalculationResult[MixtureMolecularWeightOutput]:
|
|
22
|
+
'Mole-weighted mixture and mass fractions'
|
|
23
|
+
return calculate('properties/mixture-molecular-weight', inputs, output_type=MixtureMolecularWeightOutput, context=context)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
from ..cost_tables import LeakProperties as LeakTableInput
|
|
27
|
+
from ..outputs import PropertiesLeakTableOutput as LeakTableOutput
|
|
28
|
+
|
|
29
|
+
def leak_table(inputs: LeakTableInput, *, context: Context | None = None) -> CalculationResult[LeakTableOutput]:
|
|
30
|
+
'Tabulated SI leak/remediation properties'
|
|
31
|
+
return calculate('properties/leak-table', inputs, output_type=LeakTableOutput, context=context)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
from ..htha import HydrogenPressure as HydrogenPartialPressureInput
|
|
35
|
+
from ..outputs import PropertiesHydrogenPartialPressureOutput as HydrogenPartialPressureOutput
|
|
36
|
+
|
|
37
|
+
def hydrogen_partial_pressure(inputs: HydrogenPartialPressureInput, *, context: Context | None = None) -> CalculationResult[HydrogenPartialPressureOutput]:
|
|
38
|
+
'Hydrogen ideal-mixture partial pressure'
|
|
39
|
+
return calculate('properties/hydrogen-partial-pressure', inputs, output_type=HydrogenPartialPressureOutput, context=context)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
from ..pool_fire import WaterPressure as WaterPartialPressureInput
|
|
43
|
+
from ..outputs import PropertiesWaterPartialPressureOutput as WaterPartialPressureOutput
|
|
44
|
+
|
|
45
|
+
def water_partial_pressure(inputs: WaterPartialPressureInput, *, context: Context | None = None) -> CalculationResult[WaterPartialPressureOutput]:
|
|
46
|
+
'Water partial pressure for radiation attenuation'
|
|
47
|
+
return calculate('properties/water-partial-pressure', inputs, output_type=WaterPartialPressureOutput, context=context)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
from ..toxic_level2 import ToxicFluid as ToxicImpactTableInput
|
|
51
|
+
from ..outputs import PropertiesToxicImpactTableOutput as ToxicImpactTableOutput
|
|
52
|
+
|
|
53
|
+
def toxic_impact_table(inputs: ToxicImpactTableInput, *, context: Context | None = None) -> CalculationResult[ToxicImpactTableOutput]:
|
|
54
|
+
'2016 Table4.14 toxic criteria and probit parameters'
|
|
55
|
+
return calculate('properties/toxic-impact-table', inputs, output_type=ToxicImpactTableOutput, context=context)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
from ..evaporation import SurfaceLookup as PoolSurfaceInteractionInput
|
|
59
|
+
from ..outputs import PropertiesPoolSurfaceInteractionOutput as PoolSurfaceInteractionOutput
|
|
60
|
+
|
|
61
|
+
def pool_surface_interaction(inputs: PoolSurfaceInteractionInput, *, context: Context | None = None) -> CalculationResult[PoolSurfaceInteractionOutput]:
|
|
62
|
+
'SI liquid-pool ground interaction properties'
|
|
63
|
+
return calculate('properties/pool-surface-interaction', inputs, output_type=PoolSurfaceInteractionOutput, context=context)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
from ..co2_screening import CO2PartialPressure as Co2PartialPressureInput
|
|
67
|
+
from ..outputs import PropertiesCo2PartialPressureOutput as Co2PartialPressureOutput
|
|
68
|
+
|
|
69
|
+
def co2_partial_pressure(inputs: Co2PartialPressureInput, *, context: Context | None = None) -> CalculationResult[Co2PartialPressureOutput]:
|
|
70
|
+
'CO2 partial pressure from absolute total pressure and mole fraction'
|
|
71
|
+
return calculate('properties/co2-partial-pressure', inputs, output_type=Co2PartialPressureOutput, context=context)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
from ..alkaline_sour_water import H2SPartialPressure as H2sPartialPressureInput
|
|
75
|
+
from ..outputs import PropertiesH2sPartialPressureOutput as H2sPartialPressureOutput
|
|
76
|
+
|
|
77
|
+
def h2s_partial_pressure(inputs: H2sPartialPressureInput, *, context: Context | None = None) -> CalculationResult[H2sPartialPressureOutput]:
|
|
78
|
+
'H2S partial pressure from absolute pressure and mole fraction'
|
|
79
|
+
return calculate('properties/h2s-partial-pressure', inputs, output_type=H2sPartialPressureOutput, context=context)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
from ..flash_solver import PureFluidFlash as PureFluidFlashInput
|
|
83
|
+
from ..outputs import PropertiesPureFluidFlashOutput as PureFluidFlashOutput
|
|
84
|
+
|
|
85
|
+
def pure_fluid_flash(inputs: PureFluidFlashInput, *, context: Context | None = None) -> CalculationResult[PureFluidFlashOutput]:
|
|
86
|
+
'Qualified pure-fluid isentropic or isenthalpic flash'
|
|
87
|
+
return calculate('properties/pure-fluid-flash', inputs, output_type=PureFluidFlashOutput, context=context)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
from ..saturation import SaturationPressure as PureFluidSaturationPressureInput
|
|
91
|
+
from ..outputs import PropertiesPureFluidSaturationPressureOutput as PureFluidSaturationPressureOutput
|
|
92
|
+
|
|
93
|
+
def pure_fluid_saturation_pressure(inputs: PureFluidSaturationPressureInput, *, context: Context | None = None) -> CalculationResult[PureFluidSaturationPressureOutput]:
|
|
94
|
+
'Pure-fluid bubble/dew and saturated properties at pressure'
|
|
95
|
+
return calculate('properties/pure-fluid-saturation-pressure', inputs, output_type=PureFluidSaturationPressureOutput, context=context)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
from ..saturation import SaturationTemperature as PureFluidSaturationTemperatureInput
|
|
99
|
+
from ..outputs import PropertiesPureFluidSaturationTemperatureOutput as PureFluidSaturationTemperatureOutput
|
|
100
|
+
|
|
101
|
+
def pure_fluid_saturation_temperature(inputs: PureFluidSaturationTemperatureInput, *, context: Context | None = None) -> CalculationResult[PureFluidSaturationTemperatureOutput]:
|
|
102
|
+
'Pure-fluid vapor pressure and saturated properties at temperature'
|
|
103
|
+
return calculate('properties/pure-fluid-saturation-temperature', inputs, output_type=PureFluidSaturationTemperatureOutput, context=context)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
from ..representative_fluids import AcidCausticSelection as AcidCausticRepresentativeFluidInput
|
|
107
|
+
from ..outputs import PropertiesAcidCausticRepresentativeFluidOutput as AcidCausticRepresentativeFluidOutput
|
|
108
|
+
|
|
109
|
+
def acid_caustic_representative_fluid(inputs: AcidCausticRepresentativeFluidInput, *, context: Context | None = None) -> CalculationResult[AcidCausticRepresentativeFluidOutput]:
|
|
110
|
+
'API 581 acid/caustic representative-fluid selection'
|
|
111
|
+
return calculate('properties/acid-caustic-representative-fluid', inputs, output_type=AcidCausticRepresentativeFluidOutput, context=context)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
from ..representative_fluids import MixtureRepresentativeFluid as MixtureRepresentativeFluidInput
|
|
115
|
+
from ..outputs import PropertiesMixtureRepresentativeFluidOutput as MixtureRepresentativeFluidOutput
|
|
116
|
+
|
|
117
|
+
def mixture_representative_fluid(inputs: MixtureRepresentativeFluidInput, *, context: Context | None = None) -> CalculationResult[MixtureRepresentativeFluidOutput]:
|
|
118
|
+
'Annex 3.A mole-weighted representative-fluid selection'
|
|
119
|
+
return calculate('properties/mixture-representative-fluid', inputs, output_type=MixtureRepresentativeFluidOutput, context=context)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
from ..representative_fluids import RepresentativeFluid as RepresentativeFluidInput
|
|
123
|
+
from ..outputs import PropertiesRepresentativeFluidOutput as RepresentativeFluidOutput
|
|
124
|
+
|
|
125
|
+
def representative_fluid(inputs: RepresentativeFluidInput, *, context: Context | None = None) -> CalculationResult[RepresentativeFluidOutput]:
|
|
126
|
+
'API 581 Table 4.2M representative-fluid properties'
|
|
127
|
+
return calculate('properties/representative-fluid', inputs, output_type=RepresentativeFluidOutput, context=context)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
__all__ = ['MixtureComponentInput', 'MixturePropertyComponentInput', 'heat_capacity_ratio', 'HeatCapacityRatioInput', 'HeatCapacityRatioOutput', 'mixture_molecular_weight', 'MixtureMolecularWeightInput', 'MixtureMolecularWeightOutput', 'leak_table', 'LeakTableInput', 'LeakTableOutput', 'hydrogen_partial_pressure', 'HydrogenPartialPressureInput', 'HydrogenPartialPressureOutput', 'water_partial_pressure', 'WaterPartialPressureInput', 'WaterPartialPressureOutput', 'toxic_impact_table', 'ToxicImpactTableInput', 'ToxicImpactTableOutput', 'pool_surface_interaction', 'PoolSurfaceInteractionInput', 'PoolSurfaceInteractionOutput', 'co2_partial_pressure', 'Co2PartialPressureInput', 'Co2PartialPressureOutput', 'h2s_partial_pressure', 'H2sPartialPressureInput', 'H2sPartialPressureOutput', 'pure_fluid_flash', 'PureFluidFlashInput', 'PureFluidFlashOutput', 'pure_fluid_saturation_pressure', 'PureFluidSaturationPressureInput', 'PureFluidSaturationPressureOutput', 'pure_fluid_saturation_temperature', 'PureFluidSaturationTemperatureInput', 'PureFluidSaturationTemperatureOutput', 'acid_caustic_representative_fluid', 'AcidCausticRepresentativeFluidInput', 'AcidCausticRepresentativeFluidOutput', 'mixture_representative_fluid', 'MixtureRepresentativeFluidInput', 'MixtureRepresentativeFluidOutput', 'representative_fluid', 'RepresentativeFluidInput', 'RepresentativeFluidOutput']
|
api581/api/release.py
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"""Public release calculations. Inputs and outputs use named SI units.
|
|
2
|
+
Generated by scripts/build_python_api.py; inspect the request model for fields.
|
|
3
|
+
"""
|
|
4
|
+
from ..core import Context
|
|
5
|
+
from ..result import CalculationResult, calculate
|
|
6
|
+
|
|
7
|
+
from ..release import Gas as ReleaseGasInput
|
|
8
|
+
from ..release import Liquid as ReleaseLiquidInput
|
|
9
|
+
from ..evaporation import SurfaceInteraction as SurfaceInteractionInput
|
|
10
|
+
from ..release import TimePoint as TimePointInput
|
|
11
|
+
|
|
12
|
+
from ..release import HoleSizeSelection as HoleSizeSelectionInput
|
|
13
|
+
from ..outputs import ReleaseHoleSizeSelectionOutput as HoleSizeSelectionOutput
|
|
14
|
+
|
|
15
|
+
def hole_size_selection(inputs: HoleSizeSelectionInput, *, context: Context | None = None) -> CalculationResult[HoleSizeSelectionOutput]:
|
|
16
|
+
'Release hole class and representative diameter'
|
|
17
|
+
return calculate('release/hole-size-selection', inputs, output_type=HoleSizeSelectionOutput, context=context)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
from ..release import DetectionIsolationRating as DetectionIsolationRatingInput
|
|
21
|
+
from ..outputs import ReleaseDetectionIsolationRatingOutput as DetectionIsolationRatingOutput
|
|
22
|
+
|
|
23
|
+
def detection_isolation_rating(inputs: DetectionIsolationRatingInput, *, context: Context | None = None) -> CalculationResult[DetectionIsolationRatingOutput]:
|
|
24
|
+
'Table 4.5 detection and isolation system classification'
|
|
25
|
+
return calculate('release/detection-isolation-rating', inputs, output_type=DetectionIsolationRatingOutput, context=context)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
from ..release import Orifice as OrificeAreaInput
|
|
29
|
+
from ..outputs import ReleaseOrificeAreaOutput as OrificeAreaOutput
|
|
30
|
+
|
|
31
|
+
def orifice_area(inputs: OrificeAreaInput, *, context: Context | None = None) -> CalculationResult[OrificeAreaOutput]:
|
|
32
|
+
'Circular release area'
|
|
33
|
+
return calculate('release/orifice-area', inputs, output_type=OrificeAreaOutput, context=context)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
from ..release import Viscosity as ViscosityFactorInput
|
|
37
|
+
from ..outputs import ReleaseViscosityFactorOutput as ViscosityFactorOutput
|
|
38
|
+
|
|
39
|
+
def viscosity_factor(inputs: ViscosityFactorInput, *, context: Context | None = None) -> CalculationResult[ViscosityFactorOutput]:
|
|
40
|
+
'Liquid viscosity correction'
|
|
41
|
+
return calculate('release/viscosity-factor', inputs, output_type=ViscosityFactorOutput, context=context)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
from ..release import Liquid as LiquidInput
|
|
45
|
+
from ..outputs import ReleaseLiquidOutput as LiquidOutput
|
|
46
|
+
|
|
47
|
+
def liquid(inputs: LiquidInput, *, context: Context | None = None) -> CalculationResult[LiquidOutput]:
|
|
48
|
+
'Liquid orifice mass release rate'
|
|
49
|
+
return calculate('release/liquid', inputs, output_type=LiquidOutput, context=context)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
from ..release import Gas as GasInput
|
|
53
|
+
from ..outputs import ReleaseGasOutput as GasOutput
|
|
54
|
+
|
|
55
|
+
def gas(inputs: GasInput, *, context: Context | None = None) -> CalculationResult[GasOutput]:
|
|
56
|
+
'Sonic or subsonic ideal-gas release'
|
|
57
|
+
return calculate('release/gas', inputs, output_type=GasOutput, context=context)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
from ..release import AvailableInventory as AvailableInventoryInput
|
|
61
|
+
from ..outputs import ReleaseAvailableInventoryOutput as AvailableInventoryOutput
|
|
62
|
+
|
|
63
|
+
def available_inventory(inputs: AvailableInventoryInput, *, context: Context | None = None) -> CalculationResult[AvailableInventoryOutput]:
|
|
64
|
+
'Maximum available mass'
|
|
65
|
+
return calculate('release/available-inventory', inputs, output_type=AvailableInventoryOutput, context=context)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
from ..release import ReleaseType as TypeInput
|
|
69
|
+
from ..outputs import ReleaseTypeOutput as TypeOutput
|
|
70
|
+
|
|
71
|
+
def type(inputs: TypeInput, *, context: Context | None = None) -> CalculationResult[TypeOutput]:
|
|
72
|
+
'Continuous or instantaneous release classification'
|
|
73
|
+
return calculate('release/type', inputs, output_type=TypeOutput, context=context)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
from ..release import ReleaseMagnitude as MagnitudeInput
|
|
77
|
+
from ..outputs import ReleaseMagnitudeOutput as MagnitudeOutput
|
|
78
|
+
|
|
79
|
+
def magnitude(inputs: MagnitudeInput, *, context: Context | None = None) -> CalculationResult[MagnitudeOutput]:
|
|
80
|
+
'Adjusted release rate, duration and mass'
|
|
81
|
+
return calculate('release/magnitude', inputs, output_type=MagnitudeOutput, context=context)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
from ..release import DetectionIsolation as DetectionIsolationInput
|
|
85
|
+
from ..outputs import ReleaseDetectionIsolationOutput as DetectionIsolationOutput
|
|
86
|
+
|
|
87
|
+
def detection_isolation(inputs: DetectionIsolationInput, *, context: Context | None = None) -> CalculationResult[DetectionIsolationOutput]:
|
|
88
|
+
'Detection/isolation release reduction and maximum leak duration'
|
|
89
|
+
return calculate('release/detection-isolation', inputs, output_type=DetectionIsolationOutput, context=context)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
from ..release import Transient as IntegrateProfileInput
|
|
93
|
+
from ..outputs import ReleaseIntegrateProfileOutput as IntegrateProfileOutput
|
|
94
|
+
|
|
95
|
+
def integrate_profile(inputs: IntegrateProfileInput, *, context: Context | None = None) -> CalculationResult[IntegrateProfileOutput]:
|
|
96
|
+
'Integrate a piecewise-linear release profile'
|
|
97
|
+
return calculate('release/integrate-profile', inputs, output_type=IntegrateProfileOutput, context=context)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
from ..level1 import Detection as DetectionReductionInput
|
|
101
|
+
from ..outputs import ReleaseDetectionReductionOutput as DetectionReductionOutput
|
|
102
|
+
|
|
103
|
+
def detection_reduction(inputs: DetectionReductionInput, *, context: Context | None = None) -> CalculationResult[DetectionReductionOutput]:
|
|
104
|
+
'Detection/isolation reduction factor'
|
|
105
|
+
return calculate('release/detection-reduction', inputs, output_type=DetectionReductionOutput, context=context)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
from ..level1 import LeakDuration as DetectionDurationInput
|
|
109
|
+
from ..outputs import ReleaseDetectionDurationOutput as DetectionDurationOutput
|
|
110
|
+
|
|
111
|
+
def detection_duration(inputs: DetectionDurationInput, *, context: Context | None = None) -> CalculationResult[DetectionDurationOutput]:
|
|
112
|
+
'Detection/isolation maximum duration'
|
|
113
|
+
return calculate('release/detection-duration', inputs, output_type=DetectionDurationOutput, context=context)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
from ..level1 import ControlledRelease as ControlledScenarioInput
|
|
117
|
+
from ..outputs import ReleaseControlledScenarioOutput as ControlledScenarioOutput
|
|
118
|
+
|
|
119
|
+
def controlled_scenario(inputs: ControlledScenarioInput, *, context: Context | None = None) -> CalculationResult[ControlledScenarioOutput]:
|
|
120
|
+
'Per-hole source, inventory, detection/isolation and release magnitude'
|
|
121
|
+
return calculate('release/controlled-scenario', inputs, output_type=ControlledScenarioOutput, context=context)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
from ..physical_explosion import FlashedAmount as BleveFlashedAmountInput
|
|
125
|
+
from ..outputs import ReleaseBleveFlashedAmountOutput as BleveFlashedAmountOutput
|
|
126
|
+
|
|
127
|
+
def bleve_flashed_amount(inputs: BleveFlashedAmountInput, *, context: Context | None = None) -> CalculationResult[BleveFlashedAmountOutput]:
|
|
128
|
+
'Flashed liquid mass and amount for BLEVE'
|
|
129
|
+
return calculate('release/bleve-flashed-amount', inputs, output_type=BleveFlashedAmountOutput, context=context)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
from ..toxic_level2 import ToxicDuration as Level2ToxicDurationInput
|
|
133
|
+
from ..outputs import ReleaseLevel2ToxicDurationOutput as Level2ToxicDurationOutput
|
|
134
|
+
|
|
135
|
+
def level2_toxic_duration(inputs: Level2ToxicDurationInput, *, context: Context | None = None) -> CalculationResult[Level2ToxicDurationOutput]:
|
|
136
|
+
'Level2 toxic release duration bound'
|
|
137
|
+
return calculate('release/level2-toxic-duration', inputs, output_type=Level2ToxicDurationOutput, context=context)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
from ..evaporation import PoolTemperatures as PoolEvaporationRegimeInput
|
|
141
|
+
from ..outputs import ReleasePoolEvaporationRegimeOutput as PoolEvaporationRegimeOutput
|
|
142
|
+
|
|
143
|
+
def pool_evaporation_regime(inputs: PoolEvaporationRegimeInput, *, context: Context | None = None) -> CalculationResult[PoolEvaporationRegimeOutput]:
|
|
144
|
+
'Pool boiling/non-boiling temperature classification'
|
|
145
|
+
return calculate('release/pool-evaporation-regime', inputs, output_type=PoolEvaporationRegimeOutput, context=context)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
from ..evaporation import BoilingEvaporation as BoilingPoolEvaporationInput
|
|
149
|
+
from ..outputs import ReleaseBoilingPoolEvaporationOutput as BoilingPoolEvaporationOutput
|
|
150
|
+
|
|
151
|
+
def boiling_pool_evaporation(inputs: BoilingPoolEvaporationInput, *, context: Context | None = None) -> CalculationResult[BoilingPoolEvaporationOutput]:
|
|
152
|
+
'Printed boiling-pool evaporation correlation'
|
|
153
|
+
return calculate('release/boiling-pool-evaporation', inputs, output_type=BoilingPoolEvaporationOutput, context=context)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
from ..evaporation import BoilingRadius as BoilingPoolRadiusInput
|
|
157
|
+
from ..outputs import ReleaseBoilingPoolRadiusOutput as BoilingPoolRadiusOutput
|
|
158
|
+
|
|
159
|
+
def boiling_pool_radius(inputs: BoilingPoolRadiusInput, *, context: Context | None = None) -> CalculationResult[BoilingPoolRadiusOutput]:
|
|
160
|
+
'Boiling-pool spreading radius at steady-state time'
|
|
161
|
+
return calculate('release/boiling-pool-radius', inputs, output_type=BoilingPoolRadiusOutput, context=context)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
from ..evaporation import BoilingSteadySource as BoilingPoolSteadySourceInput
|
|
165
|
+
from ..outputs import ReleaseBoilingPoolSteadySourceOutput as BoilingPoolSteadySourceOutput
|
|
166
|
+
|
|
167
|
+
def boiling_pool_steady_source(inputs: BoilingPoolSteadySourceInput, *, context: Context | None = None) -> CalculationResult[BoilingPoolSteadySourceOutput]:
|
|
168
|
+
'Boiling equilibrium vapor source with duration/site support checks'
|
|
169
|
+
return calculate('release/boiling-pool-steady-source', inputs, output_type=BoilingPoolSteadySourceOutput, context=context)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
from ..evaporation import NonBoilingEvaporation as NonboilingPoolEvaporationInput
|
|
173
|
+
from ..outputs import ReleaseNonboilingPoolEvaporationOutput as NonboilingPoolEvaporationOutput
|
|
174
|
+
|
|
175
|
+
def nonboiling_pool_evaporation(inputs: NonboilingPoolEvaporationInput, *, context: Context | None = None) -> CalculationResult[NonboilingPoolEvaporationOutput]:
|
|
176
|
+
'Non-boiling pool wind-driven vapor generation'
|
|
177
|
+
return calculate('release/nonboiling-pool-evaporation', inputs, output_type=NonboilingPoolEvaporationOutput, context=context)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
from ..evaporation import NonBoilingSteadySource as NonboilingPoolSteadySourceInput
|
|
181
|
+
from ..outputs import ReleaseNonboilingPoolSteadySourceOutput as NonboilingPoolSteadySourceOutput
|
|
182
|
+
|
|
183
|
+
def nonboiling_pool_steady_source(inputs: NonboilingPoolSteadySourceInput, *, context: Context | None = None) -> CalculationResult[NonboilingPoolSteadySourceOutput]:
|
|
184
|
+
'Non-boiling equilibrium source radius and site support check'
|
|
185
|
+
return calculate('release/nonboiling-pool-steady-source', inputs, output_type=NonboilingPoolSteadySourceOutput, context=context)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
from ..source_partition import PhaseScreen as Level2ReleasePhaseInput
|
|
189
|
+
from ..outputs import ReleaseLevel2ReleasePhaseOutput as Level2ReleasePhaseOutput
|
|
190
|
+
|
|
191
|
+
def level2_release_phase(inputs: Level2ReleasePhaseInput, *, context: Context | None = None) -> CalculationResult[Level2ReleasePhaseOutput]:
|
|
192
|
+
'Pressure-based Level2 release-phase screening'
|
|
193
|
+
return calculate('release/level2-release-phase', inputs, output_type=Level2ReleasePhaseOutput, context=context)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
from ..source_partition import Level2Orifice as Level2OrificeRateInput
|
|
197
|
+
from ..outputs import ReleaseLevel2OrificeRateOutput as Level2OrificeRateOutput
|
|
198
|
+
|
|
199
|
+
def level2_orifice_rate(inputs: Level2OrificeRateInput, *, context: Context | None = None) -> CalculationResult[Level2OrificeRateOutput]:
|
|
200
|
+
'Level2 phase-selected gas/liquid/conservative two-phase source rate'
|
|
201
|
+
return calculate('release/level2-orifice-rate', inputs, output_type=Level2OrificeRateOutput, context=context)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
from ..source_partition import Rainout as KletzRainoutFractionInput
|
|
205
|
+
from ..outputs import ReleaseKletzRainoutFractionOutput as KletzRainoutFractionOutput
|
|
206
|
+
|
|
207
|
+
def kletz_rainout_fraction(inputs: KletzRainoutFractionInput, *, context: Context | None = None) -> CalculationResult[KletzRainoutFractionOutput]:
|
|
208
|
+
'Kletz rainout mass-fraction correlation'
|
|
209
|
+
return calculate('release/kletz-rainout-fraction', inputs, output_type=KletzRainoutFractionOutput, context=context)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
from ..source_partition import RateSplit as RainoutRateSplitInput
|
|
213
|
+
from ..outputs import ReleaseRainoutRateSplitOutput as RainoutRateSplitOutput
|
|
214
|
+
|
|
215
|
+
def rainout_rate_split(inputs: RainoutRateSplitInput, *, context: Context | None = None) -> CalculationResult[RainoutRateSplitOutput]:
|
|
216
|
+
'Rainout pool and aerosol-containing jet rates'
|
|
217
|
+
return calculate('release/rainout-rate-split', inputs, output_type=RainoutRateSplitOutput, context=context)
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
from ..source_partition import Entrainment as JetLiquidEntrainmentInput
|
|
221
|
+
from ..outputs import ReleaseJetLiquidEntrainmentOutput as JetLiquidEntrainmentOutput
|
|
222
|
+
|
|
223
|
+
def jet_liquid_entrainment(inputs: JetLiquidEntrainmentInput, *, context: Context | None = None) -> CalculationResult[JetLiquidEntrainmentOutput]:
|
|
224
|
+
'Printed or post-flash-mass-balance aerosol fraction'
|
|
225
|
+
return calculate('release/jet-liquid-entrainment', inputs, output_type=JetLiquidEntrainmentOutput, context=context)
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
from ..source_partition import SourcePartition as Level2SourcePartitionInput
|
|
229
|
+
from ..outputs import ReleaseLevel2SourcePartitionOutput as Level2SourcePartitionOutput
|
|
230
|
+
|
|
231
|
+
def level2_source_partition(inputs: Level2SourcePartitionInput, *, context: Context | None = None) -> CalculationResult[Level2SourcePartitionOutput]:
|
|
232
|
+
'Pool/jet/vapor/aerosol mass and rate partition'
|
|
233
|
+
return calculate('release/level2-source-partition', inputs, output_type=Level2SourcePartitionOutput, context=context)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
from ..ignition import FlammableRates as FlammablePhaseRatesInput
|
|
237
|
+
from ..outputs import ReleaseFlammablePhaseRatesOutput as FlammablePhaseRatesOutput
|
|
238
|
+
|
|
239
|
+
def flammable_phase_rates(inputs: FlammablePhaseRatesInput, *, context: Context | None = None) -> CalculationResult[FlammablePhaseRatesOutput]:
|
|
240
|
+
'Flammable total/liquid/vapor rates for ignition'
|
|
241
|
+
return calculate('release/flammable-phase-rates', inputs, output_type=FlammablePhaseRatesOutput, context=context)
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
from ..flash_solver import PureLiquidFlashPartition as PureLiquidFlashPartitionInput
|
|
245
|
+
from ..outputs import ReleasePureLiquidFlashPartitionOutput as PureLiquidFlashPartitionOutput
|
|
246
|
+
|
|
247
|
+
def pure_liquid_flash_partition(inputs: PureLiquidFlashPartitionInput, *, context: Context | None = None) -> CalculationResult[PureLiquidFlashPartitionOutput]:
|
|
248
|
+
'Pure-liquid flash with explicit pool/jet composition basis'
|
|
249
|
+
return calculate('release/pure-liquid-flash-partition', inputs, output_type=PureLiquidFlashPartitionOutput, context=context)
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
__all__ = ['ReleaseGasInput', 'ReleaseLiquidInput', 'SurfaceInteractionInput', 'TimePointInput', 'hole_size_selection', 'HoleSizeSelectionInput', 'HoleSizeSelectionOutput', 'detection_isolation_rating', 'DetectionIsolationRatingInput', 'DetectionIsolationRatingOutput', 'orifice_area', 'OrificeAreaInput', 'OrificeAreaOutput', 'viscosity_factor', 'ViscosityFactorInput', 'ViscosityFactorOutput', 'liquid', 'LiquidInput', 'LiquidOutput', 'gas', 'GasInput', 'GasOutput', 'available_inventory', 'AvailableInventoryInput', 'AvailableInventoryOutput', 'type', 'TypeInput', 'TypeOutput', 'magnitude', 'MagnitudeInput', 'MagnitudeOutput', 'detection_isolation', 'DetectionIsolationInput', 'DetectionIsolationOutput', 'integrate_profile', 'IntegrateProfileInput', 'IntegrateProfileOutput', 'detection_reduction', 'DetectionReductionInput', 'DetectionReductionOutput', 'detection_duration', 'DetectionDurationInput', 'DetectionDurationOutput', 'controlled_scenario', 'ControlledScenarioInput', 'ControlledScenarioOutput', 'bleve_flashed_amount', 'BleveFlashedAmountInput', 'BleveFlashedAmountOutput', 'level2_toxic_duration', 'Level2ToxicDurationInput', 'Level2ToxicDurationOutput', 'pool_evaporation_regime', 'PoolEvaporationRegimeInput', 'PoolEvaporationRegimeOutput', 'boiling_pool_evaporation', 'BoilingPoolEvaporationInput', 'BoilingPoolEvaporationOutput', 'boiling_pool_radius', 'BoilingPoolRadiusInput', 'BoilingPoolRadiusOutput', 'boiling_pool_steady_source', 'BoilingPoolSteadySourceInput', 'BoilingPoolSteadySourceOutput', 'nonboiling_pool_evaporation', 'NonboilingPoolEvaporationInput', 'NonboilingPoolEvaporationOutput', 'nonboiling_pool_steady_source', 'NonboilingPoolSteadySourceInput', 'NonboilingPoolSteadySourceOutput', 'level2_release_phase', 'Level2ReleasePhaseInput', 'Level2ReleasePhaseOutput', 'level2_orifice_rate', 'Level2OrificeRateInput', 'Level2OrificeRateOutput', 'kletz_rainout_fraction', 'KletzRainoutFractionInput', 'KletzRainoutFractionOutput', 'rainout_rate_split', 'RainoutRateSplitInput', 'RainoutRateSplitOutput', 'jet_liquid_entrainment', 'JetLiquidEntrainmentInput', 'JetLiquidEntrainmentOutput', 'level2_source_partition', 'Level2SourcePartitionInput', 'Level2SourcePartitionOutput', 'flammable_phase_rates', 'FlammablePhaseRatesInput', 'FlammablePhaseRatesOutput', 'pure_liquid_flash_partition', 'PureLiquidFlashPartitionInput', 'PureLiquidFlashPartitionOutput']
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""Public reliability calculations. Inputs and outputs use named SI units.
|
|
2
|
+
Generated by scripts/build_python_api.py; inspect the request model for fields.
|
|
3
|
+
"""
|
|
4
|
+
from ..core import Context
|
|
5
|
+
from ..result import CalculationResult, calculate
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
from ..pof import Weibull as WeibullInput
|
|
9
|
+
from ..outputs import ReliabilityWeibullOutput as WeibullOutput
|
|
10
|
+
|
|
11
|
+
def weibull(inputs: WeibullInput, *, context: Context | None = None) -> CalculationResult[WeibullOutput]:
|
|
12
|
+
'Two-parameter Weibull reliability'
|
|
13
|
+
return calculate('reliability/weibull', inputs, output_type=WeibullOutput, context=context)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from ..pof import WeibullQuantile as WeibullQuantileInput
|
|
17
|
+
from ..outputs import ReliabilityWeibullQuantileOutput as WeibullQuantileOutput
|
|
18
|
+
|
|
19
|
+
def weibull_quantile(inputs: WeibullQuantileInput, *, context: Context | None = None) -> CalculationResult[WeibullQuantileOutput]:
|
|
20
|
+
'Time to a Weibull failure probability'
|
|
21
|
+
return calculate('reliability/weibull-quantile', inputs, output_type=WeibullQuantileOutput, context=context)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
from ..pof import Mttf as WeibullFromMttfInput
|
|
25
|
+
from ..outputs import ReliabilityWeibullFromMttfOutput as WeibullFromMttfOutput
|
|
26
|
+
|
|
27
|
+
def weibull_from_mttf(inputs: WeibullFromMttfInput, *, context: Context | None = None) -> CalculationResult[WeibullFromMttfOutput]:
|
|
28
|
+
'Convert mean life to Weibull characteristic life'
|
|
29
|
+
return calculate('reliability/weibull-from-mttf', inputs, output_type=WeibullFromMttfOutput, context=context)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
from ..pof import Poisson as PoissonProbabilityInput
|
|
33
|
+
from ..outputs import ReliabilityPoissonProbabilityOutput as PoissonProbabilityOutput
|
|
34
|
+
|
|
35
|
+
def poisson_probability(inputs: PoissonProbabilityInput, *, context: Context | None = None) -> CalculationResult[PoissonProbabilityOutput]:
|
|
36
|
+
'Constant-frequency period probability'
|
|
37
|
+
return calculate('reliability/poisson-probability', inputs, output_type=PoissonProbabilityOutput, context=context)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
__all__ = ['weibull', 'WeibullInput', 'WeibullOutput', 'weibull_quantile', 'WeibullQuantileInput', 'WeibullQuantileOutput', 'weibull_from_mttf', 'WeibullFromMttfInput', 'WeibullFromMttfOutput', 'poisson_probability', 'PoissonProbabilityInput', 'PoissonProbabilityOutput']
|