0
$\begingroup$

This is a simple FEM beam model. Supported at both ends, uniform load. Nothing complex.

error message - "There are fewer dependent variables, {u[x]}, than equations, so the
system is overdetermined"

error message - "Lists {uAB,uBC,uCD} and
NDSolveValue[{{-u^(4)[x]==0,-u^(4)[x]==0,-u^(4)[x]==0},{
DirichletCondition[u[x]==0,x==0],DirichletCondition[u[x]==0,x==59.4]}\ },{u},{x}\[Element]Line[{{0},{59.4}}],Method->{PDEDiscretization->{
FiniteElement,MeshOptions->{Rule[<<2>>]}}}] are not the same shape.

Here is input -

(*Load the FEM package*)Needs["NDSolve`FEM`"]

(*Define variables*)
L = 14.85; (*Distance between supports*)
LAB = LBC = LCD = L; (*Assuming equal distances between supports*)
QAB = 1000; (*Uniform load on span A-B*)
QBC = 1000; (*Uniform load on span B-C*)
QCD = 1000; (*Uniform load on span C-D*)
EI = 1; (*Constant EI for the full length of the beam*)

(*Define the beam geometry*)
region = Line[{{0}, {4*L}}];

(*Define the material properties*)
materialData = {{"YoungModulus" -> EI, "PoissonRatio" -> 0.3}};

(*Define the boundary conditions*)
bc = {DirichletCondition[u[x] == 0, x == 0], 
   DirichletCondition[u[x] == 0, x == 4*L]};

(*Define the load*)
load = {QAB, QBC, QCD};

(*Define the problem*)
pde = Table[
  D[Evaluate[Evaluate[-EI*D[u[x], {x, 2}] + load[[i]]*x]], {x, 2}] == 
   0, {i, 3}]

(*Solve the problem*)
{uAB, uBC, uCD} = 
 NDSolveValue[{pde, bc}, {u}, {x} \[Element] region, 
  Method -> {"PDEDiscretization" -> {"FiniteElement", 
      "MeshOptions" -> {"MaxCellMeasure" -> 0.1}}}]

(*Plot the deflection*)
Plot[{uAB[x], uBC[x], uCD[x]}, {x, 0, 4*L}, 
 PlotLegends -> {"Span A-B", "Span B-C", "Span C-D"}, 
 AxesLabel -> {"Distance along beam", "Deflection"}, 
 PlotLabel -> "Deflection Plot", PlotStyle -> {Blue, Red, Green}]
$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.