mirror of
https://gitlab.com/c3d/db48x.git
synced 2024-09-29 05:36:58 +02:00
equations: Add missing equations from "Columns and Beams"
Add the missing equations from "Columns and Beams" section of the HP50G advanced reference manual. Notice that some of the descriptions are incorrect in the manual, and that the correct equations had to be fetched from the HP50G itself. Foe example, the `Simple Moment` example defines `c`, which is not set in the documented equation. The actual equation contains `IFTE` expressions, which require the fix for #1093 to work. Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
parent
83d6536626
commit
a62e4425d0
7 changed files with 210 additions and 5 deletions
|
@ -64,7 +64,34 @@ These equations apply to a slender column (`K·L/r>100`) with length factor `K`.
|
|||
|
||||
### Simple Slope
|
||||
|
||||
![Simple Slop](img/SimpleSlope.bmp)
|
||||
![Simple Slope](img/SimpleSlope.bmp)
|
||||
|
||||
|
||||
### Simple Moment
|
||||
|
||||
![Simple Moment](img/SimpleMoment.bmp)
|
||||
|
||||
|
||||
### Simple Shear
|
||||
|
||||
![Simple Shear](img/SimpleShear.bmp)
|
||||
|
||||
|
||||
### Cantilever Deflection
|
||||
|
||||
![Cantilever Deflection](img/CantileverDeflection.bmp)
|
||||
|
||||
### Cantilever Slope
|
||||
|
||||
![Cantilever Slope](img/CantileverSlope.bmp)
|
||||
|
||||
### Cantilever Moment
|
||||
|
||||
![Cantilever Moment](img/CantileverMoment.bmp)
|
||||
|
||||
### Cantilever Shear
|
||||
|
||||
![Cantilever Shear](img/CantileverShear.bmp)
|
||||
|
||||
|
||||
## Electricity
|
||||
|
|
BIN
doc/img/CantileverDeflection.bmp
Normal file
BIN
doc/img/CantileverDeflection.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
|
@ -5074,7 +5074,34 @@ These equations apply to a slender column (`K·L/r>100`) with length factor `K`.
|
|||
|
||||
### Simple Slope
|
||||
|
||||
![Simple Slop](img/SimpleSlope.bmp)
|
||||
![Simple Slope](img/SimpleSlope.bmp)
|
||||
|
||||
|
||||
### Simple Moment
|
||||
|
||||
![Simple Moment](img/SimpleMoment.bmp)
|
||||
|
||||
|
||||
### Simple Shear
|
||||
|
||||
![Simple Shear](img/SimpleShear.bmp)
|
||||
|
||||
|
||||
### Cantilever Deflection
|
||||
|
||||
![Cantilever Deflection](img/CantileverDeflection.bmp)
|
||||
|
||||
### Cantilever Slope
|
||||
|
||||
![Cantilever Slope](img/CantileverSlope.bmp)
|
||||
|
||||
### Cantilever Moment
|
||||
|
||||
![Cantilever Moment](img/CantileverMoment.bmp)
|
||||
|
||||
### Cantilever Shear
|
||||
|
||||
![Cantilever Shear](img/CantileverShear.bmp)
|
||||
|
||||
|
||||
## Electricity
|
||||
|
|
|
@ -5074,7 +5074,34 @@ These equations apply to a slender column (`K·L/r>100`) with length factor `K`.
|
|||
|
||||
### Simple Slope
|
||||
|
||||
![Simple Slop](img/SimpleSlope.bmp)
|
||||
![Simple Slope](img/SimpleSlope.bmp)
|
||||
|
||||
|
||||
### Simple Moment
|
||||
|
||||
![Simple Moment](img/SimpleMoment.bmp)
|
||||
|
||||
|
||||
### Simple Shear
|
||||
|
||||
![Simple Shear](img/SimpleShear.bmp)
|
||||
|
||||
|
||||
### Cantilever Deflection
|
||||
|
||||
![Cantilever Deflection](img/CantileverDeflection.bmp)
|
||||
|
||||
### Cantilever Slope
|
||||
|
||||
![Cantilever Slope](img/CantileverSlope.bmp)
|
||||
|
||||
### Cantilever Moment
|
||||
|
||||
![Cantilever Moment](img/CantileverMoment.bmp)
|
||||
|
||||
### Cantilever Shear
|
||||
|
||||
![Cantilever Shear](img/CantileverShear.bmp)
|
||||
|
||||
|
||||
## Electricity
|
||||
|
|
|
@ -77,6 +77,31 @@ static const cstring basic_equations[] =
|
|||
" '(θ_°)=(1_r)*(((P_N)*((L_m)-(a_m)))/(6*L*(E_kPa)*(I_mm^4))*(3*(x_m)²+(L-a)²-L²)-(M_N*m)/(E*I)*(c-(x²-c²)/(2*L)-L/3)-(w_N/m)/(24*E*I)*(L³+x²*(4*x-6*L)))'"
|
||||
"}",
|
||||
|
||||
"Simple Moment", "{"
|
||||
" '(Mx_N*m)=(P_N)*IFTE((x_m)≤(a_m);((L_m)-(a_m))*(x_m);(L-x)*a)/L+(M_N*m)*IFTE(x≤(c_m);x;x-L)/L+((w_N/m)*x*(L-x))/2'"
|
||||
"}",
|
||||
|
||||
"Simple Shear", "{"
|
||||
" '(V_N)=((P_N)*((L_m)-(a_m)))/L+(M_N*m)/L+((w_N/m)*(L-2*(x_m)))/2'"
|
||||
"}",
|
||||
|
||||
"Cantilever Deflection", "{"
|
||||
" '(y_m)=((P_N)*IFTE((x_m)≤(a_m);x;a)²)/(6*(E_kPa)*(I_mm^4))*IFTE(x≤a;x-3*a;a-3*x)+(M_N*m)*IFTE(x≤(c_m);x²;c*(2*x-c))/(2*E*I)-((w_N/m)*x²)/(24*E*I)*(6*L²-4*L*x+x²)'"
|
||||
"}",
|
||||
|
||||
"Cantilever Slope", "{"
|
||||
" '(θ_°)=(1_r)*((P_N)*IFTE((x_m)≤(a_m);x*(x-2*a);-a²)/(2*(E_kPa)*(I_mm^4))+(M_N*m)*IFTE(x≤(c_m);x;c)/(E*I)-((w_N/m)*x)/(6*E*I)*(3*L²-3*L*x+x²))'"
|
||||
"}",
|
||||
|
||||
"Cantilever Moment", "{"
|
||||
" '(Mx_N*m)=IFTE((x_m)≤(a_m);1;0)*(P_N)*((x_m)-(a_m))+IFTE(x≤(c_m);1;0)*(M_N*m)-(w_N/m)/2*(L²-2*L*x+x²)'"
|
||||
"}",
|
||||
|
||||
|
||||
"Cantilever Shear", "{"
|
||||
" '(V_n)=IFTE((x_m)≤(a_m);1;0)*(P_N)+(w_N/m)*((L_m)-(x_m))'"
|
||||
"}",
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Physics
|
||||
// ------------------------------------------------------------------------
|
||||
|
|
102
src/tests.cc
102
src/tests.cc
|
@ -113,6 +113,7 @@ TESTS(text, "Text operations");
|
|||
TESTS(vectors, "Vectors");
|
||||
TESTS(matrices, "Matrices");
|
||||
TESTS(solver, "Solver");
|
||||
TESTS(colnbeams, "Columns and Beams equations in library");
|
||||
TESTS(integrate, "Numerical integration");
|
||||
TESTS(simplify, "Auto-simplification of expressions");
|
||||
TESTS(rewrites, "Equation rewrite engine");
|
||||
|
@ -164,7 +165,7 @@ void tests::run(bool onlyCurrent)
|
|||
if (onlyCurrent)
|
||||
{
|
||||
here().begin("Current");
|
||||
conditionals();
|
||||
eqnlib_columns_and_beams();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -204,6 +205,7 @@ void tests::run(bool onlyCurrent)
|
|||
vector_functions();
|
||||
matrix_functions();
|
||||
solver_testing();
|
||||
eqnlib_columns_and_beams();
|
||||
numerical_integration_testing();
|
||||
text_functions();
|
||||
auto_simplification();
|
||||
|
@ -5096,6 +5098,21 @@ void tests::solver_testing()
|
|||
.test(LSHIFT, A, LSHIFT, A)
|
||||
.expect("0.5 m");
|
||||
|
||||
step("Exit: Clear variables")
|
||||
.test(CLEAR, "UPDIR 'SLVTST' PURGE", ENTER);
|
||||
}
|
||||
|
||||
|
||||
void tests::eqnlib_columns_and_beams()
|
||||
// ----------------------------------------------------------------------------
|
||||
// Test that the solver works as expected
|
||||
// ----------------------------------------------------------------------------
|
||||
{
|
||||
BEGIN(colnbeams);
|
||||
|
||||
step("Enter directory for solving")
|
||||
.test(CLEAR, "'SLVTST' CRDIR SLVTST", ENTER);
|
||||
|
||||
step("Solving Elastic Buckling")
|
||||
.test(CLEAR, RSHIFT, F, F2, RSHIFT, F1)
|
||||
.test("53.0967", NOSHIFT, F3)
|
||||
|
@ -5139,7 +5156,7 @@ void tests::solver_testing()
|
|||
.expect("σmax:126 924.79298 4 kPa");
|
||||
step("Solving Eccentric Column second equation")
|
||||
.test(CLEAR, LSHIFT, F1, LSHIFT, F3)
|
||||
.expect("I:135 259 652.161 mm↑4.");
|
||||
.expect("I:135 259 652.161 mm↑4");
|
||||
|
||||
step("Solving Simple Deflection")
|
||||
.test(CLEAR, RSHIFT, F, F2, RSHIFT, F3)
|
||||
|
@ -5171,6 +5188,87 @@ void tests::solver_testing()
|
|||
.test(F6, LSHIFT, F2)
|
||||
.expect("θ:-0.46665 29979 95 °");
|
||||
|
||||
step("Solving Simple Moment")
|
||||
.test(CLEAR, RSHIFT, F, F2, RSHIFT, F5)
|
||||
.test("20_ft", NOSHIFT, F5)
|
||||
.test("10_ft", NOSHIFT, F3)
|
||||
.test("674.427_lbf", NOSHIFT, F6, F2)
|
||||
.test("17_ft", NOSHIFT, F6, F4)
|
||||
.test("3687.81_ft*lbf", NOSHIFT, F6, F1)
|
||||
.test("102.783_lbf/ft", NOSHIFT, F3)
|
||||
.test("9_ft", NOSHIFT, F4)
|
||||
.test(F6, LSHIFT, F2)
|
||||
.expect("Mx:13 262.87487 72 N·m")
|
||||
.test("1_ft*lbf", NOSHIFT, F2, LSHIFT, F2)
|
||||
.expect("Mx:9 782.1945 lbf·ft");
|
||||
|
||||
step("Solving Simple Shear")
|
||||
.test(CLEAR, EXIT, RSHIFT, F, F2, F6, RSHIFT, F1)
|
||||
.test("20_ft", NOSHIFT, F3)
|
||||
.test("10_ft", NOSHIFT, F2)
|
||||
.test("674.427_lbf", NOSHIFT, F5)
|
||||
.test("3687.81_ft*lbf", NOSHIFT, F4)
|
||||
.test("102.783_lbf/ft", NOSHIFT, F6, F2)
|
||||
.test("9_ft", NOSHIFT, F3)
|
||||
.test(LSHIFT, F1)
|
||||
.expect("V:2 777.41174 969 N")
|
||||
.test("1_lbf", F1, LSHIFT, F1)
|
||||
.expect("V:624.387 lbf");
|
||||
|
||||
step("Solving Cantilever Deflection")
|
||||
.test(CLEAR, EXIT, RSHIFT, F, F2, F6, RSHIFT, F2)
|
||||
.test("10_ft", NOSHIFT, F6, F1)
|
||||
.test("29000000_psi", NOSHIFT, F6, F6, F4)
|
||||
.test("15_in^4", NOSHIFT, F5)
|
||||
.test("500_lbf", NOSHIFT, F6, F3)
|
||||
.test("800_ft*lbf", NOSHIFT, F2)
|
||||
.test("3_ft", NOSHIFT, F6, F6, F2)
|
||||
.test("6_ft", NOSHIFT, F3)
|
||||
.test("100_lbf/ft", NOSHIFT, F6, F4)
|
||||
.test("8_ft", NOSHIFT, F5)
|
||||
.test(F6, LSHIFT, F1)
|
||||
.expect("y:-0.33163 03448 28 in")
|
||||
.test("1_lbf", F1)
|
||||
.error("Inconsistent units")
|
||||
.test(CLEAR, "1_cm", F1, LSHIFT, F1)
|
||||
.expect("y:-0.84234 10758 62 cm");
|
||||
|
||||
step("Solving Cantilever Slope")
|
||||
.test(CLEAR, EXIT, RSHIFT, F, F2, F6, RSHIFT, F3)
|
||||
.test("10_ft", NOSHIFT, F6, F2)
|
||||
.test("29000000_psi", LSHIFT, F6, F5)
|
||||
.test("15_in^4", NOSHIFT, F6, F1)
|
||||
.test("500_lbf", NOSHIFT, F4)
|
||||
.test("800_ft*lbf", NOSHIFT, F3)
|
||||
.test("3_ft", LSHIFT, F6, F3)
|
||||
.test("6_ft", NOSHIFT, F4)
|
||||
.test("100_lbf/ft", NOSHIFT, F6, F5)
|
||||
.test("8_ft", NOSHIFT, F6, F1)
|
||||
.test(F6, LSHIFT, F2)
|
||||
.expect("θ:-0.26522 01876 49 °");
|
||||
|
||||
step("Solving Cantilever Moment")
|
||||
.test(CLEAR, EXIT, RSHIFT, F, F2, F6, RSHIFT, F4)
|
||||
.test("10_ft", NOSHIFT, F5)
|
||||
.test("500_lbf", NOSHIFT, F6, F2)
|
||||
.test("800_ft*lbf", NOSHIFT, F1)
|
||||
.test("3_ft", LSHIFT, F6, F3)
|
||||
.test("6_ft", NOSHIFT, F4)
|
||||
.test("100_lbf/ft", NOSHIFT, F6, F3)
|
||||
.test("8_ft", NOSHIFT, F4)
|
||||
.test(F6, LSHIFT, F2)
|
||||
.expect("Mx:-200. lbf·ft");
|
||||
|
||||
step("Solving Cantilever Shear")
|
||||
.test(CLEAR, EXIT, RSHIFT, F, F2, F6, RSHIFT, F5)
|
||||
.test("10_ft", NOSHIFT, F3)
|
||||
.test("500_lbf", NOSHIFT, F4)
|
||||
.test("3_ft", NOSHIFT, F2)
|
||||
.test("8_ft", NOSHIFT, F6, F2)
|
||||
.test("100_lbf/ft", NOSHIFT, F1)
|
||||
.test(F6, LSHIFT, F5)
|
||||
.expect("V:200. lbf");
|
||||
|
||||
step("Exit: Clear variables")
|
||||
.test(CLEAR, "UPDIR 'SLVTST' PURGE", ENTER);
|
||||
}
|
||||
|
|
|
@ -92,6 +92,7 @@ struct tests
|
|||
void vector_functions();
|
||||
void matrix_functions();
|
||||
void solver_testing();
|
||||
void eqnlib_columns_and_beams();
|
||||
void numerical_integration_testing();
|
||||
void text_functions();
|
||||
void auto_simplification();
|
||||
|
|
Loading…
Reference in a new issue