Exemple #1
0
        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);
        }
Exemple #2
0
        /***************************************************/
        private IMaterialFragment GetPlatePropertyMaterial(int plateProp)
        {
            int err = 0;
            IMaterialFragment material = null;

            double[]      materialArray = new double[8];
            int           materialType  = 0;
            int           plateType     = 0;
            StringBuilder materialName  = new StringBuilder(St7.kMaxStrLen);

            err = St7.St7GetPlatePropertyType(1, plateProp, ref plateType, ref materialType);
            if (materialType != St7.mtIsotropic)
            {
                return(material);                                   // !!! ISOTROPIC ONLY !!!
            }
            err = St7.St7GetPlateIsotropicMaterial(1, plateProp, materialArray);
            if (!St7Error(err))
            {
                return(material);
            }
            err = St7.St7GetMaterialName(1, St7.ptPLATEPROP, plateProp, 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.ipPlateIsoModulus], materialArray[St7.ipPlateIsoPoisson], materialArray[St7.ipPlateIsoAlpha], materialArray[St7.ipPlateIsoDensity]);
            }
            else
            {
                material = BH.Engine.Structure.Create.Steel(materialName.ToString(), materialArray[St7.ipPlateIsoModulus], materialArray[St7.ipPlateIsoPoisson], materialArray[St7.ipPlateIsoAlpha], materialArray[St7.ipPlateIsoDensity]);
            }
            return(material);
        }