keyword

package module
v0.0.0-...-022276b Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

README

#keyword#

The keyword package implements functions for the reading and writing of ls-dyna .k files.

Documentation

Overview

The keyword package implements functions for the reading and writing of ls-dyna .k files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(w io.Writer, kwds *KeywordFile) error

Write a KeywordStruct to w (in the standard keyword format).

func WriteKeywordFile

func WriteKeywordFile(kwd *KeywordFile, filename string) error

Types

type BoundaryTemperature

type BoundaryTemperature struct {
	Id    int64
	Lcid  int64
	Cmult float64
	Loc   int64
	Node  bool
}

type BoundaryTemperatureList

type BoundaryTemperatureList []*BoundaryTemperature

type ButtLine

type ButtLine struct {
	Tfail float64
	Epsf  float64
	Sigy  float64
	Beta  float64
	L     float64
	D     float64
}

type CombinedWeldLine

type CombinedWeldLine struct {
	Tfail float64
	Epsf  float64
	Sigy  float64
	Beta  float64
	L     float64
	W     float64
	A     float64
	Alpha float64
	Nodea int64
	Nodeb int64
	Ncid  int64
	Wtyp  int64
}

type ConstrainedAdaptivity

type ConstrainedAdaptivity struct {
	Sn, Mn1, Mn2 int64
}

type ConstrainedAdaptivityList

type ConstrainedAdaptivityList []*ConstrainedAdaptivity

type ConstrainedGeneralizedWeld

type ConstrainedGeneralizedWeld struct {
	Id                int64
	Nsid              int64
	Cid               int64
	Filter            int64
	Window            float64
	Npr               int64
	Nprt              int64
	Spot              *SpotLine
	Fillet            *FilletLine
	Butt              *ButtLine
	CrossFillet       *CrossFilletLine
	NodePairs         []*NodePairLine
	CombinedWeldLines []*CombinedWeldLine
}

type ConstrainedGeneralizedWeldList

type ConstrainedGeneralizedWeldList []*ConstrainedGeneralizedWeld

type CrossFilletLine

type CrossFilletLine struct {
	Tfail float64
	Epsf  float64
	Sigy  float64
	Beta  float64
	L     float64
	W     float64
	A     float64
	Alpha float64
}

type DefineCurve

type DefineCurve struct {
	Title  string
	Lcid   int64
	Sidr   int64
	Sfa    float64
	Sfo    float64
	Offa   float64
	Offo   float64
	Dattyp int64
	Points []*DefineCurvePoint
}

type DefineCurveList

type DefineCurveList []*DefineCurve

type DefineCurvePoint

type DefineCurvePoint struct {
	A float64
	O float64
}

type ElementBeam

type ElementBeam struct {
	Eid int64
	Pid int64
	N   [3]int64
	Rr1 int64
	Rt1 int64
	Rr2 int64
	Rt2 int64
	Loc int64
}

type ElementBeamList

type ElementBeamList []*ElementBeam

type ElementMass

type ElementMass struct {
	Eid     int64
	Id      int64
	Mass    float64
	Pid     int64
	NodeSet bool
}

type ElementMassList

type ElementMassList []*ElementMass

type ElementShell

type ElementShell struct {
	Eid int64
	Pid int64
	N   [8]int64
}

func (*ElementShell) IsTri

func (e *ElementShell) IsTri() bool

type ElementShellList

type ElementShellList []*ElementShell

type ElementShellThickness

type ElementShellThickness struct {
	Eid  int64
	Pid  int64
	N    [8]int64
	Thic [4]float64
	Psi  float64
}

ELEMENT_SHELL_THICKNESS

func (*ElementShellThickness) IsTri

func (e *ElementShellThickness) IsTri() bool

type ElementShellThicknessList

type ElementShellThicknessList []*ElementShellThickness

type ElementSolid

type ElementSolid struct {
	Eid int64
	Pid int64
	N   [8]int64
}

func (*ElementSolid) IsPent

func (e *ElementSolid) IsPent() bool

func (*ElementSolid) IsTet

func (e *ElementSolid) IsTet() bool

type ElementSolidList

type ElementSolidList []*ElementSolid

type EmptyKeyword

type EmptyKeyword string

EmptyKeyword is used for keywords that have no content at all such as *KEYWORD and *END.

type FilletLine

type FilletLine struct {
	Tfail float64
	Epsf  float64
	Sigf  float64
	Beta  float64
	L     float64
	W     float64
	A     float64
	Alpha float64
}

type Inertia

type Inertia struct {
	Xc, Yc, Zc                   float64
	Tm                           float64
	Ircs                         int64
	Nid                          int64
	Ixx, Ixy, Ixz, Iyy, Iyz, Izz float64
	Vtx, Vty, Vtz                float64
	Vrx, Vry, Vrz                float64
	Xl, Yl, Zl                   float64
	Xlip, Ylip, Zlip             float64
	Cid                          int64
}

type InitialStressShell

type InitialStressShell struct {
	Id                  int64
	Nplane              int64
	Nthick              int64
	Nhisv               int64
	Ntensr              int64
	Large               int64
	Nthint              int64
	Nthhsv              int64
	Set                 bool
	IntegrationPoints   []*InitialStressShellIntegrationPoint
	ThermalHistoryLines []*InitialStressShellThermalHistoryLine
}

type InitialStressShellHistoryLine

type InitialStressShellHistoryLine struct {
	Hisv1, Hisv2, Hisv3, Hisv4, Hisv5, Hisv6, Hisv7, Hisv8 float64
}

type InitialStressShellIntegrationPoint

type InitialStressShellIntegrationPoint struct {
	StressLine   *InitialStressShellStressLine
	HistoryLines []*InitialStressShellHistoryLine
	TensorLines  []*InitialStressShellTensorLine
}

type InitialStressShellList

type InitialStressShellList []*InitialStressShell

type InitialStressShellStressLine

type InitialStressShellStressLine struct {
	T, Sigxx, Sigyy, Sigzz, Sigxy, Sigyz, Sigzx, Eps float64
}

type InitialStressShellTensorLine

type InitialStressShellTensorLine struct {
	Tenxx, Tenyy, Tenzz, Tenxy, Tenyz, Tenzx float64
}

type InitialStressShellThermalHistoryLine

type InitialStressShellThermalHistoryLine struct {
	Thhsv1, Thhsv2, Thhsv3, Thhsv4, Thhsv5 float64
}

type InitialStressSolid

type InitialStressSolid struct {
	Id                  int64
	Nint                int64
	Nhisv               int64
	Large               int64
	Iveflg              int64
	Ialegp              int64
	Nthint              int64
	Nthhsv              int64
	Set                 bool
	IntegrationPoints   []*InitialStressSolidIntegrationPoint
	ThermalHistoryLines []*InitialStressSolidThermalHistoryLine
}

type InitialStressSolidHistoryLine

type InitialStressSolidHistoryLine struct {
	Hisv1, Hisv2, Hisv3, Hisv4, Hisv5, Hisv6, Hisv7, Hisv8 float64
}

type InitialStressSolidIntegrationPoint

type InitialStressSolidIntegrationPoint struct {
	StressLine   *InitialStressSolidStressLine
	HistoryLines []*InitialStressSolidHistoryLine
	TensorLines  []*InitialStressSolidTensorLine
}

type InitialStressSolidList

type InitialStressSolidList []*InitialStressSolid

type InitialStressSolidStressLine

type InitialStressSolidStressLine struct {
	Sigxx, Sigyy, Sigzz, Sigxy, Sigyz, Sigzx, Eps float64
}

type InitialStressSolidTensorLine

type InitialStressSolidTensorLine struct {
	Tenxx, Tenyy, Tenzz, Tenxy, Tenyz, Tenzx float64
}

type InitialStressSolidThermalHistoryLine

type InitialStressSolidThermalHistoryLine struct {
	Thhsv1, Thhsv2, Thhsv3, Thhsv4, Thhsv5 float64
}

type InitialVelocityNode

type InitialVelocityNode struct {
	Nid                       int64
	Vx, Vy, Vz, Vxr, Vyr, Vzr float64
	Icid                      int64
}

type InitialVelocityNodeList

type InitialVelocityNodeList []*InitialVelocityNode

type KeywordFile

type KeywordFile struct {
	// Every type included as a member of this struct should implement
	// the keywordContainer interface.
	Keyword                      EmptyKeyword // Must be first.
	Title                        UnknownList
	Parameter                    UnknownList
	Part                         PartList
	PartAdaptiveFailure          UnknownList
	PartModes                    UnknownList
	PartSensor                   UnknownList
	PartMove                     UnknownList
	BoundarySpcNode              UnknownList
	DefineCurve                  DefineCurveList
	LoadRigidBody                LoadRigidBodyList
	LoadThermalVariableNode      LoadThermalVariableNodeList
	SectionBeam                  SectionBeamList
	SectionShell                 SectionShellList
	SectionSolid                 SectionSolidList
	SetNode                      SetNodeList
	SetShell                     SetShellList
	SetPart                      SetPartList
	BoundaryTemperature          BoundaryTemperatureList
	Node                         NodeList
	MatRigid                     MatRigidList
	MatPiecewiseLinearPlasticity MatPiecewiseLinearPlasticityList
	InitialVelocityNode          InitialVelocityNodeList
	InitialStressShell           InitialStressShellList
	InitialStressSolid           InitialStressSolidList
	ConstrainedAdaptivity        ConstrainedAdaptivityList
	ElementMass                  ElementMassList
	ElementBeam                  ElementBeamList
	ElementShell                 ElementShellList
	ElementShellThickness        ElementShellThicknessList
	InitialStressBeam            UnknownList
	InitialStrainShell           UnknownList
	InitialStrainSolid           UnknownList
	ElementSolid                 ElementSolidList
	ConstrainedGeneralizedWeld   ConstrainedGeneralizedWeldList
	Unknown                      UnknownList  // Unparsable sections will pass through verbatim.
	End                          EmptyKeyword // Must be last.
}

This struct represents and entire keyword file.

func Parse

func Parse(r io.Reader, verbose bool) (*KeywordFile, error)

Parse a KeywordFile from r.

func ReadKeywordFile

func ReadKeywordFile(filename string) (*KeywordFile, error)

func ReadKeywordFileB

func ReadKeywordFileB(filename string, verbose bool) (*KeywordFile, error)

func (*KeywordFile) Clear

func (k *KeywordFile) Clear(name string)

func (*KeywordFile) CpContainer

func (k *KeywordFile) CpContainer(inname string, k2 *KeywordFile) error

type LoadRigidBody

type LoadRigidBody struct {
	Pid  int64
	Dof  int64
	Lcid int64
	Sf   float64
	Cid  int64
	M1   int64
	M2   int64
	M3   int64
}

type LoadRigidBodyList

type LoadRigidBodyList []*LoadRigidBody

type LoadThermalVariableNode

type LoadThermalVariableNode struct {
	Id   int64
	Ts   float64
	Tb   float64
	Lcid int64
}

type LoadThermalVariableNodeList

type LoadThermalVariableNodeList []*LoadThermalVariableNode

type MatPiecewiseLinearPlasticity

type MatPiecewiseLinearPlasticity struct {
	Title string
	Mid   int64
	R0    float64
	E     float64
	Pr    float64
	Sigy  float64
	Etan  float64
	Fail  float64
	Tdel  float64
	C     float64
	P     float64
	Lcss  float64
	Lcsr  float64
	Vp    float64
	Lcf   float64
	Eps   [8]float64
	Es    [8]float64
}

type MatPiecewiseLinearPlasticityList

type MatPiecewiseLinearPlasticityList []*MatPiecewiseLinearPlasticity

type MatRigid

type MatRigid struct {
	Title    string
	Mid      int64
	R0       float64
	E        float64
	Pr       float64
	N        float64
	Couple   float64
	M        float64
	Alias_Re float64
	Cm0      float64
	Con1     float64
	Con2     float64
	Lco_A1   float64
	A2       float64
	A3       float64
	V1       float64
	V2       float64
	V3       float64
}

type MatRigidList

type MatRigidList []*MatRigid

type Node

type Node struct {
	Nid     int64
	X, Y, Z float64
	Tc, Rc  float64
}

type NodeList

type NodeList []*Node

func (*NodeList) CreateNodeMap

func (l *NodeList) CreateNodeMap() NodeMap

type NodeMap

type NodeMap map[int64]*Node

func (*NodeMap) GetNode

func (mp *NodeMap) GetNode(id int64) [3]float64

type NodePairLine

type NodePairLine struct {
	Nodea int64
	Nodeb int64
	Ncid  int64
}

Used with CROSS_FILLET read in Npr of the following

type Part

type Part struct {
	Title  string
	Pid    int64
	Secid  int64
	Mid    int64
	Eosid  int64
	Hgid   int64
	Grav   int64
	Adpopt int64
	Tmid   int64
	*Inertia
}

type PartList

type PartList []*Part

func (*PartList) CreatePartMap

func (l *PartList) CreatePartMap() PartMap

type PartMap

type PartMap map[int64]*Part

type SectionBeam

type SectionBeam struct {
	Title   string
	Secid   int64
	Elform  int64
	Shrf    float64
	Qr_Irid float64
	Cst     float64
	Scoor   float64
	Nsm     float64
	Area    float64
	Iss     float64
	Itt     float64
	J       float64
	Sa      float64
	Ist     float64
}

type SectionBeamList

type SectionBeamList []*SectionBeam

type SectionShell

type SectionShell struct {
	Title   string
	Secid   int64
	Elform  int64
	Shrf    float64
	Nip     float64
	Propt   float64
	Qr_Irid float64
	Icomp   int64
	Setyp   int64
	Thic    [4]float64
	Nloc    float64
	Marea   float64
	Idof    float64
	Edgset  int64
	Angles  []*SectionShellAngle
}

type SectionShellAngle

type SectionShellAngle struct {
	B [8]float64
}

type SectionShellList

type SectionShellList []*SectionShell

type SectionSolid

type SectionSolid struct {
	Title  string
	Secid  int64
	Elform int64
	Aet    int64
}

type SectionSolidList

type SectionSolidList []*SectionSolid

type SetNode

type SetNode struct {
	Title             string
	Sid               int64
	Da1               float64
	Da2               float64
	Da3               float64
	Da4               float64
	Solv              string
	BlankLines        []*SetNodeListLine
	ListLines         []*SetNodeListLine
	ColumnLines       []*SetNodeColumnLine
	ListGenerateLines []*SetNodeListLine
	GeneralLines      []*SetNodeGeneralLine
	ListSmoothLines   []*SetNodeListLine
}

type SetNodeColumnLine

type SetNodeColumnLine struct {
	Nid int64
	A   [4]float64
}

type SetNodeGeneralLine

type SetNodeGeneralLine struct {
	Option string
	E      [7]int64
}

type SetNodeList

type SetNodeList []*SetNode

type SetNodeListLine

type SetNodeListLine struct {
	N [8]int64
}

type SetPart

type SetPart struct {
	Title             string
	Sid               int64
	Da1               float64
	Da2               float64
	Da3               float64
	Da4               float64
	Solv              string
	BlankLines        []*SetPartListLine
	ListLines         []*SetPartListLine
	ColumnLines       []*SetPartColumnLine
	ListGenerateLines []*SetPartListLine
}

type SetPartColumnLine

type SetPartColumnLine struct {
	Pid int64
	A   [4]float64
}

type SetPartList

type SetPartList []*SetPart

type SetPartListLine

type SetPartListLine struct {
	P [8]int64
}

type SetShell

type SetShell struct {
	Title             string
	Sid               int64
	Da1               float64
	Da2               float64
	Da3               float64
	Da4               float64
	BlankLines        []*SetShellListLine
	ListLines         []*SetShellListLine
	ColumnLines       []*SetShellColumnLine
	ListGenerateLines []*SetShellListLine
	GeneralLines      []*SetShellGeneralLine
}

type SetShellColumnLine

type SetShellColumnLine struct {
	Eid int64
	A   [4]float64
}

type SetShellGeneralLine

type SetShellGeneralLine struct {
	Option string
	E      [7]int64
}

type SetShellList

type SetShellList []*SetShell

type SetShellListLine

type SetShellListLine struct {
	Eid [8]int64
}

type SpotLine

type SpotLine struct {
	Tfail float64
	Epsf  string
	Sn    string
	Ss    string
	N     string
	M     string
}

type UnknownList

type UnknownList [][]byte

This field type is used to save unknown input keywords so they can be written back out unchanged when we write the file.

Jump to

Keyboard shortcuts

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