I have a beam with $n$ points and I have to find a numerical solution of the axial force using Finite difference method
Here is my code
Ej = 210000; (* MPa *)
A = 200; (* mm^2 *)
EA = Ej*A;
n0 = 2; (* N/mm *)
L = 2000; (* mm*)
F0 = 1000; (* N *)
k = 1000; (* N/mm *)
n = 3;(*number of points*)
h = 2 L/n;(*distance between the points*)
steps = Table[u[i], {i, 0, n + 1}];
equations = Table[
steps[[i + 1]] - 2 steps[[i]] +
steps[[i - 1]] == -h^2 n0/EA, {i, 2, n + 1}];
BoundCondition = {steps[[2]] == 0,
steps[[n + 2]] - steps[[n]] == -F0 2 h/EA};
Join[equations, BoundCondition];
solution = Solve[equations, steps]
My idea was to use this code to get some numerical values for $u[i]$ for $i=1,...,n$ yet Solve leaves me an error:
Solve::svars: Equations may not give solutions for all "solve" variables.
I am approximately 95% sure that the mathematical and physical background is ok so I have a strong feeling that I am doing something wrong in this code. Any idea what might that be?
It's like Mathematica doesn't understand my boundary condition $u[1]=0$.
modifies neitheranorb. You can useAppendTo`. – Marius Ladegård Meyer Feb 24 '16 at 20:05AppendToworks! – skrat Feb 24 '16 at 20:18