Skip to content

Commit

Permalink
Merge pull request #41 from MagmaWorks/feature/concrete-exposure-class
Browse files Browse the repository at this point in the history
Concrete exposure and max aggregate size
  • Loading branch information
kpne authored Nov 7, 2024
2 parents 1d3cc42 + 335535b commit e3cf75d
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace MagmaWorks.Taxonomy.Materials
{
public enum ENConcreteExposureClass
{
X0,
XC1,
XC2,
XC3,
XC4,
XD1,
XD2,
XD3,
XS1,
XS2,
XS3,
XF1,
XF2,
XF3,
XF4,
XA1,
XA2,
XA3,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ namespace MagmaWorks.Taxonomy.Materials
{
public interface IENConcreteMaterial : IENMaterial<ENConcreteGrade>
{
ENConcreteExposureClass ExposureClass { get; }
Length MaximumAggregateSize { get; }

/// <summary>
/// γc partial factor for concrete in Persistent and Transient design situations
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using MagmaWorks.Taxonomy.Serialization.Materials.Extensions;
using MagmaWorks.Taxonomy.Standards;
using MagmaWorks.Taxonomy.Standards.Eurocode;
using OasysUnits;
using OasysUnits.Units;

namespace MaterialTests.StandardMaterials.EN
{
Expand All @@ -25,7 +27,29 @@ public void CreateStandardENC40_50UKNAConcreteMaterialTests()
Assert.Equal(
"BS EN 1992-1-1: Eurocode 2: Design of Concrete Structures - Part 1-1: General rules and rules for buildings",
material.Standard.Title);
Assert.Equal(NationalAnnex.UnitedKingdom, material.Standard.NationalAnnex);
Assert.Equal(ENConcreteGrade.C40_50, material.Grade);
Assert.Equal(ENConcreteExposureClass.XC1, material.ExposureClass);
Assert.Equal(20, material.MaximumAggregateSize.Millimeters);
}

[Fact]
public void CreateStandardENC30_37GermanNAConcreteMaterialWithExposureClassAndMaxAggregateSizeTests()
{
// Assemble
ENConcreteGrade grade = ENConcreteGrade.C30_37;
NationalAnnex nationalAnnex = NationalAnnex.Germany;
ENConcreteExposureClass exposureClass = ENConcreteExposureClass.XF2;
Length maxAggregateSize = new Length(40, LengthUnit.Millimeter);

// Act
IENConcreteMaterial material = new ENConcreteMaterial(grade, nationalAnnex, exposureClass, maxAggregateSize);

// Assert
Assert.Equal(NationalAnnex.Germany, material.Standard.NationalAnnex);
Assert.Equal(ENConcreteGrade.C30_37, material.Grade);
Assert.Equal(ENConcreteExposureClass.XF2, material.ExposureClass);
Assert.Equal(40, material.MaximumAggregateSize.Millimeters);
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public void CreateStandardENB500BUKRebarMaterialTests()
Assert.Equal(
"BS EN 1992-1-1: Eurocode 2: Design of Concrete Structures - Part 1-1: General rules and rules for buildings",
material.Standard.Title);
Assert.Equal(NationalAnnex.UnitedKingdom, material.Standard.NationalAnnex);
Assert.Equal(ENRebarGrade.B500B, material.Grade);
}

Expand Down
14 changes: 14 additions & 0 deletions Materials/Materials/StandardMaterials/EN/ENConcreteMaterial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,35 @@ namespace MagmaWorks.Taxonomy.Materials.StandardMaterials.EN
{
public class ENConcreteMaterial : IENConcreteMaterial
{
public ENConcreteExposureClass ExposureClass { get; set; } = ENConcreteExposureClass.XC1;
public ENConcreteGrade Grade { get; set; } = ENConcreteGrade.C30_37;
public IEurocode Standard { get; set; } = new EN1992(EN1992Part.Part1_1, NationalAnnex.RecommendedValues);
public MaterialType Type => MaterialType.Concrete;
public Length MaximumAggregateSize { get; set; } = new Length(20, LengthUnit.Millimeter);
public Ratio PartialFactor { get; set; } = new Ratio(1.5, RatioUnit.DecimalFraction);
public Ratio AccidentialPartialFactor { get; set; } = new Ratio(1.2, RatioUnit.DecimalFraction);
public Ratio LongTermCompressionFactor { get; set; } = new Ratio(1.0, RatioUnit.DecimalFraction);
public Ratio LongTermTensionFactor { get; set; } = new Ratio(1.0, RatioUnit.DecimalFraction);

private ENConcreteMaterial() { }

public ENConcreteMaterial(ENConcreteGrade grade, NationalAnnex nationalAnnex)
{
Standard = new EN1992(EN1992Part.Part1_1, nationalAnnex);
Grade = grade;
SetPartialFactors(nationalAnnex);
}

public ENConcreteMaterial(ENConcreteGrade grade, NationalAnnex nationalAnnex,
ENConcreteExposureClass exposureClass, Length maxAggregateSize)
{
Standard = new EN1992(EN1992Part.Part1_1, nationalAnnex);
Grade = grade;
ExposureClass = exposureClass;
MaximumAggregateSize = maxAggregateSize;
SetPartialFactors(nationalAnnex);
}

private void SetPartialFactors(NationalAnnex nationalAnnex)
{
switch (nationalAnnex)
Expand Down

0 comments on commit e3cf75d

Please sign in to comment.