Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StressStrainPoint" /> class.
 /// </summary>
 /// <param name="stress">The stress.</param>
 /// <param name="strain">The strain.</param>
 /// <param name="pointId">The point identifier.</param>
 public StressStrainPoint(double stress = 0, double strain = 0,
                          eStressStrainPointID pointId = eStressStrainPointID.None)
 {
     Stress  = stress;
     Strain  = strain;
     PointID = pointId;
 }
Пример #2
0
 /// <summary>
 /// Point identifier is numerically increasing nonzero.
 /// The point IDs must be input in numerically increasing order, except that 0 (None) values are allowed anywhere.
 /// </summary>
 /// <param name="pointId">The point identifier.</param>
 /// <param name="index">The index.</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 private bool pointIdIsNumericallyIncreasingOrZero(eStressStrainPointID pointId, int index)
 {
     if (pointId == 0)
     {
         return(true);
     }
     if (pointId < 0)
     {
         return(_items[index + 1].PointID > pointId);
     }
     return(_items[index - 1].PointID < pointId);
 }
Пример #3
0
        /// <summary>
        /// Sets the material properties 04 user stress strain curves.
        /// </summary>
        /// <param name="model">The model.</param>
        /// <param name="table">The table.</param>
        private static void setMATERIAL_PROPERTIES_04_USER_STRESS_STRAIN_CURVES(Model model, List <Dictionary <string, string> > table)
        {
            foreach (Dictionary <string, string> tableRow in table)
            {
                string   name     = tableRow["Material"];
                Material material = model.Components.Materials[name];
                MaterialByTemperature materialByTemperature = getMaterialProperties <MaterialByTemperature>(tableRow, material);

                double stress = Adaptor.toDouble(tableRow["Stress"]);
                double strain = Adaptor.toDouble(tableRow["Strain"]);
                eStressStrainPointID pointId = eStressStrainPointID.None;
                if (tableRow.ContainsKey("PointID"))
                {
                    pointId = Enums.EnumLibrary.ConvertStringToEnumByDescription <eStressStrainPointID>(tableRow["PointID"]);
                }

                materialByTemperature.StressStrainCurve.Add(new StressStrainPoint(stress, strain, pointId));
            }
        }
Пример #4
0
 /// <summary>
 /// Determines whether [has duplicate nonzero value].
 /// No duplicate point ID values are allowed except for <see cref="eStressStrainPointID.None" />.
 /// </summary>
 /// <param name="pointId">The point identifier.</param>
 /// <returns><c>true</c> if [has duplicate nonzero value]; otherwise, <c>false</c>.</returns>
 private bool pointIdIsDuplicateNonzero(eStressStrainPointID pointId)
 {
     return(pointId != eStressStrainPointID.None && _items.Any(p => p.PointID == pointId));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StressStrainPoint" /> class.
 /// </summary>
 /// <param name="stress">The stress.</param>
 /// <param name="strain">The strain.</param>
 /// <param name="pointId">The point identifier.</param>
 public StressStrainPoint(double stress = 0, double strain = 0,
                          eStressStrainPointID pointId = eStressStrainPointID.None) : base(strain, stress)
 {
     PointID = pointId;
 }