Example #1
0
        public static bool DefineCustomMaterial(SAPMaterial material)
        {
            int flag = mySapModel.PropMaterial.SetMaterial(material.MatName, material.MatType);

            flag = mySapModel.PropMaterial.SetWeightAndMass(material.MatName, 1, material.Weight);

            flag = mySapModel.PropMaterial.SetMPIsotropic(material.MatName, material.ElasticityModulus, material.PoissonRatio, material.ThermalCoef);

            switch (material.MatType)
            {
            case eMatType.Steel:
                SAPSteelMaterial steelMaterial = (SAPSteelMaterial)material;
                flag = mySapModel.PropMaterial.SetOSteel(steelMaterial.MatName, steelMaterial.Fy, steelMaterial.Fu, steelMaterial.eFy, steelMaterial.eFu, 1, 0, 0.015, 0.11, 0.17);
                break;

            case eMatType.Concrete:
                SAPConcreteMaterial rcMaterial = (SAPConcreteMaterial)material;
                //TODO   //mySapModel.PropMaterial.SetOConcrete(rcMaterial.MatName
                break;

            case eMatType.NoDesign:
                break;

            case eMatType.Aluminum:
                break;

            case eMatType.ColdFormed:
                break;

            case eMatType.Rebar:
                break;

            case eMatType.Tendon:
                break;

            case eMatType.Masonry:
                break;

            default:
                break;
            }
            if (flag != 0)
            {
                material.IsDefinedInSAP = false;
                return(false);
            }
            else
            {
                material.IsDefinedInSAP = true;
                return(true);
            }
        }
Example #2
0
        public static SAPMaterial[] SetDefaultMaterials()
        {
            SAPMaterial[] materials = new SAPMaterial[3];
            materials[0] = new SAPSteelMaterial("StGr37", 7.85, 21000000, 0.3, 1.170E-05, 24000, 36000, 24000, 36000);
            materials[1] = new SAPSteelMaterial("StGr44", 7.85, 21000000, 0.3, 1.170E-05, 28000, 44000, 28000, 44000);
            materials[2] = new SAPSteelMaterial("StGr52", 7.85, 21000000, 0.3, 1.170E-05, 36000, 52000, 36000, 52000);
            // materials[3] = new SAPConcreteMaterial("RC300", 2400);

            foreach (SAPMaterial material in materials)
            {
                DefineCustomMaterial(material);
            }
            return(materials);
        }
Example #3
0
        public SAPMaterial ConvertFromHndzMaterial(HndzStructuralMaterial material)
        {
            SAPMaterial sapMaterial = null;

            switch (material.MatType)
            {
            case HndzMaterialType.Steel:
                HndzSteelMaterial matS = (HndzSteelMaterial)material;
                sapMaterial = new SAPSteelMaterial(matS.Name, matS.Weight, matS.ElasticityModulus, matS.PoissonRatio, matS.ThermalCoef, matS.Fy, matS.Fu, matS.eFy, matS.eFu);
                break;

            case HndzMaterialType.Concrete:
                //HndzConcreteMaterial matC = (HndzConcreteMaterial)material;
                //sapMaterial = new SAPConcreteMaterial(matS.Name, matS.Weight, matS.ElasticityModulus, matS.PoissonRatio, matS.ThermalCoef, matS.Fy, matS.Fu, matS.eFy, matS.eFu);
                //TODO
                throw new NotImplementedException();
                break;

            case HndzMaterialType.NoDesign:
                break;

            case HndzMaterialType.Aluminum:
                break;

            case HndzMaterialType.ColdFormed:
                break;

            case HndzMaterialType.Rebar:
                break;

            case HndzMaterialType.Tendon:
                break;

            case HndzMaterialType.Masonry:
                break;

            default:
                break;
            }

            return(sapMaterial);
        }