structures

package module
v0.0.0-...-e9e3f96 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2018 License: MIT Imports: 4 Imported by: 0

README

Structures

This is a structural analysis package for the Go Language.

Issues

If you find any bugs or want to discuss changes to the api, additional features, etc, feel free to file an issue on the github issue tracker.

Contributing

Contributions of any sort are welcomed. I am a structural engineer, not a programmer, so there are likely many improvements to be made.

License

Code is released under the MIT License. Please see the LICENSE.md file for general license information, contributors, authors, etc.

Symbology

The code in this package uses the following symbols:

Inputs

  • m = int of number of members
  • n = int of number of nodes
  • coord = matrix of nodal coordinates (each row corresponds to X,Y,Z of node[i]) (float64,float64,float64)
  • con = matrix of connectivity and boundary conditions (each row corresponds to a member [node[i], node[j], release[i], realease[j]]) (int, int, bool, bool)
  • re = matrix of nodal releases (each row is a series of bool's) (6 bool's for 6 DOF)
  • load = matrix of nodal loads (each row is the load in 6dof for the node)
  • w = matrix of uniformly distributed loads on members in local coordinates (x,y,z components of w)
  • E = array of elastic moduli for each member
  • G = array of shear moduli for each member
  • A = array of areas ...
  • Iz = moment of interia for zz axis
  • Iy = ''' yy axis
  • J = torsional constant for each member
  • St = matrix of support settlement and displacements of nodes (each row is the DOFs for the node)
  • be = array of element rotations (CCW is positive, in radians)

Internals

  • Ni = stiffness matrix for each member
  • S = global stiffness matrix for system
  • Pf = fixed end forces for each member (global)
  • Qfi = fixed end forces for each member (local)
  • Ei = member code numbers

Outputs

  • Q = matrix of internal forces in local coordinate system
  • V = matrix of deflections in global coordinate system
  • R = reactions for supported nodes in global coordinate system

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diag

func Diag(a []float64) *mat.Dense

Diag creates a matrix with the inputs put along the diagonal and zeros elsewhere

func Hypotenuse

func Hypotenuse(x, y float64, z ...float64) float64

Hypotenuse returns the SRSS of the vector elements

func Kronecker

func Kronecker(a, b *mat.Dense) (k *mat.Dense)

Kronecker product

func OnesVec

func OnesVec(m int) *[]float64

OnesVec creates an array of size m filled with ones

func SetMatrix

func SetMatrix(i, j int, A, B *mat.Dense) *mat.Dense

SetMatrix Copies B into A, with B's 0, 0 aligning with A's i, j

Types

type MSA

type MSA interface {
	Initialize()
	Set()
	Solve()
	Display()
}

MSA (Matrix Structural Analysis) interface with methods for solving strutural problems

type Structure

type Structure struct {
	M, N                                                int
	Coord, Con, Re, Load, W, E, G, A, Iz, Iy, J, St, Be *mat.Dense
	S, Pf, Q, Qfi, Ei, V, R                             *mat.Dense
	Ni                                                  []*mat.Dense
}

Structure type contains the necessary parameters for solving a structural problem

func (Structure) Display

func (s Structure) Display()

Display prints out the structure info to the console

func (*Structure) Initialize

func (s *Structure) Initialize()

Initialize sets up the structure s

func (*Structure) Set

func (s *Structure) Set(m, n int, coord, con, re, load, w, E, G, A, Iz, Iy, J, St, be [][]float64)

Set will set the structure properties according to the function inputs. It receives a pointer to s so we can modify it.

func (*Structure) Solve

func (s *Structure) Solve()

Solve assembles the system

Jump to

Keyboard shortcuts

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