Add logic for converting beam shear calculator input data
This commit is contained in:
@@ -34,11 +34,11 @@ namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
ConcentratedForce concentratedForce = new(Guid.NewGuid())
|
||||
{
|
||||
Name = "Concentrated force",
|
||||
ForceValue = -5e4,
|
||||
LoadRatio = 1,
|
||||
RelativeLoadLevel = 0.5,
|
||||
ForceCoordinate = 1
|
||||
};
|
||||
concentratedForce.ForceValue.Qy = -5e4;
|
||||
return concentratedForce;
|
||||
}
|
||||
|
||||
@@ -47,12 +47,12 @@ namespace StructureHelperCommon.Models.Forces.BeamShearActions
|
||||
DistributedLoad distributedLoad = new(Guid.NewGuid())
|
||||
{
|
||||
Name = "Distributed load",
|
||||
LoadValue = -5e3,
|
||||
LoadRatio = 1,
|
||||
RelativeLoadLevel = 0.5,
|
||||
StartCoordinate = 0,
|
||||
EndCoordinate = 100
|
||||
};
|
||||
distributedLoad.LoadValue.Qy = -5e3;
|
||||
return distributedLoad;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
/// <inheritdoc/>
|
||||
public double ForceCoordinate { get; set; }
|
||||
/// <inheritdoc/>
|
||||
public double ForceValue { get; set; }
|
||||
public IForceTuple ForceValue { get; set; } = new ForceTuple(Guid.NewGuid());
|
||||
/// <inheritdoc/>
|
||||
public double RelativeLoadLevel
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace StructureHelperCommon.Models.Forces
|
||||
public Guid Id { get; }
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public double LoadValue { get; set; } = 0d;
|
||||
public IForceTuple LoadValue { get; set; } = new ForceTuple(Guid.NewGuid());
|
||||
public double RelativeLoadLevel
|
||||
{
|
||||
get => relativeLoadLevel;
|
||||
|
||||
@@ -18,6 +18,6 @@ namespace StructureHelperCommon.Models.Forces
|
||||
/// <summary>
|
||||
/// Value of force, N
|
||||
/// </summary>
|
||||
double ForceValue { get; set; }
|
||||
IForceTuple ForceValue { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/// <summary>
|
||||
/// Value of uniformly distributed load, N/m
|
||||
/// </summary>
|
||||
double LoadValue { get; set; }
|
||||
IForceTuple LoadValue { get; set; }
|
||||
/// <summary>
|
||||
/// Coordinate of start of load, m
|
||||
/// </summary>
|
||||
|
||||
@@ -71,6 +71,12 @@ namespace StructureHelperCommon.Services.Forces
|
||||
}
|
||||
return tuples;
|
||||
}
|
||||
/// <summary>
|
||||
/// Renew target force tuple with adding source tuple
|
||||
/// </summary>
|
||||
/// <param name="source">Source tuple</param>
|
||||
/// <param name="target">Target tuple</param>
|
||||
/// <param name="factor">Factor which source tuple will be multiplied by (1d is default value)</param>
|
||||
public static void SumTupleToTarget(IForceTuple source, IForceTuple target, double factor = 1d)
|
||||
{
|
||||
target.Mx += source.Mx * factor;
|
||||
|
||||
Reference in New Issue
Block a user