Usage example of loading a specification model and creating a parametrized geometry from it.ΒΆ

import pprint

import mmbse_client as mmbse

# Specify variables
system_id = 41
specification_model = "Specification"
model_name = "2D iron yoke"

# Load the Geometry model
mmbse = mmbse.MMBSE(api_token="")
system = mmbse.get_system(system_id)
model = mmbse.get_system_model(system_id, model_name)

# Get specification from Specification model
assert any(
    dependency["name"] == "Specification" for dependency in model["input_dependencies"]
)
spec_model = mmbse.get_system_model(system_id, "Specification")
pprint.pprint(spec_model)

# Retrieve parameters from the specification model
output_parameters = mmbse.get_model_output_parameter_list(spec_model["id"])
print(f"Rref: {output_parameters['Rref']}")

Total running time of the script: ( 0 minutes 0.000 seconds)

Gallery generated by Sphinx-Gallery