MODSIM_TEMPLATE CLI#

rectangle_geometry.py#

Create a simple rectangle geometry and write an output_file.cae Abaqus model file.

usage: abaqus cae -noGui rectangle_geometry.py -- [-h]
                                                  [--output-file OUTPUT_FILE]
                                                  [--model-name MODEL_NAME]
                                                  [--part-name PART_NAME]
                                                  [--width WIDTH]
                                                  [--height HEIGHT]

Named Arguments#

--output-file

The output file for the Abaqus model. Will be stripped of the extension and .cae will be used, e.g. output_file.cae

Default: 'rectangle_geometry'

--model-name

The name of the Abaqus model

Default: 'rectangle'

--part-name

The name of the Abaqus part

Default: 'rectangle'

--width

The rectangle width. Positive float.

Default: 1.0

--height

The rectangle height. Positive float.

Default: 1.0

rectangle_partition.py#

Partition the simple rectangle geometry created by rectangle_geometry.py and write an output_file.cae Abaqus model file.

usage: abaqus cae -noGui rectangle_partition.py -- [-h]
                                                   [--input-file INPUT_FILE]
                                                   [--output-file OUTPUT_FILE]
                                                   [--model-name MODEL_NAME]
                                                   [--part-name PART_NAME]
                                                   [--width WIDTH]
                                                   [--height HEIGHT]

Named Arguments#

--input-file

The Abaqus model file created by rectangle_geometry.py. Will be stripped of the extension and .cae will be used, e.g. input_file.cae

Default: 'rectangle_geometry'

--output-file

The output file for the Abaqus model. Will be stripped of the extension and .cae will be used, e.g. output_file.cae

Default: 'rectangle_partition'

--model-name

The name of the Abaqus model

Default: 'rectangle'

--part-name

The name of the Abaqus part

Default: 'rectangle'

--width

The rectangle width. Positive float.

Default: 1.0

--height

The rectangle height. Positive float.

Default: 1.0

rectangle_mesh.py#

Mesh the simple rectangle geometry partitioned by rectangle_partition.py and write an output_file.cae Abaqus model file and output_file.inp orphan mesh file.

usage: abaqus cae -noGui rectangle_mesh.py -- [-h] [--input-file INPUT_FILE]
                                              [--output-file OUTPUT_FILE]
                                              [--model-name MODEL_NAME]
                                              [--part-name PART_NAME]
                                              [--global-seed GLOBAL_SEED]

Named Arguments#

--input-file

The Abaqus model file created by rectangle_partition.py. Will be stripped of the extension and .cae will be used, e.g. input_file.cae

Default: 'rectangle_partition'

--output-file

The output file for the Abaqus model. Will be stripped of the extension and .cae will be used, e.g. output_file.cae

Default: 'rectangle_mesh'

--model-name

The name of the Abaqus model

Default: 'rectangle'

--part-name

The name of the Abaqus part

Default: 'rectangle'

--global-seed

The global mesh seed size. Positive float.

Default: 1.0

export_abaqus_image.py#

Save an assembly view image of an Abaqus model from an input or CAE file

usage: abaqus cae -noGui export_abaqus_image.py -- [-h] --input-file
                                                   INPUT_FILE --output-file
                                                   OUTPUT_FILE
                                                   [--x-angle X_ANGLE]
                                                   [--y-angle Y_ANGLE]
                                                   [--z-angle Z_ANGLE]
                                                   [--image-size IMAGE_SIZE IMAGE_SIZE]
                                                   [--model-name MODEL_NAME]
                                                   [--part-name PART_NAME]
                                                   [--color-map {Material,Section,Composite layup,Composite ply,Part,Part instance,Element set,Averaging region,Element type,Default,Assembly,Part geometry,Load,Boundary condition,Interaction,Constraint,Property,Meshability,Instance type,Set,Surface,Internal set,Internal surface,Display group,Selection group,Skin,Stringer,Cell,Face}]

Named Arguments#

--input-file

Abaqus input file. Supports *.inp and *.cae.

--output-file

Output image from the Abaqus viewport. Supports *.png, *.svg and *.eps.

--x-angle

Viewer rotation about X-axis in degrees (default: 0.0)

Default: 0.0

--y-angle

Viewer rotation about Y-axis in degrees (default: 0.0)

Default: 0.0

--z-angle

Viewer rotation about Z-axis in degrees (default: 0.0)

Default: 0.0

--image-size

Image size in pixels (X, Y) (default: (1920, 1080))

Default: (1920, 1080)

--model-name

Abaqus model name (default: ‘Model-1’)

Default: 'Model-1'

--part-name

Abaqus part name (default: ‘Part-1’)

Default: 'Part-1'

--color-map

Possible choices: Material, Section, Composite layup, Composite ply, Part, Part instance, Element set, Averaging region, Element type, Default, Assembly, Part geometry, Load, Boundary condition, Interaction, Constraint, Property, Meshability, Instance type, Set, Surface, Internal set, Internal surface, Display group, Selection group, Skin, Stringer, Cell, Face

Color map (default: ‘Material’)

Default: 'Material'

post_processing.py#

Read Xarray Datasets and plot stress-strain comparisons as a function of parameter set name. Save to output_file.

usage: python post_processing.py  [-h] -i INPUT_FILE [INPUT_FILE ...]
                                  --x-units X_UNITS --y-units Y_UNITS
                                  [-o OUTPUT_FILE] [-g GROUP_PATH] [-x X_VAR]
                                  [-y Y_VAR] [-s SELECTION_DICT]
                                  [-p PARAMETER_STUDY_FILE]
                                  [--csv-regression-file CSV_REGRESSION_FILE]

Named Arguments#

-o, --output-file

The output file for the stress-strain comparison plot with extension, e.g. output_file.pdf. Extension must be supported by matplotlib. File stem is also used for the CSV table output, e.g. output_file.csv. (default: ‘post_processing.pdf’)

Default: 'post_processing.pdf'

-g, --group-path

The h5py group path to the dataset object (default: ‘RECTANGLE/FieldOutputs/ALL_ELEMENTS’)

Default: 'RECTANGLE/FieldOutputs/ALL_ELEMENTS'

-x, --x-var

The independent (x-axis) variable name (default: ‘E’)

Default: 'E'

-y, --y-var

The dependent (y-axis) variable name (default: ‘S’)

Default: 'S'

-s, --selection-dict

The YAML formatted dictionary file to define the down selection of data to be plotted. Dictionary key: value pairs must match the data variables and coordinates of the expected Xarray Dataset object. If no file is provided, the a default selection dict will be used (default: {‘E values’: ‘E22’, ‘S values’: ‘S22’, ‘elements’: 1, ‘step’: ‘Step-1’, ‘integration point’: 0})

-p, --parameter-study-file

An optional h5 file with a WAVES parameter study Xarray Dataset (default: None)

--csv-regression-file

An optional CSV file to compare with the current plot data. If the CSV file data and the current plot data do not match, a non-zero exit code is returned (default: None)

required named arguments#

-i, --input-file

The Xarray Dataset file(s)

--x-units

The dependent (x-axis) units string.

--y-units

The independent (y-axis) units string.

regression.py#

Compare CSV files and return an error code if they differ

usage: python regression.py  [-h] [--output-file OUTPUT_FILE]
                             FIRST_FILE SECOND_FILE

Positional Arguments#

FIRST_FILE

First CSV file for comparison

SECOND_FILE

Second CSV file for comparison

Named Arguments#

--output-file

Regression test pass/fail list

Default: regression.yaml