Author Topic: Opening discussion about the new materails.json  (Read 302 times)


  • Newbie
  • *
  • Posts: 31
Opening discussion about the new materails.json
« on: September 27, 2016, 05:24:44 PM »
Hi everyone,

I am trying of use the new "material.json" standard, and I am having some problems. Additionally I want to open a discussion to have a common implementation for all the applications.

First of all the basis is defined in the "" from the python_scripts of the core, and a basic test in the "" and "materials.json" from the tests folder of the core.

For example, for the solid_mechanics application the function will substitute the CL import:

Code: [Select]
            # Constitutive law import
            import constitutive_law_python_utility as constitutive_law_utils
            constitutive_law = constitutive_law_utils.ConstitutiveLawUtility(self.main_model_part,

For something similar to:

Code: [Select]
            import read_materials_process

The main problem is here, because the input should be the Model, not the main_model_part; that is why maybe is a good idea to move this material import to the file, or to modify the existing approach, which is being currently used in Altair,  and for that reason this is not recommended.

Additionally it is necessary to define in the settings the *.json file containing the material properties:

Code: [Select]
            "Parameters": {
                            "materials_filename": "materials.json"

The idea is that once this is working  everytime that the new input format is not used it will print a warning message telling that you are using a deprecated input.


Josep Maria

  • Global Moderator
  • Jr. Member
  • *****
  • Posts: 50
Re: Opening discussion about the new materails.json
« Reply #1 on: October 08, 2016, 09:56:24 AM »
Hello Vicente,

   The change on the input for the materials have to be gradual. There is the issue of the extra submodelparts that have to be created only for the material assignment at the beginning of the computing. After that they remain there as garbage. The submodelparts are so new that have not been tested enough,  I get a segmentation fault if I try to remove them.  Documentation is also needed. 

In conclusion,  let's wait a little bit before changing the standard.


Josep Maria