Advertisement
Advertisement
| 10.12.2008 at 07:52PM PDT, ID: 23808449 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: |
<form id="form1" name="form1" method="post" action="rh.php">
<label> <br />
<input name="db" type="text" size="4" maxlength="6" />
<span class="style1">Dry Bulb Temp(Celsius)</span></label>
<p>
<label>
<input name="wb" type="text" size="4" maxlength="6" />
<span class="style3">Wet Bulb Temp(Celsius)</span></label>
</p>
<p>
<label>
<input name="pr" type="text" size="4" maxlength="6" />
<span class="style4">Ambient Pressure(Millibars)</span></label>
<br>
<br>
<label>
<input type="submit" name="Submit" value="Calculate" />
</label>
</p>
</form>
// Main PHP Program
if (isset($_POST['Submit'])) { //open brace MP a
$db = $_POST["db"];
$wb = $_POST["wb"];
$pr = $_POST["pr"];
gthan($db, $wb);
calc( $db, $wb, $pr);
} // closing brace main prog a
// Function gthan
function gthan($db,$wb){ //gthan opening brace e
if((int)$db < (int)$wb)
{ // if opening brace f
echo "<br>";
echo " ";
echo " ";
echo "<input type='text' size='38' name='gthan2' value='Drybulb must be greater than Wet Bulb'> ";
}// if closing brace f
else{ return;}
} //gthan closing brace e
// calc function
function calc($db, $wb, $pr){ //opening brace calc b
if ( ! preg_match('/^\d+$/', $db) || ! preg_match('/^\d+$/', $wb) || ! preg_match('/^\d+$/', $pr))
{ // if opening brace c
echo "<br>";
echo " ";
echo " ";
echo "<input type='text' size='14' name='error' value='Numbers Only!'>";} //if closing brace c
else { // else opening brace d
//Calculation Begins
$F = 6.112 * exp((17.67*$wb)/($wb+243.5));
$Ew = $F;
$H = 6.112 * exp((17.67*$db)/($db+243.5));
$Es = $H;
$I = $Ew - $pr*($db-$wb)*.00066*(1+(.00115*wb));
$Vpres = $I;
$J = ($Vpres/$Es)* 100;
$rh = $J;
$rh = round($rh,3);
$do = $Vpres/6.112;
$logs = Log10($do);
$Dp = round(((237.7 * $logs)/(7.7-$logs)),3);
echo "<br>";
echo " ";
echo " ";
echo "<input type='text' size='4' name='name' value='$rh'> % Relative Humidity";
echo "<br>";
echo "<br>";
echo " ";
echo " <input type='text' size='4' name='name' value='$Dp'> Dewpoint";}// else closing brace d
} //calc closing brace b
|