Settting for prestress has been fixed
This commit is contained in:
@@ -10,6 +10,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using StructureHelperCommon.Infrastructures.Settings;
|
||||
using LCMBML = LoaderCalculator.Data.Materials.MaterialBuilders.MaterialLogics;
|
||||
|
||||
namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
@@ -21,12 +22,15 @@ namespace StructureHelperLogics.Models.Materials
|
||||
public bool TensionForSLS { get; set; }
|
||||
|
||||
private IMaterialOptionLogic optionLogic;
|
||||
private LCMBML.ITrueStrengthLogic strengthLogic;
|
||||
|
||||
public ConcreteLibMaterial()
|
||||
{
|
||||
SafetyFactors = new List<IMaterialSafetyFactor>();
|
||||
SafetyFactors.AddRange(PartialCoefficientFactory.GetDefaultConcreteSafetyFactors(ProgramSetting.CodeType));
|
||||
optionLogic = new MaterialOptionLogic(new LCMB.ConcreteOptions());
|
||||
TensionForULS = false;
|
||||
TensionForSLS = true;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
@@ -36,7 +40,26 @@ namespace StructureHelperLogics.Models.Materials
|
||||
|
||||
public LCM.IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
var materialOptions = optionLogic.SetMaterialOptions(MaterialEntity, limitState, calcTerm);
|
||||
var materialOptions = optionLogic.SetMaterialOptions(MaterialEntity, limitState, calcTerm) as LCMB.ConcreteOptions;
|
||||
materialOptions.WorkInTension = false;
|
||||
if (limitState == LimitStates.ULS & TensionForULS == true)
|
||||
{
|
||||
materialOptions.WorkInTension = true;
|
||||
}
|
||||
if (limitState == LimitStates.SLS & TensionForSLS == true)
|
||||
{
|
||||
materialOptions.WorkInTension = true;
|
||||
}
|
||||
var strength = GetStrengthFactors(limitState, calcTerm);
|
||||
materialOptions.ExternalFactor.Compressive = strength.Compressive;
|
||||
materialOptions.ExternalFactor.Tensile = strength.Tensile;
|
||||
LCMB.IMaterialBuilder builder = new LCMB.ConcreteBuilder(materialOptions);
|
||||
LCMB.IBuilderDirector director = new LCMB.BuilderDirector(builder);
|
||||
return director.BuildMaterial();
|
||||
}
|
||||
|
||||
public (double Compressive, double Tensile) GetStrengthFactors(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
double compressionVal = 1d;
|
||||
double tensionVal = 1d;
|
||||
foreach (var item in SafetyFactors.Where(x => x.Take == true))
|
||||
@@ -44,11 +67,14 @@ namespace StructureHelperLogics.Models.Materials
|
||||
compressionVal *= item.GetFactor(StressStates.Compression, calcTerm, limitState);
|
||||
tensionVal *= item.GetFactor(StressStates.Tension, calcTerm, limitState);
|
||||
}
|
||||
materialOptions.ExternalFactor.Compressive = compressionVal;
|
||||
materialOptions.ExternalFactor.Tensile = tensionVal;
|
||||
LCMB.IMaterialBuilder builder = new LCMB.ConcreteBuilder(materialOptions);
|
||||
LCMB.IBuilderDirector director = new LCMB.BuilderDirector(builder);
|
||||
return director.BuildMaterial();
|
||||
return (compressionVal, tensionVal);
|
||||
}
|
||||
|
||||
public (double Compressive, double Tensile) GetStrength(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
strengthLogic = new LCMBML.TrueStrengthConcreteLogicSP63_2018(MaterialEntity.MainStrength);
|
||||
var strength = strengthLogic.GetTrueStrength();
|
||||
return (strength.Comressive, strength.Tensile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user