en:cs:modelling_multi-phased_electrical_system_interconnexion

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
Prochaine révisionLes deux révisions suivantes
en:cs:modelling_multi-phased_electrical_system_interconnexion [2020/11/02 20:40] – [Inverter modelling] fraggleen:cs:modelling_multi-phased_electrical_system_interconnexion [2021/04/12 09:52] – [Typescript code sketches] fraggle
Ligne 66: Ligne 66:
  
 <code javascript> <code javascript>
-export class ElectricUtils +/** 
-  public static calculateAmpTotal(nbOfPhases: number, Iph: number): number {+ * Targeted to AC related values calculation. 
 + */ 
 +export class ACElectricUtils 
 +  static amperageTotal(nbOfPhases: number, Iph: number): number {
     return nbOfPhases * Iph;     return nbOfPhases * Iph;
   }   }
  
-  public static calculatePowerPerPhase(V: number, Iph: number, cosPhi = 1): number {+  static powerPerPhase(V: number, Iph: number, cosPhi = 1): number {
     const powerPerPhase = V * Iph * cosPhi;     const powerPerPhase = V * Iph * cosPhi;
     if (cosPhi === 1) {     if (cosPhi === 1) {
       return powerPerPhase;       return powerPerPhase;
     }     }
-    return Math.round(powerPerPhase + 1);+    return Math.round(powerPerPhase);
   }   }
  
-  public static calculatePowerTotal(nbOfPhases: number, V: number, Iph: number, cosPhi = 1): number { +  static powerTotal(nbOfPhases: number, V: number, Iph: number, cosPhi = 1): number { 
-    return nbOfPhases * ElectricUtils.calculatePowerPerPhase(V, Iph, cosPhi);+    return nbOfPhases * ACElectricUtils.powerPerPhase(V, Iph, cosPhi);
   }   }
  
-  public static calculateAmpPerPhaseFromPower(nbOfPhases: number, P: number, V: number, cosPhi = 1): number { +  static amperageTotalFromPower(P: number, V: number, cosPhi = 1): number { 
-    const power ElectricUtils.calculateAmpTotalFromPower(P, VcosPhi)+    const amperage P / (V cosPhi); 
-    const powerPerPhase = power / nbOfPhases+    if (cosPhi === 1 && P === 0) { 
-    if (power nbOfPhases === 0) { +      return amperage;
-      return powerPerPhase;+
     }     }
-    return Math.round(powerPerPhase + 1);+    return Math.round(amperage);
   }   }
  
-  public static calculateAmpTotalFromPower(P: number, V: number, cosPhi = 1): number { +  static amperagePerPhaseFromPower(nbOfPhases: number, P: number, V: number, cosPhi = 1): number { 
-    const power = P / (cosPhi); +    const amperage ACElectricUtils.amperageTotalFromPower(PVcosPhi)
-    if (cosPhi === 1 && P % V === 0) { +    const amperagePerPhase = amperage / nbOfPhases
-      return power;+    if (amperage % nbOfPhases === 0) { 
 +      return amperagePerPhase; 
 +    } 
 +    return Math.round(amperagePerPhase); 
 +  } 
 +
 + 
 +/** 
 + * Targeted to DC related values calculation. 
 + */ 
 +export class DCElectricUtils { 
 +  static power(V: number, I: number): number { 
 +    return V * I; 
 +  } 
 + 
 +  static amperage(P: number, V: number): number { 
 +    const amperage = P / V; 
 +    if (P % V === 0) { 
 +      return amperage;
     }     }
-    return Math.round(power + 1);+    return Math.round(amperage);
   }   }
 } }
Ligne 135: Ligne 155:
     Iph: Math.min(Car.Iph, ChargingStation.Iph),     Iph: Math.min(Car.Iph, ChargingStation.Iph),
     V: Math.min(Car.V, ChargingStation.V),     V: Math.min(Car.V, ChargingStation.V),
-    I: ElectricityUtils.calculateAmpTotal(this.nPhases, this.Iph), +    I: ACElectricUtils.amperageTotal(this.nPhases, this.Iph), 
-    P: ElectricityUtils.calculatePowerTotal(this.nPhases, this.Iph, this.V),+    P: ACElectricUtils.powerTotal(this.nPhases, this.Iph, this.V),
   };   };
 } }
Ligne 156: Ligne 176:
  
 ===== AC modelling ===== ===== AC modelling =====
-See previous section. +See first section. 
 ===== Rectifier modelling ===== ===== Rectifier modelling =====
 FIXME FIXME
  • en/cs/modelling_multi-phased_electrical_system_interconnexion.txt
  • Dernière modification : il y a 5 heures
  • de fraggle