grains.abaqus.Material¶
-
class
grains.abaqus.
Material
(from_Abaqus=False)[source]¶ Adds, removes, modifies materials. Requirements: be able to - create an empty .inp file, containing only the materials - add materials to an existing .inp file
TODO: only document public attributes! .. attribute:: materials
materials, their behaviors and their parameters are stored here. Intended for internal representation. To view them, use the show method, to write them to an input file, use the write method.
- type
dict
Notes
The aim of this class is to programmatically add, remove, modify materials in a format understandable by Abaqus. This class does not target editing materials through a GUI (that can be done in Abaqus CAE).
-
__init__
(from_Abaqus=False)[source]¶ - Parameters
from_Abaqus (bool, optional) – True if the input file was generated by Abaqus. The default is False. Abaqus generates input files with a consistent format. This allows certain optimizations: the input file may not need to be completely traversed to extract the materials. Third-party programs sometimes generate .inp files, which are valid but do not follow the Abaqus pattern. In this case, it cannot be predicted where the material definition ends in the file – the whole file needs to be traversed.
- Returns
None.
Methods
__init__
([from_Abaqus])- Parameters
from_Abaqus (bool, optional) – True if the input file was generated by Abaqus. The default is False.
add_linearelastic
(material, E, nu)Adds linear elastic behavior to a given material.
add_material
(material)Defines a new material by its name.
add_plastic
(material, sigma_y, epsilon_p)Adds metal plasticity behavior to a given material.
add_sections
(inp_file[, output_file])Adds section definitions to an Abaqus .inp file.
create
(inp_file)Creates empty Abaqus .inp file.
read
(inp_file)Reads material data from an Abaqus .inp file.
remove
(inp_file[, output_file])Removes material definitions from an Abaqus .inp file.
show
()Shows material data as it appears in the Abaqus .inp file.
write
([output_file])Writes material data to an Abaqus .inp file.