Add BeamShearCalculator
This commit is contained in:
@@ -6,8 +6,18 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Infrastructures.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement effective depth for reinforced concrete section
|
||||
/// </summary>
|
||||
public interface IEffectiveDepth
|
||||
{
|
||||
/// <summary>
|
||||
/// Full depth of cross-section
|
||||
/// </summary>
|
||||
double FullDepth { get; set; }
|
||||
/// <summary>
|
||||
/// Effective depth of cross-section
|
||||
/// </summary>
|
||||
double EffectiveDepth { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Infrastructures.Interfaces
|
||||
{
|
||||
public interface IGetResultByInputDataLogic<T, V> : ILogic
|
||||
where T : IInputData
|
||||
where V : IResult
|
||||
{
|
||||
V GetResultByInputData(T inputData);
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Infrastructures.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement collection of shear beams load
|
||||
/// </summary>
|
||||
public interface IHasBeamShearActions
|
||||
{
|
||||
List<IBeamShearAction> BeamShearActions { get; }
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public class ConcentratedForce : IConcenratedForce
|
||||
{
|
||||
private double relativeLoadLevel;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public Guid Id { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public string Name { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double ForceCoordinate { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double ForceValue { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double RelativeLoadLevel
|
||||
{
|
||||
get => relativeLoadLevel;
|
||||
set
|
||||
{
|
||||
if (value > 0.5d) { relativeLoadLevel = 0.5d; }
|
||||
if (value < -0.5d) { relativeLoadLevel = -0.5d; }
|
||||
relativeLoadLevel = value;
|
||||
}
|
||||
}
|
||||
/// <inheritdoc/>
|
||||
public double LoadRatio { get; set; } = 1;
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public interface IBeamShearAction : IAction
|
||||
{
|
||||
|
||||
IBeamShearAxisAction XAxisSheaAction { get; }
|
||||
IBeamShearAxisAction YAxisSheaAction { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement properties of shear loads on beam
|
||||
/// </summary>
|
||||
public interface IBeamShearAxisAction : IAction
|
||||
{
|
||||
double SupportShearForce { get; set; }
|
||||
List<IBeamShearLoad> ShearLoads {get;}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement properties for shear beam load
|
||||
/// </summary>
|
||||
public interface IBeamShearLoad : IAction
|
||||
{
|
||||
/// <summary>
|
||||
/// Value of level where action is applyied at, 0.5 is top surface, -0.5 is bottom surface
|
||||
/// </summary>
|
||||
double RelativeLoadLevel { get; set; }
|
||||
/// <summary>
|
||||
/// Ratio of substraction load from total shear force
|
||||
/// </summary>
|
||||
double LoadRatio { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement properties for concentrated load in beam
|
||||
/// </summary>
|
||||
public interface IConcenratedForce : IBeamShearLoad
|
||||
{
|
||||
/// <summary>
|
||||
/// Coordinate of location of force along beam, m
|
||||
/// </summary>
|
||||
double ForceCoordinate { get; set; }
|
||||
/// <summary>
|
||||
/// Value of force, N
|
||||
/// </summary>
|
||||
double ForceValue { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
/// <summary>
|
||||
/// Implement properties of
|
||||
/// </summary>
|
||||
public interface IUniformlyDistributedLoad : IBeamShearLoad
|
||||
{
|
||||
/// <summary>
|
||||
/// Value of uniformly distributed load, N/m
|
||||
/// </summary>
|
||||
double LoadValue { get; set; }
|
||||
/// <summary>
|
||||
/// Coordinate of start of load, m
|
||||
/// </summary>
|
||||
double StartCoordinate { get; set; }
|
||||
/// <summary>
|
||||
/// Coordinate of end of load, m
|
||||
/// </summary>
|
||||
double EndCoordinate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public class UniformlyDistributedLoad : IUniformlyDistributedLoad
|
||||
{
|
||||
private double relativeLoadLevel;
|
||||
|
||||
public Guid Id { get; }
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public double LoadValue { get; set; } = 0d;
|
||||
public double RelativeLoadLevel
|
||||
{
|
||||
get => relativeLoadLevel;
|
||||
set
|
||||
{
|
||||
if (value > 0.5d) { relativeLoadLevel = 0.5d; }
|
||||
if (value < -0.5d) { relativeLoadLevel = -0.5d; }
|
||||
relativeLoadLevel = value;
|
||||
}
|
||||
}
|
||||
|
||||
public double StartCoordinate { get; set; } = double.NegativeInfinity;
|
||||
public double EndCoordinate { get; set; } = double.PositiveInfinity;
|
||||
/// <inheritdoc/>
|
||||
public double LoadRatio { get; set; } = 1;
|
||||
|
||||
public UniformlyDistributedLoad(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using StructureHelperCommon.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Forces
|
||||
{
|
||||
public class UniformlyDisributedLoadUpdateStrategy : IUpdateStrategy<IUniformlyDistributedLoad>
|
||||
{
|
||||
public void Update(IUniformlyDistributedLoad targetObject, IUniformlyDistributedLoad sourceObject)
|
||||
{
|
||||
CheckObject.IsNull(targetObject);
|
||||
CheckObject.IsNull(sourceObject);
|
||||
if (ReferenceEquals(targetObject, sourceObject)) { return; }
|
||||
targetObject.Name = sourceObject.Name;
|
||||
targetObject.LoadValue = sourceObject.LoadValue;
|
||||
targetObject.RelativeLoadLevel = sourceObject.RelativeLoadLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user