I have defined a 3 support beam, with a uniform load over part of the span. The end BC are simple to define - deflection and moment = 0. The midspan BC for deflection =0 but but the moment can not be defined at Ls/2 location. I know that there must be slope continuity across the joint - how to define that in the code ? When I define the midspan pin support w @Ls/2 = 0 I still get an error "No places were found on the boundary where x==30. was True, so DirichletCondition[w==0,x==30.
] will effectively be ignored."
The plots produced show BC @ 0 and Ls are correct.
(*Define parameters*)
Ls = 60 ;(*Length of the beam in inches*)
Es = 10000000; (*Young's modulus in psi*)
Is = 10; (*Moment of inertia in in^4*)
qs = -50;(*Uniform load in pli applied over full length of beam *)
qss = -100; (* seam load over 4 inches*)
lss = 45; (*seam start location from left edge *)
(*Load function definition*)
loadFunction1[x_] := (If[x >= lss, If[x >= (lss + 15), qss, qss], qs]);
Plot[loadFunction1[x], {x, 0, Ls},
PlotLabel -> "Loading on beam, pli",
AxesLabel -> {"x dist along beam", " pli units"}]
(*loadFunction[x_]:=If[x<=Ls/2,qs,0];
Plot[loadFunction[x],{x,0,Ls},PlotLabel->"Loading on beam, \
pli",AxesLabel->{"x dist along beam"," pli units"}]*)
(*Beam equation setup using FEM*)
Needs["NDSolve`FEM`"];
additionalPoints = {{Ls/2}}
beamDomain =
ToElementMesh[ImplicitRegion[0 <= x <= Ls, x],
"IncludePoints" -> additionalPoints]["Wireframe"]
(*Boundary conditions for a simply supported beam*)
boundaryConditions = {w[0] == 0, w[Ls/2] == 0, w[Ls] == 0,
moment[0] == 0,(*moment[Ls/2]==0,*)moment[Ls] == 0};
(*Beam equation*)
beamPDE = {D[moment[x], {x, 2}] + loadFunction1[x] == 0,
moment[x] == -Es*Is*D[w[x], {x, 2}]};
(*Solve the beam equation using NDSolve with FEM*)
(*solution=NDSolveValue[{beamPDE,boundaryConditions,\
DirichletCondition[{w[Ls/2]\[Equal]0,moment[Ls/2]\[Equal]0},True]},{w,\
moment},{x,0,Ls},Method->{"FiniteElement"}];*)
solution =
NDSolveValue[{beamPDE, boundaryConditions}, {w, moment}, {x, 0, Ls},
Method -> {"FiniteElement"}];
(*Plot the deflection diagram*)
Plot[solution[[1]][x], {x, 0, Ls}, PlotLabel -> "Deflection Diagram",
AxesLabel -> {"x (m)", "w(x) (m)"}]
(*Calculate shear force V(x)=-EI*d^3w/dx^3*)
shearForce = -Es*Is*D[solution[x], {x, 3}];
(*Plot the shear force diagram*)
Plot[solution[[2]]'[x], {x, 0, Ls},
PlotLabel -> "Shear Force Diagram",
AxesLabel -> {"x (m)", "V(x) (N)"}]
(*Plot the bending moment diagram*)
Plot[solution[[2]][x], {x, 0, Ls},
PlotLabel -> "Bending Moment Diagram",
AxesLabel -> {"x (m)", "M(x) (N*m)"}]
beamDomain = ToElementMesh[ImplicitRegion[0 <= x <= Ls, x], "IncludePoints" -> additionalPoints]
(without ["Wireframe"]) $\endgroup$