
# **********************************************************************
# This file has been auto-generated by a code generation tool.
# Version:   4.2.0
# Date/time: 22 Nov 2024 12:56:20
# Template:  templates/pythonpws/constants.razor.
# **********************************************************************


ABS_TOL_RAD = 0.0000000001
"""Absolute tolerance for radiation calculations."""

ADJUST_GROUND_FLAME = 1
"""Flame shape adjusted if grounded for jet fires."""

ATM_EXP_METHOD = 4
"""DNV recommended atmospheric expansion method from orifice to final state."""

ATM_MOLWT = 28.9505
"""Atmospheric molecular weight (kg/kmol)."""

ATM_PRESSURE = 101325.0
"""Atmospheric pressure (Pa)."""

AWD_FLAG = 3
"""Along wind diffusion method for non instantaneous dispersion."""

BUND_AREA_MULTIPLIER_FOR_RUPTURE = 1.5
"""Bund area multiplier for catastrophic ruptures."""

BUND_CANNOT_FAIL = 0
"""Bund cannot fail - liquid overspill not possible."""

CALC_METHOD_SEP_FIREBALLS = -1
"""Calculate surface emissive power for fireballs."""

CALC_METHOD_SEP_JET_FIRES = 0
"""Calculate surface emissive power for jet fires."""

CRIT_SEP_RATIO = 0.2
"""Critical separation ratio for concentration grids."""

CRIT_WEBER = 12.5
"""Critical Webber number used in the droplet size calculations."""

DROPLET_METHOD = 6
"""Modified CCPS droplet method."""

EXPL_LOCATION = 0
"""Explosion located at the cloud front (LFL fraction)."""

FIREBALL_MODEL = 0
"""Roberts/TNO hybrid fireball model."""

FLAM_AVR_TIME_PHAST_DEFAULT = 18.75
"""Default value for flammable averaging time in Phast."""

FLAMM_MASS_CALC_METHOD = 2
"""Use mass between LFL and UFL for flammable mass estimation in explosion calculations."""

FRACTION_TOTAL_TO_KINETIC = 0.04
"""Kinetic energy fraction of discharge expansion energy."""

HORIZONTAL_OPTION = 0
"""Standard method for jet fire horizontal options."""

INEX_FLAG = 2
"""New standard method for modelling of instantaneous expansion."""

JET_FIRE_AVR_TIME = 20.0
"""Jet fire averaging time (s)."""

JET_FIRE_CORRELATION = 0
"""Recommended jet fire correlation."""

JET_FIRE_EXP_DUR = 20.0
"""Jet fire maximum exposure duration (s)."""

JET_RATE_MOD_FACTOR = 3.0
"""Jet fire rate modification factor."""

LFL_FRACTION_EXPLOSIONS = 0.5
"""LFL fraction used to define the flammable cloud for explosions."""

MASS_MOD_FACTOR = 3.0
"""Mass modification factor used in calculating the mass of material involved in the fireball."""

MAX_DISP_STEP_SIZE = 300.0
"""Maximum integration step for dispersion calculations (s)."""

MAX_DROP_DIAMETER = 0.01
"""Upper limit of the droplet diameter (m)."""

MAX_NUMBER_FLAME_COORDINATES = 10
"""Maximum number of flame coordinates for jet fires."""

MAX_RELEASE_DURATION = 3600.0
"""Maximum release duration (s)."""

MAX_SEP_FIREBALL = 400000.0
"""Maximum surface emissive power for fireballs (W/m2)."""

MAX_SEP_JET_FIRE = 350000.0
"""Maximum surface emissive power for a jet fire (W/m2)."""

MAX_SEP_POOL_FIRE = 350000.0
"""Maximum surface emissive power for pool fires (W/m2)."""

MAX_TIMESTEPS = 900
"""Maximum number of time steps for time varying releases."""

MAX_VELOCITY = 100000000.0
"""Maximum release velocity (m/s)."""

MAX_VELOCITY_FLAG = 0
"""Fixed velocity capping method."""

MAXIMUM_COMPONENT_COUNT = 20
"""Maximum number of components."""

MAXIMUM_LEAK_DIAMETERS_COUNT = 5
"""Maximum number of leak diameters for scenario generation."""

MAXIMUM_PT_STEPS = 441
"""Maximum number of steps in an iteration over PT space."""

MAXIMUM_TEMPERATURE_LIMIT = 1200.0
"""Maximum temperature allowed for dispersion calculations (K)."""

MAXIMUM_WEATHER_COUNT = 10
"""Maximum number of weathers."""

ME_EXPL_EFFICIENCY_UNCONFINED = 100.0
"""Explosion efficiency for unconfined multi-energy explosions (%)."""

ME_EXPL_EFFICIENCY_UNIFORM_CONFINED = 12.5
"""Explosion efficiency for uniform confined multi-energy explosions (%)."""

MILLER_CROSSWIND_METHOD = 0
"""Method for modelling crosswind effects for Miller model: 0 = modified Johnson approach; 1 = Full deflection."""

MILLER_FLAME_RAD_FRACTION_METHOD = 0
"""Miller jet flame radiative fraction calculation method: 0 = Miller method; 2 = Sandia method."""

MILLER_FLAME_TRAJECTORY = 0
"""Miller jet flame trajectory: 0 = Line segments; 1 = Curved line."""

MILLER_LIFT_OFF_OPTION = 1
"""Method for modelling flame lift-off for Miller model: 0 = Miller method; 1 = DNV."""

MILLER_NG_FLOWRATE_METHOD = 1
"""Miller natural gas flow rate matching method: 0 = Miller (2017); 1 = DNV [similarity approach]."""

MILLER_RAD_INTENSITY_CAP_METHOD = 2
"""Radiation intensity capping method: 0 = No capping; 1 = Max intensity capping; 2 = Stefan Boltzmann's law."""

MIN_DROP_DIAMETER = 0.00000001
"""Cut-off droplet diameter below which droplets are no longer modelled (m)."""

MIN_EXPL_MASS = 0.0
"""Minimum explosive mass (kg)."""

MINIMUM_TEMPERATURE_LIMIT = 11.0
"""Minimum temperature allowed for dispersion calculations (K)."""

MIX_LAYER_HEIGHT_FOR_A = 1300
"""Mixing layer height for Pasquill stability class A (m)."""

MIX_LAYER_HEIGHT_FOR_AB = 1080
"""Mixing layer height for Pasquill stability class A/B (m)."""

MIX_LAYER_HEIGHT_FOR_B = 920
"""Mixing layer height for Pasquill stability class B (m)."""

MIX_LAYER_HEIGHT_FOR_BC = 880
"""Mixing layer height for Pasquill stability class B/C (m)."""

MIX_LAYER_HEIGHT_FOR_C = 840
"""Mixing layer height for Pasquill stability class C (m)."""

MIX_LAYER_HEIGHT_FOR_CD = 820
"""Mixing layer height for Pasquill stability class C/D (m)."""

MIX_LAYER_HEIGHT_FOR_D = 800
"""Mixing layer height for Pasquill stability class D (m)."""

MIX_LAYER_HEIGHT_FOR_E = 400
"""Mixing layer height for Pasquill stability class E (m)."""

MIX_LAYER_HEIGHT_FOR_F = 100
"""Mixing layer height for Pasquill stability class F (m)."""

MIX_LAYER_HEIGHT_FOR_G = 100
"""Mixing layer height for Pasquill stability class G (m)."""

N_VTIMES_CONT = 5
"""Number of time steps for continuous clouds used in explosion calculations."""

N_VTIMES_MAX = 100
"""Maximum number of time steps for explosion calculations."""

N_VTIMES_TV = 15
"""Number of time steps for time-varying clouds used in explosion calculations."""

NUM_FIXED_STEPS = 20
"""Number of fixed size output steps for dispersion calculations."""

NUM_X_VIEW = 21
"""Number of steps in the downwind direction per explosion cloud view."""

OBSERVER_TYPE = 1
"""Planar observer type for radiation modelling."""

PIPE_NODES_COUNT = 2
"""Number of nodes on the pipe (start, end + intermediate)."""

RAD_FRAC_GENERAL = 0.4
"""Radiative fraction for general pool fires."""

RAD_LEVEL_GRID = 1600.0
"""The radiation level used for calculating radiation grids. The value is set equal to the lowest default radiation value present in the VesselLeak apps."""

RAD_PROBIT_A = -36.38
"""Probit value A for radiation."""

RAD_PROBIT_B = 2.56
"""Probit value B for radiation."""

RAD_PROBIT_N = 1.33
"""Probit value N for radiation."""

RADS_INTEGRATOR_TYPE = 2
"""Integration method for multi-point flame sources: 0 = Discrete; 1 = QSIMP; 2 = Gauss-Lobatto."""

RADS_NUM_INTEGRATOR_POINTS = 30
"""Number of integration points to use for multi-point sources: 30 by default."""

REF_HT_WIND_SPEED = 10.0
"""Reference height for wind speed."""

REPORTING_HEIGHT_FLAG = 1
"""Centreline height is used for explosion calculations."""

RESULT_GRID_STEP = 10.0
"""Flammable result grid step in x-direction (m)."""

SHORT_DURATION_CUTOFF = 20.0
"""Cutoff for short duration effects. Only mass released until this time is used in the fireball calculation (s)."""

SHORT_PIPE_ROUGHNESS = 0.000045
"""Short pipe roughness (m)."""

STOICH_MASS_FRAC_METHOD = 0
"""Use old method (valid for paraffins only) for calculating the stoichiometric mass fraction."""

TNO_FLAME_TEMP = 2000.0
"""Flame temperature for TNO fireball model (K)."""

TOXIC_MIN_LETHALITY = 0.001
"""Toxics: minimum probability of death."""

TOXIC_MIX_CALC_METHOD = 3
"""Product of each as the multi component toxic calculation method."""

TOXIC_PD_TOLERANCE = 0.01
"""Toxics: tolerance on minimum probability of death."""

TOXIC_PROBIT_METHOD = 1
"""Prefer Probit as the toxic calculation method, i.e. if probit data is available that will be the preferred method to use."""

TOXIC_TAIL_TIME = 1800.0
"""Tail time for indoor toxic calculations (s)."""

UDS_MAX_TEMPERATURE = 1200.0
"""The absolute maximum temperature allowed for a user-defined source."""

UDS_MIN_TEMPERATURE = 11.0
"""The absolute minimum temperature allowed for a user-defined source."""

UNCONFINED_EXPLOSION_STRENGTH = 2.0
"""Unconfined explosion strength (Multi energy method)."""

UNIFORM_CONFINED_EXPLOSION_METHOD_OPTION = 3
"""Uniform confined Multi Energy explosion method."""

USE_SHAPE_CORRELATION = -1
"""Use shape correlation for fireballs."""

USE_SOLAR = 0
"""Exclude solar radiation from radiation calculations."""

USE_VOLUMES = 2
"""Use volumes when specifying size of confined sources."""

USER_DEFINED_CONFINED_EXPLOSION_METHOD_OPTION = 1
"""Unconfined Multi-Energy explosion method."""

USER_INPUT_POST_EXPANSION_VELOCITY = 0
"""Velocity for jet fire calculations must be user supplied."""

WIND_CUTOFF_HEIGHT = 1.0
"""Cut-off height for wind speed calculations."""

WIND_PROFILE_FLAG = 2
"""Logarithmic wind profile."""
# Application constants.
PWS_CLIENT_ID = 'a8dd2eef-e244-480f-af9a-788cf43a2f0b'

# REST API URIs root.
REST_API_URI = 'https://plantwebservices.dnv.com/api/'

# REST API version number.
REST_API_VERSION = '1'