Material data model/es

Propósito y principios
Para almacenar propiedades de materiales en una estructura de datos unificada, una de las intenciones es facilitar la recuperación de datos que pueden llevarse en diferentes contextos:
 * Cuando se construye un modelo para elementos finitos
 * Cuando se renderiza un modelo 3D
 * Para permitir registrar cambios en un material de un componente creado en FreeCAD, para aplicaciones PDM,
 * Aplicación BIM (industria de arquitectura y construcción)

Para manejar propiedades de materiales, se ha propuesto crear un modelo de datos específico que será replicado cuando un nuevo material sea creado con FreeCAD.

Ello posibilitará crear un material ya sea definiendo manualmente sus propiedades a través del entorno de materiales, o leyendo las propiedades del material desde un archivo. El formato de dichos archivos está por definir (algunos ya existen, como MatML, STEP AP235 & IGR45...).

También, será posible guardar las propiedades del material en una colección de archivos en un formato también aún pendiente de escoger. La colección de archivos que puede ser guardada en un directorio común formará la base de datos de materiales de FreeCAD.

A través de este modelo de datos, los materiales pueden ser definidos en FreeCAD sin la necesidad de definir un componente.

Un nuevo puntero se creará en el modelo de datos del componente, para vincularlo a un material que ha sido definido a través del modelo de datos de materiales.

Resultado
A través de este modelo de datos de materiales, se propone ofrecer una herramienta para manejar sencillamente datos de materiales con FreeCAD.

Organización
Different kinds of data need to be managed to describe a material. A material data model is proposed below. Some examples of the data that can be stored within this structure are given as well.

Modelo de datos de materiales
In addition to classical "string" attributes like a name, and a family, 3 different specific kinds of information need to be managed to describe a material in FreeCAD. All of these kind of information do not need necessarily to be defined for the material to exist. Finally, below is the list of attributes retained to describe a material in FreeCAD.
 * properties: generic structure to store data describing the engineering properties of the material
 * chemical composition: chemical composition of the material
 * appearance: information describing how the material will look like in FreeCAD (color, shininess...)

Nombre
A string indicating the name of the material. It is its designation.

Familia
A string indicating the family of the material, such as for instance: Additionnally, it is proposed to create a map between the families (for instance stored in a XML file) so as to be able to browse the FreeCAD material database. Such a map could for instance contain a tree presenting relationships between families, like:
 * metal
 * plastic


 * metal -> steel -> flat carbon steel -> advanced high strength steel


 * metal -> aluminium -> casted aluminium

fabricante
A string indicating the manufacturer of the material.

URL
A string indicating the web page presenting the material.

Descripción
The material data model includes a collection of properties. The size of such a collection is not fixed and may be extended with new user-defined properties.

A property contains the following attributes.
 * name: string
 * symbol: string to write the symbol of the properties (?in Latex math format?)
 * type: "scalar" or "array"
 * value: scalar (if it is a scalar)
 * values: array (if it is an array)
 * parameterNames: array of strings (for "array" type property)
 * parameterValues: array of scalars (for "array" type property)
 * unit & unitMagnitude (specific object described in Units)(to be noted: examples include unitMagnitude, while I am not completely sure that this should be defined at property level. The unit system may be defined at material level)
 * direction: a vector indicating in which direction is to be understood the property value. The vector is itself a FreeCAD object expressed in the global coordinate system or in a user-defined coordinate system.
 * notes: string that can be used to describe a bit more the property like what is its meaning, how has it been measured... It can also help to understand the name of the properties

Material properties will be identified thanks to their name in order to process them, i.e. for instance writing the Yield strength in a finite element model. In order to ease material data creation within FreeCAD, a standardized list of property names along with their standard units will be proposed to the user. Nonetheless, the user is free to create new properties, with new names, new units, and so on...

Below is proposed the dictionary of standard properties. Feel free to add new ones.             

Ejemplo 1: Coste por tonelada
A first example is given below to show how a Cost per tonne property can be stored.


 * name: Cost per tonne
 * symbol: not applicable
 * type: scalar
 * value: 500
 * values: not applicable (but could be: for instance different cost values per different countries)
 * parameterNames: not applicable (but could be: for instance different cost values for different countries)
 * parameterValues: not applicable (but could be: for instance different cost values for different countries)
 * parameterUnits: not applicable
 * unit & unitMagnitude: [[ 0, -3, 0, 0, 0, 0, 0], 1]
 * meaning m^(-3) (more details about unit & unit system specifications in Units page)
 * direction: not applicable

Ejemplo 2: Límite de elasticidad
A second example is given below to show how the Yield strength property can be stored.


 * name: Yield stress
 * symbol: YS
 * type: scalar
 * value: 450
 * values: not applicable
 * parameterNames: not applicable
 * parameterValues: not applicable
 * parameterUnits: not applicable
 * unit & unitMagnitude: [[ -1, 1, -2, 0, 0, 0, 0], 1]
 * meaning Pa (more details about unit & unit system specifications in Units page)
 * direction: [ 1, 0, 0] in global coordinate system
 * given a steel sheet, this means that the Yield strength given is expressed in x direction, that can be for instance the rolling direction

Ejemplo 3: Endurecimiento por acritud
A third example is given below to show how the Strain hardening property can be stored. This is a more complex example because Strain hardening is represented by a serie of curves. The curves represent the stress evolution with respect to plastic strain. 3 curves have been obtained at different strain rates. All curves have been obtained at room temperature.

[0., 0.4, 0.8, 1], [ 0, 0.4, 0.8, 1], [ 0, 0.4, 0.8, 1,
 * name: Strain hardening
 * symbol: not applicable
 * type: scalar
 * value: not applicable
 * values: 0., 100, 150, 200], [ 0., 120, 180, 210], [ 0., 140, 190, 220
 * parameterNames: [Plastic strain, Strain rate, Temperature]
 * parameterValues:
 * The 1st three arrays represents plastic strain evolutions
 * The 2nd serie of three arrays represents the strain rate evolutions. A single value is given in each of the arrays, meaning that the strain rate doesn't change for each the corresponding stress evolutions.
 * The last serie of a single array represents temperature evolutions. This time a single value is written in a single array, meaning that temperature doesn't change for a given array of stress, and this applies for all stress arrays.

[[0.]            , [100]            , [1000.]          ],

[[18.]                                                  ],]
 * parameterUnits & parameterUnitMagnitudes: [ 0, 0, 0, 0, 0, 0, 0], 1], [[ 0, 0, -1, 0, 0, 0, 0], 1], [[ 0, 0, 0, 0, 1, 0, 0], 1
 * meaning none, s^(-1) and, K (more details about unit & unit system specifications in Units page)
 * unit & unitMagnitude: [[ -1, 1, -2, 0, 0, 0, 0], 1]
 * meaning Pa (more details about unit & unit system specifications in Units page)
 * direction: not applicable

Composición química
[Yet to be filled up]

Apariencia
[Yet to be filled up]

Notas
A string where the user can add its own comments about the material.

Nombre
Brick masonry

Familia
?string?

Propiedades

 * Weight: 1kg/m³
 * Cost per cubic meter: 1€/m³
 * Number of bricks por base unit: ?float?
 * Volume of mortar por base unit: ?float?
 * Mortar type: ?string?
 * Brick type: ?string?
 * Fire resistance class: ?string?
 * Thermal conductivity: 1 W/mK

Fabricante
?string?

URL
?string?

Notas
Notes about maintainance, special cares to be taken, etc...

CSI/MasterFormat code (as there are several systems used in the industry which give to all material a special code, I propose to enter it in the notes, because it doesn't appear to me relevant create a specific properties that we won't be able to name exactly).

Siguientes acciones

 * Define a set of names for classical properties, that we can define in a dictionary (FreeCAD configuration file). These properties will most notably be re-used in other contexts like the FEM module.


 * Fill up Chemical composition section.
 * Fill up Appearance section.


 * Define a set of default chemical components.


 * Review by other people.


 * Implement in C++ data model and ability to write/read in a file (ISO 10303-45 through SCL?)).
 * Implement XML dictionaries to store default properties, with their units, that can be used by the user.
 * Implement python GUI to handle this data.