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='')[源代码]

基类:AcisMdb, JobMdb

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/2024.

Public Data Attributes:

Inherited from MdbBase

version

An Int specifying the release number of the Mdb object in memory.

lastChangedCount

A Float specifying the value of a counter associated with the Mdb object.

jobs

A repository of Job objects.

adaptivityProcesses

A repository of AdaptivityProcess objects.

coexecutions

A repository of Coexecution objects.

optimizationProcesses

A repository of OptimizationProcess objects.

meshEditOptions

A MeshEditOptions object specifying the undo/redo behavior when editing meshes on parts or part instances.

models

A repository of Model objects.

customData

A RepositorySupport object.

annotations

A repository of Annotation objects.

Public Methods:

Model(name, *args, **kwargs)

This method creates a Model object.

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.

closeAuxMdb()

This method closes the auxiliary Mdb which had been opened earlier using the openAuxMdb command.

getAuxMdbModelNames()

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:

Model(name, *args, **kwargs)[源代码]

This method creates a Model object.

备注

This function can be accessed by:

mdb.Model
参数:
name

A String specifying the repository key.

*args

Positional and keyword arguments to be passed to the Model object.

**kwargs

Positional and keyword arguments to be passed to the Model object.

Other Classes

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

Member Details:

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.

返回:

A list of model names present in the auxiliaryMdb

返回类型:

list[str]

抛出:

MdbError -- The auxiliary Mdb was not opened; If the auxiliary Mdb was not opened earlier

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
参数:
fileName

A String specifying the path to the dxf file to open.

返回:

A Mdb object

返回类型:

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:class:`float` | :py:obj:`None` = 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

version : --is-rst--:py:class:`int` | :py:obj:`None` = None[源代码]

An Int specifying the release number of the Mdb object in memory.

CombineOptResults(
optResultLocation,
optIter=INITIAL_AND_LAST,
nValues=ALL,
models=ALL,
steps=ALL,
analysisFieldVariables=ALL,
includeResultsFrom=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=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=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=ALL

A tuple of strings specifying the list of models for which the merging of results is performed. The default value is ALL.

steps=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=ALL

A tuple of strings specifying the list of analysisFieldVariables to be included in the odb merge. The default value is ALL.

includeResultsFrom=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 ).

参数:
existingMdbPath

A String specifying the path to the file containing the model database to be upgraded.

upgradedMdbPath

A String specifying the path to the file that will contain the upgraded model database.

抛出:

MdbError -- Cannot convert file