public Double specificheat; //BTUPerLbF //when using this function, the precondition is this object is from standard model, //the argument DOEgbXMLMaterial shall be from test model (user uploaded) public Boolean compare(DOEgbXMLMaterial material, List <String> message) { //No need to exam the standard model - we already ensure these edge cases will not exist if (this.rvalue == 0.0d) { //convert inches to ft this.rvalue = (this.thickness / 12) / this.conductivity; } //rule out the inadequate date - if both rvalue and conductivity are not available //then the material is not correctly defined if (material.rvalue == 0.0d) { if (material.conductivity == 0.0d && material.thickness == 0.0d) { message.Add("Test model material: " + id + "/" + name + "Rvalue, conductivity and thickness are not correctly defined."); return(false); } else { material.rvalue = (material.thickness / 12) / material.conductivity; } } //we do not need to compare id, name, and description if (Math.Abs(this.rvalue - material.rvalue) > DOEgbXMLBasics.Tolerances.RVALUE) { // r-value does not match message.Add("Test model material: " + id + "/" + name + " Rvalue (" + material.rvalue + ")" + "does not match Standard File, the difference was not within tolerance = " + DOEgbXMLBasics.Tolerances.RVALUE + " (Standard: " + this.rvalue + ")"); return(false); } if (Math.Abs(this.specificheat - material.specificheat) > DOEgbXMLBasics.Tolerances.SPECIFICHEAT) { // specificheat does not match message.Add("Test model material: " + id + "/" + name + "Specific Heat (" + material.specificheat + ")" + "does not match Standard File, the difference was not within tolerance = " + DOEgbXMLBasics.Tolerances.SPECIFICHEAT + " (Standard: " + this.specificheat + ")"); return(false); } return(true); }
public void addMaterialToLayer(DOEgbXMLMaterial material) { materialList.Add(material); }