Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object FixedFeedInConverter {
val cosPhiRated = determineCosPhiRated(input)
val reactivePowerCharacteristic =
convertQCharacteristic(qCharacteristic, cosPhiRated)
val s = input.sRated.asMegaVoltAmpere
val s = input.sRated.asKiloVoltAmpere

new FixedFeedInInput(
UUID.randomUUID(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ object PvInputGenerator {
val height = sample(params.elevationAngle).asDegreeGeom
val kG = sample(params.kG)
val kT = sample(params.kT)
val sRated = input.sRated.asMegaVoltAmpere
val sRated = input.sRated.asKiloVoltAmpere
val cosPhiRated = determineCosPhiRated(input)
val qCharacteristics =
convertQCharacteristic(params.qCharacteristic, cosPhiRated)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object WecTypeGenerator {

val capex = RandomSampler.sample(params.capex).asEuro
val opex = RandomSampler.sample(params.opex).asEuroPerMegaWattHour
val sRated = statGen.sRated.asMegaVoltAmpere
val sRated = statGen.sRated.asKiloVoltAmpere
val cosPhiRated = ConversionHelper.determineCosPhiRated(statGen)
val cpCharacteristic = new WecCharacteristicInput(
params.cpCharacteristic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ object QuantityUtils {
VOLTAMPERE
)

def asKiloVoltAmpere: ComparableQuantity[Power] = Quantities.getQuantity(
value,
MetricPrefix.KILO(VOLTAMPERE)
)

def asMegaVoltAmpere: ComparableQuantity[Power] = Quantities.getQuantity(
value,
MetricPrefix.MEGA(VOLTAMPERE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ object ConverterTestData extends LazyLogging {
1d,
0.9,
false,
11.asMegaVoltAmpere,
11.asKiloVoltAmpere,
0.91
)
)
Expand All @@ -410,7 +410,7 @@ object ConverterTestData extends LazyLogging {
"someStatGen",
getNodePair("someNode").result,
new CosPhiFixed("cosPhiFixed:{(0.0, 0.91)}"),
11.asMegaVoltAmpere,
11.asKiloVoltAmpere,
0.91
)
)
Expand Down Expand Up @@ -444,7 +444,7 @@ object ConverterTestData extends LazyLogging {
"someWecType",
100.asEuro,
50.asEuroPerMegaWattHour,
11.asMegaVoltAmpere,
11.asKiloVoltAmpere,
0.91,
new WecCharacteristicInput("cP:{(10.00,0.05),(15.00,0.10),(20.00,0.20)}"),
96.asPercent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ class QuantityUtilsSpec extends Matchers with AnyWordSpecLike {
)
}

"convert a double to kilo volt ampere" in {
value.asKiloVoltAmpere should equalWithTolerance(
Quantities.getQuantity(
value,
MetricPrefix.KILO(VOLTAMPERE)
)
)
}

"convert a double to mega volt ampere" in {
value.asMegaVoltAmpere should equalWithTolerance(
Quantities.getQuantity(
Expand Down