/// <summary> /// Assignes the load group to the correct field depending on its type /// </summary> /// <param name="loadGroup"><see cref="LoadGroupBase">A specific load group instance, derived from LoadGroupBase</see></param> /// <param name="replaceExisting">True if the general load group already contains a specific load group</param> public void AddSpecificLoadGroup(LoadGroupBase loadGroup, bool replaceExisting) { if (loadGroup is LoadGroupPermanent) { if ((GetSpecificLoadGroup() == null) || replaceExisting) { this.ModelLoadGroupPermanent = (LoadGroupPermanent)loadGroup; } else { throw new System.ArgumentException("There already exists a specific load group in the general load group"); } } else if (loadGroup is LoadGroupTemporary) { if ((GetSpecificLoadGroup() == null) || replaceExisting) { this.ModelLoadGroupTemporary = (LoadGroupTemporary)loadGroup; } else { throw new System.ArgumentException("Load group type not yet implemented"); } } }
/// <summary> /// Returns the leading action name or the leading load group name /// </summary> /// <param name="parentLoadGroup">The parent load group of the leading load case</param> /// <param name="leadingLoadCase">The leading load case</param> /// <returns>The name of the leading action or load group</returns> private string FindLeadingActionName(LoadGroupTemporary parentLoadGroup, ModelLoadCaseInGroup leadingLoadCase) { string leadingActionName = ""; // Find a suitable name for the leading action if (parentLoadGroup.Relationship == ELoadGroupRelationship.Alternative) { leadingActionName = parentLoadGroup.GetCorrespondingCompleteLoadCase(leadingLoadCase).Name; } else if (parentLoadGroup.Relationship == ELoadGroupRelationship.Entire) { // Use the groups name leadingActionName = parentLoadGroup.Name; } return(leadingActionName); }
/// <summary> /// Gets the indices of the leading action (0) if load case relation is alternative or the whole groups indices if load case relation is entire /// </summary> ///<param name="loadCases">List of load cases</param> /// <returns>Returns a list of indices</returns> private List <int> GetLeadingLoadCaseIndices(List <ModelLoadCaseInGroup> loadCases) { List <int> indicesLeadingCases = new List <int>(); // The first load cases is always one of the leading actions (entire) or the sole leading action (alternative) LoadGroupTemporary parentLoadGroupLeadingAction = (LoadGroupTemporary)loadCases[0].LoadGroup; // If relationship is entire the whole group is leading action if (parentLoadGroupLeadingAction.Relationship == ELoadGroupRelationship.Entire) { indicesLeadingCases.AddRange(Enumerable.Range(0, parentLoadGroupLeadingAction.LoadCase.Count)); } else if (parentLoadGroupLeadingAction.Relationship == ELoadGroupRelationship.Alternative) { indicesLeadingCases.Add(0); } return(indicesLeadingCases); }
/// <summary> /// Adds the load combination gamma factor based on the combination type /// </summary> /// <param name="parentLoadGroup">The load group to take the coefficients from</param> /// <param name="combinationType">The type of load combination</param> /// <param name="loadCombGammas">The list of combinations factors to append to</param> private void AddCombinationFactorsAccompanyingAction(LoadGroupTemporary parentLoadGroup, ELoadCombinationType combinationType, List <double> loadCombGammas) { if (combinationType == ELoadCombinationType.SixTenB) { loadCombGammas.Add(parentLoadGroup.SafetyFactor * parentLoadGroup.Psi0); } else if (combinationType == ELoadCombinationType.Characteristic) { loadCombGammas.Add(parentLoadGroup.Psi0); } else if (combinationType == ELoadCombinationType.Frequent) { loadCombGammas.Add(parentLoadGroup.Psi2); } else if (combinationType == ELoadCombinationType.QuasiPermanent) { loadCombGammas.Add(parentLoadGroup.Psi2); } }
/// <summary> /// Adds the load combination gamma factor based on the combination type /// </summary> /// <param name="parentLoadGroup">The load group to take the coefficients from</param> /// <param name="combinationType">The type of load combination</param> /// <param name="loadCombGammas">The list of combinations factors to append to</param> private void AddCombinationFactorLeadingAction(LoadGroupTemporary parentLoadGroup, ELoadCombinationType combinationType, List <double> loadCombGammas) { // Assign the combination factors if (combinationType == ELoadCombinationType.SixTenB) { loadCombGammas.Add(parentLoadGroup.SafetyFactor); } else if (combinationType == ELoadCombinationType.Characteristic) { loadCombGammas.Add(1); } else if (combinationType == ELoadCombinationType.Frequent) { loadCombGammas.Add(parentLoadGroup.Psi1); } else if (combinationType == ELoadCombinationType.QuasiPermanent) { loadCombGammas.Add(parentLoadGroup.Psi2); } }
/// <summary> /// Add temporary load cases and associated combination factors to the list of load cases and factors provided /// </summary> /// <param name="temporaryLoadCases">List of temporary load cases to add</param> /// <param name="combinationType">Combination type used for the factors</param> /// <param name="loadCases">A list of load cases to add to</param> /// <param name="loadCombGammas">A list of combiation factors to add to</param> private string AddTemporaryLoadCases(List <ModelLoadCaseInGroup> temporaryLoadCases, ELoadCombinationType combinationType, List <LoadCase> loadCases, List <double> loadCombGammas) { string leadingActionName = ""; // Get the indices of the leading action (or actions) List <int> indicesLeadingCases = GetLeadingLoadCaseIndices(temporaryLoadCases); for (int i = 0; i < temporaryLoadCases.Count; i++) { LoadGroupTemporary parentLoadGroup = (LoadGroupTemporary)temporaryLoadCases[i].LoadGroup; // If combination type is not 6.10a, include load case if (combinationType != ELoadCombinationType.SixTenA) { loadCases.Add(parentLoadGroup.GetCorrespondingCompleteLoadCase(temporaryLoadCases[i])); } // If leading action if (indicesLeadingCases.Contains(i)) { leadingActionName = FindLeadingActionName(parentLoadGroup, temporaryLoadCases[i]); AddCombinationFactorLeadingAction(parentLoadGroup, combinationType, loadCombGammas); } else //Else accompanying action { AddCombinationFactorsAccompanyingAction(parentLoadGroup, combinationType, loadCombGammas); } // Remove the load case if gamma is zero if (loadCombGammas[loadCombGammas.Count - 1] == 0) { loadCombGammas.RemoveAt(loadCombGammas.Count - 1); loadCases.RemoveAt(loadCases.Count - 1); } } return(leadingActionName); }