circuit

package
v0.0.0-...-cb49962 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const FloatPointAccuracy = 1e-16

Variables

This section is empty.

Functions

This section is empty.

Types

type ChargeComponents

type ChargeComponents struct {
	SupplyVoltage     float64
	Capacity          float64
	Resistance        float64
	StagesCount       uint
	GapTriggerVoltage float64
	HoldingVoltage    float64
}

type Circuit

type Circuit struct {
	// contains filtered or unexported fields
}

func New

func New(chargeComp *ChargeComponents, load *LoadComponents) *Circuit

func (*Circuit) ApplyDerivative

func (st *Circuit) ApplyDerivative(h float64, d *Derivative) *Circuit

func (*Circuit) CalculateOptimalStep

func (st *Circuit) CalculateOptimalStep(oldStep float64, d *Derivative) float64

func (*Circuit) CheckDerivative

func (st *Circuit) CheckDerivative(step float64, d *Derivative) bool

func (*Circuit) Clone

func (st *Circuit) Clone() *Circuit

func (*Circuit) GetCapVoltage

func (st *Circuit) GetCapVoltage(pos uint) float64

func (*Circuit) GetDerivative

func (st *Circuit) GetDerivative() *Derivative

func (*Circuit) GetLoadVoltage

func (st *Circuit) GetLoadVoltage() float64

func (*Circuit) GetLoadVoltageFunc

func (st *Circuit) GetLoadVoltageFunc() func(x float64) float64

func (*Circuit) GetSystemCurrent

func (st *Circuit) GetSystemCurrent() float64

func (*Circuit) GetSystemPeriod

func (st *Circuit) GetSystemPeriod() float64

func (*Circuit) ImplicitStep

func (c *Circuit) ImplicitStep(step float64, d *Derivative, prev *Circuit) float64

func (*Circuit) ToggleState

func (st *Circuit) ToggleState()

type Derivative

type Derivative struct {
	// contains filtered or unexported fields
}

func (*Derivative) Add

func (d *Derivative) Add(weight float64, add *Derivative) *Derivative

func (*Derivative) WeighCopy

func (d *Derivative) WeighCopy(weight float64) *Derivative

type LoadComponents

type LoadComponents struct {
	Resistance float64
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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