Force combination was added

This commit is contained in:
Evgeny Redikultsev
2022-11-27 17:04:34 +05:00
parent c5e503252e
commit 96b331f14c
52 changed files with 427 additions and 214 deletions

View File

@@ -2,8 +2,8 @@
{
public enum LimitStates
{
Collapse = 1,
ServiceAbility = 2,
ULS = 1,
SLS = 2,
Special = 3,
}
}

View File

@@ -12,6 +12,7 @@ namespace StructureHelperCommon.Infrastructures.Enums
Area,
Stress,
Force,
Moment
Moment,
Curvature
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Calculators
{
public interface IHelperCalculator <in TInputData, TCalculationResult>
where TInputData : class
where TCalculationResult : class
{
}
}

View File

@@ -0,0 +1,23 @@
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 class DesignForceTuple : IDesignForceTuple
{
public LimitStates LimitState { get; set; }
public CalcTerms CalcTerm { get; set; }
public IForceTuple ForceTuple { get; private set; }
public DesignForceTuple(LimitStates limitState, CalcTerms calcTerm)
{
LimitState = limitState;
CalcTerm = calcTerm;
ForceTuple = new ForceTuple();
}
}
}

View File

@@ -0,0 +1,27 @@
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 ForceCombinationList : IForceCombinationList
{
public string Name { get; set; }
public Point2D ForcePoint { get; private set; }
public List<IDesignForceTuple> DesignForces { get; private set; }
public ForceCombinationList()
{
DesignForces = new List<IDesignForceTuple>();
DesignForces.Add(new DesignForceTuple(LimitStates.ULS, CalcTerms.ShortTerm));
DesignForces.Add(new DesignForceTuple(LimitStates.ULS, CalcTerms.LongTerm));
DesignForces.Add(new DesignForceTuple(LimitStates.SLS, CalcTerms.ShortTerm));
DesignForces.Add(new DesignForceTuple(LimitStates.SLS, CalcTerms.LongTerm));
}
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Forces
{
public class ForceTuple : IForceTuple
{
public double Mx { get; set; }
public double My { get; set; }
public double Nz { get; set; }
public double Qx { get; set; }
public double Qy { get; set; }
public double Mz { get; set; }
}
}

View 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 IDesignForceTuple
{
LimitStates LimitState { get; set; }
CalcTerms CalcTerm { get; set; }
IForceTuple ForceTuple {get;}
}
}

View File

@@ -0,0 +1,16 @@
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 interface IForceCombinationList
{
string Name { get; set; }
Point2D ForcePoint {get ;}
List<IDesignForceTuple> DesignForces { get; }
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Forces
{
public interface IForceTuple
{
double Mx { get; set; }
double My { get; set; }
double Nz { get; set; }
double Qx { get; set; }
double Qy { get; set; }
double Mz { get; set; }
}
}

View File

@@ -2,7 +2,7 @@
{
public interface ICenterShape
{
ICenter Center {get;}
IPoint2D Center {get;}
IShape Shape { get;}
}
}

View File

@@ -8,8 +8,8 @@ namespace StructureHelperCommon.Models.Shapes
{
public interface ILineShape : IShape
{
ICenter StartPoint { get; set; }
ICenter EndPoint { get; set; }
IPoint2D StartPoint { get; set; }
IPoint2D EndPoint { get; set; }
double Thickness { get; set; }
}
}

View File

@@ -4,7 +4,7 @@
/// Interface for point of center of some shape
/// Интерфейс для точки центра некоторой формы
/// </summary>
public interface ICenter
public interface IPoint2D
{
/// <summary>
/// Coordinate of center of rectangle by local axis X, m

View File

@@ -10,16 +10,16 @@ namespace StructureHelperCommon.Models.Shapes
public class LineShape : ILineShape
{
/// <inheritdoc />
public ICenter StartPoint { get; set; }
public IPoint2D StartPoint { get; set; }
/// <inheritdoc />
public ICenter EndPoint { get; set; }
public IPoint2D EndPoint { get; set; }
/// <inheritdoc />
public double Thickness { get; set; }
public LineShape()
{
StartPoint = new Center();
EndPoint = new Center();
StartPoint = new Point2D();
EndPoint = new Point2D();
Thickness = 0;
}
}

View File

@@ -1,7 +1,7 @@
namespace StructureHelperCommon.Models.Shapes
{
/// <inheritdoc />
public class Center : ICenter
public class Point2D : IPoint2D
{
/// <inheritdoc />
public double X { get; set; }

View File

@@ -17,10 +17,27 @@ namespace StructureHelperCommon.Services.Units
units.Add(new Unit() { UnitType = type, Name = "mm", Multiplyer = 1e3d });
units.Add(new Unit() { UnitType = type, Name = "cm", Multiplyer = 1e2d });
units.Add(new Unit() { UnitType = type, Name = "km", Multiplyer = 1e-3d });
type = UnitTypes.Area;
units.Add(new Unit() { UnitType = type, Name = "m2", Multiplyer = 1d });
units.Add(new Unit() { UnitType = type, Name = "mm2", Multiplyer = 1e6d });
units.Add(new Unit() { UnitType = type, Name = "cm2", Multiplyer = 1e4d });
type = UnitTypes.Stress;
units.Add(new Unit() { UnitType = type, Name = "Pa", Multiplyer = 1d });
units.Add(new Unit() { UnitType = type, Name = "kPa", Multiplyer = 1e-3d });
units.Add(new Unit() { UnitType = type, Name = "MPa", Multiplyer = 1e-6d });
type = UnitTypes.Force;
units.Add(new Unit() { UnitType = type, Name = "N", Multiplyer = 1d });
units.Add(new Unit() { UnitType = type, Name = "kN", Multiplyer = 1e-3d });
units.Add(new Unit() { UnitType = type, Name = "MN", Multiplyer = 1e-6d });
type = UnitTypes.Moment;
units.Add(new Unit() { UnitType = type, Name = "Nm", Multiplyer = 1d });
units.Add(new Unit() { UnitType = type, Name = "kNm", Multiplyer = 1e-3d });
units.Add(new Unit() { UnitType = type, Name = "kgfm", Multiplyer = 9.8d });
units.Add(new Unit() { UnitType = type, Name = "tfm", Multiplyer = 9.8e-3d });
type = UnitTypes.Curvature;
units.Add(new Unit() { UnitType = type, Name = "1/m", Multiplyer = 1d });
units.Add(new Unit() { UnitType = type, Name = "1/mm", Multiplyer = 1e-3d });
units.Add(new Unit() { UnitType = type, Name = "1/cm", Multiplyer = 1e-2d });
return units;
}
}

View File

@@ -55,8 +55,15 @@
<Compile Include="Infrastructures\Interfaces\ISaveable.cs" />
<Compile Include="Infrastructures\Strings\ErrorString.cs" />
<Compile Include="Infrastructures\Enums\MaterialTypes.cs" />
<Compile Include="Models\Shapes\Center.cs" />
<Compile Include="Models\Shapes\ICenter.cs" />
<Compile Include="Models\Calculators\IHelperCalculator.cs" />
<Compile Include="Models\Forces\DesignForceTuple.cs" />
<Compile Include="Models\Forces\ForceCombinationList.cs" />
<Compile Include="Models\Forces\ForceTuple.cs" />
<Compile Include="Models\Forces\IDesignForceTuple.cs" />
<Compile Include="Models\Forces\IForceCombinationList.cs" />
<Compile Include="Models\Forces\IForceTuple.cs" />
<Compile Include="Models\Shapes\Point2D.cs" />
<Compile Include="Models\Shapes\IPoint2D.cs" />
<Compile Include="Models\Shapes\ICenterShape.cs" />
<Compile Include="Models\Shapes\ICircle.cs" />
<Compile Include="Models\Shapes\ILineShape.cs" />
@@ -73,5 +80,6 @@
<Compile Include="Services\Units\Unit.cs" />
<Compile Include="Services\Units\UnitsFactory.cs" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>