Fonction | if ([eqR:kW/m2] > [SEP:kW/m2]) return NULL;
if (Scientific::equals([eqR:kW/m2], [SEP:kW/m2])) return [DP:m] / 2;
$d = [DP:m];
$r = [DP:m] / 2;
$L = [Hf:m] / $r;
$theta = deg2rad([fTA:o]);
$steps = 100;
$delta = M_PI_2 / $steps;
$d0 = $r;
$qR0 = [SEP:kW/m2];
while (TRUE) {
$Ta = min(2.02 * pow([Pw:Pa] * ($d - $r), -0.09), 1);
$X = $d / $r;
$phi = asin(1 / $X);
$B1 = sqrt((pow($X, 2) - 1) * ((1 + cos(2 * $theta)) / 2) + (1 - 1 / pow($X, 2)) * ((1 - cos(2 * $theta)) / 2));
$A1 = 1 / $B1 * (atan2($L - ($X - 1 / $X) * sin($theta), $B1) + atan2(($X - 1 / $X) * sin($theta), $B1));
$A2 = 0;
$A3 = 0;
$A4 = 0;
for ($i = 0; $i <= $steps; $i++) {
$v = $i * $delta;
$a2 = sin($v) / ((1 + pow($L, 2) + pow($X, 2) - 2 * $X * $L * sin($theta)) + 2 * ($L * sin($theta) - $X) * sin($v));
$a3 = ($X * sin($v) - 1) / (1 + pow($X, 2) - 2 * $X * sin($v));
$a4 = ($X * sin($v) - 1) / ((1 + pow($L, 2) + pow($X, 2) - 2 * $L * sin($theta)) + 2 * ($L * sin($theta) - $X) * sin($v));
if ($i) {
$A2 += $delta * ($a2 + $b2) / 2;
$A3 += $delta * ($a3 + $b3) / 2;
$A4 += $delta * ($a4 + $b4) / 2;
}
$b2 = $a2;
$b3 = $a3;
$b4 = $a4;
}
// Horizontal view factor
$Fh = 1 / M_PI * (sin($theta) * ($A1 * cos($phi) + $L * $A2) + $A3 - $A4);
// Vertical view factor
$Fv = 1 / M_PI * (cos($theta) * ($A1 * cos($phi) + $L * $A2));
// Overall view factor
$F = min(sqrt(pow($Fh, 2) + pow($Fv, 2)), 1);
// Radiation intensity at the distance
$qR = [SEP:kW/m2] * $F * $Ta;
if (abs($qR - [eqR:kW/m2]) < 0.01) return $d;
$d1 = $d0 + ($d - $d0) / ($qR - $qR0) * ([eqR:kW/m2] - $qR0);
if ($qR > [eqR:kW/m2]) {
$d0 = $d;
$qR0 = $qR;
}
$d = $d1;
}
|
---|