aboutsummaryrefslogtreecommitdiffstats
path: root/compressor/compressor.go
blob: a3ac4bf796b83e396a70d5f876ff08c4330414d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package compressor

import (
	"time"

	"github.com/sam-anthony/volute/mass"
	"github.com/sam-anthony/volute/util"
)

type Compressor struct {
	FileName string
	// MinX is the distance of the y-axis from left of image in pixels.
	MinX int
	// MinY is the distance of the x-axis from the top of the image in
	//pixels.
	MinY int
	// MaxX is the distance of the end of the graph from the left of the
	// image in pixels.
	MaxX int
	// MaxY is the distance of the top of the graph from the top of the
	// image in pixels.
	MaxY int
	// MaxFlow is the mass flow rate at MaxX.
	MaxFlow mass.FlowRate
	// MaxPressureRatio is the pressure ratio at MaxY.
	MaxPressureRatio float32
}

func GarrettG25660() Compressor {
	maxFlow, err := mass.NewFlowRate(
		mass.Mass{70, mass.Pound},
		time.Minute,
		mass.PoundsPerMinute,
	)
	util.Check(err)
	return Compressor{
		"compressor/res/GarrettG25660.jpg",
		204,
		1885,
		1665,
		25,
		maxFlow,
		4.0,
	}
}