Calc4fem (https://sourceforge.net/projects/calc4fem/) — is the open source spreadsheet template for plane frames, beams and trusses. Finite Element Method for 2D-beam elements is used.
The primary goal of this project is not to create yet another finite element analysis (FEA) program, but rather to develop an integrated environment for solving engineering problems using a tool most familiar to engineers: spreadsheets. With calc4fem, an engineer can create original calculation templates, develop parametric structural models, program complete analyses—ranging from load determination to strength and serviceability checks against building codes—and perform structural optimization. The program is written in StarBasic and requires macro execution to be enabled. You can convert the code to VBA and use the template in MS Excel if necessary; however, the author wrote the code for his personal use and did not have that specific task in his mind.
All data must be added on the “Data” sheet (can’t be renamed or removed). The code reads the data by the special keywords (in the green cells - “nodes”, “elements”, etc). You may tab it in arbitrary order in “Data”-sheet. Also you can’t have keyword in multiple cells at the “Data” sheet.
x; y; xy, hinge; xrot, xrotz; yrot, yrotz; rot, rotz; xyrot, rigid.For truss elements J=h=0 (or empty cell).
“h” (“hinged”) for hinged connection in the begin or in the end of element.“fx”, “fy”,... “Pc”) – see Table 1 below;Coefficients for base loads: Number of nonempty rows = number of combinations
For example:
(base_load#1)*0.9 + (base_load#2)*0.8(base_load#1)*1.2 + (base_load#2)*1.4(base_load#1)*1.2 + (base_load#2)*(-1.4)| Load Key | Scheme | Description |
|---|---|---|
| fx | Nodal concentrated horizontal force | |
| fy | Nodal concentrated vertical force (minus for down direction) | |
| mz | Nodal concentrated moment | |
| ux | Nodal horizontal displacement as a load (Is not converted into Wolsink's program) | |
| uy | Nodal vertical displacement as a load (Is not converted into Wolsink's program) | |
| rotz | Nodal rotation as a load (Is not converted into Wolsink's program) | |
| p1 | Simple distributed load perpendicular to beam | |
| p2 | Simple distributed axial load, parallel to beam | |
| qx | Linearly distributed horizontal load (according a vertical projection). Typical for wind load | |
| qy | Linearly distributed vertical load (according a vertical projection). Typical for snow load. | |
| Pc | Concentrated load Par1 within the beam span, located at distance Par2 from the first node. Par3 is the angle to vertical axis. | |
| Mc | Concentrated moment Par1 within the beam span, located at distance Par2 from the first node. | |
| q | Non-uniform linearly distributed load from Par1 to Par2, perpendicular to the beam and located within distances Par3 and Par4 from the first node. |
After calculation the program creates (re-creates) several sheets: “Results”, “Graph” and (optional) - “Matrix”.
key_of_result:
"nsec" - Section type number for current element"len" - length of element: Length=[(xj-xi)²+(yj-yi)²]1/2"EA" – axial stiffness (E*A);"EJ" – bending stiffness (E*J);"l" : cosα = (xj-xi)/Length;"m" : sinα = (yj-yi)/Length;"Mt" - bending moment along beam axis (for x=t*Length);"Qt" - shear force along beam axis (for x=t*Length);"Nt" - axial force along beam axis (for x=t*Length);"yloc" - Displacements along beam axis (for x=t*Length);"phi" - Angle of rotation beam axis (for x=t*Length).base_load_number and t = x/Length – optional variables (for result key = “Mt”, “Qt”, “Nt”, “yloc”, “phi”).
This function is used for quick getting of epures. “eRes_epure is” is array function. Use it with CTRL+SHIFT+ENTER to create table (array) of results.
key_of_result:
"yloc", "phi", "Mt", "Qt", "Nt" - displacements, angles of rotation, bending moments, shear forces, axial forces respectively.key_of_result="all" then result of calculation is the table of all listed values (but "yloc" are multiplied by -1000 and "phi" are in degrees).t = x/Length is column vector for array function.
This function is for getting results for load combinations.
key_of_result: Extremal values available: "Mmin", "Nmin", "Qmin", "Mmax", "Nmax", "Qmax", "ymax".
You can use arrays (the list with element numbers) “element_number” via columns selection.
Reads Nodal Base Load Reactions into Array
node_number -> Nodes for reading nodal reactions“Rx” = Reaction force in direction X“Ry” = Reaction force in direction Y“Rm” = Reaction moment in direction Z