Input File Parser¶
The inpParser module provides functions that allow you to parse an Abaqus input file.
Create input files¶
-
class InputFile(file, directory=
''
)[source]¶ Bases:
object
The InputFile object is used to store the definitions in an Abaqus input file. InputFile objects can be created using the methods described in this section.
Note
This object can be accessed by:
import inpParser
Note
Public Data Attributes:
A String specifying the source file name of the Abaqus input file.
A String specifying the directory where the input file is located.
A sequence of Strings specifying any additional input files included in the specified input file.
A sequence of Strings for input files included in the specified input file that could not be located.
Public Methods:
__init__
(file[, directory])This method creates an InputFile object by reading an Abaqus input file.
parse
([organize, verbose, bulk, usePyArray])This method parses the input file associated with the InputFile object.
Member Details:
-
directory : --is-rst--:py:class:`str` =
''
[source]¶ A String specifying the directory where the input file is located.
-
file : --is-rst--:py:class:`str` =
''
[source]¶ A String specifying the source file name of the Abaqus input file.
-
includes : --is-rst--:py:class:`tuple`\ \[:py:class:`str`, :py:data:`...<Ellipsis>`] =
()
[source]¶ A sequence of Strings specifying any additional input files included in the specified input file.
-
missingIncludes : --is-rst--:py:class:`tuple`\ \[:py:class:`str`, :py:data:`...<Ellipsis>`] =
()
[source]¶ A sequence of Strings for input files included in the specified input file that could not be located.
-
parse(organize=
False
, verbose=False
, bulk=True
, usePyArray=False
)[source]¶ This method parses the input file associated with the InputFile object.
Note
- Parameters:¶
- organize=
False
¶ A Boolean specifying whether keywords should be organized into suboptions. The default is False.
- verbose=
False
¶ A Boolean specifying whether verbose output is to be printed. If verbose is True, information about fatal errors is printed. If no fatal errors occur, there is no output. The default is False.
- bulk=
True
¶ A Boolean specifying whether the input file includes bulk data that should be parsed. The default is True.
- usePyArray=
False
¶ A Boolean specifying that parse method can return an AbaqusNDarray object for a keyword data value. In cases where large amounts of numerical data (i.e., large node arrays) are expected, it is recommended that you use the option usePyArray=True. The default is False.
- organize=
- Returns:¶
A KeywordSequence object.
- Return type:¶
KeywordSequence
- Raises:¶
ValueError – If you parse an input file more than once, a ValueError is raised for each subsequent parsing.
-
directory : --is-rst--:py:class:`str` =
Other Classes¶
- class AbaqusNDarray[source]¶
Bases:
object
The AbaqusNDarray object is a sequence object derived from numpy.ndarray and is used to store numeric keyword data from an Abaqus input file. This object is similar to the numpy.ndarray object, but the numeric elements are returned as standard Python objects, not numpy numeric types. The numeric elements can be:
All ints.
All floats.
First column int, all other columns floats.
In the last of these cases, the member colZeroIsInt will be True; in the other two cases, it will be False.
Note
Member Details:
- class Keyword[source]¶
Bases:
object
The Keyword object is used to store a keyword definition from an Abaqus input file. Keyword objects are returned via the InputFile.parse() method.
Note
This object can be accessed by:
import inpParser
Note
Check Keyword on help.3ds.com/2021.
Member Details:
-
comments : --is-rst--:py:class:`tuple`\ \[:py:class:`str`, :py:data:`...<Ellipsis>`] =
()
[source]¶ A sequence of Strings specifying the comments.
-
data : --is-rst--:py:class:`tuple`\ \[:py:class:`tuple`\ \[:py:class:`float`, :py:data:`...<Ellipsis>`], :py:data:`...<Ellipsis>`] | :py:class:`~abaqus.InputFileParser.AbaqusNDarray.AbaqusNDarray` =
()
[source]¶ A sequence of sequences or an AbaqusNDarray object specifying the keyword data. The type of the leaf objects depends on the keyword. The AbaqusNDarray object is returned only if the data is suitable and if the InputFile.parse() method was called with the option usePyArray=True. In cases where large amounts of numerical data (i.e., large node arrays) are expected, it is recommended that you use the option usePyArray=True.
-
comments : --is-rst--:py:class:`tuple`\ \[:py:class:`str`, :py:data:`...<Ellipsis>`] =