Introduction to LS-Dyna
Pre-Post
Anna Knight for Elasticity Imaging
Fall 2018
Based on Notes from Roger Nightingale and Matthew Panzer for BME 432 Fall 2014
Finite Element Analysis
●
●
Want to solve what is happening everywhere at every time step.
Finite element method (FEM) is a numerical method for solving a differential
or integral equation
“Math” going on
●
●
●
●
Element stiffness: in each element (i) define relationship between loads and
displacements
○ {f}i = [k]i {d}i
Assembly: use continuity (material doesnt rip or overlap) to connect the
elements together to link the loads and displacements between the elements
○ {F} = [K]{D}
Boundary conditions: constrain the edges of the problem
○ {FBC} = [KBC] {DBC}
Solution: Invert the Matrix and solve for unknown displacements
○ {DBC} = [KBC]-1 {FBC}
Reference: https://www.youtube.com/watch?v=sSaUHDQf204&t=312s
File Types
●
LS-PrePost
○
○
○
●
Lspost.cfile
■ Command file that allows you to repeat all the work done during the prepost session
■ Gets over written every time LSPP is launched
Model.k or Model.dyn
■ The keyword file
■ Spaces and tabs (character alignment) matters
Dyna deck (.dyn) These are “decks” of “cards” of commands to be done by dyna. These are
what we will edit most
LS-Dyna Solver
○
○
Messag
■ The message file. A log of the execution with cpu and model statistics
D3plot. The binary plot file-- all the nodal displacements at every requested time step. Open
with ls-prepost to animate and analyze results
Basics of LS-DYNA
●
●
Defined by “keywords” which tell solver about geometry, model preoperties,
boundary and IC’s
k files are ASCII-based that you can edit in text editor (we will do this later in
the semester), or LSPP
○
○
○
Commands in a k file start with *
Comments start with $
All k files start with *KEYWORD command and end with *END
Basics of LS-DYNA
Requirements: Grey will be in our main dyna deck. Blue we will write with python
tools and then *INCLUDE later
●
●
●
●
●
●
●
●
●
*KEYWORD
*CONTROL_TERMINATION
*NODE
*ELEMENT
*MAT
*SECTION
*PART
*DATABASE_BINDARY_D3PLOT
*END
We also will import a deck for BC’s and
for our load (bc.dyn and topload.dyn)
Nodes and Elements
●
*NODE
○
○
○
●
Each node has a unique ID number (NID)
Defines X,Y,Z coordinates in global Cartesian
coordinate system
We will make these in the future with GenMesh.py
*ELEMENT_option
○
○
○
○
○
Designates the element type, e.g.
*ELEMENT_SOLID
Each element has a unique ID number (EID)
Defines what part the element belongs to (we only
have 1 part)
Defines what nodes make the element
■ Nodes must be numbered in proper order to
define the direction of the surface normal
Also will be made with GenMesh.py in the future
Parts and Sections
●
*PART
○
○
○
●
We will start with just 1 part, but once we add in PML’s we
will need 2 parts
A Part defines a group of elements with common properties
Each part has a unique ID number (PID)
*SECTION_option
○
○
○
Designates the section type, e.g. *SECTION_SOLID
Each section has a unique ID number (SID)
Defines what mathematical algorithm will be used for the
element formation
■ We use elform 2 here, which is a fully integrated S/R
solid
● See here for more details
https://www.dynamore.de/de/download/papers/for
um11/entwicklerforum-2011/erhart.pdf
*PART
1,1,1,0,0,0,0
● Part ID 1
● Section ID 1
● Material ID 1
● All others we usually default
to 0 (can look up in DYNA
manual)
*SECTION_SOLID
1,2
● Section ID is 1
● Element formation (math
algorithm is 2
Materials
●
*MAT_option
○
○
○
○
Defines a particular constituitive model (material model), e.g. *MAT_ELASTIC, or
*MAT_PML_ELASTIC
Each material has a unique ID number (MID)
Each constitutive model has different parameters and different properties
MANY different models you can choose from
*MAT_ELASTIC
1,1.0,100.0,0.48,0.0,0.0,0.0
● Material ID = 1
● Density (rho) = 1
● Young’s Modulus (E) = 100
● Poisson’s Ratio (PR) = 0.48 <= we will increase this later in the semester
● Others unused (axial damping factor, bending damping factor)
How all these things relate
1. Set Up
●
●
Make yourself a folder on the
desktop for your files
Open LS-PrePost 4.3 from within
this directory
○
○
○
You might need to press F11 to get the
named named buttons instead of the
icons
You can download LS-PrePost on your
personal computer from
http://ftp.lstc.com/anonymous/outgoing/l
sprepost/4.3/
2. Create a Cube Mesh
●
●
●
●
●
●
●
Go to Page 7 and select Mesh
Keep Entity as Box_Solid
Create a cube that goes* from
(0,0,-0.1) to (-1.0, 1.0, -1.1) with
10 nodes in each dimension
(specified by Vx, Vy, Vz)
X from -1.0 to 0
Y from 0 to 1.0
Z from -1.1 to -0.1
Click Create => Accept =>
Done
Playing with Visualizer
Play around with some of the tools to visualize your mesh
●
●
●
Shift+Click&Drag to rotate mesh
Shift +Scroll to zoom in and out
Mesh button turns mesh on and off
3. Define Materials
●
●
●
●
Go to page 3 and select *Mat
Select GroupBy: All, sort by Type
Select 001-ELASTIC and click Edit
Click NewID in the pop-up and enter:
○
○
○
○
●
●
TITLE: elastic material
RO = 1.0
E = 100.0
PR = 0.48
Click Accept
Click Done
4. Define Section Properties
●
●
●
On page 3, select *Section
Select SOLID from the list, and click Edit
Click NewID in the pop, up and enter:
○
○
●
●
TITLE: cube
ELFORM = 2
Click Accept
Click Done
*Ignore AET
5. Define Parts
●
●
●
●
●
●
On Page 3, select *Part
Click on [*]PART (1) and select Edit
Use the dropdown menu next to SECID to change it to 1 Cube from 0
Use the dropdown menu next to MID to change it to 1 elastic material from 0
Click Accept
Click Done
6. Set End Time
●
●
●
On page 3 select *Control
Select TERMINATION from the list and click Edit
Enter:
○
○
●
●
ENDTIME: 10
ENDMAS: 0
Click Accept
Click Done
7. Set Control Timestep
●
●
●
●
●
●
On page 3, select *Control
Select TIMESTEP, click Edit
Set DTINIT (initial time step size) to 1.0000E-06
Set TSSFAC (scale factor for computer time step) to 0.02, leave the rest at 0
Click Accept
Click Done
8. Set Output “Database” Parameters
●
●
●
On page 3, select *Dbase
Select BINARY_D3PLOT from the list and click Edit
Set DT to 0.5, Click Accept, Click Done
9. Set Damping Global
●
●
●
●
●
●
Page 3, *Damping
Select Global then Edit
Leave Load Curve ID as 0
Set VALDMP, the system damping constant to 50
Click Accept
Click Done
10. Define the Load Curve
●
●
●
●
●
●
●
●
Page 3, select *Define then select CURVE Then Edit
Select NewID, keep SIDR, SFA and SFO as 0,1,1 (Defaults)
Under A1 (abcissa) and O1 (ordinate) keep 0,0 as the first point, click insert
Put 1,1.0 in to A1 and O1 then hit insert (should show up as line 2)
Put 5, 1.0 in A1 and O1 then hit insert (should show up as line 3)
Put 10, 1.0 in A1 and O1 then hit insert (should show up as line 4)
Hit Accept
Hit Done
11. Define the General Node Set
Page 3, *Set
Then do NODE_GENERAL
NewID to get SID = 1
Then leave default on (ALL)
Accept and Done
12. Use SetD to define groups of nodes
1.
2.
3.
General
Bottom
Top
●
●
●
●
●
Make sure you are in bottom view
Go to page 5, select SetD
Select Radial Button Create (instead of Show)
Title as seen above, and SetID as seen at left. The general
nodeset (step 11) will not have a title, but is still SetID 1.
In the bottom menu select “ByEdge”, then Prop (propagate) is
“on”
○
○
○
●
●
Click nodes (should get a line at at time) until all of your nodes on the face
in question are yellow
If you need to remove a node you accidentally selected, right click to
remove it
Spin to make sure you don’t pick any nodes not on the face in question
When finished hit Apply, back under the right side menu
Repeat for top side
12. Apply Boundary Conditions
Go to page 3, *Boundry, Go to SPC_SET
Click edit, newID, title “constrain bottom”
●
●
●
●
●
●
●
●
NSID = 2 (bottom face)
CID = 0
DOFX = 0
DOFY = 0
DOFZ = 1
DOFRX = 1
DOFRY = 1
DOFRZ = 0
So the bottom face may not translate in z or rotate in x and y, but it may move in x
and y and rotate in z
13. Set Boundaries of Motion (Apply the Load Curve)
●
●
●
●
●
●
●
●
Page 3, go to *Boundary
Go to PRESCRIBED_MOTION_SET
Title it “move top”
NSID to 3 (top)
Set DOF to 3 (z direction translation)
Set VAD to to 2 (displacement as opposed to velocity or acceleration)
Set LCID to 1 from the drop down menu
Set Scale Factor to -0.1
14. Run The Solver
●
●
●
●
Save your keyword file (Save as=> keyword file). Make sure you write your
own file extention (.dyn) as DYNA will not write this for you.
If necessary (first time on this computer), ensure that the environment
variables are set to license:network (not local) and that the Network License
Manager is set to durmstrang.egr.duke.edu
If necessary (first time on this computer), under run select the solver as
ls-dyna_smp_d_R101_winx64_ifort131.exe (you want the one with d for
double not s for single)
Under Run, select “Run LS-DYNA Solver”. In the input file navigate to your
dyna deck you just created. Output file and other defaults are fine. Select Run
○
●
It should take about 90 seconds to run fully. Watch the messag file (or the LSTC manager
screen that will pop up) and make sure it approximately alternates between “write d3plot” and
“flush i/o buffers”
You will know you succeeded if you see NORMAL TERMINATION (instead of
ERROR TERMINATION) at the end of your file
15.Use LS PrePost To Look at Results
Reopen a new instance of LSPP
Open a LSDYNA Binary Plot
Make sure ALL d3plots are in the folder you are pulling from
Click on d3plot (not d3plot01, 02 etc)
16.Analyze Results
On page 1, use Fcomp to see color maps
Try some of the following settings
●
●
●
●
Stress
Ndv
Strain
Infinitesimal
Use the play and pause buttons on the bottom menu to play through your
simulation
Do the results make sense to you? Why or why not?
What you SHOULD see
Infin Z strain
What you SHOULD see
Ndv z displacement