Fonksiyon | $WSInputData = array(
"filmBoiling" => false,
"curveTypeRequired" => 2,
"flowIndex" => 1,
"option" => 22,
"rainout_Instantaneous" => 0,
"dispersionInput" => 1,
"vesselThickness" => 0.0,
"smDcorrelation" => 0,
"cdLiquid" => 0.61,
"cd" => 0.88,
"cutoffVelocity" => 0,
"rainout_Continuous" => 0,
"eqState" => 2,
"ipotn" => 0,
"droplet_distribution" => 0,
"aRR" => 0.422,
"bRR" => 5.32,
"ClassStabilityType" => 0,
"ALAValue" => 0,
"fireSegment" => 0,
"dispersionSegment" => 1,
"massCalculationModel" => 1,
"sig_droplets" => 1.4,
"segmentNumber" => 5,
"roughnessModel" => 0,
"poolEvaporationModel" => 0,
"poolSpreadingModel" => 0,
"cutOffType" => 1,
"PoolRoughness" => [RNR:mm],
//Defailt values (maybe we will change in the future)
"ag" => [AG:W/m.K],
"kg" => [KG:m2/s],
"nearReleaseRoughness" => [RNR:mm],
"terrainRoughness" => [SR:mm],
"height" => [Ht:m],
"averageTime" => [tr:s],
"cutOffValue" => 3600.0,
"epsilon" => 0.045,
//Meteo
"tAmb" => [TA:K],
"WindSpeed" => [u:m/s],
"Pamb" => [PA:bar],
"WindHRef" => 10.0,
"irradiation" => [RadS:W/m2], //We will set it later
"humidity" => [HA:%],
"tGround" => [Tgr:K],
"pasquillIndex" => 0, //We will set it later
//Input values
"substanceID" => [S_ID],
"ph0" => 0, //We will set it later if needed
"t0" => [TST:K],
"flagSatP" => 0, //We will set it later if needed
"ruptureType" => 0, //We will set it later
"phenomenology" => 0, //We will set it later
"fireType" => 0, //We will set it later
"bundAreaValue" => [AD:m2],
"bundArea" => false,
"filling" => [FL:%v],
"substanceQuantity" => [QFL:kg],
"substanceVolume" => [VFL:m3],
"vesselGeometry" => 1, //We will set it later
"hVessel" => 8, //We will set it later
"dVessel" => [D:m],
"vesselHeightFromGround" => [H_Ground:m],
"heightRelease" => [hh:m],
"topVenting" => false,
"downwardVenting" => false,
"holeDiameter" => 0,
"dPipe" => 0,
"lPipe" => 0,
"borePipeRupture" => false,
"autoCD" => 1,
"calculationTime" => [tr:min],
"numContours" => 1,
"damageEndpointValue" => [0, 0, 0, 0, 0], //We wil set it later
"Explosion" => [
"Reactivity" => 1,//0 original
"Obstacles" => 0,//1 original
"Expansion" => 0,//1 original
"GroundCorrection" => 1,//1 original
"ExplosionModel" => 1,
"ExplosionEfficiency" => 3,
"UseUFL" => true
]
);
if ([AST] == "PV")
$WSInputData["flowIndex"] = 0;
else if ([AST] == "AV")
$WSInputData["flowIndex"] = 1;
else if ([AST] == "TV")
$WSInputData["flowIndex"] = 2;
if (([STC] == "P") || ([STC] == "PG") || ([STC] == "PR")){
$WSInputData["ph0"] = [Pg:bar];
$WSInputData ["hVessel"] = 0;
$WSInputData ["dVessel"] = 0;
}
else {
$WSInputData["ph0"] = 0;
if ([STC] == "GLP")
$WSInputData["flagSatP"] = 1;
}
if ([vGeo] == "VC")
$WSInputData["vesselGeometry"] = 1;
else if ([vGeo] == "HC")
$WSInputData["vesselGeometry"] = 2;
else if ([vGeo] == "S")
$WSInputData["vesselGeometry"] = 3;
if ([vGeo] == "VC")
$WSInputData["hVessel"] = [h:m];
if ([vGeo]=="HC")
$WSInputData["hVessel"] = [L:m];
else if ([vGeo] == "S")
$WSInputData["hVessel"] = 0;
if ([RpT] == "VHL")
$WSInputData["ruptureType"] = 0;
else if ([RpT] == "PHR")
$WSInputData["ruptureType"] = 1;
else if ([RpT] == "CR")
$WSInputData["ruptureType"] = 2;
if ([EF] == "PF"){
$WSInputData["phenomenology"] = 2;
$WSInputData["fireType"] = 1;
$WSInputData["damageEndpointValue"] = [[eqR:kW/m2], 0, 0, 0, 0];
}
else if ([EF] == "JF"){
$WSInputData["phenomenology"] = 2;
$WSInputData["fireType"] = 2;
$WSInputData["damageEndpointValue"] = [[eqR:kW/m2], 0, 0, 0, 0];
}
else if ([EF] == "VCF"){
$WSInputData["phenomenology"] = 2;
$WSInputData["fireType"] = 0;
$WSInputData["damageEndpointValue"] = [10000 * [LFL:%v], 0, 0, 0, 0];
}
else if ([EF] == "BL"){
$WSInputData["phenomenology"] = 2;
$WSInputData["fireType"] = 3;
$WSInputData["damageEndpointValue"] = [[eqR:kW/m2], 0, 0, 0, 0];
}
else if ([EF] == "VCE"){
$WSInputData["phenomenology"] = 1;
$WSInputData["fireType"] = -1;
$WSInputData["damageEndpointValue"] = [[ePd:bar], 0, 0, 0, 0];
}
else if ([EF] == "NF"){
$WSInputData["phenomenology"] = 0;
$WSInputData["fireType"] = -1;
$WSInputData["damageEndpointValue"] = [[RMP_TEppm:ppm], 0, 0, 0, 0];
}
else if ([EF] == "JF"){
$WSInputData["phenomenology"] = 2;
$WSInputData["fireType"] = 2;
$WSInputData["damageEndpointValue"] = [[eqR:kW/m2], 0, 0, 0, 0];
}
if ([AS] == "A"){
$WSInputData["pasquillIndex"] = 0;
}
else if ([AS] == "B"){
$WSInputData["pasquillIndex"] = 2;
}
else if ([AS] == "C"){
$WSInputData["pasquillIndex"] = 4;
}
else if ([AS] == "D") {
$WSInputData["pasquillIndex"] = 6;
}
else if ([AS] == "E") {
$WSInputData["pasquillIndex"] = 7;
}
else if ([AS] == "F") {
$WSInputData["pasquillIndex"] = 8;
}
else if ([AS] == "G") {
$WSInputData["pasquillIndex"] = 9;
}
//-------------EXPLOSION PARAMETERS------------------------------//
if ([RIBST] == "S"){
$WSInputData["Explosion.Reactivity"] = 0;
} else if ([RIBST] == "H"){
$WSInputData["Explosion.Reactivity"] = 1;
} else if ([RIBST] == "M"){
$WSInputData["Explosion.Reactivity"] = 2;
} else if ([RIBST] == "L"){
$WSInputData["Explosion.Reactivity"] = 3;
}
if ([OIBST] == "H"){
$WSInputData["Explosion.Obstacles"] = 0;
} else if ([OIBST] == "M"){
$WSInputData["Explosion.Obstacles"] = 1;
} else if ([OIBST] == "L"){
$WSInputData["Explosion.Obstacles"] = 2;
}
if ([EIBST] == "2D"){
$WSInputData["Explosion.Expansion"] = 0;
} else if ([EIBST] == "2.5D"){
$WSInputData["Explosion. Expansion"] = 1;
} else if ([EIBST] == "3D"){
$WSInputData["Explosion. Expansion"] = 2;
}
if ([GBBST] == "A"){
$WSInputData["Explosion.GroundCorrection"] = 0;
} else if ([GBBST] == "G"){
$WSInputData["Explosion.GroundCorrection"] = 1;
}
//-----------DATA VALIDATION--------------------------
if(($WSInputData ["substanceVolume"] != 0) && ($WSInputData
["substanceQuantity"] != 0)){
//Substance Quantity set to 0 if Substance Volume is not 0
$WSInputData ["substanceQuantity"] = 0;
}
if($WSInputData ["bundAreaValue"] != 0){
$WSInputData ["bundArea"] = true;
}
//heightRelease (meters) holeDiameter (millimeters)
if(($WSInputData ["heightRelease"] * 1000) < $WSInputData ["holeDiameter"]){
$WSInputData ["heightRelease"] = $WSInputData ["holeDiameter"]/1000;
}
//The scenario is continuous release and we may need additional parameters. The previous limitations apply
if(($WSInputData ["hVessel"] != 0) && ($WSInputData ["dVessel"] != 0) &&
($WSInputData ["filling"] != 0)){
//Substance Quantity and Substance Volume set to 0 if vessel already has diameter, height and filling percent
$WSInputData ["substanceQuantity"] = 0;
$WSInputData ["substanceVolume"] = 0;
}
$pe = new PropertyEstimatorADAM($WSInputData, false);
return $pe->getPropertyEstimatorResponse();
|
---|