Abaqus Model Database¶
Mdb commands are used to create and upgrade an Abaqus model database that stores models and analysis controls.
Objects in Mdb
Classes¶
Mdb¶
-
class Mdb(pathName=
''
)[源代码]¶ -
The Mdb object is the high-level Abaqus model database. A model database stores models and analysis controls.
备注
This object can be accessed by:
mdb
备注
Check Mdb on help.3ds.com/2022.
Public Data Attributes:
Inherited from
MdbBase
An Int specifying the release number of the Mdb object in memory.
A Float specifying the value of a counter associated with the Mdb object.
A repository of Job objects.
A repository of AdaptivityProcess objects.
A repository of Coexecution objects.
A repository of OptimizationProcess objects.
A MeshEditOptions object specifying the undo/redo behavior when editing meshes on parts or part instances.
A repository of Model objects.
A RepositorySupport object.
A repository of Annotation objects.
Public Methods:
Model
(name, *args, **kwargs)This method creates a Model object.
ModelFromInputFile
(name, inputFileName)This method creates a Model object by reading the keywords in an input file and creating the corresponding Abaqus/CAE objects.
ModelFromOdbFile
(name, odbFileName)This method creates a Model object by reading an output database and creating any corresponding Abaqus/CAE objects.
ModelFromNastranFile
(modelName, inputFileName)This method creates a Model object by reading the keywords in a Nastran bulk data file or Nastran input file and creating any corresponding Abaqus/CAE objects.
Inherited from
AcisMdb
openAcis
(fileName[, scaleFromFile])This method creates an AcisFile object from a file containing ACIS-format geometry.
openCatia
(fileName[, topology, ...])This method creates an AcisFile object from a file containing V5-format geometry.
openEnf
(fileName, fileType[, topology, ...])This method creates an AcisFile object from a file containing Elysium Neutral File-format geometry that was created by CATIA V5, I-DEAS, or Pro/ENGINEER.
openIges
(fileName[, trimCurve, ...])This method creates an AcisFile object from a file containing IGES-format geometry.
openParasolid
(fileName[, topology])This method creates an AcisFile object from a file containing Parasolid-format geometry.
openStep
(fileName[, scale])This method creates an AcisFile object from a file containing STEP-format geometry.
openVda
(fileName)This method creates an AcisFile object from a file containing VDA-FS-format geometry.
openSolidworks
(fileName[, topology])This method creates an AcisFile object from a file containing Solidworks format geometry.
Inherited from
JobMdb
Job
(name, model[, description, type, queue, ...])This method creates an analysis job using a model on a model database (MDB) for the model definition.
JobFromInputFile
(name, inputFileName[, ...])This method creates an analysis job using an input file for the model definition.
OptimizationProcess
(name, model, task, ...)This method creates an OptimizationProcess object.
Inherited from
MdbBase
__init__
([pathName])This constructor creates an empty Mdb object.
importDxf
(fileName)This method creates a ConstrainedSketch object from a file containing dxf-format (AutoCAD) geometry.
openMdb
(pathName)This method opens an existing model database file.
close
()This method closes an open Mdb object but does not save the Mdb object to disk.
save
()This method saves an Mdb object to disk at the location specified by pathName (pathName is a member of the Mdb object).
saveAs
(pathName)This method saves an Mdb object to disk at the specified location.
openAuxMdb
(pathName)This method opens an auxiliary Mdb object on the disk at the specified location.
This method closes the auxiliary Mdb which had been opened earlier using the openAuxMdb command.
This method returns a list of model names present in the auxiliary Mdb which had been opened earlier using the openAuxMdb command.
copyAuxMdbModel
(fromName[, toName])This method copies a specified model from the auxiliary Mdb which had been opened earlier using the openAuxMdb command.
Member Details:
Click to show
- Model(name, *args, **kwargs)[源代码]¶
This method creates a Model object.
备注
This function can be accessed by:
mdb.Model
备注
Check Model on help.3ds.com/2022.
- ModelFromInputFile(name, inputFileName)[源代码]¶
This method creates a Model object by reading the keywords in an input file and creating the corresponding Abaqus/CAE objects.
备注
This function can be accessed by:
mdb.ModelFromInputFile
备注
-
ModelFromNastranFile(modelName, inputFileName, sectionConsolidation=
abaqusConstants.PRESERVE_SECTION
, preIntegratedShell=0
, weightMassScaling=1
, loadCases=1
, coupleBeamOffsets=1
, cbar=abaqusConstants.B31
, cquad4=abaqusConstants.S4
, chexa=abaqusConstants.C3D8I
, ctetra=abaqusConstants.C3D10
, keepTranslatedFiles=1
)[源代码]¶ This method creates a Model object by reading the keywords in a Nastran bulk data file or Nastran input file and creating any corresponding Abaqus/CAE objects. The default values is discussed in following and can be defined alternatively in the Abaqus environment file as the one used for the translator from Nastran to Abaqus. For more information, see Translating Nastran data to Abaqus files.
备注
This function can be accessed by:
mdb.ModelFromNastranFile
- 参数:¶
- modelName¶
A String specifying the repository key.
- inputFileName¶
A String specifying the name of the Nastran input file (including the .bdf, .dat, .nas, .nastran, .blk, .bulk extension) to be read into the new model. This String can also be the full path to the Nastran input file if it is located in another directory.
- sectionConsolidation=
abaqusConstants.PRESERVE_SECTION
¶ A SymbolicConstant specifying the method used to create shell section. Possible values are PRESERVE_SECTION, GROUP_BY_MATERIAL, and NONE. If PRESERVE_SECTION is used, an Abaqus section is created corresponding to each shell property ID. If GROUP_BY_MATERIAL is used, a single Abaqus section is created for all homogeneous elements referencing the same material. In both cases, material orientations and offsets are created using discrete fields. If NONE is used, a separate shell section is created for each combination of orientation, material offset, and/or thickness. The default is PRESERVE_SECTION.
- preIntegratedShell=
0
¶ A Boolean specifying whether the pre-integrated shell section is created in default for shell element. The default value is OFF.
- weightMassScaling=
1
¶ A Boolean specifying whether the value on the Nastran data line PARAM, WTMASS is used as a multiplier for all density, mass, and rotary inertia values created in the Abaqus input file. The default value is ON.
- loadCases=
1
¶ A Boolean specifying whether each SUBCASE for linear static analyses is translated to a LOAD CASE option, and all such LOAD CASE options are grouped in a single STEP option. The default value is ON.
- coupleBeamOffsets=
1
¶ A Boolean specifying whether to translate the beam element connectivity to newly created nodes at the offset location and rigidly coupling the new and original nodes. If not, beam element offsets are translated to the CENTROID and SHEAR CENTER options, which are suboptions of the BEAM GENERAL SECTION option. The default value is ON. When the beam element references a PBARL or PBEAML property or if the beam offset has a significant component in the direction of the beam axis, the setting for this argument is always ON.
- cbar=
abaqusConstants.B31
¶ A String specifying the 2-node beam that is created from CBAR and CBEAM elements. Possible values are B31 and B33. The default is B31.
- cquad4=
abaqusConstants.S4
¶ A String specifying the 4-node shell that is created from CQUAD4 elements. Possible values are S4 and S4R. The default is S4. If a reduced-integration element is chosen, the enhanced hourglass formulation is applied automatically.
- chexa=
abaqusConstants.C3D8I
¶ A String specifying the 8-node brick that is created from CHEXA elements. Possible values are C3D8I, C3D8 and C3D8R. The default is C3D8I. If a reduced-integration element is chosen, the enhanced hourglass formulation is applied automatically.
- ctetra=
abaqusConstants.C3D10
¶ A String specifying the 10-node tetrahedron that is created from CTETRA elements. Possible values are C3D10 and C3D10M. The default is C3D10.
- keepTranslatedFiles=
1
¶ A Boolean specifying whether to keep the generated Abaqus input file after the model is created from the Nastran input file. The default value is ON.
- 返回:¶
A Model object.
- 返回类型:¶
Other Classes¶
Click to show
-
class MdbBase(pathName=
''
)[源代码]¶ 基类:
object
The Mdb object is the high-level Abaqus model database. A model database stores models and analysis controls.
备注
This object can be accessed by:
mdb
备注
Check MdbBase on help.3ds.com/2022.
Member Details:
Click to show
-
adaptivityProcesses : --is-rst--:py:class:`dict`\[:py:class:`str`, :py:class:`~abaqus.Adaptivity.AdaptivityProcess.AdaptivityProcess`] =
{}
[源代码]¶ A repository of AdaptivityProcess objects.
-
annotations : --is-rst--:py:class:`dict`\[:py:class:`str`, :py:class:`~abaqus.Annotation.Annotation.Annotation`] =
{}
[源代码]¶ A repository of Annotation objects.
- close()[源代码]¶
This method closes an open Mdb object but does not save the Mdb object to disk.
After closing the Mdb object, this method creates a new unnamed empty Mdb object.
- closeAuxMdb()[源代码]¶
This method closes the auxiliary Mdb which had been opened earlier using the openAuxMdb command.
- 抛出:¶
MdbError – The auxiliary Mdb was not opened; If the auxiliary Mdb was not opened earlier
-
coexecutions : --is-rst--:py:class:`dict`\[:py:class:`str`, :py:class:`~abaqus.Job.Coexecution.Coexecution`] =
{}
[源代码]¶ A repository of Coexecution objects.
-
copyAuxMdbModel(fromName, toName=
''
)[源代码]¶ This method copies a specified model from the auxiliary Mdb which had been opened earlier using the openAuxMdb command.
- 参数:¶
- fromName¶
A String specifying the model name in the auxiliary Mdb which is to be copied.
- toName=
''
¶ A String specifying the name to be given to the model after it is copied into the Mdb. If this argument is not specified toName is assumed to be the same as fromName. If a model with name toName already exists in Mdb, it is overwritten.
- 抛出:¶
MdbError – The auxiliary Mdb was not opened; If the auxiliary Mdb was not opened earlier
KeyError – fromName does not exist; If the model fromName does not exist in the auxiliary Mdb
-
customData : --is-rst--:py:class:`~abaqus.CustomKernel.RepositorySupport.RepositorySupport` =
<abaqus.CustomKernel.RepositorySupport.RepositorySupport object>
[源代码]¶ A RepositorySupport object.
- getAuxMdbModelNames()[源代码]¶
This method returns a list of model names present in the auxiliary Mdb which had been opened earlier using the openAuxMdb command.
- importDxf(fileName)[源代码]¶
This method creates a ConstrainedSketch object from a file containing dxf-format (AutoCAD) geometry. Only a limited number of entities are supported. This format should be used only if no other formats are available.
备注
This function can be accessed by:
Mdb
备注
-
jobs : --is-rst--:py:class:`dict`\[:py:class:`str`, :py:data:`~typing.Union`\[:py:class:`~abaqus.Job.Job.Job`, :py:class:`~abaqus.Job.ModelJob.ModelJob`, :py:class:`~abaqus.Job.JobFromInputFile.JobFromInputFile`]] =
{}
[源代码]¶ A repository of Job objects.
-
lastChangedCount : --is-rst--:py:data:`~typing.Optional`\[:py:class:`float`] =
None
[源代码]¶ A Float specifying the value of a counter associated with the Mdb object. The counter indicates when the Mdb object was last changed.
-
meshEditOptions : --is-rst--:py:class:`~abaqus.EditMesh.MeshEditOptions.MeshEditOptions` =
<abaqus.EditMesh.MeshEditOptions.MeshEditOptions object>
[源代码]¶ A MeshEditOptions object specifying the undo/redo behavior when editing meshes on parts or part instances.
-
models : --is-rst--:py:class:`dict`\[:py:class:`str`, :py:class:`~abaqus.Model.Model.Model`] =
{'Model-1': <abaqus.Model.Model.Model object>}
[源代码]¶ A repository of Model objects.
- openAuxMdb(pathName)[源代码]¶
This method opens an auxiliary Mdb object on the disk at the specified location. This enables models from the auxiliary Mdb object to be copied into the current Mdb.
备注
- 参数:¶
- pathName¶
A String specifying the path to the auxiliary Mdb which is to be opened. If you do not provide a file extension, .cae is appended automatically to the path.
- 抛出:¶
MdbError – invalid model database; If the file is an invalid model database
MdbError – incompatible release number; If the file contains a model database from an Abaqus release other than the Abaqus release you are currently running
MdbError – cannot open file; If the command fails to open the model database file for reasons not mentioned above
- openMdb(pathName)[源代码]¶
This method opens an existing model database file.
备注
This function can be accessed by:
Mdb
备注
- 参数:¶
- pathName¶
A String specifying the path to the model database file to open. If you do not provide a file extension, Abaqus/CAE attempts to open the file with .cae appended to the path.
- 返回:¶
A Mdb object
- 返回类型:¶
Mdb
- 抛出:¶
MdbError – invalid model database; If the file is an invalid model database
MdbError – incompatible release number, expected <Abaqus release>, got <earlier or later Abaqus release>; If the file contains a model database from an Abaqus release other than the Abaqus release you are currently running
MdbError – cannot open file; may be in use by another CAE session; If the model database file is already opened in write mode
MdbError – cannot open file; If the command fails to open the model database file for reasons not mentioned above
-
optimizationProcesses : --is-rst--:py:class:`dict`\[:py:class:`str`, :py:class:`~abaqus.Job.OptimizationProcess.OptimizationProcess`] =
{}
[源代码]¶ A repository of OptimizationProcess objects.
- save()[源代码]¶
This method saves an Mdb object to disk at the location specified by pathName (pathName is a member of the Mdb object).
- 抛出:¶
MdbError – cannot save file; If the command fails to save the Mdb object to disk for reasons not mentioned above
MdbError – cannot save file: pathname member is empty; If pathName is empty
MdbError – “abaqus.cae” is an invalid CAE filename; If pathName is abaqus.cae
- saveAs(pathName)[源代码]¶
This method saves an Mdb object to disk at the specified location.
备注
- 参数:¶
- pathName¶
A String specifying the path to be used when the model database is saved to a file. If you do not provide a file extension, .cae is appended automatically to the path.
- 抛出:¶
MdbError – “abaqus.cae” is an invalid CAE filename; If pathName is abaqus.cae
MdbError – cannot save file; If the command fails to save the Mdb object to disk for reasons not mentioned above
-
adaptivityProcesses : --is-rst--:py:class:`dict`\[:py:class:`str`, :py:class:`~abaqus.Adaptivity.AdaptivityProcess.AdaptivityProcess`] =
-
CombineOptResults(optResultLocation, optIter=
abaqusConstants.INITIAL_AND_LAST
, nValues=abaqusConstants.ALL
, models=abaqusConstants.ALL
, steps=abaqusConstants.ALL
, analysisFieldVariables=abaqusConstants.ALL
, includeResultsFrom=abaqusConstants.FIRST
, originalModel=Ellipsis
)[源代码]¶ This method combines the results from existing ODB files for each optimization cycle and writes a merged ODB file.
- 参数:¶
- optResultLocation¶
A String specifying the path to the folder in which optimization results are present.
- optIter=
abaqusConstants.INITIAL_AND_LAST
¶ A Symbolic Constant to specify the optimization cycles from which the results should be merged. The possible values are INITIAL_AND_LAST, NONE, ALL, LAST, EVERY_NCYCLES, SPECIFY. The default value is INITIAL_AND_LAST.
- nValues=
abaqusConstants.ALL
¶ An Int or a tuple of Ints specifying the optimization cycles from which the results should be merged. This argument is used only when EVERY_NCYCLES or SPECIFY is selected for optIter. The default value is ALL.
- models=
abaqusConstants.ALL
¶ A tuple of strings specifying the list of models for which the merging of results is performed. The default value is ALL.
- steps=
abaqusConstants.ALL
¶ A tuple of strings specifying the list of steps from the selected models to be included in the odb merge. The default value is ALL.
- analysisFieldVariables=
abaqusConstants.ALL
¶ A tuple of strings specifying the list of analysisFieldVariables to be included in the odb merge. The default value is ALL.
- includeResultsFrom=
abaqusConstants.FIRST
¶ A Symbolic Constant to specify the target odb to which the results will be merged. The possible values are ORIGINAL_MODEL, FIRST or LAST. The default value is FIRST.
- originalModel=
Ellipsis
¶ A String to specify the path of target odb if includeResultsFrom is set to ORIGINAL_MODEL.
- openMdb(pathName)[源代码]¶
This method opens an existing model database file.
备注
This function can be accessed by:
Mdb
备注
- 参数:¶
- pathName¶
A String specifying the path to the model database file to open. If you do not provide a file extension, Abaqus/CAE attempts to open the file with .cae appended to the path.
- 返回:¶
A Mdb object
- 返回类型:¶
Mdb
- 抛出:¶
MdbError – invalid model database; If the file is an invalid model database
MdbError – incompatible release number, expected <Abaqus release>, got <earlier or later Abaqus release>; If the file contains a model database from an Abaqus release other than the Abaqus release you are currently running
MdbError – cannot open file; may be in use by another CAE session; If the model database file is already opened in write mode
MdbError – cannot open file; If the command fails to open the model database file for reasons not mentioned above
- upgradeMdb(existingMdbPath, upgradedMdbPath)[源代码]¶
This method upgrades an existing Mdb object to the current release and writes the upgraded version of the Mdb object to a file. In addition, Abaqus/CAE writes.
information about the status of the upgrade to the log file ( upgradedMdbPath.log ).