aboutsummaryrefslogtreecommitdiffstats
path: root/compressor
diff options
context:
space:
mode:
authorsam-anthony <samanthony6@protonmail.com>2022-04-09 12:05:19 -0230
committersam-anthony <samanthony6@protonmail.com>2022-04-09 12:05:19 -0230
commit4f654973e5139f14d6fa63357a274ad0e3cbb202 (patch)
tree45bbc6716382eb2cee8cf5fef77a55cb4e143015 /compressor
parent4cbd64e7ab6d976496c5e36c1ebae7526eceb375 (diff)
downloadvolute-4f654973e5139f14d6fa63357a274ad0e3cbb202.zip
selecteable compressor and add BW K03
Diffstat (limited to 'compressor')
-rw-r--r--compressor/compressor.go41
-rw-r--r--compressor/res/borgwarner/k/03.jpgbin0 -> 185706 bytes
-rw-r--r--compressor/res/garrett/g/25-660.jpg (renamed from compressor/res/GarrettG25660.jpg)bin833764 -> 833764 bytes
3 files changed, 39 insertions, 2 deletions
diff --git a/compressor/compressor.go b/compressor/compressor.go
index a3ac4bf..940d6fa 100644
--- a/compressor/compressor.go
+++ b/compressor/compressor.go
@@ -8,6 +8,7 @@ import (
)
type Compressor struct {
+ Name string
FileName string
// MinX is the distance of the y-axis from left of image in pixels.
MinX int
@@ -26,7 +27,23 @@ type Compressor struct {
MaxPressureRatio float32
}
-func GarrettG25660() Compressor {
+var compressors = make(map[string]map[string]map[string]Compressor)
+
+func init() {
+ compressors["Garrett"] = make(map[string]map[string]Compressor)
+ compressors["Garrett"]["G"] = make(map[string]Compressor)
+ compressors["Garrett"]["G"]["25-660"] = garrettG25660()
+
+ compressors["BorgWarner"] = make(map[string]map[string]Compressor)
+ compressors["BorgWarner"]["K"] = make(map[string]Compressor)
+ compressors["BorgWarner"]["K"]["03"] = borgwarnerK03()
+}
+
+func Compressors() map[string]map[string]map[string]Compressor {
+ return compressors
+}
+
+func garrettG25660() Compressor {
maxFlow, err := mass.NewFlowRate(
mass.Mass{70, mass.Pound},
time.Minute,
@@ -34,7 +51,8 @@ func GarrettG25660() Compressor {
)
util.Check(err)
return Compressor{
- "compressor/res/GarrettG25660.jpg",
+ "Garrett G25-660",
+ "compressor/res/garrett/g/25-660.jpg",
204,
1885,
1665,
@@ -43,3 +61,22 @@ func GarrettG25660() Compressor {
4.0,
}
}
+
+func borgwarnerK03() Compressor {
+ maxFlow, err := mass.NewFlowRate(
+ mass.Mass{0.13, mass.Kilogram},
+ time.Second,
+ mass.KilogramsPerSecond,
+ )
+ util.Check(err)
+ return Compressor{
+ "BorgWarner K03",
+ "compressor/res/borgwarner/k/03.jpg",
+ 30,
+ 714,
+ 876,
+ 4,
+ maxFlow,
+ 2.8,
+ }
+}
diff --git a/compressor/res/borgwarner/k/03.jpg b/compressor/res/borgwarner/k/03.jpg
new file mode 100644
index 0000000..3464331
--- /dev/null
+++ b/compressor/res/borgwarner/k/03.jpg
Binary files differ
diff --git a/compressor/res/GarrettG25660.jpg b/compressor/res/garrett/g/25-660.jpg
index aa8d12a..aa8d12a 100644
--- a/compressor/res/GarrettG25660.jpg
+++ b/compressor/res/garrett/g/25-660.jpg
Binary files differ