euler

package module
v0.0.0-...-792585a Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: MIT Imports: 2 Imported by: 0

README

euler

Resolution of euler flow equation for 1D steady, incompressible flow (Bernoulli Equation)

THIS IS A WORK IN PROGRESS do NOT use for calculations.

	const bar = 100e3
	m := euler.New(euler.Ref{P: 60 * bar}, euler.Water20C)
	piping := euler.NewBasicPipe(20e-3, 1e-3) // some 20mm diameter pipe
	ten := piping.New(10, 0) // 10meter long piping
	m.Connect(ten, ten, ten) // connect 3 aforementioned pipes together
	q := m.End(bar)
	fmt.Println("q=%0.3g m^3/s")
	// Output: q=8.445 m^3/s

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Water20C = Fluid{
	// contains filtered or unexported fields
}

Functions

This section is empty.

Types

type Fluid

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

type Model

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

func New

func New(r Ref, f Fluid) *Model

func (*Model) Connect

func (m *Model) Connect(p ...Pipe) *Model

func (*Model) End

func (m *Model) End(P float64) (Q float64)

type Pipe

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

type PipeType

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

func NewBasicPipe

func NewBasicPipe(D, ε float64) PipeType

func (PipeType) New

func (p PipeType) New(L, z float64) Pipe

type Ref

type Ref struct {
	// Relative Height [m]
	Z float64
	// Relative Pressure [Pa]
	P float64
}

Jump to

Keyboard shortcuts

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