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>();
            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))
                );
        }