[{"data":1,"prerenderedAt":940},["ShallowReactive",2],{"lib:\u002Fsolver\u002Fnodes-supports":3,"lib-nav:en:\u002Fsolver":878},{"id":4,"title":5,"body":6,"description":869,"extension":870,"group":871,"meta":872,"navigation":185,"order":189,"path":874,"seo":875,"stem":876,"__hash__":877},"libs\u002Fsolver\u002Fnodes-supports.md","Nodes and supports",{"type":7,"value":8,"toc":863},"minimark",[9,13,36,41,66,148,159,268,272,275,384,396,403,407,417,535,554,561,597,608,720,735,739,754,843,859],[10,11,5],"h1",{"id":12},"nodes-and-supports",[14,15,16,17,22,23,27,28,31,32,35],"p",{},"Nodes are the points members connect. A support is not a separate object: it is the list of degrees of freedom a node holds fixed. The snippets on this page are parts of a program like the one in ",[18,19,21],"a",{"href":20},"\u002Fsolver\u002Fgetting-started","Getting started",", and use its ",[24,25,26],"code",{},"solver",", ",[24,29,30],{},"domain"," and ",[24,33,34],{},"lc",".",[37,38,40],"h2",{"id":39},"create-a-node","Create a node",[42,43,48],"pre",{"className":44,"code":45,"language":46,"meta":47,"style":47},"language-ts shiki shiki-themes github-light github-dark","domain.createNode(label, [x, y, z], bcs)\n","ts","",[24,49,50],{"__ignoreMap":47},[51,52,55,59,63],"span",{"class":53,"line":54},"line",1,[51,56,58],{"class":57},"sVt8B","domain.",[51,60,62],{"class":61},"sScJk","createNode",[51,64,65],{"class":57},"(label, [x, y, z], bcs)\n",[67,68,69,85],"table",{},[70,71,72],"thead",{},[73,74,75,79,82],"tr",{},[76,77,78],"th",{},"Argument",[76,80,81],{},"Type",[76,83,84],{},"Meaning",[86,87,88,111,133],"tbody",{},[73,89,90,96,101],{},[91,92,93],"td",{},[24,94,95],{},"label",[91,97,98],{},[24,99,100],{},"string | number",[91,102,103,104,31,107,110],{},"Its name, stored as a string: ",[24,105,106],{},"1",[24,108,109],{},"'1'"," are the same node",[73,112,113,118,123],{},[91,114,115],{},[24,116,117],{},"coords",[91,119,120],{},[24,121,122],{},"number[]",[91,124,125,128,129,132],{},[24,126,127],{},"[x, y, z]"," in metres, with ",[24,130,131],{},"y = 0",". z points down.",[73,134,135,140,145],{},[91,136,137],{},[24,138,139],{},"bcs",[91,141,142],{},[24,143,144],{},"DofID[]",[91,146,147],{},"The degrees of freedom the support holds. Leave it out for a free node.",[14,149,150,151,154,155,158],{},"It returns the ",[24,152,153],{},"Node","; ",[24,156,157],{},"domain.getNode(label)"," finds it again. A label already in use replaces the old node.",[42,160,162],{"className":44,"code":161,"language":46,"meta":47,"style":47},"import { DofID } from '@edubeam\u002Ffem'\n\nconst fixed = [DofID.Dx, DofID.Dz, DofID.Ry]\ndomain.createNode('A', [0, 0, 0], fixed)\ndomain.createNode('B', [0, 0, -4]) \u002F\u002F free: the top of a 4 m column\n",[24,163,164,180,187,203,233],{"__ignoreMap":47},[51,165,166,170,173,176],{"class":53,"line":54},[51,167,169],{"class":168},"szBVR","import",[51,171,172],{"class":57}," { DofID } ",[51,174,175],{"class":168},"from",[51,177,179],{"class":178},"sZZnC"," '@edubeam\u002Ffem'\n",[51,181,183],{"class":53,"line":182},2,[51,184,186],{"emptyLinePlaceholder":185},true,"\n",[51,188,190,193,197,200],{"class":53,"line":189},3,[51,191,192],{"class":168},"const",[51,194,196],{"class":195},"sj4cs"," fixed",[51,198,199],{"class":168}," =",[51,201,202],{"class":57}," [DofID.Dx, DofID.Dz, DofID.Ry]\n",[51,204,206,208,210,213,216,219,222,224,226,228,230],{"class":53,"line":205},4,[51,207,58],{"class":57},[51,209,62],{"class":61},[51,211,212],{"class":57},"(",[51,214,215],{"class":178},"'A'",[51,217,218],{"class":57},", [",[51,220,221],{"class":195},"0",[51,223,27],{"class":57},[51,225,221],{"class":195},[51,227,27],{"class":57},[51,229,221],{"class":195},[51,231,232],{"class":57},"], fixed)\n",[51,234,236,238,240,242,245,247,249,251,253,255,258,261,264],{"class":53,"line":235},5,[51,237,58],{"class":57},[51,239,62],{"class":61},[51,241,212],{"class":57},[51,243,244],{"class":178},"'B'",[51,246,218],{"class":57},[51,248,221],{"class":195},[51,250,27],{"class":57},[51,252,221],{"class":195},[51,254,27],{"class":57},[51,256,257],{"class":168},"-",[51,259,260],{"class":195},"4",[51,262,263],{"class":57},"]) ",[51,265,267],{"class":266},"sJ8bj","\u002F\u002F free: the top of a 4 m column\n",[37,269,271],{"id":270},"supports","Supports",[14,273,274],{},"Each support of the EduBeam app is a set of fixed DOFs:",[67,276,277,291],{},[70,278,279],{},[73,280,281,284,288],{},[76,282,283],{},"Support",[76,285,286],{},[24,287,139],{},[76,289,290],{},"Holds",[86,292,293,306,319,332,345,358,371],{},[73,294,295,298,303],{},[91,296,297],{},"Fixed",[91,299,300],{},[24,301,302],{},"[DofID.Dx, DofID.Dz, DofID.Ry]",[91,304,305],{},"everything",[73,307,308,311,316],{},[91,309,310],{},"Pin",[91,312,313],{},[24,314,315],{},"[DofID.Dx, DofID.Dz]",[91,317,318],{},"both displacements, free to turn",[73,320,321,324,329],{},[91,322,323],{},"Roller",[91,325,326],{},[24,327,328],{},"[DofID.Dz]",[91,330,331],{},"vertical displacement, rolls along x",[73,333,334,337,342],{},[91,335,336],{},"Vertical roller",[91,338,339],{},[24,340,341],{},"[DofID.Dx]",[91,343,344],{},"horizontal displacement, rolls along z",[73,346,347,350,355],{},[91,348,349],{},"Slider",[91,351,352],{},[24,353,354],{},"[DofID.Dz, DofID.Ry]",[91,356,357],{},"vertical displacement and rotation, slides along x",[73,359,360,363,368],{},[91,361,362],{},"Vertical slider",[91,364,365],{},[24,366,367],{},"[DofID.Dx, DofID.Ry]",[91,369,370],{},"horizontal displacement and rotation, slides along z",[73,372,373,376,381],{},[91,374,375],{},"Rotation only",[91,377,378],{},[24,379,380],{},"[DofID.Ry]",[91,382,383],{},"rotation",[14,385,386,387,391,392,35],{},"The order you list them in is the order ",[18,388,390],{"href":389},"\u002Fsolver\u002Fresults#reactions","reactions"," come back in. A structure needs at least three fixed DOFs, arranged so that it cannot move as a mechanism: see ",[18,393,395],{"href":394},"\u002Fsolver\u002Fsolving#when-solving-fails","When solving fails",[14,397,398,399,35],{},"A fixed DOF can also be moved by a given amount, a support settlement: see ",[18,400,402],{"href":401},"\u002Fsolver\u002Ftemperature-settlements#prescribed-displacements","Prescribed displacements",[37,404,406],{"id":405},"inclined-supports","Inclined supports",[14,408,409,410,413,414,416],{},"A roller on a slope holds the node across the slope, not vertically. Turn the node's axes with ",[24,411,412],{},"updateLcs",", and its ",[24,415,139],{}," then refer to the turned axes. In the program of Getting started, create B like this instead:",[42,418,420],{"className":44,"code":419,"language":46,"meta":47,"style":47},"const b = domain.createNode('B', [6, 0, 0], [DofID.Dz]) \u002F\u002F holds its own z\nconst a = (30 * Math.PI) \u002F 180 \u002F\u002F 30°, from x toward z: clockwise on screen\nb.updateLcs({ locx: [Math.cos(a), 0, Math.sin(a)], locy: [0, 1, 0] })\n",[24,421,422,459,495],{"__ignoreMap":47},[51,423,424,426,429,431,434,436,438,440,442,445,447,449,451,453,456],{"class":53,"line":54},[51,425,192],{"class":168},[51,427,428],{"class":195}," b",[51,430,199],{"class":168},[51,432,433],{"class":57}," domain.",[51,435,62],{"class":61},[51,437,212],{"class":57},[51,439,244],{"class":178},[51,441,218],{"class":57},[51,443,444],{"class":195},"6",[51,446,27],{"class":57},[51,448,221],{"class":195},[51,450,27],{"class":57},[51,452,221],{"class":195},[51,454,455],{"class":57},"], [DofID.Dz]) ",[51,457,458],{"class":266},"\u002F\u002F holds its own z\n",[51,460,461,463,466,468,471,474,477,480,483,486,489,492],{"class":53,"line":182},[51,462,192],{"class":168},[51,464,465],{"class":195}," a",[51,467,199],{"class":168},[51,469,470],{"class":57}," (",[51,472,473],{"class":195},"30",[51,475,476],{"class":168}," *",[51,478,479],{"class":57}," Math.",[51,481,482],{"class":195},"PI",[51,484,485],{"class":57},") ",[51,487,488],{"class":168},"\u002F",[51,490,491],{"class":195}," 180",[51,493,494],{"class":266}," \u002F\u002F 30°, from x toward z: clockwise on screen\n",[51,496,497,500,502,505,508,511,513,516,519,522,524,526,528,530,532],{"class":53,"line":189},[51,498,499],{"class":57},"b.",[51,501,412],{"class":61},[51,503,504],{"class":57},"({ locx: [Math.",[51,506,507],{"class":61},"cos",[51,509,510],{"class":57},"(a), ",[51,512,221],{"class":195},[51,514,515],{"class":57},", Math.",[51,517,518],{"class":61},"sin",[51,520,521],{"class":57},"(a)], locy: [",[51,523,221],{"class":195},[51,525,27],{"class":57},[51,527,106],{"class":195},[51,529,27],{"class":57},[51,531,221],{"class":195},[51,533,534],{"class":57},"] })\n",[14,536,537,540,541,544,545,548,549,553],{},[24,538,539],{},"locx"," is the node's own x axis as a vector in global axes, and ",[24,542,543],{},"locy"," its y axis, which stays ",[24,546,547],{},"[0, 1, 0]",". In the EduBeam app the same angle is the node's ",[550,551,552],"em",{},"Nodal LCS angle",", 30°.",[14,555,556,557,560],{},"After ",[24,558,559],{},"solve()",", B pushes across the slope, and the pin at A takes the horizontal component:",[42,562,564],{"className":44,"code":563,"language":46,"meta":47,"style":47},"b.getReactions(lc).values \u002F\u002F [-41569]: N along B's own z, 36 kN \u002F cos 30°\nb.getReactions(lc, true).values \u002F\u002F [20785, -36000, 0]: along x, along z, moment\n",[24,565,566,579],{"__ignoreMap":47},[51,567,568,570,573,576],{"class":53,"line":54},[51,569,499],{"class":57},[51,571,572],{"class":61},"getReactions",[51,574,575],{"class":57},"(lc).values ",[51,577,578],{"class":266},"\u002F\u002F [-41569]: N along B's own z, 36 kN \u002F cos 30°\n",[51,580,581,583,585,588,591,594],{"class":53,"line":182},[51,582,499],{"class":57},[51,584,572],{"class":61},[51,586,587],{"class":57},"(lc, ",[51,589,590],{"class":195},"true",[51,592,593],{"class":57},").values ",[51,595,596],{"class":266},"\u002F\u002F [20785, -36000, 0]: along x, along z, moment\n",[598,599],"model-figure",{":angles":600,":loads":601,":members":602,":nodes":603,":results":604,":show":605,":supports":606,"caption":607},"{\"B\":30}","[{\"member\":1,\"qz\":12}]","[[\"A\",\"B\"]]","{\"A\":[0,0],\"B\":[6,0]}","[\"M\",\"N\"]","[\"nodeLabels\"]","{\"A\":\"pin\",\"B\":\"roller\"}","A roller turned by 30°: its reaction is across the slope, and the beam is in tension",[14,609,610,611,667,668,719],{},"The vertical component is still ",[51,612,615],{"className":613},[614],"katex",[51,616,619,656],{"className":617,"ariaHidden":590},[618],"katex-html",[51,620,623,628,635,639,643,648,653],{"className":621},[622],"katex-base",[51,624],{"className":625,"style":627},[626],"katex-strut","height:1em;vertical-align:-0.25em;",[51,629,634],{"className":630,"style":633},[631,632],"mord","mathnormal","margin-right:0.0359em;","q",[51,636,638],{"className":637},[631,632],"L",[51,640,642],{"className":641},[631],"\u002F2",[51,644],{"className":645,"style":647},[646],"mspace","margin-right:0.2778em;",[51,649,652],{"className":650},[651],"mrel","=",[51,654],{"className":655,"style":647},[646],[51,657,659,663],{"className":658},[622],[51,660],{"className":661,"style":662},[626],"height:0.6444em;",[51,664,666],{"className":665},[631],"36"," kN; the horizontal one, ",[51,669,671],{"className":670},[614],[51,672,674,709],{"className":673,"ariaHidden":590},[618],[51,675,677,681,684,688,693,696,700,703,706],{"className":676},[622],[51,678],{"className":679,"style":680},[626],"height:0.6944em;",[51,682,666],{"className":683},[631],[51,685],{"className":686,"style":687},[646],"margin-right:0.1667em;",[51,689,692],{"className":690},[691],"mop","tan",[51,694],{"className":695,"style":687},[646],[51,697,699],{"className":698},[631],"30°",[51,701],{"className":702,"style":647},[646],[51,704,652],{"className":705},[651],[51,707],{"className":708,"style":647},[646],[51,710,712,715],{"className":711},[622],[51,713],{"className":714,"style":662},[626],[51,716,718],{"className":717},[631],"20.8"," kN, pulls the beam from both ends. The moment does not change.",[14,721,722,723,725,726,730,731,734],{},"On a turned node, displacements and reactions are in the node's own axes unless you pass ",[24,724,590],{}," for global ones. Nodal loads on it are global unless you say otherwise: see ",[18,727,729],{"href":728},"\u002Fsolver\u002Floads#nodal-loads","Nodal loads",". ",[24,732,733],{},"node.updateLcs()"," with no argument turns the axes back.",[37,736,738],{"id":737},"change-a-node","Change a node",[14,740,741,742,745,746,749,750,753],{},"A node is a plain object: change ",[24,743,744],{},"node.coords"," to move it, or replace ",[24,747,748],{},"node.bcs",", a ",[24,751,752],{},"Set\u003CDofID>",", to change its support.",[42,755,757],{"className":44,"code":756,"language":46,"meta":47,"style":47},"domain.getNode('B').coords = [8, 0, 0] \u002F\u002F a longer span: solve() is enough\ndomain.getNode('A').bcs = new Set(fixed) \u002F\u002F a new support: renumber first\nsolver.codeNumberGenerated = false\nsolver.solve()\n",[24,758,759,795,822,832],{"__ignoreMap":47},[51,760,761,763,766,768,770,773,775,778,781,783,785,787,789,792],{"class":53,"line":54},[51,762,58],{"class":57},[51,764,765],{"class":61},"getNode",[51,767,212],{"class":57},[51,769,244],{"class":178},[51,771,772],{"class":57},").coords ",[51,774,652],{"class":168},[51,776,777],{"class":57}," [",[51,779,780],{"class":195},"8",[51,782,27],{"class":57},[51,784,221],{"class":195},[51,786,27],{"class":57},[51,788,221],{"class":195},[51,790,791],{"class":57},"] ",[51,793,794],{"class":266},"\u002F\u002F a longer span: solve() is enough\n",[51,796,797,799,801,803,805,808,810,813,816,819],{"class":53,"line":182},[51,798,58],{"class":57},[51,800,765],{"class":61},[51,802,212],{"class":57},[51,804,215],{"class":178},[51,806,807],{"class":57},").bcs ",[51,809,652],{"class":168},[51,811,812],{"class":168}," new",[51,814,815],{"class":61}," Set",[51,817,818],{"class":57},"(fixed) ",[51,820,821],{"class":266},"\u002F\u002F a new support: renumber first\n",[51,823,824,827,829],{"class":53,"line":189},[51,825,826],{"class":57},"solver.codeNumberGenerated ",[51,828,652],{"class":168},[51,830,831],{"class":195}," false\n",[51,833,834,837,840],{"class":53,"line":205},[51,835,836],{"class":57},"solver.",[51,838,839],{"class":61},"solve",[51,841,842],{"class":57},"()\n",[14,844,845,846,849,850,730,854,858],{},"Changing supports, or adding and removing nodes, changes the equations: without ",[24,847,848],{},"codeNumberGenerated = false"," the solver ",[851,852,853],"strong",{},"silently keeps the old supports",[18,855,857],{"href":856},"\u002Fsolver\u002Fsolving#solving-again-after-a-change","Solving again after a change"," lists which changes need it.",[860,861,862],"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 .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}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 .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}",{"title":47,"searchDepth":182,"depth":189,"links":864},[865,866,867,868],{"id":39,"depth":182,"text":40},{"id":270,"depth":182,"text":271},{"id":405,"depth":182,"text":406},{"id":737,"depth":182,"text":738},"Create the nodes of a @edubeam\u002Ffem model, support them by fixing degrees of freedom, turn a support's axes for an inclined roller, and change nodes later.","md","Modelling",{"source":873},"site","\u002Fsolver\u002Fnodes-supports",{"title":5,"description":869},"solver\u002Fnodes-supports","XYiS4S-S1U77ACKJC1BUcr3hrAINcrItnWV_yjhk1kE",[879,881,885,886,889,892,897,901,905,910,914,918,923,927,931,935],{"path":20,"title":21,"order":54,"group":880},"Introduction",{"path":882,"title":883,"order":182,"group":884},"\u002Fsolver\u002Fconventions","Units and signs",null,{"path":874,"title":5,"order":189,"group":871},{"path":887,"title":888,"order":205,"group":884},"\u002Fsolver\u002Fmaterials-sections","Materials and sections",{"path":890,"title":891,"order":235,"group":884},"\u002Fsolver\u002Fmembers-hinges","Members and hinges",{"path":893,"title":894,"order":895,"group":896},"\u002Fsolver\u002Floads","Nodal and member loads",6,"Loads",{"path":898,"title":899,"order":900,"group":884},"\u002Fsolver\u002Ftemperature-settlements","Temperature and settlements",7,{"path":902,"title":903,"order":904,"group":884},"\u002Fsolver\u002Fload-cases","Load cases",8,{"path":906,"title":907,"order":908,"group":909},"\u002Fsolver\u002Fsolving","Solving",9,"Solving and results",{"path":911,"title":912,"order":913,"group":884},"\u002Fsolver\u002Fresults","Reading results",10,{"path":915,"title":916,"order":917,"group":884},"\u002Fsolver\u002Fdrawing","Drawing the results",11,{"path":919,"title":920,"order":921,"group":922},"\u002Fsolver\u002Fbeams","Beams",12,"Recipes",{"path":924,"title":925,"order":926,"group":884},"\u002Fsolver\u002Fframes","Frames",13,{"path":928,"title":929,"order":930,"group":884},"\u002Fsolver\u002Ftrusses","Trusses",14,{"path":932,"title":933,"order":934,"group":884},"\u002Fsolver\u002Fscripts","Scripts and servers",15,{"path":936,"title":937,"order":938,"group":939},"\u002Fsolver\u002Freference","API reference",16,"Reference",1795108690819]