Source: functions_material.js

"use strict";

/**
* Returns a list conductor materials which can be used in Electrical Functions.  
* ID, Symbol and Description.
* @param {boolean} header header optional parameter, will display header row if set to true
* @return ID, Symbol and Description 
* @customfunction
*/
function materialConductors(header) {  
  var json =  httpGetCall("materials/conductors");
  var data = JSON.parse(json);  
  var result = dataItemArray(data,enDataType.conductors, header);
  return result;     
} 

/**
* Electrical resistivity of a conductor, Ohm.m
* @param {number} input The conductor material ID
* @return Conductor resistivity, Ohm.m
* @customfunction
*/
function materialConductorResistivity(conductorMaterialID) {  
  var json =  httpGetCall("materials/conductors/" + conductorMaterialID);
  var data = JSON.parse(json);  
  return data.Resistivity;  
} 

/**
* Volumetric heat capacity of a conductor, J.(1/K).(1/m3)
 * @param {number} input The conductor material ID.
* @return Volumetric heat capacity of resistivity, J.(1/K).(1/m3)
* @customfunction
*/
function materialConductorVolumetricHeatCapacity(conductorMaterialID) {  
  var json =  httpGetCall("materials/conductors/" + conductorMaterialID);
  var data = JSON.parse(json);  
  return data.VolumetricHeatCapacity;  
} 

/**
* Temperature coefficient of a conductor, 1/K.
 * @param {number} input The conductor material ID.
* @return Temperature coefficient of resistivity, 1/K.
* @customfunction
*/
function materialConductorTemperatureCoefficient(conductorMaterialID) {  
  var json =  httpGetCall("materials/conductors/" + conductorMaterialID);
  var data = JSON.parse(json);  
  return data.TemperatureCoefficient;  
}