Carbon Fiber Material was Added
This commit is contained in:
@@ -10,6 +10,8 @@ namespace StructureHelper.Infrastructure.Enums
|
|||||||
{
|
{
|
||||||
Concrete,
|
Concrete,
|
||||||
Reinforcement,
|
Reinforcement,
|
||||||
Elastic
|
Elastic,
|
||||||
|
CarbonFiber,
|
||||||
|
GlassFiber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,33 +81,33 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
|
|||||||
}
|
}
|
||||||
public double InvertedCenterY => - CenterY;
|
public double InvertedCenterY => - CenterY;
|
||||||
public double PrestrainKx
|
public double PrestrainKx
|
||||||
{ get => primitive.UsersPrestrain.Kx;
|
{ get => primitive.UsersPrestrain.Mx;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
primitive.UsersPrestrain.Kx = value;
|
primitive.UsersPrestrain.Mx = value;
|
||||||
OnPropertyChanged(nameof(PrestrainKx));
|
OnPropertyChanged(nameof(PrestrainKx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public double PrestrainKy
|
public double PrestrainKy
|
||||||
{ get => primitive.UsersPrestrain.Ky;
|
{ get => primitive.UsersPrestrain.My;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
primitive.UsersPrestrain.Ky = value;
|
primitive.UsersPrestrain.My = value;
|
||||||
OnPropertyChanged(nameof(PrestrainKy));
|
OnPropertyChanged(nameof(PrestrainKy));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public double PrestrainEpsZ
|
public double PrestrainEpsZ
|
||||||
{ get => primitive.UsersPrestrain.EpsZ;
|
{ get => primitive.UsersPrestrain.Nz;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
primitive.UsersPrestrain.EpsZ = value;
|
primitive.UsersPrestrain.Nz = value;
|
||||||
OnPropertyChanged(nameof(PrestrainEpsZ));
|
OnPropertyChanged(nameof(PrestrainEpsZ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public double AutoPrestrainKx => primitive.AutoPrestrain.Kx;
|
public double AutoPrestrainKx => primitive.AutoPrestrain.Mx;
|
||||||
public double AutoPrestrainKy => primitive.AutoPrestrain.Ky;
|
public double AutoPrestrainKy => primitive.AutoPrestrain.My;
|
||||||
public double AutoPrestrainEpsZ => primitive.AutoPrestrain.EpsZ;
|
public double AutoPrestrainEpsZ => primitive.AutoPrestrain.Nz;
|
||||||
|
|
||||||
public IHeadMaterial HeadMaterial
|
public IHeadMaterial HeadMaterial
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
</ComboBox>
|
</ComboBox>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="SafetyFactors">
|
<DataTemplate x:Key="SafetyFactors">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@@ -23,6 +24,20 @@
|
|||||||
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource MaterialSafetyFactors}" Content="{Binding DataContext, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window}}"/>
|
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource MaterialSafetyFactors}" Content="{Binding DataContext, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window}}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
|
<DataTemplate x:Key="DirectSafetyFactors">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="30"/>
|
||||||
|
<RowDefinition Height="30"/>
|
||||||
|
<RowDefinition Height="200"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Button Content="Show Safety Factors" Command="{Binding ShowSafetyFactors}"/>
|
||||||
|
<Button Grid.Row="1" Content="Show Partial Factors" Command="{Binding ShowPartialFactors}"/>
|
||||||
|
<ContentControl Grid.Row="2" ContentTemplate="{StaticResource MaterialSafetyFactors}" Content="{Binding}"/>
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="ConcreteLibMaterial">
|
<DataTemplate x:Key="ConcreteLibMaterial">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="Library material"/>
|
<TextBlock Text="Library material"/>
|
||||||
@@ -36,6 +51,7 @@
|
|||||||
<ContentControl ContentTemplate="{StaticResource SafetyFactors}"/>
|
<ContentControl ContentTemplate="{StaticResource SafetyFactors}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="ConcreteMaterial">
|
<DataTemplate x:Key="ConcreteMaterial">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<ContentControl ContentTemplate="{StaticResource LibraryMaterial}" Content="{Binding}"/>
|
<ContentControl ContentTemplate="{StaticResource LibraryMaterial}" Content="{Binding}"/>
|
||||||
@@ -82,6 +98,7 @@
|
|||||||
<ContentControl ContentTemplate="{StaticResource SafetyFactors}"/>
|
<ContentControl ContentTemplate="{StaticResource SafetyFactors}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<DataTemplate x:Key="ElasticMaterial">
|
<DataTemplate x:Key="ElasticMaterial">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews
|
|||||||
public partial class SetPrestrainView : Window
|
public partial class SetPrestrainView : Window
|
||||||
{
|
{
|
||||||
SetPrestrainViewModel viewModel;
|
SetPrestrainViewModel viewModel;
|
||||||
public IStrainTuple StrainTuple { get; set; }
|
public StrainTuple StrainTuple { get; set; }
|
||||||
|
|
||||||
public SetPrestrainView(SetPrestrainViewModel vm)
|
public SetPrestrainView(SetPrestrainViewModel vm)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -106,6 +106,8 @@
|
|||||||
<Button Content="Concrete" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.Concrete}"/>
|
<Button Content="Concrete" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.Concrete}"/>
|
||||||
<Button Content="Reinforcement" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.Reinforcement}"/>
|
<Button Content="Reinforcement" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.Reinforcement}"/>
|
||||||
<Button Content="Elastic" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.Elastic}"/>
|
<Button Content="Elastic" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.Elastic}"/>
|
||||||
|
<Button Content="CarbonFiber" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.CarbonFiber}"/>
|
||||||
|
<Button Content="GlassFiber" Command="{Binding Add}" CommandParameter="{x:Static enums:MaterialType.GlassFiber}"/>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</Expander.ContextMenu>
|
</Expander.ContextMenu>
|
||||||
|
|||||||
@@ -42,28 +42,36 @@ namespace StructureHelper.Windows.MainWindow.Materials
|
|||||||
var bindings = new Dictionary<string, Binding>();
|
var bindings = new Dictionary<string, Binding>();
|
||||||
var helperMaterial = headMaterial.HelperMaterial;
|
var helperMaterial = headMaterial.HelperMaterial;
|
||||||
string templateName;
|
string templateName;
|
||||||
var binding = new Binding();
|
|
||||||
if (helperMaterial is IConcreteLibMaterial)
|
if (helperMaterial is IConcreteLibMaterial)
|
||||||
{
|
{
|
||||||
templateName = "ConcreteMaterial";
|
templateName = "ConcreteMaterial";
|
||||||
|
var binding = new Binding();
|
||||||
binding.Source = vm.HelperMaterialViewModel;
|
binding.Source = vm.HelperMaterialViewModel;
|
||||||
|
bindings.Add(templateName, binding);
|
||||||
}
|
}
|
||||||
else if (helperMaterial is IReinforcementLibMaterial)
|
else if (helperMaterial is IReinforcementLibMaterial)
|
||||||
{
|
{
|
||||||
templateName = "ReinforcementMaterial";
|
templateName = "ReinforcementMaterial";
|
||||||
|
var binding = new Binding();
|
||||||
binding.Source = vm.HelperMaterialViewModel;
|
binding.Source = vm.HelperMaterialViewModel;
|
||||||
|
bindings.Add(templateName, binding);
|
||||||
}
|
}
|
||||||
else if (helperMaterial is IElasticMaterial)
|
else if (helperMaterial is IElasticMaterial)
|
||||||
{
|
{
|
||||||
templateName = "ElasticMaterial";
|
templateName = "ElasticMaterial";
|
||||||
|
var binding = new Binding();
|
||||||
binding.Source = vm.HelperMaterialViewModel;
|
binding.Source = vm.HelperMaterialViewModel;
|
||||||
|
bindings.Add(templateName, binding);
|
||||||
|
templateName = "DirectSafetyFactors";
|
||||||
|
var frBinding = new Binding();
|
||||||
|
frBinding.Source = (vm.HelperMaterialViewModel as ElasticViewModel).SafetyFactors;
|
||||||
|
bindings.Add(templateName, frBinding);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + $". Expected: {typeof(IHelperMaterial)}, but was: {helperMaterial.GetType()}");
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + $". Expected: {typeof(IHelperMaterial)}, but was: {helperMaterial.GetType()}");
|
||||||
}
|
}
|
||||||
|
|
||||||
bindings.Add(templateName, binding);
|
|
||||||
foreach (var item in bindings)
|
foreach (var item in bindings)
|
||||||
{
|
{
|
||||||
ContentControl contentControl = new ContentControl();
|
ContentControl contentControl = new ContentControl();
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators
|
|||||||
{
|
{
|
||||||
foreach (var item in ndmPrimitives)
|
foreach (var item in ndmPrimitives)
|
||||||
{
|
{
|
||||||
StrainTupleService.CopyProperties(wnd.StrainTuple, item.AutoPrestrain);
|
ForceTupleService.CopyProperties(wnd.StrainTuple, item.AutoPrestrain);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators
|
|||||||
{
|
{
|
||||||
public class SetPrestrainViewModel : ViewModelBase
|
public class SetPrestrainViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
IStrainTuple SourceTuple;
|
StrainTuple SourceTuple;
|
||||||
private double coefficient;
|
private double coefficient;
|
||||||
|
|
||||||
public double Coefficient
|
public double Coefficient
|
||||||
@@ -26,16 +26,16 @@ namespace StructureHelper.Windows.ViewModels.Calculations.Calculators
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public SetPrestrainViewModel(IStrainTuple sourceTuple)
|
public SetPrestrainViewModel(StrainTuple sourceTuple)
|
||||||
{
|
{
|
||||||
SourceTuple = sourceTuple;
|
SourceTuple = sourceTuple;
|
||||||
coefficient = 1d;
|
coefficient = 1d;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IStrainTuple GetStrainTuple()
|
public StrainTuple GetStrainTuple()
|
||||||
{
|
{
|
||||||
var result = new StrainTuple();
|
var result = new StrainTuple();
|
||||||
StrainTupleService.CopyProperties(SourceTuple, result, coefficient);
|
ForceTupleService.CopyProperties(SourceTuple, result, coefficient);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
internal class ElasticViewModel : HelperMaterialViewModel
|
internal class ElasticViewModel : HelperMaterialViewModel
|
||||||
{
|
{
|
||||||
IElasticMaterial material;
|
IElasticMaterial material;
|
||||||
|
SafetyFactorsViewModel safetyFactorsViewModel;
|
||||||
|
public SafetyFactorsViewModel SafetyFactors => safetyFactorsViewModel;
|
||||||
public double Modulus
|
public double Modulus
|
||||||
{
|
{
|
||||||
get => material.Modulus;
|
get => material.Modulus;
|
||||||
@@ -43,6 +45,7 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
public ElasticViewModel(IElasticMaterial material)
|
public ElasticViewModel(IElasticMaterial material)
|
||||||
{
|
{
|
||||||
this.material = material;
|
this.material = material;
|
||||||
|
safetyFactorsViewModel = new SafetyFactorsViewModel(material.SafetyFactors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
18
StructureHelper/Windows/ViewModels/Materials/FRViewModel.cs
Normal file
18
StructureHelper/Windows/ViewModels/Materials/FRViewModel.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
|
using StructureHelperLogics.Models.Materials;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelper.Windows.ViewModels.Materials
|
||||||
|
{
|
||||||
|
internal class FRViewModel : ElasticViewModel
|
||||||
|
{
|
||||||
|
public FRViewModel(IFRMaterial material) : base(material)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -82,8 +82,16 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
}
|
}
|
||||||
else if (helperMaterial is IElasticMaterial)
|
else if (helperMaterial is IElasticMaterial)
|
||||||
{
|
{
|
||||||
var material = helperMaterial as IElasticMaterial;
|
if (helperMaterial is IFRMaterial)
|
||||||
helperMaterialViewModel = new ElasticViewModel(material);
|
{
|
||||||
|
var material = helperMaterial as IFRMaterial;
|
||||||
|
helperMaterialViewModel = new FRViewModel(material);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var material = helperMaterial as IElasticMaterial;
|
||||||
|
helperMaterialViewModel = new ElasticViewModel(material);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
using StructureHelper.Infrastructure;
|
|
||||||
using StructureHelperCommon.Models.Materials.Libraries;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace StructureHelper.Windows.ViewModels.Materials
|
|
||||||
{
|
|
||||||
internal interface ISafetyFactorViewModel<TItem> : ICRUDViewModel<TItem>
|
|
||||||
{
|
|
||||||
RelayCommand ShowPartialFactors { get; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -47,6 +47,8 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
if (paramType == MaterialType.Concrete) { AddConcrete(); }
|
if (paramType == MaterialType.Concrete) { AddConcrete(); }
|
||||||
else if (paramType == MaterialType.Reinforcement) { AddReinforcement(); }
|
else if (paramType == MaterialType.Reinforcement) { AddReinforcement(); }
|
||||||
else if (paramType == MaterialType.Elastic) { AddElastic(); }
|
else if (paramType == MaterialType.Elastic) { AddElastic(); }
|
||||||
|
else if (paramType == MaterialType.CarbonFiber) { AddCarbonFiber(); }
|
||||||
|
else if (paramType == MaterialType.GlassFiber) { AddGlassFiber(); }
|
||||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + $". Expected: {typeof(MaterialType)}, Actual type: {nameof(paramType)}");
|
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + $". Expected: {typeof(MaterialType)}, Actual type: {nameof(paramType)}");
|
||||||
base.AddMethod(parameter);
|
base.AddMethod(parameter);
|
||||||
}
|
}
|
||||||
@@ -78,6 +80,18 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
material.Name = "New Elastic Material";
|
material.Name = "New Elastic Material";
|
||||||
NewItem = material;
|
NewItem = material;
|
||||||
}
|
}
|
||||||
|
private void AddCarbonFiber()
|
||||||
|
{
|
||||||
|
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Carbon4000, ProgramSetting.CodeType);
|
||||||
|
material.Name = "New CFR Material";
|
||||||
|
NewItem = material;
|
||||||
|
}
|
||||||
|
private void AddGlassFiber()
|
||||||
|
{
|
||||||
|
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Glass1200, ProgramSetting.CodeType);
|
||||||
|
material.Name = "New GFR Material";
|
||||||
|
NewItem = material;
|
||||||
|
}
|
||||||
private void AddReinforcement()
|
private void AddReinforcement()
|
||||||
{
|
{
|
||||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Reinforecement400, ProgramSetting.CodeType);
|
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Reinforecement400, ProgramSetting.CodeType);
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
using StructureHelper.Infrastructure;
|
using StructureHelper.Infrastructure;
|
||||||
|
using StructureHelper.Windows.AddMaterialWindow;
|
||||||
using StructureHelper.Windows.MainWindow.Materials;
|
using StructureHelper.Windows.MainWindow.Materials;
|
||||||
using StructureHelperCommon.Models.Materials.Libraries;
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
|
using StructureHelperLogics.Models.Materials;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace StructureHelper.Windows.ViewModels.Materials
|
namespace StructureHelper.Windows.ViewModels.Materials
|
||||||
{
|
{
|
||||||
internal class SafetyFactorsViewModel : SelectedItemViewModel<IMaterialSafetyFactor>
|
internal class SafetyFactorsViewModel : SelectedItemViewModel<IMaterialSafetyFactor>
|
||||||
{
|
{
|
||||||
|
List<IMaterialSafetyFactor> safetyFactors;
|
||||||
private RelayCommand showPartialCommand;
|
private RelayCommand showPartialCommand;
|
||||||
|
|
||||||
public RelayCommand ShowPartialFactors
|
public RelayCommand ShowPartialFactors
|
||||||
@@ -28,6 +32,22 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ICommand showSafetyFactors;
|
||||||
|
|
||||||
|
public ICommand ShowSafetyFactors
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return showSafetyFactors ??= new RelayCommand(o =>
|
||||||
|
{
|
||||||
|
var wnd = new SafetyFactorsView(safetyFactors);
|
||||||
|
wnd.ShowDialog();
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void AddMethod(object parameter)
|
public override void AddMethod(object parameter)
|
||||||
{
|
{
|
||||||
NewItem = new MaterialSafetyFactor();
|
NewItem = new MaterialSafetyFactor();
|
||||||
@@ -36,6 +56,7 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
|||||||
|
|
||||||
public SafetyFactorsViewModel(List<IMaterialSafetyFactor> safetyFactors) : base(safetyFactors)
|
public SafetyFactorsViewModel(List<IMaterialSafetyFactor> safetyFactors) : base(safetyFactors)
|
||||||
{
|
{
|
||||||
|
this.safetyFactors = safetyFactors;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
{
|
{
|
||||||
public enum CodeTypes
|
public enum CodeTypes
|
||||||
{
|
{
|
||||||
SP63_13330_2018,
|
SP63_2018,
|
||||||
EuroCode_2_1990
|
EuroCode_2_1990,
|
||||||
|
SP164_2014,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
Concrete,
|
Concrete,
|
||||||
Reinforcement,
|
Reinforcement,
|
||||||
//Steel,
|
//Steel,
|
||||||
//CarbonFiber,
|
CarbonFiber,
|
||||||
|
GlassFiber,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ namespace StructureHelperCommon.Infrastructures.Settings
|
|||||||
{
|
{
|
||||||
public static class ProgramSetting
|
public static class ProgramSetting
|
||||||
{
|
{
|
||||||
public static CodeTypes CodeType => CodeTypes.SP63_13330_2018;
|
public static CodeTypes CodeType => CodeTypes.SP63_2018;
|
||||||
|
public static CodeTypes FRCodeType => CodeTypes.SP164_2014;
|
||||||
public static CrossSectionAxisNames CrossSectionAxisNames => new CrossSectionAxisNames();
|
public static CrossSectionAxisNames CrossSectionAxisNames => new CrossSectionAxisNames();
|
||||||
public static LimitStatesList LimitStatesList => new LimitStatesList();
|
public static LimitStatesList LimitStatesList => new LimitStatesList();
|
||||||
public static CalcTermList CalcTermList => new CalcTermList();
|
public static CalcTermList CalcTermList => new CalcTermList();
|
||||||
|
|||||||
36
StructureHelperCommon/Models/Forces/DesignForcePair.cs
Normal file
36
StructureHelperCommon/Models/Forces/DesignForcePair.cs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Models.Shapes;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Models.Forces
|
||||||
|
{
|
||||||
|
public class DesignForcePair : IDesignForcePair
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public IPoint2D ForcePoint { get; set; }
|
||||||
|
public bool SetInGravityCenter { get; set; }
|
||||||
|
public LimitStates LimitState { get; set; }
|
||||||
|
public IForceTuple LongForceTuple { get; set; }
|
||||||
|
public IForceTuple FullForceTuple { get; set; }
|
||||||
|
|
||||||
|
public DesignForcePair()
|
||||||
|
{
|
||||||
|
LongForceTuple = new ForceTuple();
|
||||||
|
FullForceTuple = new ForceTuple();
|
||||||
|
}
|
||||||
|
|
||||||
|
public IForceCombinationList GetCombinations()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ namespace StructureHelperCommon.Models.Forces
|
|||||||
{
|
{
|
||||||
public LimitStates LimitState { get; set; }
|
public LimitStates LimitState { get; set; }
|
||||||
public CalcTerms CalcTerm { get; set; }
|
public CalcTerms CalcTerm { get; set; }
|
||||||
public IForceTuple ForceTuple { get; set; }
|
public ForceTuple ForceTuple { get; set; }
|
||||||
|
|
||||||
public DesignForceTuple(LimitStates limitState, CalcTerms calcTerm) : this()
|
public DesignForceTuple(LimitStates limitState, CalcTerms calcTerm) : this()
|
||||||
{
|
{
|
||||||
@@ -22,7 +22,7 @@ namespace StructureHelperCommon.Models.Forces
|
|||||||
public object Clone()
|
public object Clone()
|
||||||
{
|
{
|
||||||
var newTuple = new DesignForceTuple(this.LimitState, this.CalcTerm);
|
var newTuple = new DesignForceTuple(this.LimitState, this.CalcTerm);
|
||||||
newTuple.ForceTuple = this.ForceTuple.Clone() as IForceTuple;
|
newTuple.ForceTuple = this.ForceTuple.Clone() as ForceTuple;
|
||||||
return newTuple;
|
return newTuple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace StructureHelperCommon.Models.Forces
|
|||||||
{
|
{
|
||||||
var termFactor = calcTerm is CalcTerms.ShortTerm ? 1d : LongTermFactor;
|
var termFactor = calcTerm is CalcTerms.ShortTerm ? 1d : LongTermFactor;
|
||||||
var designForceTuple = new DesignForceTuple() { LimitState = limitState, CalcTerm = calcTerm };
|
var designForceTuple = new DesignForceTuple() { LimitState = limitState, CalcTerm = calcTerm };
|
||||||
designForceTuple.ForceTuple = ForceTupleService.MultiplyTuples(FullSLSForces, stateFactor * termFactor);
|
designForceTuple.ForceTuple = ForceTupleService.MultiplyTuples(FullSLSForces, stateFactor * termFactor) as ForceTuple;
|
||||||
result.DesignForces.Add(designForceTuple);
|
result.DesignForces.Add(designForceTuple);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace StructureHelperCommon.Models.Forces
|
|||||||
var forceTupleList = DesignForces.Where(x => x.LimitState == limitState & x.CalcTerm == calcTerm);
|
var forceTupleList = DesignForces.Where(x => x.LimitState == limitState & x.CalcTerm == calcTerm);
|
||||||
foreach (var item in forceTupleList)
|
foreach (var item in forceTupleList)
|
||||||
{
|
{
|
||||||
designForceTuple.ForceTuple = ForceTupleService.SumTuples(designForceTuple.ForceTuple, item.ForceTuple);
|
designForceTuple.ForceTuple = ForceTupleService.SumTuples(designForceTuple.ForceTuple, item.ForceTuple) as ForceTuple;
|
||||||
}
|
}
|
||||||
result.DesignForces.Add(designForceTuple);
|
result.DesignForces.Add(designForceTuple);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using StructureHelperCommon.Services.Forces;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace StructureHelperCommon.Models.Forces
|
namespace StructureHelperCommon.Models.Forces
|
||||||
{
|
{
|
||||||
@@ -21,20 +22,13 @@ namespace StructureHelperCommon.Models.Forces
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public object Clone()
|
public object Clone()
|
||||||
{
|
{
|
||||||
IForceTuple forceTuple = new ForceTuple() { Mx = Mx, My = My, Nz = Nz, Qx = Qx, Qy = Qy, Mz = Mz};
|
ForceTuple forceTuple = new ForceTuple() { Mx = Mx, My = My, Nz = Nz, Qx = Qx, Qy = Qy, Mz = Mz};
|
||||||
return forceTuple;
|
return forceTuple;
|
||||||
}
|
}
|
||||||
public static ForceTuple operator +(ForceTuple first) => first;
|
public static ForceTuple operator +(ForceTuple first) => first;
|
||||||
public static ForceTuple operator +(ForceTuple first, ForceTuple second)
|
public static ForceTuple operator +(ForceTuple first, ForceTuple second)
|
||||||
{
|
{
|
||||||
var result = new ForceTuple();
|
return ForceTupleService.SumTuples(first, second) as ForceTuple;
|
||||||
result.Mx += first.Mx + second.Mx;
|
|
||||||
result.My += first.My + second.My;
|
|
||||||
result.Mz += first.Mz + second.Mz;
|
|
||||||
result.Qx += first.Qx + second.Qx;
|
|
||||||
result.Qy += first.Qy + second.Qy;
|
|
||||||
result.Nz += first.Nz + second.Nz;
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
StructureHelperCommon/Models/Forces/IDesignForcePair.cs
Normal file
16
StructureHelperCommon/Models/Forces/IDesignForcePair.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Models.Forces
|
||||||
|
{
|
||||||
|
public interface IDesignForcePair : IForceAction
|
||||||
|
{
|
||||||
|
LimitStates LimitState { get; set; }
|
||||||
|
IForceTuple LongForceTuple { get; set; }
|
||||||
|
IForceTuple FullForceTuple { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,6 @@ namespace StructureHelperCommon.Models.Forces
|
|||||||
{
|
{
|
||||||
LimitStates LimitState { get; set; }
|
LimitStates LimitState { get; set; }
|
||||||
CalcTerms CalcTerm { get; set; }
|
CalcTerms CalcTerm { get; set; }
|
||||||
IForceTuple ForceTuple { get; set; }
|
ForceTuple ForceTuple { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
33
StructureHelperCommon/Models/Forces/StrainTuple.cs
Normal file
33
StructureHelperCommon/Models/Forces/StrainTuple.cs
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
using StructureHelperCommon.Services.Forces;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Models.Forces
|
||||||
|
{
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public class StrainTuple : IForceTuple
|
||||||
|
{
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public double Mx { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public double My { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public double Nz { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public double Qx { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public double Qy { get; set; }
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public double Mz { get; set; }
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
StrainTuple forceTuple = new StrainTuple() { Mx = Mx, My = My, Nz = Nz, Qx = Qx, Qy = Qy, Mz = Mz };
|
||||||
|
return forceTuple;
|
||||||
|
}
|
||||||
|
public static StrainTuple operator +(StrainTuple first) => first;
|
||||||
|
public static StrainTuple operator +(StrainTuple first, ForceTuple second)
|
||||||
|
{
|
||||||
|
return ForceTupleService.SumTuples(first, second) as StrainTuple;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace StructureHelperCommon.Models.Forces
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Interface for generic curvature for beams
|
|
||||||
/// </summary>
|
|
||||||
public interface IStrainTuple : ICloneable
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Curvature about x-axis
|
|
||||||
/// </summary>
|
|
||||||
double Kx { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Curvature about y-axis
|
|
||||||
/// </summary>
|
|
||||||
double Ky { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Strain along z-axis
|
|
||||||
/// </summary>
|
|
||||||
double EpsZ { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Screw along x-axis
|
|
||||||
/// </summary>
|
|
||||||
double Gx { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Screw along y-axis
|
|
||||||
/// </summary>
|
|
||||||
double Gy { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Twisting about z-axis
|
|
||||||
/// </summary>
|
|
||||||
double Gz { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
using StructureHelperCommon.Services.Forces;
|
|
||||||
|
|
||||||
namespace StructureHelperCommon.Models.Forces
|
|
||||||
{
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public class StrainTuple : IStrainTuple
|
|
||||||
{
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public double Kx { get; set; }
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public double Ky { get; set; }
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public double EpsZ { get; set; }
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public double Gx { get; set; }
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public double Gy { get; set; }
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public double Gz { get; set; }
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public object Clone()
|
|
||||||
{
|
|
||||||
var target = new StrainTuple();
|
|
||||||
StrainTupleService.CopyProperties(this, target);
|
|
||||||
return target;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||||
|
{
|
||||||
|
public class FactorLogic : IFactorLogic
|
||||||
|
{
|
||||||
|
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||||
|
public (double Compressive, double Tensile) GetTotalFactor(LimitStates limitState, CalcTerms calcTerm)
|
||||||
|
{
|
||||||
|
double compressionVal = 1d;
|
||||||
|
double tensionVal = 1d;
|
||||||
|
foreach (var item in SafetyFactors.Where(x => x.Take == true))
|
||||||
|
{
|
||||||
|
compressionVal *= item.GetFactor(StressStates.Compression, calcTerm, limitState);
|
||||||
|
tensionVal *= item.GetFactor(StressStates.Tension, calcTerm, limitState);
|
||||||
|
}
|
||||||
|
return (compressionVal, tensionVal);
|
||||||
|
}
|
||||||
|
public FactorLogic(List<IMaterialSafetyFactor> safetyFactors)
|
||||||
|
{
|
||||||
|
SafetyFactors = safetyFactors;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ using StructureHelperCommon.Infrastructures.Strings;
|
|||||||
|
|
||||||
namespace StructureHelperCommon.Models.Materials.Libraries
|
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||||
{
|
{
|
||||||
public enum FactorType
|
public enum ConcreteFactorType
|
||||||
{
|
{
|
||||||
LongTermFactor,
|
LongTermFactor,
|
||||||
BleedingFactor,
|
BleedingFactor,
|
||||||
@@ -13,11 +13,11 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
|||||||
|
|
||||||
public static class ConcreteFactorsFactory
|
public static class ConcreteFactorsFactory
|
||||||
{
|
{
|
||||||
public static IMaterialSafetyFactor GetFactor(FactorType factorType)
|
public static IMaterialSafetyFactor GetFactor(ConcreteFactorType factorType)
|
||||||
{
|
{
|
||||||
if (factorType == FactorType.LongTermFactor) { return LongTerm(); }
|
if (factorType == ConcreteFactorType.LongTermFactor) { return LongTerm(); }
|
||||||
else if (factorType == FactorType.BleedingFactor) { return Bleeding(); }
|
else if (factorType == ConcreteFactorType.BleedingFactor) { return Bleeding(); }
|
||||||
else if (factorType == FactorType.PlainConcreteFactor) { return PlainConcrete(); }
|
else if (factorType == ConcreteFactorType.PlainConcreteFactor) { return PlainConcrete(); }
|
||||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,127 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
|
using StructureHelperCommon.Infrastructures.Strings;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||||
|
{
|
||||||
|
public enum FRFactorType
|
||||||
|
{
|
||||||
|
ConditionFactor,
|
||||||
|
CohesionFactor,
|
||||||
|
LongTermFactor,
|
||||||
|
}
|
||||||
|
public static class FRFactorsFactory
|
||||||
|
{
|
||||||
|
const string gammaf1Name = "Gamma_f1";
|
||||||
|
const string gammaf1Description = "Coefficient for considering environment";
|
||||||
|
const string gammaf2Name = "Gamma_f2";
|
||||||
|
const string gammaf2Description = "Coefficient for considering cohesion";
|
||||||
|
const string gammaf3Name = "Gamma_f3";
|
||||||
|
const string gammaf3Description = "Coefficient for considering long term calculations";
|
||||||
|
public static IMaterialSafetyFactor GetCarbonFactor(FRFactorType factorType)
|
||||||
|
{
|
||||||
|
if (factorType == FRFactorType.LongTermFactor) { return LongTerm(1d / 1.2d,0.8d); }
|
||||||
|
else if (factorType == FRFactorType.ConditionFactor) { return Condition(gammaf1Name, gammaf1Description , 0.9d); }
|
||||||
|
else if (factorType == FRFactorType.CohesionFactor) { return Condition(gammaf2Name, gammaf2Description, 0.9d); }
|
||||||
|
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
||||||
|
}
|
||||||
|
public static IMaterialSafetyFactor GetGlassFactor(FRFactorType factorType)
|
||||||
|
{
|
||||||
|
if (factorType == FRFactorType.LongTermFactor) { return LongTerm(1d / 1.8d, 0.3d); }
|
||||||
|
else if (factorType == FRFactorType.ConditionFactor) { return Condition(gammaf1Name, gammaf1Description, 0.7d); }
|
||||||
|
else if (factorType == FRFactorType.CohesionFactor) { return Condition(gammaf2Name, gammaf2Description, 0.9d); }
|
||||||
|
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IMaterialSafetyFactor Condition(string name, string description, double value)
|
||||||
|
{
|
||||||
|
IMaterialSafetyFactor safetyFactor = new MaterialSafetyFactor()
|
||||||
|
{
|
||||||
|
Name = name,
|
||||||
|
Description = description,
|
||||||
|
};
|
||||||
|
IMaterialPartialFactor partialFactor;
|
||||||
|
partialFactor = new MaterialPartialFactor
|
||||||
|
{
|
||||||
|
StressState = StressStates.Tension,
|
||||||
|
CalcTerm = CalcTerms.ShortTerm,
|
||||||
|
LimitState = LimitStates.ULS,
|
||||||
|
FactorValue = value
|
||||||
|
};
|
||||||
|
safetyFactor.PartialFactors.Add(partialFactor);
|
||||||
|
partialFactor = new MaterialPartialFactor
|
||||||
|
{
|
||||||
|
StressState = StressStates.Compression,
|
||||||
|
CalcTerm = CalcTerms.ShortTerm,
|
||||||
|
LimitState = LimitStates.ULS,
|
||||||
|
FactorValue = value
|
||||||
|
};
|
||||||
|
safetyFactor.PartialFactors.Add(partialFactor);
|
||||||
|
partialFactor = new MaterialPartialFactor
|
||||||
|
{
|
||||||
|
StressState = StressStates.Tension,
|
||||||
|
CalcTerm = CalcTerms.LongTerm,
|
||||||
|
LimitState = LimitStates.ULS,
|
||||||
|
FactorValue = value
|
||||||
|
};
|
||||||
|
safetyFactor.PartialFactors.Add(partialFactor);
|
||||||
|
partialFactor = new MaterialPartialFactor
|
||||||
|
{
|
||||||
|
StressState = StressStates.Compression,
|
||||||
|
CalcTerm = CalcTerms.LongTerm,
|
||||||
|
LimitState = LimitStates.ULS,
|
||||||
|
FactorValue = value
|
||||||
|
};
|
||||||
|
safetyFactor.PartialFactors.Add(partialFactor);
|
||||||
|
return safetyFactor;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IMaterialSafetyFactor LongTerm(double shortValue, double longValue)
|
||||||
|
{
|
||||||
|
IMaterialSafetyFactor safetyFactor = new MaterialSafetyFactor()
|
||||||
|
{
|
||||||
|
Name = gammaf3Name,
|
||||||
|
Description = gammaf3Description,
|
||||||
|
};
|
||||||
|
IMaterialPartialFactor partialFactor;
|
||||||
|
partialFactor = new MaterialPartialFactor
|
||||||
|
{
|
||||||
|
StressState = StressStates.Tension,
|
||||||
|
CalcTerm = CalcTerms.ShortTerm,
|
||||||
|
LimitState = LimitStates.ULS,
|
||||||
|
FactorValue = shortValue
|
||||||
|
};
|
||||||
|
safetyFactor.PartialFactors.Add(partialFactor);
|
||||||
|
partialFactor = new MaterialPartialFactor
|
||||||
|
{
|
||||||
|
StressState = StressStates.Compression,
|
||||||
|
CalcTerm = CalcTerms.ShortTerm,
|
||||||
|
LimitState = LimitStates.ULS,
|
||||||
|
FactorValue = shortValue
|
||||||
|
};
|
||||||
|
safetyFactor.PartialFactors.Add(partialFactor);
|
||||||
|
partialFactor = new MaterialPartialFactor
|
||||||
|
{
|
||||||
|
StressState = StressStates.Tension,
|
||||||
|
CalcTerm = CalcTerms.LongTerm,
|
||||||
|
LimitState = LimitStates.ULS,
|
||||||
|
FactorValue = longValue
|
||||||
|
};
|
||||||
|
safetyFactor.PartialFactors.Add(partialFactor);
|
||||||
|
partialFactor = new MaterialPartialFactor
|
||||||
|
{
|
||||||
|
StressState = StressStates.Compression,
|
||||||
|
CalcTerm = CalcTerms.LongTerm,
|
||||||
|
LimitState = LimitStates.ULS,
|
||||||
|
FactorValue = longValue
|
||||||
|
};
|
||||||
|
safetyFactor.PartialFactors.Add(partialFactor);
|
||||||
|
return safetyFactor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,7 +40,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
|||||||
}
|
}
|
||||||
private static IEnumerable<ILibMaterialEntity> GetConcreteSP63()
|
private static IEnumerable<ILibMaterialEntity> GetConcreteSP63()
|
||||||
{
|
{
|
||||||
var code = CodeTypes.SP63_13330_2018;
|
var code = CodeTypes.SP63_2018;
|
||||||
List<ILibMaterialEntity> libMaterials = new List<ILibMaterialEntity>();
|
List<ILibMaterialEntity> libMaterials = new List<ILibMaterialEntity>();
|
||||||
libMaterials.Add(new ConcreteMaterialEntity() { CodeType = code, Name = "B5", MainStrength = 5e6 });
|
libMaterials.Add(new ConcreteMaterialEntity() { CodeType = code, Name = "B5", MainStrength = 5e6 });
|
||||||
libMaterials.Add(new ConcreteMaterialEntity() { CodeType = code, Name = "B7,5", MainStrength = 7.5e6 });
|
libMaterials.Add(new ConcreteMaterialEntity() { CodeType = code, Name = "B7,5", MainStrength = 7.5e6 });
|
||||||
@@ -57,7 +57,7 @@ namespace StructureHelperCommon.Models.Materials.Libraries
|
|||||||
}
|
}
|
||||||
private static IEnumerable<ILibMaterialEntity> GetReinforcementSP63()
|
private static IEnumerable<ILibMaterialEntity> GetReinforcementSP63()
|
||||||
{
|
{
|
||||||
var code = CodeTypes.SP63_13330_2018;
|
var code = CodeTypes.SP63_2018;
|
||||||
List<ILibMaterialEntity> libMaterials = new List<ILibMaterialEntity>();
|
List<ILibMaterialEntity> libMaterials = new List<ILibMaterialEntity>();
|
||||||
libMaterials.Add(new ReinforcementMaterialEntity() { CodeType = code, Name = "A240", MainStrength = 240e6 });
|
libMaterials.Add(new ReinforcementMaterialEntity() { CodeType = code, Name = "A240", MainStrength = 240e6 });
|
||||||
libMaterials.Add(new ReinforcementMaterialEntity() { CodeType = code, Name = "A400", MainStrength = 400e6 });
|
libMaterials.Add(new ReinforcementMaterialEntity() { CodeType = code, Name = "A400", MainStrength = 400e6 });
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Models.Materials.Libraries
|
||||||
|
{
|
||||||
|
public interface IFactorLogic
|
||||||
|
{
|
||||||
|
List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||||
|
(double Compressive, double Tensile) GetTotalFactor(LimitStates limitState, CalcTerms calcTerm);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
namespace StructureHelperCommon.Models.Shapes
|
using System;
|
||||||
|
|
||||||
|
namespace StructureHelperCommon.Models.Shapes
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface for point of center of some shape
|
/// Interface for point of center of some shape
|
||||||
/// Интерфейс для точки центра некоторой формы
|
/// Интерфейс для точки центра некоторой формы
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IPoint2D
|
public interface IPoint2D : ICloneable
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Coordinate of center of rectangle by local axis X, m
|
/// Coordinate of center of rectangle by local axis X, m
|
||||||
|
|||||||
@@ -7,5 +7,11 @@
|
|||||||
public double X { get; set; }
|
public double X { get; set; }
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public double Y { get; set; }
|
public double Y { get; set; }
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
var point = new Point2D() { X = X, Y = Y };
|
||||||
|
return point;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
using StructureHelperCommon.Models.Forces;
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
|
using StructureHelperCommon.Infrastructures.Strings;
|
||||||
|
using StructureHelperCommon.Models.Forces;
|
||||||
|
using StructureHelperCommon.Models.Shapes;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -17,5 +21,82 @@ namespace StructureHelperCommon.Services.Forces
|
|||||||
target.ForcePoint.X = source.ForcePoint.X;
|
target.ForcePoint.X = source.ForcePoint.X;
|
||||||
target.ForcePoint.Y = source.ForcePoint.Y;
|
target.ForcePoint.Y = source.ForcePoint.Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<IDesignForcePair> ConvertCombinationToPairs(IForceCombinationList combinations)
|
||||||
|
{
|
||||||
|
var resultList = new List<IDesignForcePair>();
|
||||||
|
var limitStates = new List<LimitStates>() { LimitStates.ULS, LimitStates.SLS };
|
||||||
|
var calcTerms = new List<CalcTerms>() { CalcTerms.ShortTerm, CalcTerms.LongTerm };
|
||||||
|
foreach (var limitState in limitStates)
|
||||||
|
{
|
||||||
|
var tuples = new IForceTuple[2];
|
||||||
|
for (int i = 0; i < calcTerms.Count; i++)
|
||||||
|
{
|
||||||
|
var forceTupleList = combinations.DesignForces.Where(x => x.LimitState == limitState && x.CalcTerm == calcTerms[i]).Select(x => x.ForceTuple);
|
||||||
|
var sumLongTuple = ForceTupleService.MergeTupleCollection(forceTupleList);
|
||||||
|
tuples[i] = sumLongTuple;
|
||||||
|
}
|
||||||
|
var pair = new DesignForcePair()
|
||||||
|
{
|
||||||
|
Name = combinations.Name,
|
||||||
|
ForcePoint = (IPoint2D)combinations.ForcePoint.Clone(),
|
||||||
|
SetInGravityCenter = combinations.SetInGravityCenter,
|
||||||
|
LimitState = limitState,
|
||||||
|
FullForceTuple = tuples[0],
|
||||||
|
LongForceTuple = tuples[1]
|
||||||
|
};
|
||||||
|
resultList.Add(pair);
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
public static List<IDesignForcePair> ConvertCombinationToPairs(IForceCombinationByFactor combinations)
|
||||||
|
{
|
||||||
|
var resultList = new List<IDesignForcePair>();
|
||||||
|
var limitStates = new List<LimitStates>() { LimitStates.ULS, LimitStates.SLS };
|
||||||
|
var calcTerms = new List<CalcTerms>() { CalcTerms.ShortTerm, CalcTerms.LongTerm };
|
||||||
|
foreach (var limitState in limitStates)
|
||||||
|
{
|
||||||
|
var tuples = new IForceTuple[2];
|
||||||
|
for (int i = 0; i < calcTerms.Count; i++)
|
||||||
|
{
|
||||||
|
var stateFactor = limitState is LimitStates.SLS ? 1d : combinations.ULSFactor;
|
||||||
|
var termFactor = calcTerms[i] == CalcTerms.ShortTerm ? 1d : combinations.LongTermFactor;
|
||||||
|
var forceTupleList = ForceTupleService.MultiplyTuples(combinations.FullSLSForces, stateFactor * termFactor);
|
||||||
|
tuples[i] = forceTupleList;
|
||||||
|
}
|
||||||
|
var pair = new DesignForcePair()
|
||||||
|
{
|
||||||
|
Name = combinations.Name,
|
||||||
|
ForcePoint = (IPoint2D)combinations.ForcePoint.Clone(),
|
||||||
|
SetInGravityCenter = combinations.SetInGravityCenter,
|
||||||
|
LimitState = limitState,
|
||||||
|
FullForceTuple = tuples[0],
|
||||||
|
LongForceTuple = tuples[1]
|
||||||
|
};
|
||||||
|
resultList.Add(pair);
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<IDesignForcePair> ConvertCombinationToPairs(IForceAction forceAction)
|
||||||
|
{
|
||||||
|
var resultList = new List<IDesignForcePair>();
|
||||||
|
if (forceAction is IForceCombinationList)
|
||||||
|
{
|
||||||
|
var item = forceAction as IForceCombinationList;
|
||||||
|
resultList.AddRange(ConvertCombinationToPairs(item));
|
||||||
|
}
|
||||||
|
else if (forceAction is IForceCombinationByFactor)
|
||||||
|
{
|
||||||
|
var item = forceAction as IForceCombinationByFactor;
|
||||||
|
resultList.AddRange(ConvertCombinationToPairs(item));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + $": expected {typeof(IForceAction)}, but was {forceAction.GetType()}");
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using StructureHelperCommon.Infrastructures.Exceptions;
|
using StructureHelperCommon.Infrastructures.Exceptions;
|
||||||
using StructureHelperCommon.Infrastructures.Strings;
|
using StructureHelperCommon.Infrastructures.Strings;
|
||||||
using StructureHelperCommon.Models.Forces;
|
using StructureHelperCommon.Models.Forces;
|
||||||
@@ -8,6 +9,12 @@ namespace StructureHelperCommon.Services.Forces
|
|||||||
{
|
{
|
||||||
public static class ForceTupleService
|
public static class ForceTupleService
|
||||||
{
|
{
|
||||||
|
public static void CopyProperties(IForceTuple source, IForceTuple target, double factor = 1d)
|
||||||
|
{
|
||||||
|
CheckTuples(source, target);
|
||||||
|
SumTupleToTarget(source, target, 0);
|
||||||
|
SumTupleToTarget(source, target, factor);
|
||||||
|
}
|
||||||
public static IForceTuple MoveTupleIntoPoint(IForceTuple forceTuple, IPoint2D point2D)
|
public static IForceTuple MoveTupleIntoPoint(IForceTuple forceTuple, IPoint2D point2D)
|
||||||
{
|
{
|
||||||
var newTuple = forceTuple.Clone() as IForceTuple;
|
var newTuple = forceTuple.Clone() as IForceTuple;
|
||||||
@@ -15,44 +22,37 @@ namespace StructureHelperCommon.Services.Forces
|
|||||||
newTuple.My -= newTuple.Nz * point2D.X;
|
newTuple.My -= newTuple.Nz * point2D.X;
|
||||||
return newTuple;
|
return newTuple;
|
||||||
}
|
}
|
||||||
public static IForceTuple SumTuples(IForceTuple first, IForceTuple second)
|
public static IForceTuple SumTuples(IForceTuple first, IForceTuple second, double factor = 1d)
|
||||||
{
|
{
|
||||||
var result = new ForceTuple();
|
CheckTuples(first, second);
|
||||||
result.Mx += first.Mx + second.Mx;
|
IForceTuple result = GetNewTupleSameType(first);
|
||||||
result.My += first.My + second.My;
|
SumTupleToTarget(first, result, 1d);
|
||||||
result.Mz += first.Mz + second.Mz;
|
SumTupleToTarget(second, result, factor);
|
||||||
result.Qx += first.Qx + second.Qx;
|
return result;
|
||||||
result.Qy += first.Qy + second.Qy;
|
}
|
||||||
result.Nz += first.Nz + second.Nz;
|
public static IForceTuple MergeTupleCollection(IEnumerable<IForceTuple> tupleCollection)
|
||||||
|
{
|
||||||
|
CheckTupleCollection(tupleCollection);
|
||||||
|
var result = GetNewTupleSameType(tupleCollection.First());
|
||||||
|
foreach (var item in tupleCollection)
|
||||||
|
{
|
||||||
|
SumTuples(result, item);
|
||||||
|
};
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
public static IForceTuple MultiplyTuples(IForceTuple first, double factor)
|
public static IForceTuple MultiplyTuples(IForceTuple first, double factor)
|
||||||
{
|
{
|
||||||
var result = new ForceTuple();
|
var result = GetNewTupleSameType(first);
|
||||||
result.Mx += first.Mx * factor;
|
CopyProperties(first, result, factor);
|
||||||
result.My += first.My * factor;
|
|
||||||
result.Mz += first.Mz * factor;
|
|
||||||
result.Qx += first.Qx * factor;
|
|
||||||
result.Qy += first.Qy * factor;
|
|
||||||
result.Nz += first.Nz * factor;
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
public static IForceTuple InterpolateTuples(IForceTuple endTuple, IForceTuple startTuple = null, double coefficient = 0.5d)
|
public static IForceTuple InterpolateTuples(IForceTuple endTuple, IForceTuple startTuple = null, double coefficient = 0.5d)
|
||||||
{
|
{
|
||||||
if (startTuple == null) startTuple = new ForceTuple();
|
if (startTuple is null) startTuple = GetNewTupleSameType(endTuple);
|
||||||
double dMx, dMy, dNz;
|
else { CheckTuples(startTuple, endTuple); }
|
||||||
dMx = endTuple.Mx - startTuple.Mx;
|
var deltaTuple = SumTuples(endTuple, startTuple, -1d);
|
||||||
dMy = endTuple.My - startTuple.My;
|
return SumTuples(startTuple, deltaTuple, coefficient);
|
||||||
dNz = endTuple.Nz - startTuple.Nz;
|
|
||||||
return new ForceTuple()
|
|
||||||
{
|
|
||||||
Mx = startTuple.Mx + dMx * coefficient,
|
|
||||||
My = startTuple.My + dMy * coefficient,
|
|
||||||
Nz = startTuple.Nz + dNz * coefficient
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static List<IDesignForceTuple> InterpolateDesignTuple(IDesignForceTuple finishDesignForce, IDesignForceTuple startDesignForce = null, int stepCount = 10)
|
public static List<IDesignForceTuple> InterpolateDesignTuple(IDesignForceTuple finishDesignForce, IDesignForceTuple startDesignForce = null, int stepCount = 10)
|
||||||
{
|
{
|
||||||
if (startDesignForce.LimitState != finishDesignForce.LimitState) throw new StructureHelperException(ErrorStrings.LimitStatesIsNotValid);
|
if (startDesignForce.LimitState != finishDesignForce.LimitState) throw new StructureHelperException(ErrorStrings.LimitStatesIsNotValid);
|
||||||
@@ -61,11 +61,50 @@ namespace StructureHelperCommon.Services.Forces
|
|||||||
double step = 1d / stepCount;
|
double step = 1d / stepCount;
|
||||||
for (int i = 0; i <= stepCount; i++)
|
for (int i = 0; i <= stepCount; i++)
|
||||||
{
|
{
|
||||||
var currentTuple = InterpolateTuples(finishDesignForce.ForceTuple, startDesignForce.ForceTuple, i * step);
|
var currentTuple = InterpolateTuples(finishDesignForce.ForceTuple, startDesignForce.ForceTuple, i * step) as ForceTuple;
|
||||||
var currentDesignTuple = new DesignForceTuple() { LimitState = finishDesignForce.LimitState, CalcTerm = finishDesignForce.CalcTerm, ForceTuple = currentTuple };
|
var currentDesignTuple = new DesignForceTuple() { LimitState = finishDesignForce.LimitState, CalcTerm = finishDesignForce.CalcTerm, ForceTuple = currentTuple };
|
||||||
tuples.Add(currentDesignTuple);
|
tuples.Add(currentDesignTuple);
|
||||||
}
|
}
|
||||||
return tuples;
|
return tuples;
|
||||||
}
|
}
|
||||||
|
private static void SumTupleToTarget(IForceTuple source, IForceTuple target, double factor = 1d)
|
||||||
|
{
|
||||||
|
target.Mx += source.Mx * factor;
|
||||||
|
target.My += source.My * factor;
|
||||||
|
target.Nz += source.Nz * factor;
|
||||||
|
target.Qx += source.Qx * factor;
|
||||||
|
target.Qy += source.Qy * factor;
|
||||||
|
target.Mz += source.Mz * factor;
|
||||||
|
}
|
||||||
|
private static void CheckTuples(IForceTuple first, IForceTuple second)
|
||||||
|
{
|
||||||
|
if (first.GetType() != second.GetType())
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(ErrorStrings.DataIsInCorrect +
|
||||||
|
$": Type of first parameter (type = {first.GetType()}) doesn't corespond second parameter type ({second.GetType()})");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static void CheckTupleCollection(IEnumerable<IForceTuple> tupleCollection)
|
||||||
|
{
|
||||||
|
if (tupleCollection.Count() == 0)
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(ErrorStrings.DataIsInCorrect + $": Collection is Empty");
|
||||||
|
}
|
||||||
|
foreach (var item in tupleCollection)
|
||||||
|
{
|
||||||
|
CheckTuples(tupleCollection.First(), item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static IForceTuple GetNewTupleSameType(IForceTuple first)
|
||||||
|
{
|
||||||
|
IForceTuple result;
|
||||||
|
if (first is ForceTuple) { result = new ForceTuple(); }
|
||||||
|
else if (first is StrainTuple) { result = new StrainTuple(); }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,25 +5,15 @@ namespace StructureHelperCommon.Services.Forces
|
|||||||
{
|
{
|
||||||
public static class StrainTupleService
|
public static class StrainTupleService
|
||||||
{
|
{
|
||||||
public static void CopyProperties (IStrainTuple source, IStrainTuple target, double factor = 1 )
|
public static IStrainMatrix ConvertToLoaderStrainMatrix(StrainTuple strainTuple)
|
||||||
{
|
{
|
||||||
target.Kx = source.Kx * factor;
|
IStrainMatrix strainMatrix = new StrainMatrix() { Kx = strainTuple.Nz, Ky = strainTuple.My, EpsZ = strainTuple.Nz };
|
||||||
target.Ky = source.Ky * factor;
|
|
||||||
target.EpsZ = source.EpsZ * factor;
|
|
||||||
target.Gx = source.Gx * factor;
|
|
||||||
target.Gy = source.Gy * factor;
|
|
||||||
target.Gz = source.Gz * factor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IStrainMatrix ConvertToLoaderStrainMatrix(IStrainTuple strainTuple)
|
|
||||||
{
|
|
||||||
IStrainMatrix strainMatrix = new StrainMatrix() { Kx = strainTuple.EpsZ, Ky = strainTuple.Ky, EpsZ = strainTuple.EpsZ };
|
|
||||||
return strainMatrix;
|
return strainMatrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IStrainTuple ConvertToStrainTuple(IStrainMatrix strainMatrix)
|
public static StrainTuple ConvertToStrainTuple(IStrainMatrix strainMatrix)
|
||||||
{
|
{
|
||||||
IStrainTuple strainTuple = new StrainTuple() { Kx = strainMatrix.Kx, Ky = strainMatrix.Ky, EpsZ = strainMatrix.EpsZ };
|
StrainTuple strainTuple = new StrainTuple() { Mx = strainMatrix.Kx, My = strainMatrix.Ky, Nz = strainMatrix.EpsZ };
|
||||||
return strainTuple;
|
return strainTuple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
{
|
{
|
||||||
public class ConcreteLibMaterial : IConcreteLibMaterial
|
public class ConcreteLibMaterial : IConcreteLibMaterial
|
||||||
{
|
{
|
||||||
|
private IFactorLogic factorLogic => new FactorLogic(SafetyFactors);
|
||||||
public ILibMaterialEntity MaterialEntity { get; set; }
|
public ILibMaterialEntity MaterialEntity { get; set; }
|
||||||
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||||
public bool TensionForULS { get ; set; }
|
public bool TensionForULS { get ; set; }
|
||||||
@@ -52,7 +53,7 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
{
|
{
|
||||||
materialOptions.WorkInTension = true;
|
materialOptions.WorkInTension = true;
|
||||||
}
|
}
|
||||||
var strength = GetStrengthFactors(limitState, calcTerm);
|
var strength = factorLogic.GetTotalFactor(limitState, calcTerm);
|
||||||
materialOptions.ExternalFactor.Compressive = strength.Compressive;
|
materialOptions.ExternalFactor.Compressive = strength.Compressive;
|
||||||
materialOptions.ExternalFactor.Tensile = strength.Tensile;
|
materialOptions.ExternalFactor.Tensile = strength.Tensile;
|
||||||
LoaderMaterialBuilders.IMaterialBuilder builder = new LoaderMaterialBuilders.ConcreteBuilder(materialOptions);
|
LoaderMaterialBuilders.IMaterialBuilder builder = new LoaderMaterialBuilders.ConcreteBuilder(materialOptions);
|
||||||
@@ -60,18 +61,6 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
return director.BuildMaterial();
|
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))
|
|
||||||
{
|
|
||||||
compressionVal *= item.GetFactor(StressStates.Compression, calcTerm, limitState);
|
|
||||||
tensionVal *= item.GetFactor(StressStates.Tension, calcTerm, limitState);
|
|
||||||
}
|
|
||||||
return (compressionVal, tensionVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
public (double Compressive, double Tensile) GetStrength(LimitStates limitState, CalcTerms calcTerm)
|
public (double Compressive, double Tensile) GetStrength(LimitStates limitState, CalcTerms calcTerm)
|
||||||
{
|
{
|
||||||
strengthLogic = new LoaderMaterialLogic.TrueStrengthConcreteLogicSP63_2018(MaterialEntity.MainStrength);
|
strengthLogic = new LoaderMaterialLogic.TrueStrengthConcreteLogicSP63_2018(MaterialEntity.MainStrength);
|
||||||
@@ -82,7 +71,7 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
{
|
{
|
||||||
compressionFactor /= 1.3d;
|
compressionFactor /= 1.3d;
|
||||||
tensionFactor /= 1.5d;
|
tensionFactor /= 1.5d;
|
||||||
var factors = GetStrengthFactors(limitState, calcTerm);
|
var factors = factorLogic.GetTotalFactor(limitState, calcTerm);
|
||||||
compressionFactor *= factors.Compressive;
|
compressionFactor *= factors.Compressive;
|
||||||
tensionFactor *= factors.Tensile;
|
tensionFactor *= factors.Tensile;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using LoaderCalculator.Data.Materials;
|
using LoaderCalculator.Data.Materials;
|
||||||
using StructureHelperCommon.Infrastructures.Enums;
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
using StructureHelperLogics.Models.Materials;
|
using StructureHelperLogics.Models.Materials;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -11,30 +12,23 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
{
|
{
|
||||||
public class ElasticMaterial : IElasticMaterial
|
public class ElasticMaterial : IElasticMaterial
|
||||||
{
|
{
|
||||||
|
private IElasticMaterialLogic elasticMaterialLogic => new ElasticMaterialLogic();
|
||||||
public double Modulus { get; set; }
|
public double Modulus { get; set; }
|
||||||
public double CompressiveStrength { get; set; }
|
public double CompressiveStrength { get; set; }
|
||||||
public double TensileStrength { get; set; }
|
public double TensileStrength { get; set; }
|
||||||
|
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||||
|
|
||||||
|
public ElasticMaterial()
|
||||||
|
{
|
||||||
|
SafetyFactors = new List<IMaterialSafetyFactor>();
|
||||||
|
}
|
||||||
|
|
||||||
public IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
public IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||||
{
|
{
|
||||||
IMaterial material = new Material();
|
var material = elasticMaterialLogic.GetLoaderMaterial(this, limitState, calcTerm);
|
||||||
material.InitModulus = Modulus;
|
|
||||||
IEnumerable<double> parameters = new List<double>() { Modulus, CompressiveStrength, TensileStrength};
|
|
||||||
material.DiagramParameters = parameters;
|
|
||||||
material.Diagram = GetStress;
|
|
||||||
return material;
|
return material;
|
||||||
}
|
}
|
||||||
|
|
||||||
private double GetStress (IEnumerable<double> parameters, double strain)
|
|
||||||
{
|
|
||||||
double modulus = parameters.First();
|
|
||||||
double stress = modulus * strain;
|
|
||||||
double compressiveStrength = (-1d) * parameters.ElementAt(1);
|
|
||||||
double tensileStrength = parameters.ElementAt(2);
|
|
||||||
if (stress > tensileStrength || stress < compressiveStrength) { return 0d; }
|
|
||||||
else { return stress; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Clone()
|
public object Clone()
|
||||||
{
|
{
|
||||||
return new ElasticMaterial() { Modulus = Modulus, CompressiveStrength = CompressiveStrength, TensileStrength = TensileStrength };
|
return new ElasticMaterial() { Modulus = Modulus, CompressiveStrength = CompressiveStrength, TensileStrength = TensileStrength };
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
using LoaderCalculator.Data.Materials;
|
||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Infrastructures.Settings;
|
||||||
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.Materials
|
||||||
|
{
|
||||||
|
public class FRMaterial : IFRMaterial
|
||||||
|
{
|
||||||
|
private IElasticMaterialLogic elasticMaterialLogic => new ElasticMaterialLogic();
|
||||||
|
private MaterialTypes materialType;
|
||||||
|
public double Modulus { get; set; }
|
||||||
|
public double CompressiveStrength { get; set; }
|
||||||
|
public double TensileStrength { get; set; }
|
||||||
|
|
||||||
|
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||||
|
|
||||||
|
public FRMaterial(MaterialTypes materialType)
|
||||||
|
{
|
||||||
|
SafetyFactors = new List<IMaterialSafetyFactor>();
|
||||||
|
this.materialType = materialType;
|
||||||
|
SafetyFactors.AddRange(PartialCoefficientFactory.GetDefaultFRSafetyFactors(ProgramSetting.FRCodeType, this.materialType));
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
var newItem = new FRMaterial(materialType)
|
||||||
|
{
|
||||||
|
Modulus = Modulus,
|
||||||
|
CompressiveStrength = CompressiveStrength,
|
||||||
|
TensileStrength = TensileStrength
|
||||||
|
};
|
||||||
|
return newItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||||
|
{
|
||||||
|
var material = elasticMaterialLogic.GetLoaderMaterial(this, limitState, calcTerm);
|
||||||
|
return material;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.Materials
|
||||||
|
{
|
||||||
|
public interface IFRMaterial : IElasticMaterial
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,7 +17,9 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
Concrete40,
|
Concrete40,
|
||||||
Reinforecement400,
|
Reinforecement400,
|
||||||
Reinforecement500,
|
Reinforecement500,
|
||||||
Elastic200
|
Elastic200,
|
||||||
|
Carbon4000,
|
||||||
|
Glass1200
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class HeadMaterialFactory
|
public static class HeadMaterialFactory
|
||||||
@@ -33,6 +35,8 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
if (type == HeadmaterialType.Reinforecement400) { return GetReinforcement400(); }
|
if (type == HeadmaterialType.Reinforecement400) { return GetReinforcement400(); }
|
||||||
if (type == HeadmaterialType.Reinforecement500) { return GetReinforcement500(); }
|
if (type == HeadmaterialType.Reinforecement500) { return GetReinforcement500(); }
|
||||||
if (type == HeadmaterialType.Elastic200) { return GetElastic200(); }
|
if (type == HeadmaterialType.Elastic200) { return GetElastic200(); }
|
||||||
|
if (type == HeadmaterialType.Carbon4000) { return GetCarbon4000(); }
|
||||||
|
if (type == HeadmaterialType.Glass1200) { return GetGlass1200(); }
|
||||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + nameof(type));
|
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + nameof(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,6 +57,20 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
return material;
|
return material;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static IHeadMaterial GetCarbon4000()
|
||||||
|
{
|
||||||
|
var material = new HeadMaterial();
|
||||||
|
material.HelperMaterial = new FRMaterial(MaterialTypes.CarbonFiber) { Modulus = 2e11d, CompressiveStrength = 4e9d, TensileStrength = 4e9d };
|
||||||
|
return material;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IHeadMaterial GetGlass1200()
|
||||||
|
{
|
||||||
|
var material = new HeadMaterial();
|
||||||
|
material.HelperMaterial = new FRMaterial(MaterialTypes.GlassFiber) { Modulus = 8e10d, CompressiveStrength = 1.2e9d, TensileStrength = 1.2e9d };
|
||||||
|
return material;
|
||||||
|
}
|
||||||
|
|
||||||
private static IHeadMaterial GetReinforcement400()
|
private static IHeadMaterial GetReinforcement400()
|
||||||
{
|
{
|
||||||
var material = new HeadMaterial() { Name = "New reinforcement" };
|
var material = new HeadMaterial() { Name = "New reinforcement" };
|
||||||
|
|||||||
@@ -14,11 +14,17 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
{
|
{
|
||||||
public static List<IMaterialSafetyFactor> GetDefaultConcreteSafetyFactors(CodeTypes codeType)
|
public static List<IMaterialSafetyFactor> GetDefaultConcreteSafetyFactors(CodeTypes codeType)
|
||||||
{
|
{
|
||||||
if (codeType == CodeTypes.SP63_13330_2018) return GetConcreteFactorsSP63_2018();
|
if (codeType == CodeTypes.SP63_2018) return GetConcreteFactorsSP63_2018();
|
||||||
else if (codeType == CodeTypes.EuroCode_2_1990) return GetConcreteFactorsEC2_1990();
|
else if (codeType == CodeTypes.EuroCode_2_1990) return GetConcreteFactorsEC2_1990();
|
||||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + ": " + codeType);
|
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + ": " + codeType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<IMaterialSafetyFactor> GetDefaultFRSafetyFactors(CodeTypes codeType, MaterialTypes materialType)
|
||||||
|
{
|
||||||
|
if (codeType == CodeTypes.SP164_2014) return GetFRFactorsSP164_2014(materialType);
|
||||||
|
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + ": " + codeType);
|
||||||
|
}
|
||||||
|
|
||||||
private static List<IMaterialSafetyFactor> GetConcreteFactorsEC2_1990()
|
private static List<IMaterialSafetyFactor> GetConcreteFactorsEC2_1990()
|
||||||
{
|
{
|
||||||
List<IMaterialSafetyFactor> factors = new List<IMaterialSafetyFactor>();
|
List<IMaterialSafetyFactor> factors = new List<IMaterialSafetyFactor>();
|
||||||
@@ -29,16 +35,56 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
{
|
{
|
||||||
List<IMaterialSafetyFactor> factors = new List<IMaterialSafetyFactor>();
|
List<IMaterialSafetyFactor> factors = new List<IMaterialSafetyFactor>();
|
||||||
IMaterialSafetyFactor coefficient;
|
IMaterialSafetyFactor coefficient;
|
||||||
coefficient = ConcreteFactorsFactory.GetFactor(FactorType.LongTermFactor);
|
coefficient = ConcreteFactorsFactory.GetFactor(ConcreteFactorType.LongTermFactor);
|
||||||
coefficient.Take = true;
|
coefficient.Take = true;
|
||||||
factors.Add(coefficient);
|
factors.Add(coefficient);
|
||||||
coefficient = ConcreteFactorsFactory.GetFactor(FactorType.PlainConcreteFactor);
|
coefficient = ConcreteFactorsFactory.GetFactor(ConcreteFactorType.PlainConcreteFactor);
|
||||||
coefficient.Take = false;
|
coefficient.Take = false;
|
||||||
factors.Add(coefficient);
|
factors.Add(coefficient);
|
||||||
coefficient = ConcreteFactorsFactory.GetFactor(FactorType.BleedingFactor);
|
coefficient = ConcreteFactorsFactory.GetFactor(ConcreteFactorType.BleedingFactor);
|
||||||
coefficient.Take = false;
|
coefficient.Take = false;
|
||||||
factors.Add(coefficient);
|
factors.Add(coefficient);
|
||||||
return factors;
|
return factors;
|
||||||
}
|
}
|
||||||
|
private static List<IMaterialSafetyFactor> GetFRFactorsSP164_2014(MaterialTypes materialType)
|
||||||
|
{
|
||||||
|
List<IMaterialSafetyFactor> factors = new List<IMaterialSafetyFactor>();
|
||||||
|
if (materialType == MaterialTypes.CarbonFiber)
|
||||||
|
{
|
||||||
|
GetCarbonFactors(factors);
|
||||||
|
}
|
||||||
|
else if (materialType == MaterialTypes.GlassFiber)
|
||||||
|
{
|
||||||
|
GetGlassFactors(factors);
|
||||||
|
}
|
||||||
|
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + ": " + materialType);
|
||||||
|
return factors;
|
||||||
|
}
|
||||||
|
private static void GetCarbonFactors(List<IMaterialSafetyFactor> factors)
|
||||||
|
{
|
||||||
|
IMaterialSafetyFactor coefficient;
|
||||||
|
coefficient = FRFactorsFactory.GetCarbonFactor(FRFactorType.ConditionFactor);
|
||||||
|
coefficient.Take = true;
|
||||||
|
factors.Add(coefficient);
|
||||||
|
coefficient = FRFactorsFactory.GetCarbonFactor(FRFactorType.CohesionFactor);
|
||||||
|
coefficient.Take = true;
|
||||||
|
factors.Add(coefficient);
|
||||||
|
coefficient = FRFactorsFactory.GetCarbonFactor(FRFactorType.LongTermFactor);
|
||||||
|
coefficient.Take = true;
|
||||||
|
factors.Add(coefficient);
|
||||||
|
}
|
||||||
|
private static void GetGlassFactors(List<IMaterialSafetyFactor> factors)
|
||||||
|
{
|
||||||
|
IMaterialSafetyFactor coefficient;
|
||||||
|
coefficient = FRFactorsFactory.GetGlassFactor(FRFactorType.ConditionFactor);
|
||||||
|
coefficient.Take = true;
|
||||||
|
factors.Add(coefficient);
|
||||||
|
coefficient = FRFactorsFactory.GetGlassFactor(FRFactorType.CohesionFactor);
|
||||||
|
coefficient.Take = true;
|
||||||
|
factors.Add(coefficient);
|
||||||
|
coefficient = FRFactorsFactory.GetGlassFactor(FRFactorType.LongTermFactor);
|
||||||
|
coefficient.Take = true;
|
||||||
|
factors.Add(coefficient);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -11,5 +12,6 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
double Modulus { get; set; }
|
double Modulus { get; set; }
|
||||||
double CompressiveStrength { get; set; }
|
double CompressiveStrength { get; set; }
|
||||||
double TensileStrength { get; set; }
|
double TensileStrength { get; set; }
|
||||||
|
List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
{
|
{
|
||||||
materialOptions.CodesType = LCMB.CodesType.EC2_1990;
|
materialOptions.CodesType = LCMB.CodesType.EC2_1990;
|
||||||
}
|
}
|
||||||
else if (codeType == CodeTypes.SP63_13330_2018)
|
else if (codeType == CodeTypes.SP63_2018)
|
||||||
{
|
{
|
||||||
materialOptions.CodesType = LCMB.CodesType.SP63_2018;
|
materialOptions.CodesType = LCMB.CodesType.SP63_2018;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
using LoaderCalculator.Data.Materials;
|
||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using StructureHelperCommon.Models.Materials.Libraries;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.Materials
|
||||||
|
{
|
||||||
|
internal class ElasticMaterialLogic : IElasticMaterialLogic
|
||||||
|
{
|
||||||
|
public IMaterial GetLoaderMaterial(IElasticMaterial elasticMaterial, LimitStates limitState, CalcTerms calcTerm)
|
||||||
|
{
|
||||||
|
IMaterial material = new Material();
|
||||||
|
material.InitModulus = elasticMaterial.Modulus;
|
||||||
|
IFactorLogic factorLogic = new FactorLogic(elasticMaterial.SafetyFactors);
|
||||||
|
var factors = factorLogic.GetTotalFactor(limitState, calcTerm);
|
||||||
|
IEnumerable<double> parameters = new List<double>()
|
||||||
|
{
|
||||||
|
elasticMaterial.Modulus,
|
||||||
|
elasticMaterial.CompressiveStrength * factors.Compressive,
|
||||||
|
elasticMaterial.TensileStrength * factors.Tensile
|
||||||
|
};
|
||||||
|
material.DiagramParameters = parameters;
|
||||||
|
material.Diagram = GetStress;
|
||||||
|
return material;
|
||||||
|
}
|
||||||
|
|
||||||
|
private double GetStress(IEnumerable<double> parameters, double strain)
|
||||||
|
{
|
||||||
|
double modulus = parameters.First();
|
||||||
|
double stress = modulus * strain;
|
||||||
|
double compressiveStrength = (-1d) * parameters.ElementAt(1);
|
||||||
|
double tensileStrength = parameters.ElementAt(2);
|
||||||
|
if (stress > tensileStrength || stress < compressiveStrength) { return 0d; }
|
||||||
|
else { return stress; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using LoaderCalculator.Data.Materials;
|
||||||
|
using StructureHelperCommon.Infrastructures.Enums;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace StructureHelperLogics.Models.Materials
|
||||||
|
{
|
||||||
|
internal interface IElasticMaterialLogic
|
||||||
|
{
|
||||||
|
IMaterial GetLoaderMaterial(IElasticMaterial material, LimitStates limitState, CalcTerms calcTerm);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -27,7 +27,7 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
{
|
{
|
||||||
materialOptions.CodesType = LCMB.CodesType.EC2_1990;
|
materialOptions.CodesType = LCMB.CodesType.EC2_1990;
|
||||||
}
|
}
|
||||||
else if (materialEntity.CodeType == CodeTypes.SP63_13330_2018)
|
else if (materialEntity.CodeType == CodeTypes.SP63_2018)
|
||||||
{
|
{
|
||||||
materialOptions.CodesType = LCMB.CodesType.SP63_2018;
|
materialOptions.CodesType = LCMB.CodesType.SP63_2018;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
{
|
{
|
||||||
public class ReinforcementLibMaterial : IReinforcementLibMaterial
|
public class ReinforcementLibMaterial : IReinforcementLibMaterial
|
||||||
{
|
{
|
||||||
|
private IFactorLogic factorLogic => new FactorLogic(SafetyFactors);
|
||||||
public ILibMaterialEntity MaterialEntity { get; set; }
|
public ILibMaterialEntity MaterialEntity { get; set; }
|
||||||
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||||
|
|
||||||
@@ -33,26 +34,13 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
public Loadermaterials.IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
public Loadermaterials.IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||||
{
|
{
|
||||||
var materialOptions = optionLogic.SetMaterialOptions(MaterialEntity, limitState, calcTerm);
|
var materialOptions = optionLogic.SetMaterialOptions(MaterialEntity, limitState, calcTerm);
|
||||||
var strength = GetStrengthFactors(limitState, calcTerm);
|
var factors = factorLogic.GetTotalFactor(limitState, calcTerm);
|
||||||
materialOptions.ExternalFactor.Compressive = strength.Compressive;
|
materialOptions.ExternalFactor.Compressive = factors.Compressive;
|
||||||
materialOptions.ExternalFactor.Tensile = strength.Tensile;
|
materialOptions.ExternalFactor.Tensile = factors.Tensile;
|
||||||
LoaderMaterialBuilders.IMaterialBuilder builder = new LoaderMaterialBuilders.ReinforcementBuilder(materialOptions);
|
LoaderMaterialBuilders.IMaterialBuilder builder = new LoaderMaterialBuilders.ReinforcementBuilder(materialOptions);
|
||||||
LoaderMaterialBuilders.IBuilderDirector director = new LoaderMaterialBuilders.BuilderDirector(builder);
|
LoaderMaterialBuilders.IBuilderDirector director = new LoaderMaterialBuilders.BuilderDirector(builder);
|
||||||
return director.BuildMaterial();
|
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))
|
|
||||||
{
|
|
||||||
compressionVal *= item.GetFactor(StressStates.Compression, calcTerm, limitState);
|
|
||||||
tensionVal *= item.GetFactor(StressStates.Tension, calcTerm, limitState);
|
|
||||||
}
|
|
||||||
return (compressionVal, tensionVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
public (double Compressive, double Tensile) GetStrength(LimitStates limitState, CalcTerms calcTerm)
|
public (double Compressive, double Tensile) GetStrength(LimitStates limitState, CalcTerms calcTerm)
|
||||||
{
|
{
|
||||||
strengthLogic = new LoaderMaterialLogics.TrueStrengthReinforcementLogic(MaterialEntity.MainStrength);
|
strengthLogic = new LoaderMaterialLogics.TrueStrengthReinforcementLogic(MaterialEntity.MainStrength);
|
||||||
@@ -64,7 +52,7 @@ namespace StructureHelperLogics.Models.Materials
|
|||||||
compressionFactor /= 1.15d;
|
compressionFactor /= 1.15d;
|
||||||
tensionFactor /= 1.15d;
|
tensionFactor /= 1.15d;
|
||||||
}
|
}
|
||||||
var factors = GetStrengthFactors(limitState, calcTerm);
|
var factors = factorLogic.GetTotalFactor(limitState, calcTerm);
|
||||||
compressionFactor *= factors.Compressive;
|
compressionFactor *= factors.Compressive;
|
||||||
tensionFactor *= factors.Tensile;
|
tensionFactor *= factors.Tensile;
|
||||||
var compressiveStrength = strength.Compressive * compressionFactor;
|
var compressiveStrength = strength.Compressive * compressionFactor;
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
point2D = new Point2D() { X = loaderPoint.CenterX, Y = loaderPoint.CenterY };
|
point2D = new Point2D() { X = loaderPoint.CenterX, Y = loaderPoint.CenterY };
|
||||||
}
|
}
|
||||||
else point2D = combination.ForcePoint;
|
else point2D = combination.ForcePoint;
|
||||||
var newTuple = ForceTupleService.MoveTupleIntoPoint(tuple.ForceTuple, point2D);
|
var newTuple = ForceTupleService.MoveTupleIntoPoint(tuple.ForceTuple, point2D) as ForceTuple;
|
||||||
IForcesTupleResult result = GetPrimitiveStrainMatrix(ndms, newTuple);
|
IForcesTupleResult result = GetPrimitiveStrainMatrix(ndms, newTuple);
|
||||||
if (CompressedMember.Buckling == true)
|
if (CompressedMember.Buckling == true)
|
||||||
{
|
{
|
||||||
@@ -145,9 +145,9 @@ namespace StructureHelperLogics.NdmCalculations.Analyses.ByForces
|
|||||||
return bucklingCalculator;
|
return bucklingCalculator;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IForceTuple CalculateBuckling(IForceTuple calcTuple, IConcreteBucklingResult bucklingResult)
|
private ForceTuple CalculateBuckling(ForceTuple calcTuple, IConcreteBucklingResult bucklingResult)
|
||||||
{
|
{
|
||||||
var newTuple = calcTuple.Clone() as IForceTuple;
|
var newTuple = calcTuple.Clone() as ForceTuple;
|
||||||
newTuple.Mx *= bucklingResult.EtaFactorAlongY;
|
newTuple.Mx *= bucklingResult.EtaFactorAlongY;
|
||||||
newTuple.My *= bucklingResult.EtaFactorAlongX;
|
newTuple.My *= bucklingResult.EtaFactorAlongX;
|
||||||
return newTuple;
|
return newTuple;
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
|||||||
public double CenterX { get; set; }
|
public double CenterX { get; set; }
|
||||||
public double CenterY { get; set; }
|
public double CenterY { get; set; }
|
||||||
public IHeadMaterial? HeadMaterial { get; set; }
|
public IHeadMaterial? HeadMaterial { get; set; }
|
||||||
public IStrainTuple UsersPrestrain { get; }
|
public StrainTuple UsersPrestrain { get; }
|
||||||
public IStrainTuple AutoPrestrain { get; }
|
public StrainTuple AutoPrestrain { get; }
|
||||||
public IVisualProperty VisualProperty { get; }
|
public IVisualProperty VisualProperty { get; }
|
||||||
public double Diameter { get; set; }
|
public double Diameter { get; set; }
|
||||||
public double NdmMaxSize { get; set; }
|
public double NdmMaxSize { get; set; }
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
|||||||
/// Flag of triangulation
|
/// Flag of triangulation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool Triangulate { get; set; }
|
bool Triangulate { get; set; }
|
||||||
IStrainTuple UsersPrestrain { get; }
|
StrainTuple UsersPrestrain { get; }
|
||||||
IStrainTuple AutoPrestrain { get; }
|
StrainTuple AutoPrestrain { get; }
|
||||||
IVisualProperty VisualProperty {get; }
|
IVisualProperty VisualProperty {get; }
|
||||||
|
|
||||||
IEnumerable<INdm> GetNdms(IMaterial material);
|
IEnumerable<INdm> GetNdms(IMaterial material);
|
||||||
|
|||||||
@@ -34,9 +34,9 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
|||||||
|
|
||||||
public IVisualProperty VisualProperty => throw new NotImplementedException();
|
public IVisualProperty VisualProperty => throw new NotImplementedException();
|
||||||
|
|
||||||
public IStrainTuple UsersPrestrain => throw new NotImplementedException();
|
public StrainTuple UsersPrestrain => throw new NotImplementedException();
|
||||||
|
|
||||||
public IStrainTuple AutoPrestrain => throw new NotImplementedException();
|
public StrainTuple AutoPrestrain => throw new NotImplementedException();
|
||||||
|
|
||||||
public bool ClearUnderlying { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
public bool ClearUnderlying { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||||
public bool Triangulate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
public bool Triangulate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ namespace StructureHelperLogics.Models.Primitives
|
|||||||
public IHeadMaterial HeadMaterial { get; set; }
|
public IHeadMaterial HeadMaterial { get; set; }
|
||||||
public double NdmMaxSize { get; set; }
|
public double NdmMaxSize { get; set; }
|
||||||
public int NdmMinDivision { get; set; }
|
public int NdmMinDivision { get; set; }
|
||||||
public IStrainTuple UsersPrestrain { get; private set; }
|
public StrainTuple UsersPrestrain { get; private set; }
|
||||||
public IStrainTuple AutoPrestrain { get; private set; }
|
public StrainTuple AutoPrestrain { get; private set; }
|
||||||
public double Area { get; set; }
|
public double Area { get; set; }
|
||||||
|
|
||||||
public IVisualProperty VisualProperty { get; }
|
public IVisualProperty VisualProperty { get; }
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
|||||||
public double CenterX { get; set; }
|
public double CenterX { get; set; }
|
||||||
public double CenterY { get; set; }
|
public double CenterY { get; set; }
|
||||||
public IHeadMaterial? HeadMaterial { get; set; }
|
public IHeadMaterial? HeadMaterial { get; set; }
|
||||||
public IStrainTuple UsersPrestrain { get; private set; }
|
public StrainTuple UsersPrestrain { get; private set; }
|
||||||
public IStrainTuple AutoPrestrain { get; private set; }
|
public StrainTuple AutoPrestrain { get; private set; }
|
||||||
public double NdmMaxSize { get; set; }
|
public double NdmMaxSize { get; set; }
|
||||||
public int NdmMinDivision { get; set; }
|
public int NdmMinDivision { get; set; }
|
||||||
public double Width { get; set; }
|
public double Width { get; set; }
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
|||||||
public IHeadMaterial? HeadMaterial { get; set; }
|
public IHeadMaterial? HeadMaterial { get; set; }
|
||||||
public bool Triangulate { get; set; }
|
public bool Triangulate { get; set; }
|
||||||
|
|
||||||
public IStrainTuple UsersPrestrain { get; private set; }
|
public StrainTuple UsersPrestrain { get; private set; }
|
||||||
|
|
||||||
public IStrainTuple AutoPrestrain { get; private set; }
|
public StrainTuple AutoPrestrain { get; private set; }
|
||||||
|
|
||||||
public IVisualProperty VisualProperty { get; private set; }
|
public IVisualProperty VisualProperty { get; private set; }
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
|||||||
|
|
||||||
public int NdmMinDivision { get; }
|
public int NdmMinDivision { get; }
|
||||||
|
|
||||||
public IStrainTuple Prestrain { get; set; }
|
public StrainTuple Prestrain { get; set; }
|
||||||
|
|
||||||
public CircleTriangulationLogicOptions(ICirclePrimitive primitive)
|
public CircleTriangulationLogicOptions(ICirclePrimitive primitive)
|
||||||
{
|
{
|
||||||
@@ -29,9 +29,9 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
|||||||
NdmMinDivision = primitive.NdmMinDivision;
|
NdmMinDivision = primitive.NdmMinDivision;
|
||||||
Prestrain = new StrainTuple
|
Prestrain = new StrainTuple
|
||||||
{
|
{
|
||||||
Kx = primitive.UsersPrestrain.Kx + primitive.AutoPrestrain.Kx,
|
Mx = primitive.UsersPrestrain.Mx + primitive.AutoPrestrain.Mx,
|
||||||
Ky = primitive.UsersPrestrain.Ky + primitive.AutoPrestrain.Ky,
|
My = primitive.UsersPrestrain.My + primitive.AutoPrestrain.My,
|
||||||
EpsZ = primitive.UsersPrestrain.EpsZ + primitive.AutoPrestrain.EpsZ
|
Nz = primitive.UsersPrestrain.Nz + primitive.AutoPrestrain.Nz
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
|||||||
{
|
{
|
||||||
public interface ITriangulationLogicOptions
|
public interface ITriangulationLogicOptions
|
||||||
{
|
{
|
||||||
IStrainTuple Prestrain { get; set; }
|
StrainTuple Prestrain { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
|||||||
List<INdm> ndmCollection = new List<INdm>();
|
List<INdm> ndmCollection = new List<INdm>();
|
||||||
INdm ndm = new Ndm { CenterX = center.X, CenterY = center.Y, Area = area, Material = material };
|
INdm ndm = new Ndm { CenterX = center.X, CenterY = center.Y, Area = area, Material = material };
|
||||||
ndmCollection.Add(ndm);
|
ndmCollection.Add(ndm);
|
||||||
NdmTransform.SetPrestrain(ndmCollection, new StrainMatrix() { Kx = options.Prestrain.Kx, Ky = options.Prestrain.Ky, EpsZ = options.Prestrain.EpsZ });
|
NdmTransform.SetPrestrain(ndmCollection, new StrainMatrix() { Kx = options.Prestrain.Mx, Ky = options.Prestrain.My, EpsZ = options.Prestrain.Nz });
|
||||||
return ndmCollection;
|
return ndmCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
|||||||
public IPoint2D Center { get; }
|
public IPoint2D Center { get; }
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public double Area { get; }
|
public double Area { get; }
|
||||||
public IStrainTuple Prestrain { get; set; }
|
public StrainTuple Prestrain { get; set; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
||||||
@@ -35,9 +35,9 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
|||||||
Area = primitive.Area;
|
Area = primitive.Area;
|
||||||
Prestrain = new StrainTuple
|
Prestrain = new StrainTuple
|
||||||
{
|
{
|
||||||
Kx = primitive.UsersPrestrain.Kx + primitive.AutoPrestrain.Kx,
|
Mx = primitive.UsersPrestrain.Mx + primitive.AutoPrestrain.Mx,
|
||||||
Ky = primitive.UsersPrestrain.Ky + primitive.AutoPrestrain.Ky,
|
My = primitive.UsersPrestrain.My + primitive.AutoPrestrain.My,
|
||||||
EpsZ = primitive.UsersPrestrain.EpsZ + primitive.AutoPrestrain.EpsZ
|
Nz = primitive.UsersPrestrain.Nz + primitive.AutoPrestrain.Nz
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public int NdmMinDivision { get; }
|
public int NdmMinDivision { get; }
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public IStrainTuple Prestrain { get; set; }
|
public StrainTuple Prestrain { get; set; }
|
||||||
|
|
||||||
public RectangleTriangulationLogicOptions(IPoint2D center, IRectangleShape rectangle, double ndmMaxSize, int ndmMinDivision)
|
public RectangleTriangulationLogicOptions(IPoint2D center, IRectangleShape rectangle, double ndmMaxSize, int ndmMinDivision)
|
||||||
{
|
{
|
||||||
@@ -39,9 +39,9 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
|||||||
NdmMinDivision = primitive.NdmMinDivision;
|
NdmMinDivision = primitive.NdmMinDivision;
|
||||||
Prestrain = new StrainTuple
|
Prestrain = new StrainTuple
|
||||||
{
|
{
|
||||||
Kx = primitive.UsersPrestrain.Kx + primitive.AutoPrestrain.Kx,
|
Mx = primitive.UsersPrestrain.Mx + primitive.AutoPrestrain.Mx,
|
||||||
Ky = primitive.UsersPrestrain.Ky + primitive.AutoPrestrain.Ky,
|
My = primitive.UsersPrestrain.My + primitive.AutoPrestrain.My,
|
||||||
EpsZ = primitive.UsersPrestrain.EpsZ + primitive.AutoPrestrain.EpsZ
|
Nz = primitive.UsersPrestrain.Nz + primitive.AutoPrestrain.Nz
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ namespace StructureHelperLogics.NdmCalculations.Triangulations
|
|||||||
{
|
{
|
||||||
internal static class TriangulationService
|
internal static class TriangulationService
|
||||||
{
|
{
|
||||||
public static void SetPrestrain(IEnumerable<INdm> ndmCollection, IStrainTuple strainTuple)
|
public static void SetPrestrain(IEnumerable<INdm> ndmCollection, StrainTuple strainTuple)
|
||||||
{
|
{
|
||||||
NdmTransform.SetPrestrain(ndmCollection, new StrainMatrix() { Kx = strainTuple.Kx, Ky = strainTuple.Ky, EpsZ = strainTuple.EpsZ });
|
NdmTransform.SetPrestrain(ndmCollection, new StrainMatrix() { Kx = strainTuple.Mx, Ky = strainTuple.My, EpsZ = strainTuple.Nz });
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void CommonTransform(IEnumerable<INdm> ndmCollection, IShapeTriangulationLogicOptions options)
|
public static void CommonTransform(IEnumerable<INdm> ndmCollection, IShapeTriangulationLogicOptions options)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace StructureHelperLogics.Services.NdmPrimitives
|
|||||||
target.CenterX = source.CenterX;
|
target.CenterX = source.CenterX;
|
||||||
target.CenterY = source.CenterY;
|
target.CenterY = source.CenterY;
|
||||||
target.Triangulate = source.Triangulate;
|
target.Triangulate = source.Triangulate;
|
||||||
StrainTupleService.CopyProperties(source.UsersPrestrain, target.UsersPrestrain);
|
ForceTupleService.CopyProperties(source.UsersPrestrain, target.UsersPrestrain);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void CopyDivisionProperties(IHasDivisionSize source, IHasDivisionSize target)
|
public static void CopyDivisionProperties(IHasDivisionSize source, IHasDivisionSize target)
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace StructureHelperTests.FunctionalTests.Ndms.Calculators.ForceCalculatorT
|
|||||||
//Act
|
//Act
|
||||||
foreach (var item in ndmPrimitives)
|
foreach (var item in ndmPrimitives)
|
||||||
{
|
{
|
||||||
StrainTupleService.CopyProperties(source, item.AutoPrestrain);
|
ForceTupleService.CopyProperties(source, item.AutoPrestrain);
|
||||||
}
|
}
|
||||||
calculator.Run();
|
calculator.Run();
|
||||||
var result2 = calculator.Result as IForcesResults;
|
var result2 = calculator.Result as IForcesResults;
|
||||||
|
|||||||
@@ -11,16 +11,16 @@ namespace StructureHelperTests.UnitTests.MaterialTests
|
|||||||
{
|
{
|
||||||
public class MaterialStrengthTest
|
public class MaterialStrengthTest
|
||||||
{
|
{
|
||||||
[TestCase(HeadmaterialType.Reinforecement400, CodeTypes.SP63_13330_2018, LimitStates.ULS, CalcTerms.ShortTerm, 347826086.95652175d, 347826086.95652175d)]
|
[TestCase(HeadmaterialType.Reinforecement400, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.ShortTerm, 347826086.95652175d, 347826086.95652175d)]
|
||||||
[TestCase(HeadmaterialType.Reinforecement400, CodeTypes.SP63_13330_2018, LimitStates.SLS, CalcTerms.ShortTerm, 400000000d, 400000000d)]
|
[TestCase(HeadmaterialType.Reinforecement400, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 400000000d, 400000000d)]
|
||||||
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_13330_2018, LimitStates.ULS, CalcTerms.ShortTerm, 400000000.0d, 434782608.69565225d)]
|
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.ShortTerm, 400000000.0d, 434782608.69565225d)]
|
||||||
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_13330_2018, LimitStates.ULS, CalcTerms.LongTerm, 434782608.69565225d, 434782608.69565225d)]
|
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.LongTerm, 434782608.69565225d, 434782608.69565225d)]
|
||||||
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_13330_2018, LimitStates.SLS, CalcTerms.ShortTerm, 5e8d, 5e8d)]
|
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 5e8d, 5e8d)]
|
||||||
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_13330_2018, LimitStates.SLS, CalcTerms.ShortTerm, 5e8d, 5e8d)]
|
[TestCase(HeadmaterialType.Reinforecement500, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 5e8d, 5e8d)]
|
||||||
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018, LimitStates.ULS, CalcTerms.ShortTerm, 22461538.46153846d, 1395297.0017909051d)]
|
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.ShortTerm, 22461538.46153846d, 1395297.0017909051d)]
|
||||||
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018, LimitStates.ULS, CalcTerms.LongTerm, 20215384.615384616d, 1255767.3016118146d)]
|
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_2018, LimitStates.ULS, CalcTerms.LongTerm, 20215384.615384616d, 1255767.3016118146d)]
|
||||||
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018, LimitStates.SLS, CalcTerms.ShortTerm, 29200000.0d, 2092945.5026863578d)]
|
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.ShortTerm, 29200000.0d, 2092945.5026863578d)]
|
||||||
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018, LimitStates.SLS, CalcTerms.LongTerm, 29200000.0d, 2092945.5026863578d)]
|
[TestCase(HeadmaterialType.Concrete40, CodeTypes.SP63_2018, LimitStates.SLS, CalcTerms.LongTerm, 29200000.0d, 2092945.5026863578d)]
|
||||||
public void Run_ShouldPass(HeadmaterialType headmaterialType, CodeTypes code, LimitStates limitState, CalcTerms calcTerm, double expectedCompressive, double expectedTensile)
|
public void Run_ShouldPass(HeadmaterialType headmaterialType, CodeTypes code, LimitStates limitState, CalcTerms calcTerm, double expectedCompressive, double expectedTensile)
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Triangulations
|
|||||||
public void Run_Shouldpass_RectOpeningRect(double centerX, double centerY, double width, double height, bool triangOpening, double expectedArea, double expectedMomX, double expectedMomY)
|
public void Run_Shouldpass_RectOpeningRect(double centerX, double centerY, double width, double height, bool triangOpening, double expectedArea, double expectedMomX, double expectedMomY)
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||||
var mainBlock = new RectanglePrimitive() { CenterX = centerX, CenterY = centerY, Width = width, Height = height, HeadMaterial = material };
|
var mainBlock = new RectanglePrimitive() { CenterX = centerX, CenterY = centerY, Width = width, Height = height, HeadMaterial = material };
|
||||||
mainBlock.VisualProperty.ZIndex = 0;
|
mainBlock.VisualProperty.ZIndex = 0;
|
||||||
var opening = new RectanglePrimitive()
|
var opening = new RectanglePrimitive()
|
||||||
@@ -71,7 +71,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Triangulations
|
|||||||
public void Run_Shouldpass_RectOpeningCircle(double centerX, double centerY, double width, double height, bool triangOpening, double expectedArea, double expectedMomX, double expectedMomY)
|
public void Run_Shouldpass_RectOpeningCircle(double centerX, double centerY, double width, double height, bool triangOpening, double expectedArea, double expectedMomX, double expectedMomY)
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||||
var mainBlock = new RectanglePrimitive() { CenterX = centerX, CenterY = centerY, Width = width, Height = height, HeadMaterial = material };
|
var mainBlock = new RectanglePrimitive() { CenterX = centerX, CenterY = centerY, Width = width, Height = height, HeadMaterial = material };
|
||||||
mainBlock.VisualProperty.ZIndex = 0;
|
mainBlock.VisualProperty.ZIndex = 0;
|
||||||
var opening = new CirclePrimitive()
|
var opening = new CirclePrimitive()
|
||||||
@@ -101,7 +101,7 @@ namespace StructureHelperTests.UnitTests.Ndms.Triangulations
|
|||||||
public void Run_Shouldpass_CircleOpeningRect(double centerX, double centerY, double diameter, bool triangOpening, double expectedArea, double expectedMomX, double expectedMomY)
|
public void Run_Shouldpass_CircleOpeningRect(double centerX, double centerY, double diameter, bool triangOpening, double expectedArea, double expectedMomX, double expectedMomY)
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||||
var mainBlock = new CirclePrimitive() { CenterX = centerX, CenterY = centerY, Diameter = diameter, HeadMaterial = material };
|
var mainBlock = new CirclePrimitive() { CenterX = centerX, CenterY = centerY, Diameter = diameter, HeadMaterial = material };
|
||||||
mainBlock.VisualProperty.ZIndex = 0;
|
mainBlock.VisualProperty.ZIndex = 0;
|
||||||
var opening = new RectanglePrimitive()
|
var opening = new RectanglePrimitive()
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace StructureHelperTests.ViewModelTests
|
|||||||
public void Rectangle_Run_ShouldPass()
|
public void Rectangle_Run_ShouldPass()
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||||
var primitive = new RectanglePrimitive(material);
|
var primitive = new RectanglePrimitive(material);
|
||||||
var primitiveBase = new RectangleViewPrimitive(primitive);
|
var primitiveBase = new RectangleViewPrimitive(primitive);
|
||||||
//Act
|
//Act
|
||||||
@@ -36,7 +36,7 @@ namespace StructureHelperTests.ViewModelTests
|
|||||||
public void Circle_Run_ShouldPass()
|
public void Circle_Run_ShouldPass()
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||||
var primitive = new CirclePrimitive() { HeadMaterial = material};
|
var primitive = new CirclePrimitive() { HeadMaterial = material};
|
||||||
var primitiveBase = new CircleViewPrimitive(primitive);
|
var primitiveBase = new CircleViewPrimitive(primitive);
|
||||||
//Act
|
//Act
|
||||||
@@ -49,7 +49,7 @@ namespace StructureHelperTests.ViewModelTests
|
|||||||
public void Point_Run_ShouldPass()
|
public void Point_Run_ShouldPass()
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||||
var primitive = new PointPrimitive(material);
|
var primitive = new PointPrimitive(material);
|
||||||
var primitiveBase = new PointViewPrimitive(primitive);
|
var primitiveBase = new PointViewPrimitive(primitive);
|
||||||
//Act
|
//Act
|
||||||
@@ -61,7 +61,7 @@ namespace StructureHelperTests.ViewModelTests
|
|||||||
public void Reinforcement_Run_ShouldPass()
|
public void Reinforcement_Run_ShouldPass()
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_13330_2018);
|
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Concrete40, CodeTypes.SP63_2018);
|
||||||
var primitive = new ReinforcementPrimitive() { HeadMaterial = material };
|
var primitive = new ReinforcementPrimitive() { HeadMaterial = material };
|
||||||
var primitiveBase = new ReinforcementViewPrimitive(primitive);
|
var primitiveBase = new ReinforcementViewPrimitive(primitive);
|
||||||
//Act
|
//Act
|
||||||
|
|||||||
Reference in New Issue
Block a user