public override void UpdateCalc()
        {
            formulae = new List <Formula>();
            var concProps     = ConcProperties.ByGrade(concGrade.ValueAsString);
            var creepCalc     = new ConcCreep(concGrade.ValueAsString, relativeHumidity.Value, time.Value, time0.Value, L.Value, W.Value);
            var shrinkageCalc = new ConcShrinkage(concGrade.ValueAsString, relativeHumidity.Value, time.Value, timeShrinkStart.Value, L.Value, W.Value, cementType.ValueAsString);

            notionalcreepcoeff.Value = creepCalc.NotionalCreepCoefficient;
            charCompStr.Value        = concProps.fck;
            meanCompStr.Value        = concProps.fcm;
            Ac.Value                   = creepCalc.Ac;
            u.Value                    = creepCalc.U;
            creepTimeCoeff.Value       = creepCalc.CreepTimeCoeff;
            creepCoeff.Value           = creepCalc.CreepCoefficient;
            dryingStrain.Value         = shrinkageCalc.DryingStrain;
            totalShrinkageStrain.Value = shrinkageCalc.TotalShrinkageStrain;

            double effectiveE  = 1.08 * concProps.Ecm / (1 + creepCoeff.Value);
            double stress      = F.Value * 1000 / Ac.Value;
            double creepStrain = stress / (effectiveE * 1000);

            creepMovement.Value     = H.Value * creepStrain;
            shrinkageMovement.Value = H.Value * totalShrinkageStrain.Value;

            formulae.AddRange(creepCalc.GetFormulae());
            formulae.AddRange(shrinkageCalc.GetFormulae());

            totalMovement.Value = creepMovement.Value + shrinkageMovement.Value;
            formulae.Add(
                Formula.FormulaWithNarrative("Total movement")
                .AddFirstExpression(@"\delta=" + String.Format("{0:F2}", totalMovement.Value))
                );
        }
Esempio n. 2
0
        public override void UpdateCalc()
        {
            formulae    = null;
            expressions = new List <Formula>();

            double T = 0;
            double F = _strutForce.Value;
            double a = _nodeWidth.Value;
            double H = _strutLength.Value;
            double b = Math.Min(_availableStrutWidth.Value, _strutLength.Value / 2);

            if (_discontinuity.ValueAsString == "Full")
            {
                T = F * (1 - (0.7 * a / H)) / 4;
                expressions.Add(
                    Formula.FormulaWithNarrative("Calculate bursting tie force")
                    .AddFirstExpression("T = " + Math.Round(T, 2) + "kN")
                    );
            }
            else
            {
                T = F * (b - a) / (4 * b);
                expressions.Add(
                    Formula.FormulaWithNarrative("Calculate bursting tie force")
                    .AddFirstExpression("T = " + Math.Round(T, 2) + "kN")
                    );
            }

            var    concProps = ConcProperties.ByGrade(_concGrade.ValueAsString);
            double fctd      = concProps.fctk005 / 1.5; // 1.5 is partial factor for transient loads. alpha factored is default 1 and not used here
            double t         = _thickness.Value;

            if (T * 1000 >= 0.3 * t * H * fctd)
            {
                expressions.Add(
                    Formula.FormulaWithNarrative("Check tie force")
                    .AddFirstExpression(@"T \geq 0.3tHf_{fctd}")
                    .AddExpression(@"T \geq " + Math.Round((0.3 * t * H * fctd) / 1000, 2))
                    .AddConclusion("Reinforcement required")
                    .AddStatus(CalcStatus.FAIL)
                    );
                _tensionToReinforce.Value = T;
            }
            else
            {
                expressions.Add(
                    Formula.FormulaWithNarrative("Check tie force")
                    .AddFirstExpression(@"T < 0.3tHf_{fctd}")
                    .AddExpression(@"T < " + Math.Round((0.3 * t * H * fctd) / 1000, 2))
                    .AddConclusion("OK")
                    .AddStatus(CalcStatus.PASS)
                    );
                _tensionToReinforce.Value = 0;
            }
            _burstingForce.Value = T;
        }
Esempio n. 3
0
        public override void UpdateCalc()
        {
            // reset the formulae
            formulae = new List <Formula>();

            //add your calc logic here
            //do something!
            Double secwdith = 1000;
            var    concprop = ConcProperties.ByGrade(_ConcreteGrade.ValueAsString);
            Double linkdia  = double.Parse(_linkdia.ValueAsString);
            Double bardia   = double.Parse(_Bardia.ValueAsString);
            Double d        = _depth.Value - _cover.Value - linkdia - bardia / 2;

            // in accordance with section 9.2.1.1
            Asmin9 = Math.Max((0.26 * concprop.fctm * secwdith * d) / (_Fy.Value), 0.0013 * secwdith * d);

            //add formulae and commentary as you work through
            formulae.Add(Formula.FormulaWithNarrative("Minimum steel for brittle failure")
                         .AddExpression(_Asmin.Symbol + "= Min (0.26*f_{ctm}*b_{t}*d,0.0013*b_t*d)=" + Asmin9 + _Asmin.Unit)
                         .AddRef("EN1992-1-1 9.2.1.1(1)")
                         );

            //in accordance with section 7
            k1 = 0.8;
            k2 = 0.5;
            k3 = 3.4;
            k4 = 0.425;
            kc = 0.4;
            k  = 1;

            //Double hcef = Math.Min(2.5 * (_depth.Value - d), Math.Min(_depth.Value / 2, (_depth.Value - x) / 3));
            Double hcef = 0.2 * _depth.Value;

            Double Aceff = secwdith * hcef;

            //minimum steel requirements
            Asmin7 = (kc * k * concprop.fctm * Aceff) / _Fy.Value;
            formulae.Add(Formula.FormulaWithNarrative("Minimum steel for cracking")
                         .AddExpression("k_{c}=" + kc)
                         .AddExpression("k=" + k)
                         .AddExpression("A_{ct}=0.2*h=" + Aceff)
                         .AddExpression(_Asmin.Symbol + "= (k_{c}*k*f_{ct,eff}*A_{ct})/f_{y} =" + Asmin7 + _Asmin.Unit)
                         .AddRef("EN1992-1-1 7.3.2 (7.1)")
                         );

            //worst case minimum
            _Asmin.Value = Math.Max(Asmin7, Asmin9);
            formulae.Add(Formula.FormulaWithNarrative("Minimum steel")
                         .AddExpression(_Asmin.Symbol + "=" + _Asmin.Value + _Asmin.Unit)
                         );
        }
        public override void UpdateCalc()
        {
            formulae = null;
            ConcProperties props = ConcProperties.ByGrade(_grade.ValueAsString);

            _fck.Value     = props.fck;
            _fckcube.Value = props.fckcube;
            _fcm.Value     = props.fcm;
            _fctm.Value    = props.fctm;
            _fctk005.Value = props.fctk005;
            _fctk095.Value = props.fctk095;
            _Ecm.Value     = props.Ecm;
            _Ec1.Value     = props.Epsilonc1;
            _Ecu1.Value    = props.Epsiloncu1;
            _Ec2.Value     = props.Epsilonc2;
            _Ecu2.Value    = props.Epsiloncu2;
            _n.Value       = props.n;
            _Ec3.Value     = props.Epsilonc3;
            _Ecu3.Value    = props.Epsiloncu3;
        }
Esempio n. 5
0
        public override void UpdateCalc()
        {
            formulae    = null;
            expressions = new List <Formula>();
            var concProps = ConcProperties.ByGrade(concGrade.ValueAsString);
            // CALC SHRINKAGE FOR FIRST AND SECOND RH VALUES
            var shrinkageExpression = Formula.FormulaWithNarrative("Calculate shrinkage");

            if (time.Value <= relativeHumiditySwitchTime.Value)
            {
                var shrinkageCalc1 = new ConcShrinkage(concGrade.ValueAsString, relativeHumidity1.Value, time.Value, timeShrinkStart.Value, L.Value, W.Value, cementType.ValueAsString);
                totalShrinkageStrain.Value = shrinkageCalc1.TotalShrinkageStrain;
                shrinkageExpression.AddFirstExpression(totalShrinkageStrain.Symbol + "=" + Math.Round(totalShrinkageStrain.Value, 2));
            }
            else
            {
                var shrinkageCalc1 = new ConcShrinkage(concGrade.ValueAsString, relativeHumidity1.Value, relativeHumiditySwitchTime.Value, timeShrinkStart.Value, L.Value, W.Value, cementType.ValueAsString);
                var shrinkageCalc2 = new ConcShrinkage(concGrade.ValueAsString, relativeHumidity2.Value, relativeHumiditySwitchTime.Value, timeShrinkStart.Value, L.Value, W.Value, cementType.ValueAsString);
                var shrinkageCalc3 = new ConcShrinkage(concGrade.ValueAsString, relativeHumidity2.Value, time.Value, timeShrinkStart.Value, L.Value, W.Value, cementType.ValueAsString);
                totalShrinkageStrain.Value     = shrinkageCalc1.TotalShrinkageStrain + (shrinkageCalc3.TotalShrinkageStrain - shrinkageCalc2.TotalShrinkageStrain);
                shrinkageExpression.Narrative += Environment.NewLine + "Calculate shrinkage up to change in humidity using RH1 (1) and RH2 (2), and " +
                                                 "calculate total shrinkage using RH2 (3).";
                shrinkageExpression.AddFirstExpression(@"\epsilon_{cs,1} = " + string.Format("{0:#.##E+0}", shrinkageCalc1.TotalShrinkageStrain));
                shrinkageExpression.AddExpression(@"\epsilon_{cs,2} = " + string.Format("{0:#.##E+0}", shrinkageCalc2.TotalShrinkageStrain));
                shrinkageExpression.AddExpression(@"\epsilon_{cs,3} = " + string.Format("{0:#.##E+0}", shrinkageCalc3.TotalShrinkageStrain));
                shrinkageExpression.AddExpression(totalShrinkageStrain.Symbol + @"= \epsilon_{cs,1} + (\epsilon_{cs,3} - \epsilon_{cs,2}) = " + string.Format("{0:#.##E+0}", totalShrinkageStrain.Value));
            }

            Ac.Value = L.Value * W.Value;
            u.Value  = 2 * L.Value + 2 * W.Value;

            totalCreepMovement.Value = 0;
            var    creepExpression = Formula.FormulaWithNarrative("Calculate creep from each load" + Environment.NewLine);
            double Et = 1.08 * concProps.Ecm;

            foreach (var loadEvent in _loads.Value)
            {
                double load     = loadEvent[0];
                double loadTime = loadEvent[1];

                if (loadTime < time.Value)
                {
                    if (loadTime > relativeHumiditySwitchTime.Value)
                    {
                        // load only affected by RH2
                        var    creepCalc     = new ConcCreep(concGrade.ValueAsString, relativeHumidity2.Value, time.Value, loadTime, L.Value, W.Value);
                        double effectiveE    = Et / (1 + creepCalc.CreepCoefficient);
                        double stress        = load * 1000 / Ac.Value;
                        double creepStrain   = stress / (effectiveE * 1000);
                        double creepMovement = H.Value * creepStrain;
                        this.totalCreepMovement.Value += creepMovement;
                        creepExpression.Narrative     += "Elastic movement plus creep due to " + load + "kN applied at " + loadTime + " days: " + creepMovement + "mm" + Environment.NewLine;
                    }
                    else if (time.Value < relativeHumiditySwitchTime.Value)
                    {
                        //load only affected by RH1
                        var    creepCalc     = new ConcCreep(concGrade.ValueAsString, relativeHumidity1.Value, time.Value, loadTime, L.Value, W.Value);
                        double effectiveE    = Et / (1 + creepCalc.CreepCoefficient);
                        double stress        = load * 1000 / Ac.Value;
                        double creepStrain   = stress / (effectiveE * 1000);
                        double creepMovement = H.Value * creepStrain;
                        this.totalCreepMovement.Value += creepMovement;
                        creepExpression.Narrative     += "Elastic movement plus creep due to " + load + "kN applied at " + loadTime + " days: " + creepMovement + "mm" + Environment.NewLine;
                    }
                    else
                    {
                        var    creepCalc1    = new ConcCreep(concGrade.ValueAsString, relativeHumidity1.Value, relativeHumiditySwitchTime.Value, loadTime, L.Value, W.Value);
                        var    creepCalc2_1  = new ConcCreep(concGrade.ValueAsString, relativeHumidity2.Value, relativeHumiditySwitchTime.Value, loadTime, L.Value, W.Value);
                        var    creepCalc2_2  = new ConcCreep(concGrade.ValueAsString, relativeHumidity2.Value, time.Value, loadTime, L.Value, W.Value);
                        double effCreepCoeff = creepCalc1.CreepCoefficient + (creepCalc2_2.CreepCoefficient - creepCalc2_1.CreepCoefficient);
                        double effectiveE    = Et / (1 + effCreepCoeff);
                        double stress        = load * 1000 / Ac.Value;
                        double creepStrain   = stress / (effectiveE * 1000);
                        double creepMovement = H.Value * creepStrain;
                        this.totalCreepMovement.Value += creepMovement;
                        creepExpression.Narrative     += "Creep coefficients :" + creepCalc1.CreepCoefficient + ", " + creepCalc2_1.CreepCoefficient + ", " + creepCalc2_2.CreepCoefficient + ". " + Environment.NewLine;
                        creepExpression.Narrative     += "Elastic movement plus creep due to " + load + "kN applied at " + loadTime + " days: " + creepMovement + "mm" + Environment.NewLine;
                    }
                }
            }

            expressions.Add(shrinkageExpression);
            expressions.Add(creepExpression);

            charCompStr.Value       = concProps.fck;
            meanCompStr.Value       = concProps.fcm;
            shrinkageMovement.Value = H.Value * totalShrinkageStrain.Value;
            totalMovement.Value     = this.totalCreepMovement.Value + shrinkageMovement.Value;
            expressions.Add(
                Formula.FormulaWithNarrative("Total movement")
                .AddFirstExpression(String.Format("{0:F3}", totalMovement.Value))
                );
        }