Professional Documents
Culture Documents
Lars P. Mikkelsen
DTU Wind Energy
3 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Step-by-step
• Before starting input the following line
– session.journalOptions.setValues(replayGeometry=COORDINATE,
recoverGeometry=COORDINATE)
• Follow the instructions on the previous slide and build up the model. End
with saving the model to a cae-file and look at the content of the jnl-file
using an text-editor e.g. the open source editor notepad++.
• Click e.g. the save bottom between each element in the build up in order
to be able to split up the part in the script
• Build up the script and make clean up during the scripting
4 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
First element in the script: Square box
5 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Build a script for square box using notepad++
6 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Structured script
.
Always included
7 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Structured script with parameters
8 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Use “print()” to check content of variables
9 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Define
functions
10 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Move functions to separate file
11 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Add set names to part
Run this first
session.journalOptions.setValues(replayGeometry=COORDINATE,
recoverGeometry=COORDINATE)
Then this is coming from a set-name definition
12 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Defined as set-naming function
13 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Complete script (1/2)
14 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Complete script (2/2)
15 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Functions
16 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Post-processing and output
17 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
Post processing as a separate rutine
Remember to include the top:
18 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018
How to start
• Make an empty cae-file and click on that. Thereby, from abaqus import *
Abaqus will use that folder as the working folder and
from abaqusConstants import *
save all files there
from part import *
• Make an empty py-file and add the lines shown to the
right
from material import *
from section import *
• Run the following command in the scripting part of
the Abaqus GUI window in order to get coordinates from assembly import *
out from the click operations from step import *
– session.journalOptions.setValues(replayGeometr from interaction import *
y=COORDINATE, from load import *
recoverGeometry=COORDINATE) from mesh import *
• Define the following parameter and start building up from optimization import *
the model replacing “mdb.models(‘xxx’)” with from job import *
modelObj from sketch import *
– NameModel=‘NewModelName' from visualization import *
– modelObj = mdb.Model(name=NameModel) from connectorBehavior import *
• From the demo video in the link to the right LINK to demo video on starting
note that “model-1” is not changed. Will make up a script. See this video before
it easier to reset and run the script multiple starting
times. https://www.youtube.com/w
atch?v=VMxSzdtpzJg
• See the content and run the start-up script
Box00PreProcesssStart.py
19 DTU Wind Energy, Technical University of Denmark Topic 3b, Box scripting Spring 2018