Input File Parser¶
The inpParser module provides functions that allow you to parse an Abaqus input file.
Create input files¶
-
class InputFile(file, directory=
''
)[源代码]¶ 基类:
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.
备注
This object can be accessed by:
import inpParser
备注
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` =
''
[源代码]¶ A String specifying the directory where the input file is located.
-
file : --is-rst--:py:class:`str` =
''
[源代码]¶ A String specifying the source file name of the Abaqus input file.
-
includes : --is-rst--:py:class:`tuple`\ \[:py:class:`str`, :py:data:`...<Ellipsis>`] =
()
[源代码]¶ 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>`] =
()
[源代码]¶ 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
)[源代码]¶ This method parses the input file associated with the InputFile object.
备注
- 参数:¶
- 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=
- 返回:¶
A KeywordSequence object.
- 返回类型:¶
KeywordSequence
- 抛出:¶
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[源代码]¶
基类:
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.
备注
Member Details:
- class Keyword[源代码]¶
基类:
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.
备注
This object can be accessed by:
import inpParser
备注
Check Keyword on help.3ds.com/2024.
Member Details:
-
comments : --is-rst--:py:class:`tuple`\ \[:py:class:`str`, :py:data:`...<Ellipsis>`] =
()
[源代码]¶ 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` =
()
[源代码]¶ 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>`] =