private LevelDataDictionary <SeismicStoryForce> DetermineStoryShears() { var storyShears = new LevelDataDictionary <SeismicStoryForce>(); var calc = new RecordedCalculation("Design Story Shears", CalculationType.SeismicDesign); List <BuildingLevelLateral2> levelsFromBottomToTop = _levels.OrderBy(l => l.Level.Elevation).ToList(); for (var i = 0; i < levelsFromBottomToTop.Count; i++) { List <SeismicStoryForce> orderedForces = _storyForces.DataOrderedFromBottomToTopLevel(); Force Vx_i_x = Chapter_12.Section_12_8.Eqn_12_8_13(orderedForces.Select(f => f.X).ToList(), i, ref calc); Force Vx_i_y = Chapter_12.Section_12_8.Eqn_12_8_13(orderedForces.Select(f => f.Y).ToList(), i, ref calc); storyShears.Add(new SeismicStoryForce { Level = levelsFromBottomToTop[i].Level, X = Vx_i_x, Y = Vx_i_y }); } ; return(storyShears); }
private LevelDataDictionary <SeismicStoryForce> DetermineStoryForces() { var storyForces = new LevelDataDictionary <SeismicStoryForce>(); var calc = new RecordedCalculation("Design Story Forces", CalculationType.SeismicDesign); foreach (BuildingLevelLateral2 level in _levels) { var distributionFactorX = _distributionFactors[level.Level].X; var distributionFactorY = _distributionFactors[level.Level].Y; Force Fx_i_x = Chapter_12.Section_12_8.Eqn_12_8_11(distributionFactorX, _baseShear, ref calc); Force Fx_i_y = Chapter_12.Section_12_8.Eqn_12_8_11(distributionFactorY, _baseShear, ref calc); storyForces.Add(new SeismicStoryForce { Level = level.Level, X = Fx_i_x, Y = Fx_i_y }); } // CalcLog.AddCalculation(calc); return(storyForces); }
public WallCostCharacterization Run() { _elf = new EquivalentLateralForceProcedure(_lateralLevels, _seismicBuildingProperties, new Length(_serializedModel.ModelSettings.BuildingHeight, LengthUnit.Inch)); _elf.Run(); RigidAnalyses = GenerateRigidAnalyses(); AnalyzeRigid(); return(CharacterizeAllWallCosts()); }
/// <summary> /// Do not use null. Just don't. /// </summary> /// <param name="levelDict"></param> /// <param name="sideBDict"></param> /// <param name="achDict"></param> /// <param name="complete"></param> /// <param name="sideBUnlocked"></param> /// <param name="sideBComplete"></param> public SaveData(LevelDataDictionary levelDict, LevelDataDictionary sideBDict, AccomplishmentDictionary achList, bool complete, bool sideBUnlocked, bool sideBComplete, WindowsOptions winOpt, XboxOptions xOpt) { LevelData = levelDict; SideBLevelData = sideBDict; AchievementData = achList; GameCompleted = complete; SideBUnlocked = sideBUnlocked; SideBCompleted = sideBComplete; Options = winOpt; Xoptions = xOpt; }
/// <summary> /// Only the serializer should call this. /// </summary> public SaveData() { SaveData EmptyData = SaveData.GetEmptyData(1); this.AchievementData = EmptyData.AchievementData; this.GameCompleted = false; this.LevelData = EmptyData.LevelData; this.SideBCompleted = false; this.SideBUnlocked = false; this.SideBLevelData = EmptyData.SideBLevelData; Options = new WindowsOptions(); Xoptions = new XboxOptions(); }
public static LevelDictionary <PointDrift> GetDesignBoundaryCornerDrifts(LevelDataDictionary <RigidAnalysis> analyses) { var drifts = new LevelDictionary <PointDrift>(); List <BuildingLevelLateral2> sortedLevels = analyses.Select(l => l.Value.LateralLevel).OrderBy(l => l.Level.Elevation).ToList(); for (var i = 0; i < sortedLevels.Count; i++) { BuildingLevel level = sortedLevels[i].Level; RigidAnalysis analysis = analyses[level]; List <PointDrift> driftsAtLevel = DisplacementsWithUnknownDrifts(level, analysis.Responses.NodalLoadCaseResults.Values.SelectMany(r => r)); var storyHeight = sortedLevels[i].Height; if (i == 0) { // Lowest level; compare to ground driftsAtLevel.ForEach(d => { d.Drift = (Unitless)Result.Abs(d.Displacement / storyHeight); d.CoordinateBelow = d.Coordinate; d.DisplacementBelow = new Length(0, LengthUnit.Inch); }); } else { // Elevated level; compare to level below List <PointDrift> driftsAtLevelBelow = drifts[sortedLevels[i - 1].Level]; driftsAtLevel.ForEach(d => { PointDrift driftBelow = d.GetMatchingDriftAtLevelBelow(driftsAtLevelBelow); d.Drift = (Unitless)Result.Abs((d.Displacement - driftBelow.Displacement) / storyHeight); d.CoordinateBelow = driftBelow.Coordinate; d.DisplacementBelow = driftBelow.Displacement; }); } drifts.Add(level, driftsAtLevel); } return(drifts); }
public void Run() { ValidateLevelHeights(); SetDefaultStoryEccentricities(); _baseShear = DetermineSeismicBaseShear(); _distributionFactors = DetermineDistributionFactors(); _storyForces = DetermineStoryForces(); _storyShears = DetermineStoryShears(); AppliedForces = GenerateAppliedLoading(); }
private LevelDataDictionary <RigidAnalysis> GenerateRigidAnalyses() { var analyses = new LevelDataDictionary <RigidAnalysis>(); foreach (BuildingLevelLateral2 level in _lateralLevels) { IEnumerable <AnalyticalWallLateral> wallsAtLevel = _lateralWallList.Where(w => w.TopLevel.Equals(level.Level)); List <LateralLevelForce> forcesAtLevel = _elf.AppliedForces[level.Level]; analyses.Add(new RigidAnalysis(level, wallsAtLevel, forcesAtLevel, CommonResources.ASCE7SeismicELFLoadCases(), _serializedModel.SeismicParameters.SystemParameters.Cd)); } return(analyses); }
private LevelDataDictionary <VerticalDistributionFactors> DetermineDistributionFactors() { var distributionFactors = new LevelDataDictionary <VerticalDistributionFactors>(); var k = 1.0; if (_fundamentalPeriod.Value > 0.5 && _fundamentalPeriod.Value < 2.5) { k = 1.0 + (_fundamentalPeriod.Value - 0.5) / 2d; } else if (_fundamentalPeriod.Value >= 2.5) { k = 2.0; } List <Force> w = _levels.Select(l => l.SeismicWeight).ToList(); List <Length> H = _levels.Select(l => l.Height).ToList(); var n = _levels.Count; var calc = new RecordedCalculation("Vertical Distribution Factors", CalculationType.SeismicDesign); foreach (BuildingLevelLateral2 level in _levels) { Force w_x = level.SeismicWeight; Length h_x = level.Height; Unitless C_vxi = Chapter_12.Section_12_8.Eqn_12_8_12(w_x, h_x, k, n, w, H, ref calc); distributionFactors.Add(new VerticalDistributionFactors { Level = level.Level, X = C_vxi, Y = C_vxi }); } // CalcLog.AddCalculation(calc); return(distributionFactors); }