You are on page 1of 3

3/28/2017

FRANC3D Training Workshop:


Part IX
April - 2017

Drs. Bruce Carter, Paul Wash


Wawrzynek, Tony Ingraffea, and
Omar Ibrahim

Fracture Analysis
Consultants, Inc.

Workshop Agenda

Part I: Introduction to Fracture Mechanics Analysis


Part II: Introduction to FRANC3D
Part III: Finite Element (FE) Model Import
Part IV: Crack Insertion
Part V: Static Crack Analysis & SIF Computation
Part VI: Crack Growth
Part VII: Multiple/Variable DOF Approach to Fatigue Life
Part VIII: SIF History & Fatigue Life
Part IX: Session Log, Command Line and Python Interface
Part X: Miscellaneous

2
Part I

1
3/28/2017

FRANC3D Session Log and Playback


A session##.log file is saved for each FRANC3D GUI
session. As GUI commands are executed, the command is
written to the session log. An example session:
OpenMeshModel(
model_type=ANSYS,
file_name='cube_orig.cdb',
extra_files=['cube_orig.s01','cube_orig.s02'],
retained_nodes_file='cube_orig_RETAINED.txt')

InsertFileFlaw(
file_name='test.crk',
radius=0.0081)

RunAnalysis(
model_type=ANSYS,
file_name='test.fdb',
flags=[OUTPUT_MAT,OUTPUT_CS,NO_WRITE_TEMP,TRANSFER_BC,NO_CFACE_TRACT,NO_CFACE_CNTCT],
connection_type=MERGE,
element_series_type=SOLID_185_187,
executable='ANSYS150.exe',
command='"ANSYS150.exe" -b -p struct -m 4000 -db 1000 -i "test.macro" -o "test.out"',
offset_mat=0,
offset_csys=0,
license=struct,
crack_face_contact=false)

ComputeSif(
do_therm_terms=true,
ref_temp=71.6) 3
Part VII

FRANC3D Session Log and Playback


The session can be played back in the GUI:
from FRANC3D menu, choose File Playback

Choose the
session log
to playback
The file can also be and Accept.
played back from a
Command/Terminal
window:
> franc3d -batch ses.log

4
Part VII

2
3/28/2017

FRANC3D Python Programming Interface


The FRANC3D program has a programming interface that is an
extension to the Python programming language.
Python is an open source, object oriented, scripting language,
which is popular in engineering and scientific computing
community (e.g., it is used to drive the ABAQUS GUI).
The Python interface allows one to automate repetitive and
possibly error prone tasks.
It also provides a possible strategy for coupling FRANC3D with
other computational applications.

5
Part VII

A simple PyF3D Program


import PyF3D
The session log easily converted to Python.
f3d = PyF3D.F3DApp() Modify this to insert many cracks:
f3d.OpenMeshModel( # lists of crack size parameters to
model_type="ANSYS",
file_name='cube_orig.cdb', a_sizes = [0.0160, 0.0320, 0.0480,0.0640, 0.0787, 0.2362, 0.3937]
extra_files='cube_orig.s01','cube_orig.s02', b_sizes = [0.0160, 0.0787, 0.2362, 0.3937]
retained_nodes_file='cube_orig_RETAINED.txt')
# loop through the crack size matrix
f3d.InsertFileFlaw(
file_name='test.crk', for a in a_sizes:
radius=0.0081) for b in b_sizes:
# create flaw, insert it, and run analysis
f3d.RunAnalysis(
model_type="ANSYS",
file_name='test.fdb',
flags=["OUTPUT_MAT","OUTPUT_CS","NO_WRITE_TEMP","TRANSFER_BC","NO_CFACE_TRACT","NO_CFACE_CNTCT"],
connection_type="MERGE",
element_series_type="SOLID_185_187",
executable='ANSYS150.exe',
command='"ANSYS150.exe" -b -p struct -m 4000 -db 1000 -i "test.macro" -o "test.out"',
offset_mat=0,
offset_csys=0,
license="struct",
crack_face_contact=False)

f3d.ComputeSif(
do_therm_terms=True,
ref_temp=71.6) 6
Part VII

You might also like