Skip to content

3.3 DIC control

Eric Breitbarth edited this page Apr 9, 2024 · 1 revision

Install CrackPy using the GOM Aramis Professional v2020 internal Python. You should then be able to import CrackPy in the Aramis Scripting Editor.

We use the module to:

  • detect crack tips
  • calculate actual SIFs
  • export results to txt
  • export results to vtk
  • convert nodemap & connection files to vtk

1. Define names and initialize a GOM Project in CrackPy

# imports
import gom
import crackpy.dic_control.utils as aramis_utils
from crackpy.structure_elements.material import Material

# name definition
PROJECT_NAME = "my_project" 
SPECIMEN_NAME = "this_specimen"  
EXPERIMENT_NAME = "this_experiment"  

# Initialization

material = Material(E=72000, nu_xy=0.33, sig_yield=350.0)
gom_project = aramis_utils.DicToCrackPy(gom_app=gom.app, gom_script=gom.script, project_name=PROJECT_NAME, specimen_name=SPECIMEN_NAME, experiment_name=EXPERIMENT_NAME, material=material)

2. Setup crack detection and detect actual crack tips

The interpolation size should fit into the specimen, i.e. must not be larger than the specimen. The offset defines the distance between origin (in the gom project) and left edge of the interpolation area.

# new imports
import os

# setup detection
gom_project.setup_cracktip_detection(side="right", interp_size=25.0, offset=(5.0, 0.0), export_folder=os.path.join("path","to","folder"), crack_path_radius=70)
# with interp_size, offset in mm, export_folder the rel. path from the aramis project, crack_path_radius in px

# detection of crack tip in current stage
crack_tip = gom_project.detect_actual_crack_tip() 

3. Calculate the SIFs for the actual stage

sifs = gom_project.calc_actual_sifs(cr_info=crack_tip, int_props="auto")

4. Export stages

For export, stages have to be defined that should be exported, i.e. either "all" or a list of stages (counting from 0). Make sure that all stages are set active. Otherwise, the indexing of stages is probably wrong.

stages="all"
gom_project.export_data(stage_indxs=stages) # exports to a folder named 'aramis_to_txt'. But you can also add the keyword export_folder="name_you_whish" 

or to vtk

stages="all"
gom_project.export_data_to_vtk(stage_indxs=stages) # exports to a folder named 'aramis_to_vtk'

5. Define value elements

gom_project.define_value_element(name="CrackTipX", dtype="float", unit = "LENGTH")
gom_project.define_value_element(name="CrackTipY", dtype="float", unit = "LENGTH")
gom_project.define_value_element(name="CrackAngle", dtype="float", unit = "ANGLE")'

Next, value elements can be filled with values per stage or constantly over all stages

gom_project.write_to_value_element(name="CrackTipX", stage_indx ="actual",value=float(crack_tip.crack_tip_x), is_constant=False)

We recommend the following naming conventions for compatibility with other CrackPy modules:

Load: 'force',
Cycles: 'cycles',
Displacements: 'displacement',
Potential: 'potential',
Projected Crack Length: 'cracklength',
Time Stamp: 'time',
DMS: 'dms_1', 'dms_2', ...