48 $this->rDx = (real)
$rDx;
57 return - ($this->oP->rIf - $this->oSect->Calc(
'J',$Y)) / (1 - pow($this->oSect->Calc(
'Fr',$Y),2));
68 $Y2 = $Y+ $this->rDx * $this->
Calc_dYdX($Y);
69 if($this->rDx > 0 xor !($Y2 < $this->oSect->rHautCritique)) {
86 if($this->rDx > 0 xor !($Y +
$rDx / 2 * $rk1 < $this->oSect->rHautCritique)) {
return false;}
88 if($this->rDx > 0 xor !($Y +
$rDx / 2 * $rk2 < $this->oSect->rHautCritique)) {
return false;}
90 if($this->rDx > 0 xor !($Y +
$rDx / 2 * $rk3 < $this->oSect->rHautCritique)) {
return false;}
92 $Yout = $Y +
$rDx / 6 * ($rk1 + 2 * ($rk2 + $rk3) + $rk4);
93 if($this->rDx > 0 xor !($Yout < $this->oSect->rHautCritique)) {
return false;}
102 return $this->oSect->Calc(
'Hs',$this->VarCal) - $this->oSect->Calc(
'J',$this->VarCal) / 2 *
$this->rDx;
112 include_spip(
'hyd_inc/dichotomie.class');
114 $oDicho =
new cDichotomie($this->oLog, $this,
'Calc_Y_Trapez_Fn',
false);
116 $Trapez_Fn = $this->oSect->Calc(
'Hs',$this->VarCal) + $this->oSect->Calc(
'J',$this->VarCal) / 2 *
$this->rDx;
118 $Trapez_Fn = $Trapez_Fn - $this->rDx * $this->oP->rIf;
119 list($Y2, $flag) = $oDicho->calculer($Trapez_Fn, $this->oP->rPrec, $this->oSect->rHautCritique);
122 } elseif($this->rDx > 0 xor !($Y2 < $this->oSect->rHautCritique)) {
134 public function Calc_Y($rY, $sResolution) {
135 $funcCalcY =
'Calc_Y_'.$sResolution;
136 if(method_exists($this,$funcCalcY)) {
137 return $this->$funcCalcY($rY);
149 function calcul($rYCL, $rLong, $sResolution) {
163 spip_log($this,
'hydraulic',_LOG_DEBUG);
165 $trY[sprintf(
'%1.'.round($this->oP->iPrec).
'f',$xDeb)] = (real)$rYCL;
168 for($x = $xDeb + $dx; ($dx > 0 && $x <= $xFin) || ($dx < 0 && $x >= $xFin); $x += $dx) {
169 $rY = (real)$this->
Calc_Y(end($trY), $sResolution);
171 if(end($trY) > $this->oSect->rHautNormale xor $rY > $this->oSect->rHautNormale) {
172 $this->oLog->Add(_T(
'hydraulic:pente_forte').
' '.$x.
' m ('._T(
'hydraulic:reduire_pas').
')',
true);
174 $trY[sprintf(
'%1.'.round($this->oP->iPrec).
'f',$x)] = $rY;
176 $this->oLog->Add(_T(
'hydraulic:arret_calcul').
' '.$x.
' m');
$VarCal
Pas d'espace (positif en partant de l'aval, négatif en partant de l'amont)
Calc_Y_Trapez($Y)
Calcul du point suivant de la courbe de remous par la méthode de l'intégration par trapèze...
Calcul d'une courbe de remous.
$oP
Pour loguer les messages de debug de cette classe.
Calc_Y($rY, $sResolution)
Calcul du point suivant d'une courbe de remous.
Calc_Y_Trapez_Fn()
Equation de l'intégration par la méthode des trapèzes.
Calc_Y_Euler($Y)
Calcul du point suivant de la courbe de remous par la méthode Euler explicite.
calcul($rYCL, $rLong, $sResolution)
Calcul d'une courbe de remous en fluvia ou torrentiel.
$oSect
Paramètres de la section.
Calc_dYdX($Y)
Calcul de dy/dx.
__construct(&$oLog, &$oParam, &$oSect, $rDx)
Variable calculée Y pour la dichotomie (intégration trapèze)
Calc_Y_RK4($Y)
Calcul du point suivant de la courbe de remous par la méthode RK4.