#include <codecogs/engineering/structures/deflection_pp.h>
using namespace Engineering::Structures;
| double | deflection_pp (double L, double a, double W, double x, double EI=1) Beam deflection due to a point load with two pin jointed supports at either end. | |
| Real | cc_structuresDeflection_pp (Real L, Real a, Real W, Real x, Real EI) This function is available as a Microsoft Excel add-in. |
| doubledeflection_pp( | double | L | |
| double | a | ||
| double | W | ||
| double | x | ||
| double | EI = 1 | ) |

Further information available when you purchase a licence.

#include<stdio.h> #include<codecogs/engineering/structures/deflection_pp.h> int main() { double E=10e9; // approximate strength of wood. double I=1.042e-6; // I=b*h^3/12. double L=9; double a=3; double W=70*9.81; // Force in Newtons for(int x=0;x<=L;x++) printf("\n deflection(x=%d)=%lf",x, Engineering::Structures::deflection_pp(L, a, W, x, E*I)); return 0; }Output:
deflection(x=0)=0.000000 deflection(x=1)=0.322188 deflection(x=2)=0.600441 deflection(x=3)=0.790825 deflection(x=4)=0.860389 deflection(x=5)=0.820115 deflection(x=6)=0.691972 deflection(x=7)=0.497927 deflection(x=8)=0.259947 deflection(x=9)=0.000000
| L | The length of the beam. [m] |
| a | The location of the point load applied to the beam. [m] |
| W | The point load applied at location a in a direction perpendicular to the main beam. [N] |
| x | The point at which the deflection should be calculated |
| EI | The Modulus of Elasticity (E) multiplied with the Second Moment of Area (I) for the specified beam. See Young's Modulus for example values. [N/m^2] |