process

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

README

Process Package

Documentation

Overview

Package process defines the Finite Element Method computation. It starts from the sliced structure, assembles the global system of equations, solves it and creates a solution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElementSolution

type ElementSolution struct {
	*preprocess.Element

	GlobalXDispl []PointSolutionValue
	GlobalYDispl []PointSolutionValue
	GlobalZRot   []PointSolutionValue

	LocalXDispl []PointSolutionValue
	LocalYDispl []PointSolutionValue
	LocalZRot   []PointSolutionValue

	AxialStress                      []PointSolutionValue
	ShearForce                       []PointSolutionValue
	BendingMoment                    []PointSolutionValue
	BendingMomentTopFiberAxialStress []PointSolutionValue
	// contains filtered or unexported fields
}

ElementSolution is the displacements and stresses for a given preprocessed element.

Displacements are stored in both local and global coordinates. Stresses, forces and moments are referred only to the local reference frame.

func MakeElementSolution

func MakeElementSolution(
	element *preprocess.Element,
	globalDisp vec.ReadOnlyVector,
) *ElementSolution

MakeElementSolution creates a solution element with all solution values for the preprocessed element.

It sets the element's global and local displacements given the structure's system of equations solution vector (the global node displacements) and computes the axial stress, shear force and bending moment in each of the slices of the preprocessed element.

func (*ElementSolution) GlobalEndTorsor

func (es *ElementSolution) GlobalEndTorsor() *math.Torsor

GlobalEndTorsor returns the forces and moment torsor {fx, fy, mz} at the end node in global coordinates.

Sign convention: - a tensile stress (positive) yields a positive force value - a positive shear force yields a negative force value - a positive bending moment yields a positive moment value

func (*ElementSolution) GlobalStartTorsor

func (es *ElementSolution) GlobalStartTorsor() *math.Torsor

GlobalStartTorsor returns the forces and moment torsor {fx, fy, mz} at the start node in global coordinates.

Sign convention: - a tensile stress (positive) yields a negative force value - a positive shear force yields a positive force value - a positive bending moment yields a negative moment value

func (*ElementSolution) RefFrame

func (es *ElementSolution) RefFrame() *g2d.RefFrame

RefFrame returns the element's reference frame.

type PointSolutionValue

type PointSolutionValue struct {
	T     nums.TParam
	Value float64
}

PointSolutionValue is a tuple of a T parameter and a value.

func (PointSolutionValue) String

func (psv PointSolutionValue) String() string

type Solution

type Solution struct {
	Metadata structure.StrMetadata
	structure.NodesById
	Elements []*ElementSolution
}

Solution is the group of all element solutions with the structure metadata.

func MakeSolution

func MakeSolution(
	metadata structure.StrMetadata,
	nodesById structure.NodesById,
	elements []*ElementSolution,
) *Solution

MakeSolution creates a new solution with the given structure metadata, nodes and elements.

func Solve

func Solve(str *preprocess.Structure, options SolveOptions) *Solution

Solve assembles the system of equations for the structure and solves it using the Preconditioned Conjugate Gradient numerical procedure.

The local element stresses are computed using the displacements obtained in the first step.

func (*Solution) ElementCount

func (solution *Solution) ElementCount() int

ElementCount returns the number of total bars in the structure's solution, which is the same number as in the original definition of the structure.

func (*Solution) NodeReactions

func (solution *Solution) NodeReactions() map[contracts.StrID]*math.Torsor

NodeReactions returns the map of externally constrained nodes with their reaction.

type SolveOptions

type SolveOptions struct {
	OutputPath            string
	SafeChecks            bool
	MaxDisplacementsError float64
}

SolveOptions includes configuration parameters for structural solving process.

Jump to

Keyboard shortcuts

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