Skip to main content
The Granta Material Model Service has endpoints to create and download Material Model Definitions. Here is an annotated example JSON file. Note: The comments are included in this example for informational purposes. Do not include comments in real Material Model Definitions.

Examples

To write a Material Model Definition for the Hooke’s law model:
To take data from a Functional Attribute and interpolate it at a particular value. If the constraint for Temperature wasn’t required, we would have used the default value defined in the database on the Attribute (or Parameter if the attribute ‘Density with Temperature’ did not define a default value for Temperature).

Creating a Material Model Definition

Material Model Definitions can be created by sending an HTTP POST request to the Granta Material Model Service /v1alpha/modelDefinitions endpoint. The body of the request should be a Material Model Definition in JSON format like the examples above. Material Model Definitions can be updated using a PATCH request to /v1alpha/modelDefinitions/{id}. For example: /v1alpha/modelDefinitions/hookes.law. The request body should be a JSON Material Model Definition, but properties that do not need changing may be omitted (this endpoint uses the JSON Merge Patch RFC 7396 format).