Skip to content

Feature Request: Switch up order of parameter / material_id in json #49

@claudiushaag

Description

@claudiushaag

It might make sense to switch up the ordering of material_parameter / material_id.

Right now, in the json one defines each material parameter in a vector, where the indice of each entry corresponds to the material index in the microstructure. This came up when talking about the way of parametrizing multiple fans simulations ussing aiida and the aiida-fans-plugin, where it is counterintutive to encode the material parameters based on their index in vectors.

    "material_properties":{
        "bulk_modulus": [62.5000, 222.222],
        "shear_modulus": [28.8462, 166.6667],
        "yield_stress": [0.1, 10000],
        "isotropic_hardening_parameter": [0.0, 0.0],
        "kinematic_hardening_parameter": [0.0, 0.0],
        "viscosity": [1, 1],
        "time_step": 0.01,

        "saturation_stress": [0.15, 10000],
        "saturation_exponent": [1000, 1000]
    },

It might be more accessible to people if one would define the materials as one group. The index of a material group in the material_properties list would still encode and correspond to the material index in the microstructure. An example could look like this:

    "material_properties": [{
        "bulk_modulus": 62.5000,
        "shear_modulus": 28.8462,
        "yield_stress": 0.1,
        "isotropic_hardening_parameter": 0.0,
        "kinematic_hardening_parameter": 0.0,
        "viscosity": 1,
        "time_step": 0.01,
        "saturation_stress": 0.15,
        "saturation_exponent": 1000
    },
    {
        "bulk_modulus": 222.222,
        "shear_modulus": 166.6667,
        "yield_stress": 10000,
        "isotropic_hardening_parameter": 0.0,
        "kinematic_hardening_parameter": 0.0,
        "viscosity": 1,
        "time_step": 0.01,
        "saturation_stress": 10000,
        "saturation_exponent": 1000
    }
]

time_step is actually an interesting edge case: it is only loaded once currently, as the value should be /is the same for both materials. One possibility would be to just read in the first (zeroth) value and use that in the material calculation. When defining it in latter materials, its possible to copy them either way in the future or accomodate the functionality to read in different values.
Which makes it easier to actually copy materials from one json input to another.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions