Documentation ¶
Index ¶
- func GetFragHeader() string
- type Cloud
- func (d *Cloud) Collapse(center, axis [3]float64, length, radius float64)
- func (d *Cloud) CreateFragments(eList []*Element)
- func (d *Cloud) FragListString() string
- func (d *Cloud) Fragments() []*Fragment
- func (d *Cloud) KeStats() (min, max, avg float64)
- func (d *Cloud) KeString() string
- func (d *Cloud) MassStats() (min, max, tot, avg float64)
- func (d *Cloud) MassString() string
- func (d *Cloud) MissingMass() float64
- func (d *Cloud) NumFragsString() string
- func (d *Cloud) ReflectX()
- func (d *Cloud) ReflectY()
- func (d *Cloud) ReflectZ()
- func (d *Cloud) RotateN1N2(angle float64, center, n1, n2 Node)
- func (d *Cloud) RotateN1N2N3(angle float64, center, n1, n2, n3 Node)
- func (d *Cloud) RotateX(angle float64, center Node)
- func (d *Cloud) RotateY(angle float64, center Node)
- func (d *Cloud) RotateZ(angle float64, center Node)
- func (d *Cloud) Translate(dir [3]float64)
- func (d *Cloud) VelStats() (min, max, avg float64)
- func (d *Cloud) VelocityString() string
- type Element
- func (e *Element) Idx() [3]int64
- func (e *Element) Pos() [3]float64
- func (e *Element) ReflectX()
- func (e *Element) ReflectY()
- func (e *Element) ReflectZ()
- func (e *Element) RotateN1N2(angle float64, center, n1, n2 Node)
- func (e *Element) RotateN1N2N3(angle float64, center, n1, n2, n3 Node)
- func (e *Element) RotateX(angle float64, center Node)
- func (e *Element) RotateY(angle float64, center Node)
- func (e *Element) RotateZ(angle float64, center Node)
- func (e *Element) Translate(dir [3]float64)
- type Fragment
- func (f *Fragment) AddElement(e *Element)
- func (f *Fragment) Cd() float64
- func (f *Fragment) Elements() []*Element
- func (f *Fragment) GetFragString() string
- func (f *Fragment) Ke() float64
- func (f *Fragment) Mass() float64
- func (f *Fragment) Nodes(minid int64) (map[*Node](int64), int64)
- func (f *Fragment) Pa() float64
- func (f *Fragment) Pos() [3]float64
- func (f *Fragment) ReflectX()
- func (f *Fragment) ReflectY()
- func (f *Fragment) ReflectZ()
- func (f *Fragment) RotateN1N2(angle float64, center, n1, n2 Node)
- func (f *Fragment) RotateN1N2N3(angle float64, center, n1, n2, n3 Node)
- func (f *Fragment) RotateX(angle float64, center Node)
- func (f *Fragment) RotateY(angle float64, center Node)
- func (f *Fragment) RotateZ(angle float64, center Node)
- func (f *Fragment) Translate(dir [3]float64)
- func (f *Fragment) Vel() [3]float64
- type Mesh
- func (m *Mesh) Add(m2 *Mesh)
- func (m *Mesh) AddElement(e *Element)
- func (m *Mesh) Copy() *Mesh
- func (m *Mesh) NodeMap(minid int64) (map[*Node](int64), int64)
- func (m *Mesh) ReflectX()
- func (m *Mesh) ReflectY()
- func (m *Mesh) ReflectZ()
- func (m *Mesh) RotateN1N2(angle float64, center, n1, n2 Node)
- func (m *Mesh) RotateN1N2N3(angle float64, center, n1, n2, n3 Node)
- func (m *Mesh) RotateX(angle float64, center Node)
- func (m *Mesh) RotateY(angle float64, center Node)
- func (m *Mesh) RotateZ(angle float64, center Node)
- func (m *Mesh) Translate(dir [3]float64)
- type NidList
- type Node
- func (n *Node) ReflectX()
- func (n *Node) ReflectY()
- func (n *Node) ReflectZ()
- func (n *Node) RotateN1N2(angle float64, center, n1, n2 Node)
- func (n *Node) RotateN1N2N3(angle float64, center, n1, n2, n3 Node)
- func (n *Node) RotateX(angle float64, center Node)
- func (n *Node) RotateY(angle float64, center Node)
- func (n *Node) RotateZ(angle float64, center Node)
- func (n *Node) Translate(dir [3]float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFragHeader ¶
func GetFragHeader() string
GetFragHeader returns a header string that can be used when listing out summary information about the frag using GetFragString().
Types ¶
type Cloud ¶
type Cloud struct {
// contains filtered or unexported fields
}
A Cloud stores a list of fragments (and information to create the fragments given a list of elements)
func NewCloud ¶
NewCloud creates a new Cloud object. If minVf, minDens, minMass, minKe, or minVel are less than zero then NewCloud will replace the negative numbers with the default values 0.001, 7.6, 2.5, 0.0, 0.0 respectively.
func (*Cloud) CreateFragments ¶
CreateFragments parses a list of elements and determines the fragments.
func (*Cloud) FragListString ¶
FragListString returns a string with a header line and one line summarizing each fragment
func (*Cloud) KeStats ¶
KeStats returns the minimum, maximum, and average kinetic energy of the fragments in the cloud.
func (*Cloud) KeString ¶
KeString returns a string documenting the minimum, maximum, and average kinetic energy of the fragments.
func (*Cloud) MassStats ¶
MassStats returns the minimum, the maximum, the total, and the average fragment mass for the cloud.
func (*Cloud) MassString ¶
MassString returns a string documenting the minimum, maximum, total, and average fragment mass along with the missing mass.
func (*Cloud) MissingMass ¶
MissingMass returns the mass of fragment material that was not included in the fragments due to one of the minimum constraints.
func (*Cloud) NumFragsString ¶
NumFragsString returns a string documenting the number of fragments.
func (*Cloud) RotateN1N2 ¶
func (*Cloud) RotateN1N2N3 ¶
func (*Cloud) VelStats ¶
VelStats returns the minimum, maximum, and average velocity of the fragments in the cloud.
func (*Cloud) VelocityString ¶
VelocityString returns a string documenting the minimum, maximum, and average velocity of the fragments.
type Element ¶
type Element struct { Volm float64 // volume fraction of the element that is fragment Dens float64 // density of the fragment material in the element Size float64 // length of the cube Mass float64 // mass of the fragment material in the element Vol float64 // volume of the fragment material in the element Vel [3]float64 // velocity of the material in the element Nodes []*Node // coordinates of the corners of the element }
Element stores data about the fragment material in a cth element
func NewElement ¶
CreateElement is used to create a Element specifically calculating the index position and nodal locations
func (*Element) Idx ¶
Idx calculates the x,y,z integer index of the element assuming all the elements are the same size. This is used for determining if there is an adjacent element and therefor part of the same fragment.
func (*Element) RotateN1N2 ¶
func (*Element) RotateN1N2N3 ¶
type Fragment ¶
type Fragment struct {
// contains filtered or unexported fields
}
Fragment stores information about a fragment.
func NewFragment ¶
NewFragment creates a new fragment object and its associatie mesh.
func (*Fragment) AddElement ¶
AddElement allows an element to be added to a fragment.
func (*Fragment) GetFragString ¶
GetFragString returns a string containing the mass, velocity (x,y,z), speed, kinetic energy, number of elements, number of nodes, position (x,y,z), coefficient of drag, and the presented area for each fragment.
func (*Fragment) Nodes ¶
Nodes returns the fragments nodemap. Along with the element node lists this would allow you to make a finite element model of the fragment.
func (*Fragment) RotateN1N2 ¶
func (*Fragment) RotateN1N2N3 ¶
type Mesh ¶
type Mesh struct { Elements []*Element // contains filtered or unexported fields }
A Mesh contains a lists of nodes and (hex) elements as well as a NidList for each element, and the tolerance that is to be used to determine if two nodes are overlapping
func (*Mesh) AddElement ¶
AddElement adds element e to the mesh and adds nodes from the element that aren't already in the mesh. It also creates an NidList for the element and appends it to ElementNids..
func (*Mesh) RotateN1N2 ¶
func (*Mesh) RotateN1N2N3 ¶
type NidList ¶
type NidList [8]int
A NidList contains a list of 8 indexes into the node array of the mesh object. One index for each node of an element.
type Node ¶
type Node [3]float64
Node stores the location of a point