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='')[source]

Bases: AcisMdb, JobMdb

The Mdb object is the high-level Abaqus model database. A model database stores models and analysis controls.

Note

This object can be accessed by:

mdb

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[, description, stefanBoltzmann, ...])

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,
description='',
stefanBoltzmann=None,
absoluteZero=None,
waveFormulation=NOT_SET,
modelType=STANDARD_EXPLICIT,
universalGas=None,
copyConstraints=1,
copyConnectors=1,
copyInteractions=1,
)[source]

This method creates a Model object.

Note

This function can be accessed by:

mdb.Model
Parameters:
name

A String specifying the repository key.

description=''

A String specifying the purpose and contents of the Model object. The default value is an empty string.

stefanBoltzmann=None

None or a Float specifying the Stefan-Boltzmann constant. The default value is None.

absoluteZero=None

None or a Float specifying the absolute zero constant. The default value is None.

waveFormulation=NOT_SET

A SymbolicConstant specifying the type of incident wave formulation to be used in acoustic problems. Possible values are NOT_SET, SCATTERED, and TOTAL. The default value is NOT_SET.

modelType=STANDARD_EXPLICIT

A SymbolicConstant specifying the analysis model type. Possible values are STANDARD_EXPLICIT and ELECTROMAGNETIC. The default is STANDARD_EXPLICIT.

universalGas=None

None or a Float specifying the universal gas constant. The default value is None.

copyConstraints=1

A boolean specifying whether to copy the constraints created in the model to the model that instances this model. The default value is ON.

copyConnectors=1

A boolean specifying whether to copy the connectors created in the model to the model that instances this model. The default value is ON.

copyInteractions=1

A boolean specifying whether to copy the interactions created in the model to the model that instances this model. The default value is ON.

Returns:

model – A Model object

Return type:

Model

Other Classes

class MdbBase(pathName='')[source]

Bases: object

The Mdb object is the high-level Abaqus model database. A model database stores models and analysis controls.

Note

This object can be accessed by:

mdb

Member Details:

adaptivityProcesses : --is-rst--:py:class:`dict`\ \[:py:class:`str`, :py:class:`~abaqus.Adaptivity.AdaptivityProcess.AdaptivityProcess`] = {}[source]

A repository of AdaptivityProcess objects.

annotations : --is-rst--:py:class:`dict`\ \[:py:class:`str`, :py:class:`~abaqus.Annotation.Annotation.Annotation`] = {}[source]

A repository of Annotation objects.

close()[source]

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()[source]

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

Raises:

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`] = {}[source]

A repository of Coexecution objects.

copyAuxMdbModel(fromName, toName='')[source]

This method copies a specified model from the auxiliary Mdb which had been opened earlier using the openAuxMdb command.

Parameters:
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.

Raises:
  • 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>[source]

A RepositorySupport object.

getAuxMdbModelNames()[source]

This method returns a list of model names present in the auxiliary Mdb which had been opened earlier using the openAuxMdb command.

Returns:

A list of model names present in the auxiliaryMdb

Return type:

list[str]

Raises:

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

importDxf(fileName)[source]

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.

Note

This function can be accessed by:

Mdb
Parameters:
fileName

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

Returns:

A Mdb object

Return type:

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`]] = {}[source]

A repository of Job objects.

lastChangedCount : --is-rst--:py:class:`float` | :py:obj:`None` = None[source]

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>[source]

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>}[source]

A repository of Model objects.

openAuxMdb(pathName)[source]

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.

Parameters:
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.

Raises:
  • 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)[source]

This method opens an existing model database file.

Note

This function can be accessed by:

Mdb
Parameters:
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.

Returns:

A Mdb object

Return type:

Mdb

Raises:
  • 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`] = {}[source]

A repository of OptimizationProcess objects.

save()[source]

This method saves an Mdb object to disk at the location specified by pathName (pathName is a member of the Mdb object).

Raises:
  • 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)[source]

This method saves an Mdb object to disk at the specified location.

Parameters:
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.

Raises:
  • 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[source]

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,
)[source]

This method combines the results from existing ODB files for each optimization cycle and writes a merged ODB file.

Parameters:
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)[source]

This method opens an existing model database file.

Note

This function can be accessed by:

Mdb
Parameters:
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.

Returns:

A Mdb object

Return type:

Mdb

Raises:
  • 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)[source]

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

Parameters:
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.

Raises:

MdbError – Cannot convert file