[{"data":1,"prerenderedAt":599},["ShallowReactive",2],{"lib:\u002Fsolver\u002Fsolving":3,"lib-nav:en:\u002Fsolver":537},{"id":4,"title":5,"body":6,"description":526,"extension":527,"group":528,"meta":529,"navigation":531,"order":532,"path":533,"seo":534,"stem":535,"__hash__":536},"libs\u002Fsolver\u002Fsolving.md","Solving",{"type":7,"value":8,"toc":520},"minimark",[9,13,39,61,64,73,78,84,185,267,291,299,303,309,317,387,390,406,414,428,432,435,496,499,502,506,516],[10,11,5],"h1",{"id":12},"solving",[14,15,20],"pre",{"className":16,"code":17,"language":18,"meta":19,"style":19},"language-ts shiki shiki-themes github-light github-dark","solver.solve()\n","ts","",[21,22,23],"code",{"__ignoreMap":19},[24,25,28,32,36],"span",{"class":26,"line":27},"line",1,[24,29,31],{"class":30},"sVt8B","solver.",[24,33,35],{"class":34},"sScJk","solve",[24,37,38],{"class":30},"()\n",[40,41,42,45,46,51,52,55,56,60],"p",{},[21,43,44],{},"solve()"," numbers the equations, assembles the global stiffness matrix and the load vectors of every load case, and solves for the displacements and the reactions. After it, every ",[47,48,50],"a",{"href":49},"\u002Fsolver\u002Fresults","result"," can be read; before it, reading one throws a ",[21,53,54],{},"TypeError",". The steps are the ones of ",[47,57,59],{"href":58},"\u002Felements\u002Fanalysis","How EduBeam solves"," in the theory manual.",[40,62,63],{},"The solution is exact for the linear model: the deflected shape and the internal forces along each member come from closed-form solutions of the Timoshenko beam, so there is no mesh to refine and no need to split members for accurate diagrams.",[40,65,66,68,69,72],{},[21,67,44],{}," writes nothing to the console from 0.3.1 on; 0.3.0 printed a line such as ",[21,70,71],{},"Solution took 9 [ms]"," on every call.",[74,75,77],"h2",{"id":76},"solving-again-after-a-change","Solving again after a change",[40,79,80,81,83],{},"Changing numbers in a model needs only another ",[21,82,44],{},". Changing which equations there are needs one more line first:",[14,85,87],{"className":16,"code":86,"language":18,"meta":19,"style":19},"domain.createNode('C', [10, 0, 0], [DofID.Dz])\ndomain.createBeam2D(2, ['B', 'C'], 1, 1)\nsolver.codeNumberGenerated = false \u002F\u002F the DOFs changed: number them again\nsolver.solve()\n",[21,88,89,124,159,176],{"__ignoreMap":19},[24,90,91,94,97,100,104,107,111,114,117,119,121],{"class":26,"line":27},[24,92,93],{"class":30},"domain.",[24,95,96],{"class":34},"createNode",[24,98,99],{"class":30},"(",[24,101,103],{"class":102},"sZZnC","'C'",[24,105,106],{"class":30},", [",[24,108,110],{"class":109},"sj4cs","10",[24,112,113],{"class":30},", ",[24,115,116],{"class":109},"0",[24,118,113],{"class":30},[24,120,116],{"class":109},[24,122,123],{"class":30},"], [DofID.Dz])\n",[24,125,127,129,132,134,137,139,142,144,146,149,152,154,156],{"class":26,"line":126},2,[24,128,93],{"class":30},[24,130,131],{"class":34},"createBeam2D",[24,133,99],{"class":30},[24,135,136],{"class":109},"2",[24,138,106],{"class":30},[24,140,141],{"class":102},"'B'",[24,143,113],{"class":30},[24,145,103],{"class":102},[24,147,148],{"class":30},"], ",[24,150,151],{"class":109},"1",[24,153,113],{"class":30},[24,155,151],{"class":109},[24,157,158],{"class":30},")\n",[24,160,162,165,169,172],{"class":26,"line":161},3,[24,163,164],{"class":30},"solver.codeNumberGenerated ",[24,166,168],{"class":167},"szBVR","=",[24,170,171],{"class":109}," false",[24,173,175],{"class":174},"sJ8bj"," \u002F\u002F the DOFs changed: number them again\n",[24,177,179,181,183],{"class":26,"line":178},4,[24,180,31],{"class":30},[24,182,35],{"class":34},[24,184,38],{"class":30},[186,187,188,201],"table",{},[189,190,191],"thead",{},[192,193,194,198],"tr",{},[195,196,197],"th",{},"Change",[195,199,200],{},"Then",[202,203,204,214,223,236,253],"tbody",{},[192,205,206,210],{},[207,208,209],"td",{},"Load values, new or removed loads",[207,211,212],{},[21,213,44],{},[192,215,216,219],{},[207,217,218],{},"Node coordinates, materials, sections, hinges",[207,220,221],{},[21,222,44],{},[192,224,225,228],{},[207,226,227],{},"Adding nodes or members",[207,229,230,233,234],{},[21,231,232],{},"codeNumberGenerated = false",", then ",[21,235,44],{},[192,237,238,247],{},[207,239,240,241,113,244],{},"Removing nodes or members: ",[21,242,243],{},"domain.nodes.delete(label)",[21,245,246],{},"domain.elements.delete(label)",[207,248,249,233,251],{},[21,250,232],{},[21,252,44],{},[192,254,255,261],{},[207,256,257,258],{},"Changing a node's supports, ",[21,259,260],{},"node.bcs",[207,262,263,233,265],{},[21,264,232],{},[21,266,44],{},[40,268,269,270,272,273,275,276,280,281,284,285,272,287,290],{},"Forget it after adding a node, and ",[21,271,44],{}," throws a ",[21,274,54],{},". Forget it after changing a support, and it ",[277,278,279],"strong",{},"silently"," solves the old supports. When in doubt, reset it: numbering costs next to nothing. Removing a member also means removing its loads from ",[21,282,283],{},"lc.elementLoadList",", or ",[21,286,44],{},[21,288,289],{},"RangeError"," for the missing member.",[40,292,293,294,298],{},"For many variants of one model, such as a parameter study, a fresh solver for each is simpler and just as fast: see the ",[47,295,297],{"href":296},"\u002Fsolver\u002Fscripts#an-influence-line-as-csv","influence line recipe",".",[74,300,302],{"id":301},"when-solving-fails","When solving fails",[40,304,305,306,308],{},"A structure that can move without deforming, a mechanism, has a singular stiffness matrix. Sometimes ",[21,307,44],{}," notices and throws:",[14,310,315],{"className":311,"code":313,"language":314,"meta":19},[312],"language-text","Error: Linear system cannot be solved since matrix is singular\n","text",[21,316,313],{"__ignoreMap":19},[40,318,319,320,386],{},"Often it does not: round-off makes the matrix look solvable, and you get displacements of ",[24,321,324],{"className":322},[323],"katex",[24,325,329],{"className":326,"ariaHidden":328},[327],"katex-html","true",[24,330,333,338,342],{"className":331},[332],"katex-base",[24,334],{"className":335,"style":337},[336],"katex-strut","height:0.8141em;",[24,339,151],{"className":340},[341],"mord",[24,343,345,348],{"className":344},[341],[24,346,116],{"className":347},[341],[24,349,352],{"className":350},[351],"msupsub",[24,353,356],{"className":354},[355],"vlist-t",[24,357,360],{"className":358},[359],"vlist-r",[24,361,364],{"className":362,"style":337},[363],"vlist",[24,365,367,372],{"style":366},"top:-3.063em;margin-right:0.05em;",[24,368],{"className":369,"style":371},[370],"pstrut","height:2.7em;",[24,373,379],{"className":374},[375,376,377,378],"katex-sizing","reset-size6","size3","mtight",[24,380,382],{"className":381},[341,378],[24,383,385],{"className":384},[341,378],"12"," m, or reasonable-looking numbers for a structure that is free to slide. A beam on two rollers, for one, solves without complaint as long as nothing pushes it sideways. So check the supports yourself, and treat huge displacements as the sign of a mechanism.",[40,388,389],{},"Typical causes:",[391,392,393,397,400,403],"ul",{},[394,395,396],"li",{},"too few supports, such as a beam on two rollers;",[394,398,399],{},"supports that cannot hold the structure: all parallel, or all pointing at one point;",[394,401,402],{},"one hinge too many, such as three in a row;",[394,404,405],{},"a moment applied to a joint where every member end is hinged.",[40,407,408,409,413],{},"The message does not say where the problem is. The EduBeam app checks for mechanisms before it solves, and finds and animates the motion; building the same model there is often the quickest way to see it. ",[47,410,412],{"href":411},"\u002Freference\u002Ftroubleshooting","Troubleshooting"," lists the usual causes.",[40,415,416,417,419,420,423,424,298],{},"A missing node, material or section throws a ",[21,418,289],{}," that names it. Missing section parameters do not throw at all: every result is ",[21,421,422],{},"NaN",". See ",[47,425,427],{"href":426},"\u002Fsolver\u002Fmaterials-sections#cross-section","Materials and sections",[74,429,431],{"id":430},"model-size","Model size",[40,433,434],{},"The solver uses dense matrices, built for teaching-sized models. On a laptop, in Node, a straight line of members solves in about:",[186,436,437,450],{},[189,438,439],{},[192,440,441,444,447],{},[195,442,443],{},"Members",[195,445,446],{},"DOFs",[195,448,449],{},"Time",[202,451,452,463,474,485],{},[192,453,454,457,460],{},[207,455,456],{},"50",[207,458,459],{},"150",[207,461,462],{},"0.1 s",[192,464,465,468,471],{},[207,466,467],{},"100",[207,469,470],{},"300",[207,472,473],{},"0.2 s",[192,475,476,479,482],{},[207,477,478],{},"200",[207,480,481],{},"600",[207,483,484],{},"1 s",[192,486,487,490,493],{},[207,488,489],{},"400",[207,491,492],{},"1200",[207,494,495],{},"10 s",[40,497,498],{},"Each doubling of the model costs six to nine times as long.",[40,500,501],{},"Every exercise, frame and truss of a structural analysis course fits easily. It is not meant for models of thousands of members.",[74,503,505],{"id":504},"no-other-analyses","No other analyses",[40,507,508,509,512,513,298],{},"This version solves linear statics only. The source contains an eigenvalue solver for natural frequencies, but it is not part of the published package: ",[21,510,511],{},"EigenValueDynamicSolver"," cannot be imported from ",[21,514,515],{},"@edubeam\u002Ffem",[517,518,519],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":19,"searchDepth":126,"depth":161,"links":521},[522,523,524,525],{"id":76,"depth":126,"text":77},{"id":301,"depth":126,"text":302},{"id":430,"depth":126,"text":431},{"id":504,"depth":126,"text":505},"What solve() in @edubeam\u002Ffem does, when to number the equations again after changing a model, how to recognise a mechanism, and how large a model it handles.","md","Solving and results",{"source":530},"site",true,9,"\u002Fsolver\u002Fsolving",{"title":5,"description":526},"solver\u002Fsolving","qLltXZCKTyTuZXbpynnIIc0pYovWEwjoXdd2kpLdEYM",[538,542,546,550,552,556,561,565,569,570,573,577,582,586,590,594],{"path":539,"title":540,"order":27,"group":541},"\u002Fsolver\u002Fgetting-started","Getting started","Introduction",{"path":543,"title":544,"order":126,"group":545},"\u002Fsolver\u002Fconventions","Units and signs",null,{"path":547,"title":548,"order":161,"group":549},"\u002Fsolver\u002Fnodes-supports","Nodes and supports","Modelling",{"path":551,"title":427,"order":178,"group":545},"\u002Fsolver\u002Fmaterials-sections",{"path":553,"title":554,"order":555,"group":545},"\u002Fsolver\u002Fmembers-hinges","Members and hinges",5,{"path":557,"title":558,"order":559,"group":560},"\u002Fsolver\u002Floads","Nodal and member loads",6,"Loads",{"path":562,"title":563,"order":564,"group":545},"\u002Fsolver\u002Ftemperature-settlements","Temperature and settlements",7,{"path":566,"title":567,"order":568,"group":545},"\u002Fsolver\u002Fload-cases","Load cases",8,{"path":533,"title":5,"order":532,"group":528},{"path":49,"title":571,"order":572,"group":545},"Reading results",10,{"path":574,"title":575,"order":576,"group":545},"\u002Fsolver\u002Fdrawing","Drawing the results",11,{"path":578,"title":579,"order":580,"group":581},"\u002Fsolver\u002Fbeams","Beams",12,"Recipes",{"path":583,"title":584,"order":585,"group":545},"\u002Fsolver\u002Fframes","Frames",13,{"path":587,"title":588,"order":589,"group":545},"\u002Fsolver\u002Ftrusses","Trusses",14,{"path":591,"title":592,"order":593,"group":545},"\u002Fsolver\u002Fscripts","Scripts and servers",15,{"path":595,"title":596,"order":597,"group":598},"\u002Fsolver\u002Freference","API reference",16,"Reference",1795108690702]