private IMaterialFragment GetBrickPropertyMaterial(int brickProp) { int err = 0; IMaterialFragment material = null; double[] materialArray = new double[8]; int materialType = 0; StringBuilder materialName = new StringBuilder(St7.kMaxStrLen); err = St7.St7GetBrickPropertyType(1, brickProp, ref materialType); if (materialType != St7.mtIsotropic) { return(material); // !!! ISOTROPIC ONLY !!! } err = St7.St7GetBrickIsotropicMaterial(1, brickProp, materialArray); if (!St7Error(err)) { return(material); } err = St7.St7GetMaterialName(1, St7.ptBRICKPROP, brickProp, materialName, St7.kMaxStrLen); // !!!! Materials are set based on Poisson Ratio !!!! if (materialArray[St7.ipBeamPoisson] <= 0.2) { material = BH.Engine.Structure.Create.Concrete(materialName.ToString(), materialArray[St7.ipBrickIsoModulus], materialArray[St7.ipBrickIsoPoisson], materialArray[St7.ipBrickIsoAlpha], materialArray[St7.ipBrickIsoDensity]); } else { material = BH.Engine.Structure.Create.Steel(materialName.ToString(), materialArray[St7.ipBrickIsoModulus], materialArray[St7.ipBrickIsoPoisson], materialArray[St7.ipBrickIsoAlpha], materialArray[St7.ipBrickIsoDensity]); } return(material); }
private IMaterialFragment GetPlateIsotropicMaterial(int platePropNumber) { int uID = 1; int err = 0; IMaterialFragment material = null; double[] materialArray = new double[8]; StringBuilder materialName = new StringBuilder(St7.kMaxStrLen); err = St7.St7GetPlateIsotropicMaterial(uID, platePropNumber, materialArray); if (!St7Error(err)) { return(material); } err = St7.St7GetMaterialName(uID, St7.ptPLATEPROP, platePropNumber, materialName, St7.kMaxStrLen); if (!St7Error(err)) { return(material); } // !!!! Materials are set based on Poisson Ratio !!!! if (materialArray[St7.ipPlateIsoPoisson] <= 0.2) { material = BH.Engine.Structure.Create.Concrete(materialName.ToString(), materialArray[St7.ipPlateIsoModulus], materialArray[St7.ipPlateIsoPoisson], materialArray[St7.ipPlateIsoAlpha], materialArray[St7.ipPlateIsoDensity], materialArray[St7.ipPlateIsoDampingRatio]); } else { material = BH.Engine.Structure.Create.Steel(materialName.ToString(), materialArray[St7.ipPlateIsoModulus], materialArray[St7.ipPlateIsoPoisson], materialArray[St7.ipPlateIsoAlpha], materialArray[St7.ipPlateIsoDensity], materialArray[St7.ipPlateIsoDampingRatio]); } return(material); }
private IMaterialFragment GetBeamPropertyMaterial(int beamProp) { int err = 0; IMaterialFragment material = null; double[] materialArray = new double[9]; StringBuilder materialName = new StringBuilder(St7.kMaxStrLen); err = St7.St7GetBeamMaterialData(1, beamProp, materialArray); if (!St7Error(err)) { return(material); } err = St7.St7GetMaterialName(1, St7.ptBEAMPROP, beamProp, materialName, St7.kMaxStrLen); if (!St7Error(err)) { return(material); } // !!!! Materials are set based on Poisson Ratio !!!! if (materialArray[St7.ipBeamPoisson] <= 0.2) { material = BH.Engine.Structure.Create.Concrete(materialName.ToString(), materialArray[St7.ipBeamModulus], materialArray[St7.ipBeamPoisson], materialArray[St7.ipBeamAlpha], materialArray[St7.ipBeamDensity]); } else { material = BH.Engine.Structure.Create.Steel(materialName.ToString(), materialArray[St7.ipBeamModulus], materialArray[St7.ipBeamPoisson], materialArray[St7.ipBeamAlpha], materialArray[St7.ipBeamDensity]); } return(material); }