Documentation
¶
Index ¶
- Constants
- func IMapInt(OrigMap map[int]int) (InvMap map[int]int)
- func ReadFile(fileName string) (frameData *FrameData, inDataPtr *Description, err error)
- type BodyLoad
- type CondensationParam
- type CondensedMode
- type CondensedNode
- type Curve
- type Description
- type Doc
- type Element
- type ElementMass
- type ElementPointLoad
- type FrameData
- type Material
- type ModalParam
- type NewmarkBetaParam
- type NodalAcceleration
- type NodalDisplacement
- type NodalLoad
- type NodalMass
- type NodalVelocity
- type Node
- type Reaction
- type StaticParam
- type TemperatureLoad
- type TrapezoidLoad
- type UniformLoad
Constants ¶
const FileSuffix = ".ffin"
FileSuffix specifies the filename suffix to be used for files of this type
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BodyLoad ¶
type BodyLoad struct { ID int `csvrecField:"int"` // bodyload id Gx, Gy, Gz float64 `csvrecField:"flt"` // Acceleration in the x, y, and z directions }
BodyLoad describes a body load (like gravity) that will be applied to the whole model.
type CondensationParam ¶
type CondensationParam struct {
CondensationMethod int `csvrecField:"int"` // matrix condensation method: 0, 1, 2, or 3
}
CondensationParam contains the parameters necessary for matrix condensation.
type CondensedMode ¶
type CondensedMode struct {
Modes []int `csvrecField:"intlist"` // condensation mode numbers
}
CondensedMode contains a vector of the condensed mode numbers
type CondensedNode ¶
type CondensedNode struct { Nid int `csvrecField:"int"` // node id X, Y, Z bool `csvrecField:"bool"` // Position reactions 0 = free, 1 = fixed. Xx, Yy, Zz bool `csvrecField:"bool"` // Rotation reactions 0 = free, 1 = fixed. }
CondensedNode contains the condensed degrees of freedom for a node.
type Curve ¶
type Curve struct { ID int `csvrecField:"int"` // curve id Points [][2]float64 `csvrecField:"fpairlist"` // curve point list Points[0][0] is the x of point zero Points[0][1] is the y of point zero. }
Curve is a slice of CurvePt
type Description ¶
type Description struct { Filename string Docs []*Doc `csvrecRec:"Doc"` StaticParams []*StaticParam `csvrecRec:"StaticParams"` /*Sp*/ Nodes []*Node `csvrecRec:"Node"` /*Nl*/ Reactions []*Reaction `csvrecRec:"Reaction"` /*Rl*/ Elements []*Element `csvrecRec:"Element"` /*El*/ Materials []*Material `csvrecRec:"Material"` /*Ml*/ Curves []*Curve `csvrecRec:"Curve"` BodyLoads []*BodyLoad `csvrecRec:"BodyLoad"` /*Bll*/ ElementPointLoads []*ElementPointLoad `csvrecRec:"ElementPointLoad"` /*Epll*/ NodalDisplacements []*NodalDisplacement `csvrecRec:"NodalDisplacement"` /*Ndl*/ NodalVelocities []*NodalVelocity `csvrecRec:"NodalVelocity"` NodalAccelerations []*NodalAcceleration `csvrecRec:"NodalAcceleration"` NodalLoads []*NodalLoad `csvrecRec:"NodalLoad"` /*Nll*/ TemperatureLoads []*TemperatureLoad `csvrecRec:"TemperatureLoad"` /*Templl*/ TrapezoidLoads []*TrapezoidLoad `csvrecRec:"TrapezoidLoad"` /*Trapll*/ UniformLoads []*UniformLoad `csvrecRec:"UniformLoad"` /*Ull*/ ModalParams []*ModalParam `csvrecRec:"ModalParams"` /*Mp*/ NodalMasses []*NodalMass `csvrecRec:"NodalMass"` /*Nml*/ ElementMasses []*ElementMass `csvrecRec:"ElementMass"` /*Eml*/ CondensationParams []*CondensationParam `csvrecRec:"CondensationParams"` /*Cp*/ CondensedNodes []*CondensedNode `csvrecRec:"CondensedNode"` /*Cnl*/ CondensedModes []*CondensedMode `csvrecRec:"CondensedModes"` /*Dcm*/ NewmarkBetaParams []*NewmarkBetaParam `csvrecRec:"NewmarkBetaParams"` }
Description contains the framefea input data as read (or to be written) from the file.
func (*Description) WriteFile ¶
func (inData *Description) WriteFile(fileName, toolName string) error
WriteFile writes a Description struct to a file.
type Doc ¶
type Doc struct {
Text string `csvrecField:"cstr"` // Doc name
}
Doc describes a Documentation record.
type Element ¶
type Element struct { ID int `csvrecField:"int"` // element id Nid1 int `csvrecField:"int"` // element nodes Nid2 int `csvrecField:"int"` // element nodes Nid3 int `csvrecField:"int"` // beam orientation node as in lsdyna Mid int `csvrecField:"int"` // material id Ax float64 `csvrecField:"flt"` // Cross sectional area Asy, Asz float64 `csvrecField:"flt"` // Shear area in the y and z directions Jx float64 `csvrecField:"flt"` // Torsional moment of inertia of a frame element Iy, Iz float64 `csvrecField:"flt"` // Moment of inertia for bending about the local y and z axis Temp float64 `csvrecField:"flt"` // Temperature of the Element }
Element defines the properties and orientation of a frame element.
type ElementMass ¶
type ElementMass struct { ID int `csvrecField:"int"` // Element ID Mass float64 `csvrecField:"flt"` // Extra frame element mass }
ElementMass describes a mass to be added to an element for use in modal analysis.
type ElementPointLoad ¶
type ElementPointLoad struct { ID int `csvrecField:"int"` // load id Eid int `csvrecField:"int"` // node id X, Y, Z float64 `csvrecField:"flt"` // node x, y, z Pos float64 `csvrecField:"flt"` // nodal radius }
ElementPointLoad describes a point load somewhere on and element.
type FrameData ¶
type FrameData struct { Shear bool // indicates shear deformation Geom bool // indicates geometric nonlinearity // Node Info NumNodes int // number of Nodes Xyz []femath.Vec3 // {NumNodes} X,Y,Z node coordinates (global) NodeRadius []float64 // {NumNodes} node size radius, for finite sizes // Reaction Info ReactedDof []bool // {Dof} Dof's with reactions formally "r" UnreactedDof []bool // {Dof} Dof's without reactions formally "q" (calculated) // Element Info NumElems int // Number of Frame Elements N1, N2 []int // {NumElems} begin and end node numbers Ax, Asy, Asz []float64 // {NumElems} cross section areas, incl. shear Jx, Iy, Iz []float64 // {NumElems} section inertias E, G []float64 // {NumElems} elastic modulus, shear modulus ElemRoll []float64 // {NumElems} roll of each member, radians ElemDensity []float64 // {NumElems} member densities L []float64 // node-to-node length of each element (calculated) Le []float64 // effective length, accounts for node size (calculated) // Load Info PerformStaticAnalysis bool StaticTol float64 // Convergence tolerance for the static analysis when Geom == true AnalyzeLoadCase bool // Are there mechanical loads in Mechanical Loads MechanicalLoads []float64 // {Dof} mechanical load vectors, all load cases Dp []float64 // {Dof} prescribed node displacements TempLoads bool // Are there temperature loads in the load case ThermalLoads []float64 // {Dof} thermal load vectors, all load cases EqFMech [][]float64 // {numElems}{12} equivalent end forces from mech loads global (calculated) EqFTemp [][]float64 // {numElems}{12} equivalent end forces from temp loads global (calculated) // Dynamic Analysis Data PerformModalAnalysis bool NumModes int // number of desired modes ModalMethod int // modal analysis method: 1=Jacobi-Subspace or 2=Stodola LumpFlag bool // true: lumped mass matrix or false: consistent mass matrix ModalTol float64 // convergence tolerance for modal analysis ModalFreqShift float64 // modal frequency shift for unrestrained structures, shift-factor for rigid-body-modes NMs []float64 // {NumNodes} node mass for each node NMx []float64 // {NumNodes} node inertia about global X axis NMy []float64 // {NumNodes} node inertia about global Y axis NMz []float64 // {NumNodes} node inertia about global Z axis EMs []float64 // {NumElems} lumped mass for each frame element // matrix Condensation Data PerformCondensation bool Cdof int // number of condensed degrees of freedom CondensationMethod int // matrix condensation method: 0, 1, 2, or 3 CondensationData []int // {DoF} matrix condensation data CondensedModeNums []int // {DoF} vector of condensed mode numbers */ // Newmark-beta Data PerformNewmarkBetaAnalysis bool NBAlpha float64 NBBeta float64 NBDt float64 NBTermTime float64 Vi []float64 // {Dof} initial nodal velocities Ai []float64 // {Dof} initial nodal accelerations // convenience maps NodeMap map[int]int // map of external node number to internal node number INodeMap map[int]int // inverse of NodeMap. map of internal to external node number DofMap map[int]int // map of external node ID to lowest degree of freedom (the x dir) ElemMap map[int]int // map of external to internal element number IElemMap map[int]int // inverse of ElemMap. map of internal to external element number // contains filtered or unexported fields }
FrameData contains all the input data in a form that can be used directly to run analyses (Assembled loads, nodes and elements that just use index id's etc...)
func CreateFrameData ¶
func CreateFrameData(in *Description) (fd *FrameData, err error)
CreateFrameData converts the Inputfile struct to a FrameData struct that can be used to run analyses.
func (*FrameData) DoF ¶
DoF returns the number of degrees of freedom described by a FrameInput2 structure (6*NumNodes).
func (*FrameData) NewCondensationInput ¶
func (fd *FrameData) NewCondensationInput() (mi *condensation.Input)
NewCondensationInput converts a FrameData structure to the CondensationInput structure needed for matrix condensation.
func (*FrameData) NewModalInput ¶
NewModalInput converts a FrameData structure to the ModalInput structure needed for a modal analysis.
func (*FrameData) NewNewmarkBetaInput ¶
func (fd *FrameData) NewNewmarkBetaInput() (si *newmarkbeta.Input)
NewNewmarkBetaInput converts a FrameData structure to the NewmarkBetaInput structure needed for NewmarkBeta time integration analysis.
func (*FrameData) NewStaticInput ¶
NewStaticInput converts a FrameData structure to the StaticInput structure needed for a static structural analysis.
type Material ¶
type Material struct { ID int `csvrecField:"int"` // id Name string `csvrecField:"str"` // name Rho float64 `csvrecField:"flt"` // density YoungsStr string `csvrecField:"str"` ThermCoefStr string `csvrecField:"str"` PoissonStr string `csvrecField:"str"` Youngs float64 // Youngs modulous ThermCoef float64 // Coefficient of thermal expansion Poisson float64 // Poisson's Ratio YoungsCurv *Curve // pointer to Youngs Modulus vs. temperature curve ThermCoefCurv *Curve // pointer to thermal coefficient vs. temperature curve PoissonCurv *Curve // pointer to Poisson's ratio vs. temperature curve }
A Material defines temperature dependent material properties and failure criteria.
func (Material) GetPoisson ¶
GetPoisson returns the Poisson's Ratio at the temperature given.
func (Material) GetThermCoef ¶
GetThermCoef returns the Thermal Coefficient at the temperature given.
type ModalParam ¶
type ModalParam struct { NumModes int `csvrecField:"int"` // number of desired modes ModalMethod int `csvrecField:"int"` // modal analysis method: 1=Jacobi-Subspace or 2=Stodola LumpFlag bool `csvrecField:"bool"` // true: lumped mass matrix or false: consistent mass matrix ModalTol float64 `csvrecField:"flt"` // convergence tolerance for modal analysis ModalFreqShift float64 `csvrecField:"flt"` // modal frequency shift for unrestrained structures, shift-factor for rigid-body-modes }
ModalParam contains parameters necessary for a modal analysis.
type NewmarkBetaParam ¶
type NewmarkBetaParam struct { Dt float64 `csvrecField:"flt"` // desired time step. Alpha float64 `csvrecField:"flt"` // parameter chosen to control the stability of the solution Beta float64 `csvrecField:"flt"` // parameter chosen to control the stability of the solution TerminationTime float64 `csvrecField:"flt"` // parameter that specifies a termination time for a time integration analysis with multiple steps. If 0 is specified then only one time step of durration Dt will be run. I TerminationTime is > 0 then multiple timesteps will be run, where the resulting accelerations, velocities, and displacements will be fed into the next simulation, until the simulation time exceeds the TerminationTime. }
NewmarkBetaParam performs implicit time integration on the model
type NodalAcceleration ¶
type NodalAcceleration struct { ID int `csvrecField:"int"` // load id Nid int `csvrecField:"int"` // node id Ax, Ay, Az float64 `csvrecField:"flt"` // Accelerations in the x, y, and z directions Axx, Ayy, Azz float64 `csvrecField:"flt"` // rotational acceleration about the x, y, and z axis }
NodalAcceleration describes an initial acceleration of a node.
type NodalDisplacement ¶
type NodalDisplacement struct { ID int `csvrecField:"int"` // load id Nid int `csvrecField:"int"` // node id Dx, Dy, Dz float64 `csvrecField:"flt"` // Displacements in the x, y, and z directions Dxx, Dyy, Dzz float64 `csvrecField:"flt"` // Rotations about the x, y, and z axis }
NodalDisplacement describes a prescribed displacement of a node.
type NodalLoad ¶
type NodalLoad struct { ID int `csvrecField:"int"` // load id Nid int `csvrecField:"int"` // node id X, Y, Z float64 `csvrecField:"flt"` // Applied loads in the x, y, z directions Xx, Yy, Zz float64 `csvrecField:"flt"` // Applied moments about the x, y, z axis }
NodalLoad describes a load/moment applied at a particular node.
type NodalMass ¶
type NodalMass struct { ID int `csvrecField:"int"` // node id Mass float64 `csvrecField:"flt"` // node mass for each node InertiaX float64 `csvrecField:"flt"` // node inertia about global X axis InertiaY float64 `csvrecField:"flt"` // node inertia about global Y axis InertiaZ float64 `csvrecField:"flt"` // node inertia about global Z axis }
NodalMass describes extra mass and/or inertia applied to a node.
type NodalVelocity ¶
type NodalVelocity struct { ID int `csvrecField:"int"` // load id Nid int `csvrecField:"int"` // node id Vx, Vy, Vz float64 `csvrecField:"flt"` // Velocities in the x, y, and z directions Vxx, Vyy, Vzz float64 `csvrecField:"flt"` // rotational velocities about the x, y, and z axis }
NodalVelocity describes an initial velocity of a node.
type Node ¶
type Node struct { ID int `csvrecField:"int"` // node id Loc [3]float64 `csvrecField:"f3vec"` // node x, y, z Rad float64 `csvrecField:"flt"` // nodal radius }
Node describes a node in 3d space.
type Reaction ¶
type Reaction struct { Nid int `csvrecField:"int"` // node id X, Y, Z bool `csvrecField:"bool"` // Position reactions 0 = free, 1 = fixed. Xx, Yy, Zz bool `csvrecField:"bool"` // Rotation reactions 0 = free, 1 = fixed. }
Reaction descripes the constrained degrees of freedom of a node.
type StaticParam ¶
type StaticParam struct { Shear bool `csvrecField:"bool"` // true=Do, false=Don't include shear deformation effects Geom bool `csvrecField:"bool"` // true=Do, false=Don't include geometric stiffness effects Tol float64 `csvrecField:"flt"` // Convergence tolerance for the static analysis when Geom == true Temp float64 `csvrecField:"flt"` // this is the default temperature of elements that do not have a temperature specified by a load (for material property purposes) }
StaticParam contains parameters necessary for a static analysis.
type TemperatureLoad ¶
type TemperatureLoad struct { ID int `csvrecField:"int"` // load id Eid int `csvrecField:"int"` // node id Hy, Hz float64 `csvrecField:"flt"` // y and z depth DtyPos, DtyNeg float64 `csvrecField:"flt"` // the temperature change on the local +/-y face of the element. DtzPos, DtzNeg float64 `csvrecField:"flt"` // the temperature change on the local +/-z face of the element. }
TemperatureLoad describes a temperature gradiant applied to an element.
type TrapezoidLoad ¶
type TrapezoidLoad struct { ID int `csvrecField:"int"` // load id Eid int `csvrecField:"int"` // element id X1, X2 float64 `csvrecField:"flt"` // start and stop location in the local x-direction Wx1, Wx2 float64 `csvrecField:"flt"` // start and stop load in the local x-direction Y1, Y2 float64 `csvrecField:"flt"` // start and stop location in the local y-direction Wy1, Wy2 float64 `csvrecField:"flt"` // start and stop load in the local y-direction Z1, Z2 float64 `csvrecField:"flt"` // start and stop location in the local z-direction Wz1, Wz2 float64 `csvrecField:"flt"` // start and stop load in the local z-direction }
TrapezoidLoad describes a trapezoidal load applied to an element.
type UniformLoad ¶
type UniformLoad struct { ID int `csvrecField:"int"` // load id Eid int `csvrecField:"int"` // Element id Ux, Uy, Uz float64 `csvrecField:"flt"` // Uniformly distributed load in the x, y, and z dirs }
UniformLoad describes a uniform load applied to an element.