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(double loadP0,
double loadQ0,
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)
Calculate Q based on P and PFactor
|
static double |
calQ(double p,
double pf,
Unit.UnitType unit)
Calculate Q based on P and PFactor
|
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 long[] |
getAreaNumberAry(java.util.List<Area> areaList)
get araa number array from a list of area objects
|
static java.lang.String[] |
getBranchIdArray(Network<?,?> net)
Get branch ids into an array
|
static java.util.Set<java.lang.String> |
getBranchIdSet(Network<?,?> net,
int flag)
Get branch ids with bus.intFlag == flag
|
static java.lang.String[] |
getBusIdArray(Network<?,?> net)
Get bus ids into an array
|
static java.util.Set<java.lang.String> |
getBusIdSet(Network<?,?> net,
int flag)
Get bus ids with bus.intFlag == flag
|
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 java.util.List<Branch> |
getParallelBranchList(Branch b)
calculate parallel branch list between branch.fromBus and branch.toBus.
|
static java.util.List<Branch> |
getParallelBranchList(Bus b1,
Bus b2)
calculate parallel branch list between the two buses.
|
static long[] |
getZoneNumberAry(java.util.List<Zone> zoneList)
get zone number array from a list of zone objects
|
static boolean |
isParallelBranch(Branch b1,
Branch b2)
check if the two branches are connected to the fromBus and toBus
|
static int |
noParallelBranches(Branch b)
calculate no of parallel branches between branch.fromBus and branch.toBus
|
static int |
noParallelBranches(Bus b1,
Bus b2)
calculate no of parallel branches between the two buses.
|
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 boolean isParallelBranch(Branch b1, Branch b2)
b1
- b2
- public static java.util.List<Branch> getParallelBranchList(Bus b1, Bus b2)
b1
- b2
- public static java.util.List<Branch> getParallelBranchList(Branch b)
b1
- b2
- public static int noParallelBranches(Bus b1, Bus b2)
b1
- b2
- public static int noParallelBranches(Branch b)
b
- 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
- InterpssException
public 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(double loadP0, double loadQ0, double volt, double expP, double expQ)
load0
- load at v=1.0volt
- bus voltageexpP
- real power exponentialexpQ
- reactive power exponentialpublic static int getBusSortNumber(java.lang.String busId, Network<?,?> net)
busId,
- the bus objectpublic static java.lang.String[] getBusIdArray(Network<?,?> net)
public static java.util.Set<java.lang.String> getBusIdSet(Network<?,?> net, int flag)
flag
- public static java.lang.String[] getBranchIdArray(Network<?,?> net)
public static java.util.Set<java.lang.String> getBranchIdSet(Network<?,?> net, int flag)
flag
- 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)
p
- active powerpf
- power factorunit
- power factor unitpublic static double calPFactor(double p, double q)
p
- q
- public static long[] getZoneNumberAry(java.util.List<Zone> zoneList)
zoneList
- public static long[] getAreaNumberAry(java.util.List<Area> areaList)
list
-