anl

package
v0.0.1-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOnesVec

func NewOnesVec(n int) []float64

func Repeat

func Repeat[T any](item T, n int) []T

Types

type Analysis

type Analysis struct {
	Name           string
	ModelPath      string
	ModelPathValid bool
	ExecPath       string
	ExecPathValid  bool
	NumCPUs        int
	Conditions     []acdc.Conditions
	Viz            VizData
	Model          *input.Model
	Campbell       *CampbellData
}

func New

func New() *Analysis

func Read

func Read(path string) (*Analysis, error)

func (*Analysis) Evaluate

func (a *Analysis) Evaluate(ctx context.Context, conditions acdc.Conditions,
	statusChan chan<- EvalStatus) error

func (*Analysis) ValidatePaths

func (a *Analysis) ValidatePaths()

func (*Analysis) Write

func (a *Analysis) Write(path string) error

type CampbellData

type CampbellData struct {
}

type EvalStatus

type EvalStatus struct {
	ID       int
	State    string
	Progress int
	Error    string
}

type LinData

type LinData struct {
	FilePath       string
	SimTime        float64
	RotorSpeed     float64
	Azimuth        float64
	WindSpeed      float64
	NumX           int
	NumX2          int
	NumXd          int
	NumZ           int
	NumU           int
	NumY           int
	X, Xd, Z, U, Y []OperPointData
	A, B, C, D     *mat.Dense
}

func ReadLinData

func ReadLinData(filePath string) (*LinData, error)

type MBC

type MBC struct {
	DescStates []string
	NumDOF2    int
	NumDOF1    int
	RotSpeed   float64
	WindSpeed  float64
}

type MatData

type MatData struct {
	LinData    []*LinData
	NumStep    int
	NumStates  int
	NumStates2 int
	NumInputs  int
	NumOutputs int
	NumDOF1    int
	NumDOF2    int
	Azimuth    *mat.VecDense
	Omega      *mat.VecDense
	OmegaDot   *mat.VecDense
	WindSpeed  *mat.VecDense
	A, B, C, D []*mat.Dense
	OpX        []*mat.VecDense
	OpXd       []*mat.VecDense
	AvgA       *mat.Dense
	AvgOpX     *mat.VecDense
	AvgOpXd    *mat.VecDense
	Rotation   RotationTriplets
	Modes      []*ModeResults
}

type ModeResults

type ModeResults struct {
	EigenValue     complex128
	NaturalFreqRaw float64
	NaturalFreqHz  float64
	DampedFreqRaw  float64
	DampedFreqHz   float64
	DampingRatio   float64
	EigenVector    []complex128
	Magnitudes     []float64
	Phases         []float64
	Shape          []float64
}

type OperPointData

type OperPointData struct {
	RC         int
	OperPoint  float64
	IsRotating bool
	DerivOrder int
	Desc       string
}

type RotationTriplets

type RotationTriplets struct {
	TripletsStates2 [][]int
	PermuteStates2  []int
	TripletsStates1 [][]int
	PermuteStates1  []int
	TripletsInputs  [][]int
	PermuteInputs   []int
	TripletsOutputs [][]int
	PermuteOutputs  []int
}

type Turbine

type Turbine struct {
	ID             int
	Name           string
	OperatingPoint acdc.Conditions
	Dir            string
	ModelPath      string
	LogPath        string
	Model          *input.Model
}

func NewTurbine

func NewTurbine(c acdc.Conditions, model *input.Model) *Turbine

func (*Turbine) PerformMBC

func (turb *Turbine) PerformMBC() (*MBC, error)

func (*Turbine) Simulate

func (turb *Turbine) Simulate(ctx context.Context, execPath string, statusChan chan<- EvalStatus) error

type VizData

type VizData struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL