Carbon material was changed
This commit is contained in:
@@ -25,6 +25,29 @@
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="CarbonProperties">
|
||||
<Expander Header="Fiber Cohesion Properties" IsExpanded="False">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="180"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="30"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="ULS Concrete Strength"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ULSConcreteStrength, Converter={StaticResource StressConverter}, ValidatesOnExceptions=True}"/>
|
||||
<TextBlock Grid.Row="1" Text="Total Layers Thickness"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding SumThickness, Converter={StaticResource LengthConverter}, ValidatesOnExceptions=True}"/>
|
||||
<TextBlock Grid.Row="2" Text="GammaF2 Factor"/>
|
||||
<TextBox Grid.Row="2" Grid.Column="1" IsEnabled="False" Text="{Binding GammaF2, Converter={StaticResource PlainDouble}, ValidatesOnExceptions=True}"/>
|
||||
</Grid>
|
||||
</Expander>
|
||||
|
||||
</DataTemplate>
|
||||
|
||||
<DataTemplate x:Key="DirectSafetyFactors">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@@ -7,40 +7,43 @@
|
||||
xmlns:vm="clr-namespace:StructureHelper.Windows.ViewModels.Materials"
|
||||
d:DataContext="{d:DesignInstance vm:HeadMaterialViewModel}"
|
||||
mc:Ignorable="d"
|
||||
Title="Material properties" Height="350" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
|
||||
Title="Material properties"
|
||||
Height="350" Width="300"
|
||||
MinWidth="300" MaxWidth="400" MinHeight="350" MaxHeight="500"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="/Infrastructure/UI/Resources/Materials.xaml"/>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="46"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="1"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollViewer>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="22"/>
|
||||
<RowDefinition Height="22"/>
|
||||
<RowDefinition Height="46"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="1"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="Name"/>
|
||||
<TextBlock Grid.Row="1" Text="Color"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Margin="1" Text="{Binding Name}"/>
|
||||
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
|
||||
<Rectangle Width="100" Margin="1" Stroke="Black">
|
||||
<Rectangle.Fill>
|
||||
<SolidColorBrush Color="{Binding Color}"/>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Button Width="50" Margin="1" Content="..." Command="{Binding EditColorCommand}"/>
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="22"/>
|
||||
<RowDefinition Height="22"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="Name"/>
|
||||
<TextBlock Grid.Row="1" Text="Color"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Margin="1" Text="{Binding Name}"/>
|
||||
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
|
||||
<Rectangle Width="100" Margin="1" Stroke="Black">
|
||||
<Rectangle.Fill>
|
||||
<SolidColorBrush Color="{Binding Color}"/>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Button Width="50" Margin="1" Content="..." Command="{Binding EditColorCommand}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="1" x:Name="StpMaterialProperties"/>
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="1" x:Name="StpMaterialProperties">
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Window>
|
||||
|
||||
@@ -62,6 +62,13 @@ namespace StructureHelper.Windows.MainWindow.Materials
|
||||
var binding = new Binding();
|
||||
binding.Source = vm.HelperMaterialViewModel;
|
||||
bindings.Add(templateName, binding);
|
||||
if (helperMaterial is IFRMaterial)
|
||||
{
|
||||
templateName = "CarbonProperties";
|
||||
var carbonBinding = new Binding();
|
||||
carbonBinding.Source = vm.HelperMaterialViewModel as FRViewModel;
|
||||
bindings.Add(templateName, carbonBinding);
|
||||
}
|
||||
templateName = "DirectSafetyFactors";
|
||||
var frBinding = new Binding();
|
||||
frBinding.Source = (vm.HelperMaterialViewModel as ElasticViewModel).SafetyFactors;
|
||||
|
||||
@@ -10,9 +10,41 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
||||
{
|
||||
internal class FRViewModel : ElasticViewModel
|
||||
{
|
||||
IFRMaterial material;
|
||||
public double ULSConcreteStrength
|
||||
{
|
||||
get
|
||||
{
|
||||
return material.ULSConcreteStrength;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
material.ULSConcreteStrength = value;
|
||||
OnPropertyChanged(nameof(ULSConcreteStrength));
|
||||
}
|
||||
}
|
||||
public double SumThickness
|
||||
{
|
||||
get
|
||||
{
|
||||
return material.SumThickness;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
material.SumThickness = value;
|
||||
OnPropertyChanged(nameof(SumThickness));
|
||||
}
|
||||
}
|
||||
public double GammaF2
|
||||
{
|
||||
get => material.GammaF2;
|
||||
set {}
|
||||
}
|
||||
public FRViewModel(IFRMaterial material) : base(material)
|
||||
{
|
||||
|
||||
this.material = material;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace StructureHelper.Windows.ViewModels.Materials
|
||||
}
|
||||
private void AddCarbonFiber()
|
||||
{
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Carbon4000, ProgramSetting.CodeType);
|
||||
var material = HeadMaterialFactory.GetHeadMaterial(HeadmaterialType.Carbon1400, ProgramSetting.CodeType);
|
||||
material.Name = "New CFR Material";
|
||||
NewItem = material;
|
||||
}
|
||||
|
||||
@@ -12,29 +12,24 @@ 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,14 +14,33 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
private IElasticMaterialLogic elasticMaterialLogic => new ElasticMaterialLogic();
|
||||
private MaterialTypes materialType;
|
||||
public double Modulus { get; set; }
|
||||
public double Modulus{ get; set; }
|
||||
public double CompressiveStrength { get; set; }
|
||||
public double TensileStrength { get; set; }
|
||||
|
||||
public List<IMaterialSafetyFactor> SafetyFactors { get; }
|
||||
public double ULSConcreteStrength { get; set; }
|
||||
public double SumThickness { get; set; }
|
||||
public double GammaF2 => GetGammaF2();
|
||||
|
||||
private double GetGammaF2()
|
||||
{
|
||||
const double gammaF2Max = 0.9d;
|
||||
double gammaF2;
|
||||
IFactorLogic factorLogic = new FactorLogic(SafetyFactors);
|
||||
var factors = factorLogic.GetTotalFactor(LimitStates.ULS, CalcTerms.ShortTerm);
|
||||
var rf = TensileStrength * factors.Tensile;
|
||||
var epsUlt = rf / Modulus;
|
||||
gammaF2 = 0.4d / epsUlt * Math.Sqrt(ULSConcreteStrength / (Modulus * SumThickness * 1e3d));
|
||||
gammaF2 = Math.Min(gammaF2, gammaF2Max);
|
||||
return gammaF2;
|
||||
}
|
||||
|
||||
public FRMaterial(MaterialTypes materialType)
|
||||
{
|
||||
|
||||
ULSConcreteStrength = 14e6d;
|
||||
SumThickness = 0.175e-3d;
|
||||
SafetyFactors = new List<IMaterialSafetyFactor>();
|
||||
this.materialType = materialType;
|
||||
SafetyFactors.AddRange(PartialCoefficientFactory.GetDefaultFRSafetyFactors(ProgramSetting.FRCodeType, this.materialType));
|
||||
@@ -30,17 +49,24 @@ namespace StructureHelperLogics.Models.Materials
|
||||
public object Clone()
|
||||
{
|
||||
var newItem = new FRMaterial(materialType)
|
||||
{
|
||||
{
|
||||
Modulus = Modulus,
|
||||
CompressiveStrength = CompressiveStrength,
|
||||
TensileStrength = TensileStrength
|
||||
TensileStrength = TensileStrength,
|
||||
ULSConcreteStrength = ULSConcreteStrength,
|
||||
SumThickness = SumThickness,
|
||||
};
|
||||
return newItem;
|
||||
}
|
||||
|
||||
public IMaterial GetLoaderMaterial(LimitStates limitState, CalcTerms calcTerm)
|
||||
{
|
||||
var material = elasticMaterialLogic.GetLoaderMaterial(this, limitState, calcTerm);
|
||||
double factor = 1d;
|
||||
if (limitState == LimitStates.ULS)
|
||||
{
|
||||
factor = GetGammaF2();
|
||||
}
|
||||
var material = elasticMaterialLogic.GetLoaderMaterial(this, limitState, calcTerm, factor);
|
||||
return material;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,9 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
public interface IFRMaterial : IElasticMaterial
|
||||
{
|
||||
|
||||
double ULSConcreteStrength { get; set; }
|
||||
double SumThickness { get; set; }
|
||||
double GammaF2 { get; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
Reinforecement400,
|
||||
Reinforecement500,
|
||||
Elastic200,
|
||||
Carbon4000,
|
||||
Carbon1400,
|
||||
Glass1200
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
if (type == HeadmaterialType.Reinforecement400) { return GetReinforcement400(); }
|
||||
if (type == HeadmaterialType.Reinforecement500) { return GetReinforcement500(); }
|
||||
if (type == HeadmaterialType.Elastic200) { return GetElastic200(); }
|
||||
if (type == HeadmaterialType.Carbon4000) { return GetCarbon4000(); }
|
||||
if (type == HeadmaterialType.Carbon1400) { return GetCarbon1400(); }
|
||||
if (type == HeadmaterialType.Glass1200) { return GetGlass1200(); }
|
||||
else throw new StructureHelperException(ErrorStrings.ObjectTypeIsUnknown + nameof(type));
|
||||
}
|
||||
@@ -57,17 +57,27 @@ namespace StructureHelperLogics.Models.Materials
|
||||
return material;
|
||||
}
|
||||
|
||||
private static IHeadMaterial GetCarbon4000()
|
||||
private static IHeadMaterial GetCarbon1400()
|
||||
{
|
||||
var material = new HeadMaterial();
|
||||
material.HelperMaterial = new FRMaterial(MaterialTypes.CarbonFiber) { Modulus = 2e11d, CompressiveStrength = 4e9d, TensileStrength = 4e9d };
|
||||
material.HelperMaterial = new FRMaterial(MaterialTypes.CarbonFiber)
|
||||
{
|
||||
Modulus = 1.2e11d,
|
||||
CompressiveStrength = 0d,
|
||||
TensileStrength = 1.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 };
|
||||
material.HelperMaterial = new FRMaterial(MaterialTypes.GlassFiber)
|
||||
{
|
||||
Modulus = 8e10d,
|
||||
CompressiveStrength = 1.2e9d,
|
||||
TensileStrength = 1.2e9d
|
||||
};
|
||||
return material;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,9 +66,6 @@ namespace StructureHelperLogics.Models.Materials
|
||||
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);
|
||||
@@ -79,9 +76,6 @@ namespace StructureHelperLogics.Models.Materials
|
||||
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);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
internal class ElasticMaterialLogic : IElasticMaterialLogic
|
||||
{
|
||||
public IMaterial GetLoaderMaterial(IElasticMaterial elasticMaterial, LimitStates limitState, CalcTerms calcTerm)
|
||||
public IMaterial GetLoaderMaterial(IElasticMaterial elasticMaterial, LimitStates limitState, CalcTerms calcTerm, double factor = 1d)
|
||||
{
|
||||
IMaterial material = new Material();
|
||||
material.InitModulus = elasticMaterial.Modulus;
|
||||
@@ -21,15 +21,15 @@ namespace StructureHelperLogics.Models.Materials
|
||||
IEnumerable<double> parameters = new List<double>()
|
||||
{
|
||||
elasticMaterial.Modulus,
|
||||
elasticMaterial.CompressiveStrength * factors.Compressive,
|
||||
elasticMaterial.TensileStrength * factors.Tensile
|
||||
elasticMaterial.CompressiveStrength * factors.Compressive * factor,
|
||||
elasticMaterial.TensileStrength * factors.Tensile * factor
|
||||
};
|
||||
material.DiagramParameters = parameters;
|
||||
material.Diagram = GetStress;
|
||||
material.Diagram = GetStressByStrain;
|
||||
return material;
|
||||
}
|
||||
|
||||
private double GetStress(IEnumerable<double> parameters, double strain)
|
||||
private double GetStressByStrain(IEnumerable<double> parameters, double strain)
|
||||
{
|
||||
double modulus = parameters.First();
|
||||
double stress = modulus * strain;
|
||||
|
||||
@@ -10,6 +10,6 @@ namespace StructureHelperLogics.Models.Materials
|
||||
{
|
||||
internal interface IElasticMaterialLogic
|
||||
{
|
||||
IMaterial GetLoaderMaterial(IElasticMaterial material, LimitStates limitState, CalcTerms calcTerm);
|
||||
IMaterial GetLoaderMaterial(IElasticMaterial material, LimitStates limitState, CalcTerms calcTerm, double factor = 1d);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user