openmc.model.Model

class openmc.model.Model(geometry=None, materials=None, settings=None, tallies=None, cmfd=None, plots=None)[source]

Model container.

This class can be used to store instances of openmc.Geometry, openmc.Materials, openmc.Settings, openmc.Tallies, openmc.Plots, and openmc.CMFD, thus making a complete model. The Model.export_to_xml() method will export XML files for all attributes that have been set. If the Model.materials() attribute is not set, it will attempt to create a materials.xml file based on all materials appearing in the geometry.

Parameters:
Variables:
export_to_xml()[source]

Export model to XML files.

run(**kwargs)[source]

Creates the XML files, runs OpenMC, and returns k-effective

Parameters:**kwargs – All keyword arguments are passed to openmc.run
Returns:Combined estimator of k-effective from the statepoint
Return type:2-tuple of float