Inheritance: SectionMaterial
        /// <structural_toolkit_2015>

        /// <summary>
        /// Calculate the moment of inertia for cracking section.
        /// </summary>
        /// <param name="inNMM">The acting forces.</param>
        /// <returns>Returns moment of inertia for cracking section.</returns>
        public double InertiaOfCrackingSection(InternalForcesContainer inNMM)
        {
            double momentOfInertiaCrackingConcreteSection = 0.0;

            SafetyFactor(inNMM);
            SetOfForces solverNMM       = solver.GetInternalForces(Autodesk.CodeChecking.Concrete.ResultType.Section);
            double      neutralAxisDist = solver.GetNeutralAxisDistance();
            double      stressArea      = solver.GetConcreteStressArea();
            double      comprHeight     = 0.5 * totalHeight + neutralAxisDist;
            Steel       steel           = solver.GetSteel();

            Autodesk.CodeChecking.Concrete.Concrete concrete = solver.GetConcrete();
            double n = steel.ModulusOfElasticity / concrete.ModulusOfElasticity;

            switch (crossSectionType)
            {
            case SectionShapeType.RectangularBar:
            {
                momentOfInertiaCrackingConcreteSection = comprHeight * comprHeight * stressArea / 3.0; // bh^3/12 + b*h*(0.5*h)^2, b*h=stressArea
            }
            break;

            default:
                throw new Exception("InertiaOfCrackingSection. Unhandled cross section type. Only rectangular cross-section can be used on this path. 3th party implementation is necessary.");
            }
            foreach (Rebar bar in solver.GetRebars())
            {
                momentOfInertiaCrackingConcreteSection += n * bar.Area * Math.Pow((bar.Y + neutralAxisDist), 2);
            }
            return(momentOfInertiaCrackingConcreteSection);
        }
Exemple #2
0
        /// <summary>
        /// Case 9: Calculation of internal forces in symmetric section for given state of strain with inclined neutral axis
        /// </summary>
        public void Case9()
        {
            // geometry definition
            Geometry geometry = new Geometry();

            geometry.Add(0.0, 0.0);
            geometry.Add(0.0, 0.6);
            geometry.Add(0.3, 0.6);
            geometry.Add(0.3, 0.0);
            // rebars definition
            List <Rebar> rebars    = new List <Rebar>();
            double       rebarArea = 0.012 * 0.012 * Math.PI / 4.0;

            rebars.Add(new Rebar(0.05, 0.05, rebarArea));
            rebars.Add(new Rebar(0.05, 0.55, rebarArea));
            rebars.Add(new Rebar(0.25, 0.55, rebarArea));
            rebars.Add(new Rebar(0.25, 0.05, rebarArea));
            // concrete parameters
            Concrete concrete = new Concrete();

            concrete.SetStrainStressModelBiLinear(25e6, 0.003, 28e9, 0.002);
            // steel parameters
            Steel steel = new Steel();

            steel.SetModelIdealElastoPlastic(550e6, 0.1, 200e9);
            // solver creation and parameterization
            RCSolver solver = RCSolver.CreateNewSolver(geometry);

            solver.SetRebars(rebars);
            solver.SetConcrete(concrete);
            solver.SetSteel(steel);
            //calulation
            solver.SolveForces(ResultType.Section, 0.0025, -0.00383423, 0.34906585);
            // result for rebars
            SetOfForces forcesRebar = solver.GetInternalForces(ResultType.Rebars);
            // result for concrete
            SetOfForces forcesConcrete = solver.GetInternalForces(ResultType.Concrete);
            Point2D     Gcc            = solver.GetStressGravityCenter(ResultType.Concrete);
            double      Acc            = solver.GetConcreteStressArea();
            // result for RC section
            SetOfForces forces = solver.GetInternalForces(ResultType.Section);

            // result presentation
            sb.AppendLine();
            sb.AppendLine(decoration);
            sb.AppendLine("Case 9: Calculation of internal forces in symmetric section for given state of strain with inclined neutral axis ");
            sb.AppendLine(decoration);
            sb.AppendLine(FormatOutput("Ns", forcesRebar.AxialForce, 6));
            sb.AppendLine(FormatOutput("Mxs", forcesRebar.MomentX, 6));
            sb.AppendLine(FormatOutput("Mys", forcesRebar.MomentY, 6));
            sb.AppendLine(FormatOutput("Ac", Acc, 6));
            sb.AppendLine(FormatOutput("Gcx", Gcc.X, 6));
            sb.AppendLine(FormatOutput("Gcy", Gcc.Y, 6));
            sb.AppendLine(FormatOutput("Nc", forcesConcrete.AxialForce, 6));
            sb.AppendLine(FormatOutput("Mxc", forcesConcrete.MomentX, 6));
            sb.AppendLine(FormatOutput("Myc", forcesConcrete.MomentY, 6));
            sb.AppendLine(FormatOutput("N", forces.AxialForce, 6));
            sb.AppendLine(FormatOutput("Mx", forces.MomentX, 6));
            sb.AppendLine(FormatOutput("My", forces.MomentY, 6));
        }
Exemple #3
0
        public static void FunctionXm(Steel steel)
        {
            double fg = SoilParameters.SoilCoefficient;       // [kN/m3]
            double wx = GeometryParameters.GlobalModulusX;    // [m3]
            double fy = steel.YieldStrength * 1000;           // [MPa/10 = kN/m2]

            Results.SteelYieldStrength = fy / 1000;           // [MPa]

            double Mmax = wx * fy;                            // [kNm]

            GeometryParameters.MaximumMoment = Mmax;

            double b = GeometryParameters.ConstructionWidth;    // [m]
            double h = GeometryParameters.ForceHeight;          // [m]

            double[] tabXm    = new double[100];
            double   Accuracy = 0.01;

            tabXm[0] = 1;
            tabXm[1] = 24 * Mmax / (fg * (3 * Math.Pow(tabXm[0], 3) + Math.Pow(tabXm[0], 2) * (4 * h + 8 * b) + 12 * h * b * tabXm[0]));
            tabXm[2] = (tabXm[1] + tabXm[0]) / 2;

            int i = 1;

            for (i = 1; (Math.Abs(tabXm[i] - tabXm[i - 1])) > Accuracy; i = i + 1)
            {
                tabXm[2 * i + 1]   = 24 * Mmax / (fg * (3 * Math.Pow(tabXm[2 * i], 3) + Math.Pow(tabXm[2 * i], 2) * (4 * h + 8 * b) + 12 * h * b * tabXm[2 * i]));
                tabXm[2 * (i + 1)] = (tabXm[2 * i + 1] + tabXm[2 * i]) / 2;
            }
            double Xm = tabXm[i];

            GeometryParameters.MomentDepth = Xm;
        }
Exemple #4
0
        /// <summary>
        /// Case 14: Calculation of capacity state in symmetric section for bidirectional bending with axial force
        /// </summary>
        public void Case14()
        {
            // geometry definition
            Geometry geometry = new Geometry();

            geometry.Add(0.0, 0.0);
            geometry.Add(0.3, 0.0);
            geometry.Add(0.3, 0.45);
            geometry.Add(0.0, 0.45);
            // rebars definition
            List <Rebar> rebars = new List <Rebar>();

            rebars.Add(new Rebar(0.15, 0.04, 0.025977 * 0.025977 * Math.PI / 4.0));
            // concrete parameters
            Concrete concrete = new Concrete();

            concrete.SetStrainStressModelRectangular(21.36e6, 0.0035, 35e9, 0.8);
            // steel parameters
            Steel steel = new Steel();

            steel.SetModelIdealElastoPlastic(310e6, 0.01, 200e9);
            // solver creation and parameterization
            RCSolver solver = RCSolver.CreateNewSolver(geometry);

            solver.SetRebars(rebars);
            solver.SetConcrete(concrete);
            solver.SetSteel(steel);
            //calulation
            solver.SolveResistance(200E3, -96E3, -24E3);
            // result for rebars
            SetOfForces forcesRebar = solver.GetInternalForces(ResultType.Rebars);
            // result for concrete
            SetOfForces forcesConcrete = solver.GetInternalForces(ResultType.Concrete);
            Point2D     Gcc            = solver.GetStressGravityCenter(ResultType.Concrete);
            double      Acc            = solver.GetConcreteStressArea();
            // result for RC section
            SetOfForces forces = solver.GetInternalForces(ResultType.Section);
            double      angle  = solver.GetNeutralAxisAngle();
            double      dist   = solver.GetNeutralAxisDistance();

            // result presentation
            sb.AppendLine();
            sb.AppendLine(decoration);
            sb.AppendLine("Case 14: Calculation of capacity state in symmetric section for bidirectional bending with axial force ");
            sb.AppendLine(decoration);
            sb.AppendLine(FormatOutput("Ns", forcesRebar.AxialForce, 6));
            sb.AppendLine(FormatOutput("Mxs", forcesRebar.MomentX, 6));
            sb.AppendLine(FormatOutput("Mys", forcesRebar.MomentY, 6));
            sb.AppendLine(FormatOutput("Ac", Acc, 6));
            sb.AppendLine(FormatOutput("Gcx", Gcc.X, 6));
            sb.AppendLine(FormatOutput("Gcy", Gcc.Y, 6));
            sb.AppendLine(FormatOutput("Nc", forcesConcrete.AxialForce, 6));
            sb.AppendLine(FormatOutput("Mxc", forcesConcrete.MomentX, 6));
            sb.AppendLine(FormatOutput("Myc", forcesConcrete.MomentY, 6));
            sb.AppendLine(FormatOutput("N", forces.AxialForce, 6));
            sb.AppendLine(FormatOutput("Mx", forces.MomentX, 6));
            sb.AppendLine(FormatOutput("My", forces.MomentY, 6));
            sb.AppendLine(FormatOutput("dist", dist, 6));
            sb.AppendLine(FormatOutput("angle", angle, 6));
        }
Exemple #5
0
        public void SetUpBeam()
        {
            var material = new Steel();
            var section  = new IBeamSection(
                width: 91, height: 180, flangeWidth: 8, webWidth: 5.3, radius: 9);

            var node1 = new FixedNode();
            var node2 = new FixedNode();

            var nodes = new Node[] { node1, node2 };

            var span1 = new Span(
                leftNode: node1,
                length: 10,
                rightNode: node2,
                material: material,
                section: section,
                includeSelfWeight: true
                );

            var spans = new Span[] { span1 };

            _beam = new Beam(spans, nodes, includeSelfWeight: false);

            _beam.CalculationEngine.Calculate();
        }
Exemple #6
0
        public CoactingGUI()
        {
            InitializeComponent();

            treatments.Items.Add("");
            treatments.Items.Add("Efterpolering, simple");
            treatments.Items.Add("Stripning, HSS Ti, TIAL");
            treatments.Items.Add("Stripning, HSS CrN, Crosal");

            foreach (Coating c in CR.GetAllCoatings())
            {
                dropdown1.Items.Add(c.name);
                dropdown2.Items.Add(c.name);
                dropdown3.Items.Add(c.name);
                dropdown4.Items.Add(c.name);
                dropdown5.Items.Add(c.name);
            }

            tooltypes1.Items.Add(" ");
            foreach (ToolType tt in TTR.GetAllToolTypes())
            {
                tooltypes1.Items.Add(tt.Name);
            }

            steel = new Steel(PR);
        }
Exemple #7
0
        private void ModelComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox combo = sender as ComboBox;

            switch ((string)combo.SelectedValue)
            {
            case "10ХСНД":
                if (_10CrSiNiCu == null)
                {
                    _10CrSiNiCu = new _10CrSiNiCu();
                }
                Calculator = _10CrSiNiCu;
                break;

            case "К60":
                if (K60 == null)
                {
                    K60 = new K60();
                }
                Calculator = K60;
                break;

            case "10Г2ФБ":
                if (_10Mn2VNb == null)
                {
                    _10Mn2VNb = new _10Mn2VNb();
                }
                Calculator = _10Mn2VNb;
                break;
            }
            Ratio = Calculator.ratio.ToString();
        }
Exemple #8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="concrete">Beton</param>
 /// <param name="steel">Çelik</param>
 /// <param name="section">Dikdörtgen kesit</param>
 /// <param name="Md">Tasarım moment [t.m]</param>
 /// <param name="Nd">Normal kuvvet. Basınç +. [t]</param>
 public SinglyReinforcedRectangularMember(Concrete concrete, Steel steel, RectangularSection section, double Md, double Nd)
 {
     k  = 1 - Math.Sqrt(1 - 2.0 * (Math.Abs(Md) + Nd * (section.d - section.h / 2)) / (concrete.beta * concrete.fcd * section.b * Math.Pow(section.d, 2.0)));
     a  = k * section.d;
     c  = a / concrete.k1;
     As = (concrete.beta * concrete.fcd * section.b * section.d - Nd) / steel.fyd;
     r  = As / (section.b * section.d);
 }
Exemple #9
0
        public Excadrill(double health, string status)
        {
            name  = "Excadrill";
            type1 = new Steel();
            type2 = new Ground();

            estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status);
        }
Exemple #10
0
        public Ferrothorn(double health, string status)
        {
            name  = "Ferrothorn";
            type1 = new Grass();
            type2 = new Steel();

            estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status);
        }
Exemple #11
0
 public Battleship() : base(16, 18, 12, 4, 2)
 {
     Type         = UnitType.Battleship;
     Name         = "Battleship";
     RequiredTech = new Steel();
     ObsoleteTech = null;
     SetIcon('A', 1, 0);
 }
Exemple #12
0
        public void SteelCreationTest_Success()
        {
            var steel = new Steel();

            Assert.That(steel.Density, Is.EqualTo(7850));
            Assert.That(steel.ThermalExpansionCoefficient, Is.EqualTo(0.000012));
            Assert.That(steel.YoungModulus, Is.EqualTo(210));
        }
Exemple #13
0
        public Scizor(double health, string status)
        {
            name  = "Scizor";
            type1 = new Steel();
            type2 = new Bug();

            estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status);
        }
Exemple #14
0
        public Magnezone(double health, string status)
        {
            name  = "Magnezone";
            type1 = new Steel();
            type2 = new Electric();

            estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status);
        }
Exemple #15
0
        public Metagross(double health, string status)
        {
            name  = "Metagross";
            type1 = new Steel();
            type2 = new Psychic();

            estimatedSpeed = 309; estimatedHealth = 309; estimatedAttack = 309; estimatedDefense = 309; estimatedSpAttk = 309; estimatedSpDef = 309; move1 = new Flamethrower(); move2 = new Flamethrower(); move3 = new Flamethrower(); move4 = new Flamethrower(); Initialize(name, health, status);
        }
Exemple #16
0
        public void CanGetDifferentQuantities()
        {
            Steel steel = new Steel()
            {
                IsRound = false, Width = 50, Height = 50, Length = 50, Quantity = 4
            };

            Assert.AreEqual(57.49, Math.Round(DryTreatmentRepository.GetDryTreatment(steel).QuantityMid, 2));
        }
Exemple #17
0
        public void CanGetDryTreatmentFromRoundSteel()
        {
            Steel steel2 = new Steel()
            {
                IsRound = true, Width = 180, Length = 173, Quantity = 20
            };

            Assert.AreEqual(142.07, Math.Round(DryTreatmentRepository.GetDryTreatment(steel2).QuantityHigh, 2));
        }
Exemple #18
0
        public static string Description(this Steel material)
        {
            if (material == null)
            {
                return("null material");
            }

            return($"Steel {material.MaterialAnalyticalValues():G3}, fy: {material.YieldStress:G3}, fu: {material.UltimateStress:G3}");
        }
Exemple #19
0
        /***************************************************/

        public static void CopyCharacteristics(this IMaterialFragment toMaterial, StructuralAsset fromAsset)
        {
            double density = fromAsset.Density.ToSI(UnitType.UT_MassDensity);

#if (REVIT2020 || REVIT2021)
#else
            double dampingRatio = fromAsset.DampingRatio;
#endif

            oM.Geometry.Vector youngsModulus         = BH.Engine.Geometry.Create.Vector(fromAsset.YoungModulus.X.ToSI(UnitType.UT_Stress), fromAsset.YoungModulus.Y.ToSI(UnitType.UT_Stress), fromAsset.YoungModulus.Z.ToSI(UnitType.UT_Stress));
            oM.Geometry.Vector thermalExpansionCoeff = BH.Engine.Geometry.Create.Vector(fromAsset.ThermalExpansionCoefficient.X.ToSI(UnitType.UT_ThermalExpansion), fromAsset.ThermalExpansionCoefficient.Y.ToSI(UnitType.UT_ThermalExpansion), fromAsset.ThermalExpansionCoefficient.Z.ToSI(UnitType.UT_ThermalExpansion));
            oM.Geometry.Vector poissonsRatio         = BH.Engine.Geometry.Create.Vector(fromAsset.PoissonRatio.X, fromAsset.PoissonRatio.Y, fromAsset.PoissonRatio.Z);
            oM.Geometry.Vector shearModulus          = BH.Engine.Geometry.Create.Vector(fromAsset.ShearModulus.X.ToSI(UnitType.UT_Stress), fromAsset.ShearModulus.Y.ToSI(UnitType.UT_Stress), fromAsset.ShearModulus.Z.ToSI(UnitType.UT_Stress));

            toMaterial.Density = density;
#if (REVIT2020 || REVIT2021)
#else
            toMaterial.DampingRatio = dampingRatio;
#endif

            if (toMaterial is Aluminium)
            {
                Aluminium material = toMaterial as Aluminium;
                material.YoungsModulus         = youngsModulus.X;
                material.ThermalExpansionCoeff = thermalExpansionCoeff.X;
                material.PoissonsRatio         = poissonsRatio.X;
            }
            else if (toMaterial is Concrete)
            {
                Concrete material = toMaterial as Concrete;
                material.YoungsModulus         = youngsModulus.X;
                material.ThermalExpansionCoeff = thermalExpansionCoeff.X;
                material.PoissonsRatio         = poissonsRatio.X;
            }
            else if (toMaterial is Steel)
            {
                Steel material = toMaterial as Steel;
                material.YoungsModulus         = youngsModulus.X;
                material.ThermalExpansionCoeff = thermalExpansionCoeff.X;
                material.PoissonsRatio         = poissonsRatio.X;
            }
            else if (toMaterial is Timber)
            {
                Timber material = toMaterial as Timber;
                material.YoungsModulus         = youngsModulus;
                material.ThermalExpansionCoeff = thermalExpansionCoeff;
                material.PoissonsRatio         = poissonsRatio;
            }
            else if (toMaterial is GenericIsotropicMaterial)
            {
                GenericIsotropicMaterial material = toMaterial as GenericIsotropicMaterial;
                material.YoungsModulus         = youngsModulus.X;
                material.ThermalExpansionCoeff = thermalExpansionCoeff.X;
                material.PoissonsRatio         = poissonsRatio.X;
            }
        }
        public ServiceabilityCondition(Concrete concrete, Steel steel, double b, double d)
        {
            r = 0.235 * concrete.fcd / steel.fyd;
            c = r * d * steel.fyd / (concrete.fcd * concrete.beta * concrete.k1);
            j = 1 - c * concrete.k1 / (2.0 * d);
            M = r * b * d * steel.fyd * j * d;
            a = concrete.k1 * c;

            K = b * d * d / M;
        }
Exemple #21
0
        public void Setup()
        {
            Mock <IRandom> random = new Mock <IRandom>();

            random.Setup(e => e.Next(6, 9)).Returns(1);
            random.Setup(e => e.Next(9, 12)).Returns(2);
            random.Setup(e => e.Next(12, 15)).Returns(3);
            GlobalReference.GlobalValues.Random = random.Object;
            material = new Steel();
        }
Exemple #22
0
 public MainWindow()
 {
     InitializeComponent();
     ModelList = new ObservableCollection <string>
     {
         "10ХСНД",
         "К60",
         "10Г2ФБ"
     };
     Calculator = null;
 }
Exemple #23
0
        public DoublyReinforcedRectangularMember(Concrete concrete, Steel steel, RectangularSection section, double Md, double Nd)
        {
            ServiceabilityCondition sCond = new ServiceabilityCondition(concrete, steel, section.b, section.d);

            double Mds = 0.85 * concrete.fcd * sCond.a * section.b * (section.d - sCond.a / 2.0) - (section.d - section.h / 2.0) * Nd;

            double fs = Math.Min(steel.E * concrete.Ecu * ((sCond.c - section.pCompFace) / sCond.c), steel.fyd);

            Asc = (Md - Mds) / (fs * (section.d - section.pCompFace));
            Ast = (0.85 * concrete.fcd * sCond.a * section.b - Nd + Asc * fs) / steel.fyd;
        }
Exemple #24
0
    public Armours[] InitArmours()
    {
        Armours[] armArr = new Armours[4];

        armArr[0] = new Wool();
        armArr[1] = new Leather();
        armArr[2] = new Steel();
        armArr[3] = new Chainmail();

        return(armArr);
    }
        public RcRectangularSection(RectangularSection Section, Concrete Concrete, Steel Steel, List <ReinforcingBar> ReinforcingBars)
        {
            this.Section         = Section;
            this.Concrete        = Concrete;
            this.Steel           = Steel;
            this.ReinforcingBars = ReinforcingBars;

            balancedCondition       = new BalancedCondition(Concrete, Steel, Section.b, Section.d);
            serviceabilityCondition = new ServiceabilityCondition(Concrete, Steel, Section.b, Section.d);
            cMax = ReinforcingBars.Max(bar => bar.di);
            //cMax = 0.90 * Section.h;
        }
Exemple #26
0
        public void CalculateVolumeOfRoundSteel()
        {
            Steel steel = new Steel()
            {
                IsRound  = true,
                Width    = 20,
                Length   = 20,
                Quantity = 1
            };

            Assert.AreEqual(6.28, Math.Round(steel.GetVolume(), 2));
        }
Exemple #27
0
        public void CanCalculateFinalPriceWithOnlyCoatings()
        {
            Steel steel = new Steel(PriceRepository)
            {
                Width = 33, Length = 20, Height = 55, IsRound = false, Quantity = 1
            };

            coatings.Add(CoatingRepository.GetCoating("CROSAL"));
            coatings.Add(CoatingRepository.GetCoating("SISTRAL"));

            //Assert.AreEqual(601.13, steel.GetFinalPrice(coatings, watertreatment, drytreatment, tooltypes));
        }
Exemple #28
0
        /***************************************************/

        private static ISectionProperty ToSectionProperty(BHP.FramingProperties.ConstantFramingProperty property)
        {
            ISectionProperty prop = null;

            BHP.Materials.Material material = property.Material;

            IMaterialFragment fragment;

            if (material == null)
            {
                Reflection.Compute.RecordError("The FramingElement does not contain any material. An empty steel material has been used");
                fragment = new Steel();
            }
            else if (!material.IsValidStructural())
            {
                string matName = material.Name ?? "";
                Reflection.Compute.RecordWarning("The material with name " + matName + " is not a valid structural material as it does not contain exactly one structural material fragment. An empty steel material has been assumed");
                fragment = new Steel {
                    Name = matName
                };
            }
            else
            {
                fragment = material.StructuralMaterialFragment();
            }

            switch (fragment.IMaterialType())
            {
            case oM.Structure.MaterialFragments.MaterialType.Steel:
                prop = Create.SteelSectionFromProfile(property.Profile, fragment as Steel, property.Name);
                break;

            case oM.Structure.MaterialFragments.MaterialType.Concrete:
                prop = Create.ConcreteSectionFromProfile(property.Profile, fragment as Concrete, property.Name);
                break;

            case oM.Structure.MaterialFragments.MaterialType.Aluminium:
            case oM.Structure.MaterialFragments.MaterialType.Timber:
            case oM.Structure.MaterialFragments.MaterialType.Rebar:
            case oM.Structure.MaterialFragments.MaterialType.Tendon:
            case oM.Structure.MaterialFragments.MaterialType.Glass:
            case oM.Structure.MaterialFragments.MaterialType.Cable:
            case oM.Structure.MaterialFragments.MaterialType.Undefined:
            default:
                prop          = Create.SteelSectionFromProfile(property.Profile, null, property.Name);
                prop.Material = fragment;
                Reflection.Compute.RecordWarning("The BHoM does not currently support sections of material type " + fragment.IMaterialType() + ". A steel section has been created with the material applied to it");
                break;
            }

            return(prop);
        }
Exemple #29
0
        /// <summary>
        /// Calculate the moment of inertia for cracking section.
        /// </summary>
        /// <param name="inNMM">The acting forces.</param>
        /// <returns>Returns moment of inertia for cracking section.</returns>
        public double InertiaOfCrackingSection(InternalForcesContainer inNMM)
        {
            double momentOfInertiaCrackingConcreteSection = 0.0;

            solver.SolveResistance(inNMM.ForceFx, inNMM.MomentMy, 0.0);
            SetOfForces solverNMM        = solver.GetInternalForces(Autodesk.CodeChecking.Concrete.ResultType.Section);
            double      neutralAxisDist  = solver.GetNeutralAxisDistance();
            double      centerOfInertiaY = solverGeometry.CenterOfInertia.Y;
            double      stressArea       = solver.GetConcreteStressArea();
            double      comprHeight      = -neutralAxisDist;
            Steel       steel            = solver.GetSteel();

            Autodesk.CodeChecking.Concrete.Concrete concrete = solver.GetConcrete();
            double bottomWidth = solverGeometry.Point(1).X - solverGeometry.Point(0).X;
            double n           = steel.ModulusOfElasticity / concrete.ModulusOfElasticity;

            momentOfInertiaCrackingConcreteSection  = comprHeight * comprHeight * comprHeight * bottomWidth / 3.0; // bh^3/12 + b*h*(0.5*h)^2
            momentOfInertiaCrackingConcreteSection += n * (solver.GetMomentOfInertiaX(Autodesk.CodeChecking.Concrete.ResultType.Rebars) + Math.Abs(neutralAxisDist) * solver.GetArea(Autodesk.CodeChecking.Concrete.ResultType.Rebars));
            switch (crossSectionType)
            {
            case SectionShapeType.RectangularBar:
                break;

            case SectionShapeType.T:
            {
                bool   bottomMoreCompression = inNMM.MomentMy >= 0.0;
                double TotalWidth            = solverGeometry.Point(4).X - solverGeometry.Point(5).X;
                if (bottomMoreCompression)
                {
                    double WithoutSlabHeight = solverGeometry.Point(2).Y - solverGeometry.Point(1).Y;
                    if (comprHeight > WithoutSlabHeight)
                    {
                        double partT = (comprHeight - WithoutSlabHeight);
                        momentOfInertiaCrackingConcreteSection += Math.Pow(comprHeight - 0.5 * partT, 2) * (TotalWidth - bottomWidth);
                        momentOfInertiaCrackingConcreteSection += (TotalWidth - bottomWidth) * partT * partT * partT / 12.0;
                    }
                }
                else
                {
                    double SlabHeight = solverGeometry.Point(4).Y - solverGeometry.Point(3).Y;
                    SlabHeight = Math.Min(SlabHeight, comprHeight);
                    momentOfInertiaCrackingConcreteSection += Math.Pow(comprHeight - 0.5 * SlabHeight, 2) * (TotalWidth - bottomWidth);
                    momentOfInertiaCrackingConcreteSection += (TotalWidth - bottomWidth) * SlabHeight * SlabHeight * SlabHeight / 12.0;
                }
            }
            break;

            default:
                throw new Exception("InertiaOfCrackingSection. Unhandled cross section type. Only R and T cross-sections can be used on this path.");
            }
            return(momentOfInertiaCrackingConcreteSection);
        }
Exemple #30
0
        public void CalculateVolumeOfSquareSteel()
        {
            Steel steel = new Steel()
            {
                IsRound  = false,
                Height   = 20,
                Width    = 20,
                Length   = 20,
                Quantity = 1
            };

            Assert.AreEqual(8, steel.GetVolume());
        }
        public override void Update()
        {
            base.Update();

            if (this.CycleCounter % 3 == 0 && this.CycleCounter != 0)
            {
                var steel = new Steel();
                this.AddResource(steel);
                this.ResourceCycle = 0;
            }
            if (this.CycleCounter % 4 == 0 && this.CycleCounter != 0)
            {
                var swordsman = new Swordsman();
                this.AddUnit(swordsman);
                this.Engine.DB.AddUnit(swordsman);
                this.UnitCycle = 0;
            }
        }