Command Language & Python Extensions

[Pages:70]Command Language & Python Extensions

Version 8.0

Fracture Analysis Consultants, Inc

Revised: November 2021

Table of Contents:

Table of Contents:........................................................................................................................... 2 1. Introduction................................................................................................................................. 5 2. Command File Syntax................................................................................................................. 5

2.1 Commands ............................................................................................................................ 9 2.1.1 AutoGrowth( )................................................................................................................ 9 2.1.1.1 sif_params ............................................................................................................ 10 2.1.1.2 growth_params..................................................................................................... 10 2.1.1.3 growth_plan ......................................................................................................... 13 2.1.1.4 growth_variables.................................................................................................. 13 2.1.1.5 template_params .................................................................................................. 13 2.1.1.6 front_fitting_params ............................................................................................ 14 2.1.1.7 general_analysis_options ...................................................................................... 14 2.1.2 CheckGrowthStatus( ).................................................................................................. 18 2.1.3 CloseModel( ) .............................................................................................................. 18 2.1.4 ComputeCOD( )........................................................................................................... 19 2.1.5 ComputeGrowthParams( ) ........................................................................................... 19 2.1.6 ComputeSif( )............................................................................................................... 19 2.1.7 CrackTractConst( )....................................................................................................... 19 2.1.7.1 CFT index and load case....................................................................................... 20 2.1.8 CrackTractDelete( ) ..................................................................................................... 20 2.1.9 CrackTractExternalDist( )............................................................................................ 20 2.1.10 CrackTractSurface( ).................................................................................................. 21 2.1.11 CrackTract1DRad( )................................................................................................... 21 2.1.12 CrackTract2DRad( )................................................................................................... 22 2.1.13 FretModelImport( ) .................................................................................................... 22 2.1.14 FretNucleationCycles( ) ............................................................................................. 23 2.1.15 FretNucleationDataImport( ) ..................................................................................... 23 2.1.16 GetBuildInfo( )........................................................................................................... 24 2.1.17 GetCrackData( ) ........................................................................................................ 24 2.1.18 GetIntegrationResults( )............................................................................................. 24 2.1.19 GetGrowthStatus( ) .................................................................................................... 24 2.1.20 GrowCrack( ) ............................................................................................................. 24 2.1.21 GrowCrackFromFile( ) .............................................................................................. 25 2.1.22 GrowMergeCrack ( ).................................................................................................. 25 2.1.23 Include( ) .................................................................................................................... 26 2.1.24 InsertFileFlaw( )......................................................................................................... 26 2.1.24.1 flaw_insert_params ............................................................................................. 26 2.1.25 InsertMultFileFlaw( )................................................................................................. 27 2.1.26 InsertMultParamFlaw( )............................................................................................. 27 2.1.27 InsertParamFlaw( )..................................................................................................... 28 2.1.28 InsertUserBdryFlaw( ) ............................................................................................... 29 2.1.29 InsertUserMeshFlaw( ) .............................................................................................. 29 2.1.30 IntegrateStep( )........................................................................................................... 30

2

2.1.31 OpenFdbModel( )....................................................................................................... 30 2.1.32 OpenMeshModel( ) .................................................................................................... 31 2.1.33 ReadFullGrowthHist ( ) ............................................................................................. 31 2.1.34 ReadGrowthParams ( )............................................................................................... 31 2.1.35 ReadResponse( ) ........................................................................................................ 32 2.1.36 RunAnalysis( ) ........................................................................................................... 32 2.1.37 SaveFdbModel( ) ....................................................................................................... 32 2.1.38 SaveGrowthParams( ) ................................................................................................ 33 2.1.39 SaveMeshModel( )..................................................................................................... 33 2.1.40 SetEdgeParameters( )................................................................................................. 34 2.1.41 SetGrowthParams( )................................................................................................... 34 2.1.42 SetLoadSchedule( ) .................................................................................................... 35 2.1.43 SetMeshingParameters( ) ........................................................................................... 35 2.1.44 SetStatusFile( )........................................................................................................... 36 2.1.45 SetUnits( ) .................................................................................................................. 36 2.1.46 SetUserExtensionsFile( ) ........................................................................................... 36 2.1.47 SetWorkingDirectory( ) ............................................................................................. 37 2.1.48 SifHistory( ) ............................................................................................................... 37 2.1.49 StartRecording( ) ....................................................................................................... 38 2.1.50 Submodeler( )............................................................................................................. 38 2.1.51 WriteCOD( ) .............................................................................................................. 39 2.1.52 WriteCrackData( )...................................................................................................... 39 2.1.53 WriteEPJ( )................................................................................................................. 40 2.1.54 WriteFatigueData( ) ................................................................................................... 40 2.1.55 WriteGrowthData( ) ................................................................................................... 41 2.1.56 WriteGrowthParams( )............................................................................................... 42 2.1.57 WriteResolvedSif( ) ................................................................................................... 42 2.1.58 WriteResolvedSifPath( ) ............................................................................................ 43 2.1.59 WriteSERR( )............................................................................................................. 44 2.1.60 WriteSif( ) .................................................................................................................. 44 2.1.61 WriteSifPath( ) ........................................................................................................... 45 2.1.62 WriteSifHistory( ) ...................................................................................................... 46 2.1.63 WriteStdTempData( )................................................................................................. 46 2.2 Example Command File ..................................................................................................... 46 3. Python Module.......................................................................................................................... 49 3.1 Command Converter ........................................................................................................... 49 3.2 Python Module.................................................................................................................... 49 3.2.1 Setting the Path ............................................................................................................ 50 3.2.2 class F3DApp............................................................................................................... 51 3.2.3 class CrackData............................................................................................................ 60 3.2.4 class CrackStep ............................................................................................................ 61 3.2.5 class CrackFront........................................................................................................... 61 3.2.6 class FrontPoint............................................................................................................ 62 3.2.7 class IntegrationResults ............................................................................................... 63 4. Python Crack Growth Extensions ............................................................................................. 64 4.1 Data Access Functions ........................................................................................................ 65

3

4.2 Specifying a user extension file .......................................................................................... 67 4.3 Example user extension files .............................................................................................. 68

4

1. Introduction

This document describes the FRANC3D command language and the Python extensions.

The PyF3D module works with Python versions 3.6 - 3.9. If your system does not have one of these versions, you can download (and build) Python yourself (see ).

Note that the PATH and PYTHONPATH environment variables might need to be set for all the Python modules to work correctly. The folder that contains the franc3d executable and the PyF3D modules can be added to these environment variables. Additional information is provided in Section 3.

2. Command File Syntax

When running FRANC3D using the standard GUI menu and dialogs, a session file is saved that contains the commands executed through the GUI. A user can play-back these commands to reproduce their actions or edit the file to execute different or modified commands without using the GUI.

These session files contain a series of command statements. In command files, lines starting with '#' are comment lines. Informally, the command statements look something like:

command_a(param_1=value1,param_2="string param")

The syntax diagram for a command file is:

command file

command

command string

param list

param list

(

string = value

)

,

5

Each parameter value is one of the following types:

value

string int float bool

vec3d string array

int array float array bool array vec3d array check list int array array float array array

Where the types are defined as:

6

string

plain string quoted string

plain string

A-Z,a-z,or _

A-Z,a-z,0-9,_,or -

quoted string

"

"

any character except "

'

'

any character except '

int 0-9

-

float -

. 0-9

0-9 0-9

e

+

0-9

E

-

bool True

False

7

vec3d [ float , float , float ]

string array

[

string

]

,

int array

[

int

]

,

float array

[

float

]

,

bool array

[

bool

]

,

vec3d array

[

vec3d

]

,

check list

[

check item

]

,

8

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download