public class CoreUtilFunc
extends java.lang.Object
| Constructor and Description |
|---|
CoreUtilFunc() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.commons.math3.complex.Complex |
calExpLoad(AclfBus bus)
Calculate exponential load
|
static org.apache.commons.math3.complex.Complex |
calExpLoad(org.apache.commons.math3.complex.Complex load0,
double volt,
double expP,
double expQ)
Calculate exponential load
|
static double |
calPFactor(double p,
double q)
calculate power factor
|
static double |
calQ(double p,
double pf,
java.lang.String unit)
Calcute Q based on P and PFactor
|
static double |
calQ(double p,
double pf,
Unit.UnitType unit) |
static double |
calRatingKVA(double rating,
Unit.UnitType ratingUnit,
double pf,
Unit.UnitType pfUnit)
Calculate the KVA rating based on input rating and pfactor.
|
static org.apache.commons.math3.complex.Complex |
calUitilityZ0PU(double kva1P,
double x_r1P,
double baseKva,
org.apache.commons.math3.complex.Complex z1)
Calculate utility bus z0 based on its 1-phase Sc Mva and X/r
|
static org.apache.commons.math3.complex.Complex |
calUitilityZ1PU(double kva3P,
double x_r3P,
double baseKva)
Calculate utility bus z1 based on its 3-phase Sc Mva and X/r
|
static org.apache.commons.math3.complex.Complex |
calZPU(double x,
double r,
double x_r,
Unit.UnitType unit,
double baseKVA,
double rating_kva,
double baseV,
double ratedV)
Calculate PU z on the baseKva base
|
static void |
deepCopy(BaseAclfNetwork<?,?> fromNet,
BaseAclfNetwork<?,?> toNet,
java.lang.String[] busIdAry,
java.lang.String[] branchIdAry)
deep copy of the bus and branch set
|
static long[] |
getAreaNumberAry(java.util.List<Area> list)
get araa number array from a list of area objects
|
static java.lang.Object[] |
getBranchIdArray(Network<Bus,Branch> net)
Get branch ids into an array
|
static java.lang.Object[] |
getBusIdArray(Network<Bus,Branch> net)
Get bus ids into an array
|
static int |
getBusSortNumber(java.lang.String busId,
Network<?,?> net)
Get bus sort number from bus id
|
static double |
getMvaFlowCalculated(AclfBranch branch,
boolean onFromSide,
boolean flowFrom2To,
Unit.UnitType unit)
Calculate branch q at the specified side (onFromSide) and in specified direction (flowFrom2To)
|
static long[] |
getZoneNumberAry(java.util.List<Zone> list)
get zone number array from a list of zone objects
|
static void |
setBranchFaultData(AcscBranchFault fault,
SimpleFaultCode type,
double distance,
double rLG,
double xLG,
double rLL,
double xLL)
Set AcscBranchFault object data
|
static void |
setBusFaultData(AcscBusFault fault,
SimpleFaultCode type,
double rLG,
double xLG,
double rLL,
double xLL)
Set AcscBusFault object data
|
static org.apache.commons.math3.complex.Complex |
yXfrGround(AcscBranch branch,
boolean iAtFromSide)
Compute zero sequence Xfr node to ground y.
|
public static double getMvaFlowCalculated(AclfBranch branch, boolean onFromSide, boolean flowFrom2To, Unit.UnitType unit)
branch - onFromSide - flowFrom2To - unit - public static org.apache.commons.math3.complex.Complex calUitilityZ1PU(double kva3P,
double x_r3P,
double baseKva)
kva3P - 3-phase sc mva in kav unitx_r3P - 3-phase sc x/rbaseKva - system base kavapublic static org.apache.commons.math3.complex.Complex calUitilityZ0PU(double kva1P,
double x_r1P,
double baseKva,
org.apache.commons.math3.complex.Complex z1)
kva1P - 1-phase sc mva in kav unitx_r1P - 1-phase sc x/rbaseKva - system base kavaz1 - z1 of the buspublic static org.apache.commons.math3.complex.Complex yXfrGround(AcscBranch branch, boolean iAtFromSide) throws InterpssException
branch - the xfr branch objectzGround_i - gtype_i - InterpssExceptionpublic static void setBusFaultData(AcscBusFault fault, SimpleFaultCode type, double rLG, double xLG, double rLL, double xLL)
fault - the fault objecttype - fault typerLG - Line-ground rxLG - Line-ground xrLL - Line-line rxLL - Line-line xpublic static void setBranchFaultData(AcscBranchFault fault, SimpleFaultCode type, double distance, double rLG, double xLG, double rLL, double xLL)
fault - the fault objecttype - fault typedistance - fault distance in pu from the FromBusrLG - Line-ground rxLG - Line-ground xrLL - Line-line rxLL - Line-line xpublic static org.apache.commons.math3.complex.Complex calExpLoad(org.apache.commons.math3.complex.Complex load0,
double volt,
double expP,
double expQ)
load0 - load at v=1.0volt - bus voltageexpP - real power exponentialexpQ - reactive power exponentialpublic static org.apache.commons.math3.complex.Complex calExpLoad(AclfBus bus)
bus, - the bus objectpublic static int getBusSortNumber(java.lang.String busId,
Network<?,?> net)
busId, - the bus objectpublic static void deepCopy(BaseAclfNetwork<?,?> fromNet, BaseAclfNetwork<?,?> toNet, java.lang.String[] busIdAry, java.lang.String[] branchIdAry) throws InterpssException
fromNet - toNet - busIdAry - branchIdAry - InterpssExceptionpublic static java.lang.Object[] getBusIdArray(Network<Bus,Branch> net)
public static java.lang.Object[] getBranchIdArray(Network<Bus,Branch> net)
public static double calRatingKVA(double rating,
Unit.UnitType ratingUnit,
double pf,
Unit.UnitType pfUnit)
rating - input ratingratingUnit - the rating unitpf - power factorpfUnit - power factor unitpublic static org.apache.commons.math3.complex.Complex calZPU(double x,
double r,
double x_r,
Unit.UnitType unit,
double baseKVA,
double rating_kva,
double baseV,
double ratedV)
x - x on the rating baser - r on the rating basex_r - x/r ratiounit - input x unit (PU or %)baseKVA - base KVErating_kva - ratingpublic static double calQ(double p,
double pf,
java.lang.String unit)
p - active powerpf - power factorunit - power factor unit, "PU" or "%"public static double calQ(double p,
double pf,
Unit.UnitType unit)
public static double calPFactor(double p,
double q)
p - q - public static long[] getZoneNumberAry(java.util.List<Zone> list)
list - public static long[] getAreaNumberAry(java.util.List<Area> list)
list -