{"id":1673,"date":"2026-10-19T21:58:31","date_gmt":"2026-10-19T13:58:31","guid":{"rendered":"https:\/\/people.utm.my\/arazin\/?page_id=1673"},"modified":"2026-11-07T20:53:39","modified_gmt":"2026-11-07T12:53:39","slug":"1d-bar-fem-explorer","status":"publish","type":"page","link":"https:\/\/people.utm.my\/arazin\/1d-bar-fem-explorer\/","title":{"rendered":"1D Bar FEM Explorer"},"content":{"rendered":"<div class=\"rz-page\">\n<p><!-- \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 ENGLISH \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 --><\/p>\n<div lang=\"en\">\n<p class=\"rz-eyebrow\">Interactive tool &middot; Finite element method<\/p>\n<h1>1D Bar FEM Explorer<\/h1>\n<details class=\"rz-lead-fold\">\n<summary>About this tool<\/summary>\n<p class=\"rz-lead\">An axially loaded bar, fixed at one end. Change the material, geometry, loads and mesh, and compare the finite element displacement and stress with the exact solution.<\/p>\n<\/details>\n<\/div>\n<p><!-- \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 BAHASA MELAYU \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 --><\/p>\n<div lang=\"ms\">\n<p class=\"rz-eyebrow\">Alatan interaktif &middot; Finite element method<\/p>\n<h1>1D Bar FEM Explorer<\/h1>\n<details class=\"rz-lead-fold\">\n<summary>Tentang alatan ini<\/summary>\n<p class=\"rz-lead\">Bar yang dibebankan secara paksi, ditetapkan pada satu hujung. Ubah bahan, geometri, beban dan mesh, dan bandingkan sesaran dan tegasan finite element dengan exact solution.<\/p>\n<\/details>\n<\/div>\n<p><!-- \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 THE TOOL \u2014 shared by both languages, loaded by the site bundle. Keep this line as it is. \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 --><\/p>\n<div data-rz-tool=\"bar1d\">\n<p><span lang=\"en\">Loading the interactive tool&hellip;<\/span><span lang=\"ms\">Memuatkan alatan interaktif&hellip;<\/span><\/p>\n<\/div>\n<div class=\"rzt-doc\">\n<div lang=\"en\">\n<details class=\"rz-acc\" open>\n<summary>How it works<\/summary>\n<div>\n<p>A bar fixed at x = 0 carries a tip load P and a uniform distributed load q, with an area that varies linearly from A\u2080 at the support to A(L) at the tip. The governing equation and its exact solution are<\/p>\n<div class=\"rzt-eq\">d\/dx ( E A(x) du\/dx ) + q = 0 &nbsp;&nbsp;&nbsp; u(0) = 0 &nbsp;&nbsp;&nbsp; E A du\/dx |<sub>x=L<\/sub> = P &nbsp;&nbsp;&nbsp; N(x) = P + q (L &minus; x)<\/div>\n<p>Each element contributes a stiffness matrix and a consistent load vector,<\/p>\n<div class=\"rzt-eq\">k<sub>e<\/sub> = &int; B<sup>T<\/sup> E A B dx &nbsp;&nbsp;&nbsp; f<sub>e<\/sub> = &int; N<sup>T<\/sup> q dx &nbsp;&nbsp;&nbsp; linear, uniform bar: k<sub>e<\/sub> = (EA \/ L<sub>e<\/sub>) [1 &minus;1; &minus;1 1], f<sub>e<\/sub> = (q L<sub>e<\/sub> \/ 2) [1; 1]<\/div>\n<p>The element matrices are assembled into K u = f, the fixed node is removed, and the stress follows from &sigma; = E du\/dx. Linear elements give a constant stress in each element; quadratic elements give a linearly varying stress.<\/p>\n<ul>\n<li><b>Tip load only, uniform bar:<\/b> the axial force is constant, so linear elements are exact everywhere. This is the case of the original app, u<sub>max<\/sub> = PL \/ EA.<\/li>\n<li><b>Distributed load:<\/b> linear elements still give exact nodal displacements (a property of one-dimensional problems with constant EA), but the stress inside each element is only an average of the exact linear variation.<\/li>\n<li><b>Tapered bar:<\/b> the exact displacement is logarithmic, so the nodal values are no longer exact, and the error falls with the mesh size.<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<details class=\"rz-acc\">\n<summary>Things to try<\/summary>\n<div>\n<ol>\n<li>Keep the default tip load and change the number of elements. The displacement and stress stay exact.<\/li>\n<li>Add q = 100 kN\/m. Compare the stress plot with the exact line, then switch to quadratic elements.<\/li>\n<li>Set the taper to 0.25 and run through n = 1, 2, 4, 8. Read the convergence plot: linear elements converge at rate 1 in the energy norm, quadratic elements at rate 2.<\/li>\n<li>Make P negative to put the bar in compression and watch the colour change.<\/li>\n<li>Open the tables to compare the nodal values with the exact solution, and copy the Python code to run the same model yourself.<\/li>\n<\/ol>\n<\/div>\n<\/details>\n<\/div>\n<div lang=\"ms\">\n<details class=\"rz-acc\" open>\n<summary>Bagaimana ia berfungsi<\/summary>\n<div>\n<p>Satu bar yang ditetapkan pada x = 0 menanggung beban hujung P dan beban teragih seragam q, dengan luas yang berubah secara linear dari A\u2080 di support ke A(L) di hujung. Persamaan menakluk dan exact solution-nya ialah<\/p>\n<div class=\"rzt-eq\">d\/dx ( E A(x) du\/dx ) + q = 0 &nbsp;&nbsp;&nbsp; u(0) = 0 &nbsp;&nbsp;&nbsp; E A du\/dx |<sub>x=L<\/sub> = P &nbsp;&nbsp;&nbsp; N(x) = P + q (L &minus; x)<\/div>\n<p>Setiap element menyumbang stiffness matrix dan consistent load vector,<\/p>\n<div class=\"rzt-eq\">k<sub>e<\/sub> = &int; B<sup>T<\/sup> E A B dx &nbsp;&nbsp;&nbsp; f<sub>e<\/sub> = &int; N<sup>T<\/sup> q dx &nbsp;&nbsp;&nbsp; linear, bar seragam: k<sub>e<\/sub> = (EA \/ L<sub>e<\/sub>) [1 &minus;1; &minus;1 1], f<sub>e<\/sub> = (q L<sub>e<\/sub> \/ 2) [1; 1]<\/div>\n<p>Matriks element dipasang menjadi K u = f, nod yang ditetapkan dikeluarkan, dan tegasan diperoleh daripada &sigma; = E du\/dx. Element linear memberi tegasan malar dalam setiap element; element kuadratik memberi tegasan yang berubah secara linear.<\/p>\n<ul>\n<li><b>Beban hujung sahaja, bar seragam:<\/b> daya paksi adalah malar, jadi element linear exact di semua tempat. Inilah kes app asal, u<sub>max<\/sub> = PL \/ EA.<\/li>\n<li><b>Beban teragih:<\/b> element linear masih memberi sesaran nodal yang exact (sifat masalah satu dimensi dengan EA malar), tetapi tegasan dalam setiap element hanyalah purata bagi perubahan linear yang exact.<\/li>\n<li><b>Bar tirus:<\/b> sesaran exact adalah logaritma, jadi nilai nodal tidak lagi exact, dan ralat berkurang mengikut saiz mesh.<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<details class=\"rz-acc\">\n<summary>Cubaan untuk anda<\/summary>\n<div>\n<ol>\n<li>Kekalkan beban hujung lalai dan ubah bilangan element. Sesaran dan tegasan kekal exact.<\/li>\n<li>Tambah q = 100 kN\/m. Bandingkan plot tegasan dengan garis exact, kemudian tukar ke element kuadratik.<\/li>\n<li>Tetapkan tirus kepada 0.25 dan cuba n = 1, 2, 4, 8. Baca plot convergence: element linear menumpu pada kadar 1 dalam energy norm, element kuadratik pada kadar 2.<\/li>\n<li>Jadikan P negatif supaya bar dalam mampatan dan lihat warnanya berubah.<\/li>\n<li>Buka jadual untuk membandingkan nilai nodal dengan exact solution, dan salin kod Python untuk menjalankan model yang sama sendiri.<\/li>\n<\/ol>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<div lang=\"en\">\n<h3>Related reading<\/h3>\n<div class=\"rz-links\">\n  <a href=\"https:\/\/people.utm.my\/arazin\/2020\/01\/27\/fem-book-1d\/\"><span class=\"k\">Book<\/span><\/p>\n<div><b>Finite Element Formulations for Statics and Dynamics of Plane Structures<\/b><span>MSNM, 2018 &mdash; bars, beams and frames with MATLAB.<\/span><\/div>\n<p><\/a><br \/>\n  <a href=\"https:\/\/people.utm.my\/arazin\/2d-plane-stress-fem-explorer\/\"><span class=\"k\">Tool<\/span><\/p>\n<div><b>2D Plane Stress FEM Explorer<\/b><span>The next step: plane stress with four element types.<\/span><\/div>\n<p><\/a><br \/>\n  <a href=\"https:\/\/people.utm.my\/arazin\/category\/fem\/\"><span class=\"k\">Notes<\/span><\/p>\n<div><b>FEM notes and codes<\/b><span>Lecture notes and MATLAB \/ Octave codes for SEAA4243 and MKAE1143.<\/span><\/div>\n<p><\/a>\n<\/div>\n<p class=\"rz-note\">Runs entirely in your browser; nothing is sent anywhere. Source code: <a href=\"https:\/\/github.com\/RazinUTM\/rz-tools\" target=\"_blank\" rel=\"noopener\">github.com\/RazinUTM\/rz-tools<\/a>. Spotted a bug or have an idea for a tool? Email <a href=\"mailto:arazin@utm.my\">arazin@utm.my<\/a>.<\/p>\n<\/div>\n<div lang=\"ms\">\n<h3>Bacaan berkaitan<\/h3>\n<div class=\"rz-links\">\n  <a href=\"https:\/\/people.utm.my\/arazin\/2020\/01\/27\/fem-book-1d\/\"><span class=\"k\">Buku<\/span><\/p>\n<div><b>Finite Element Formulations for Statics and Dynamics of Plane Structures<\/b><span>MSNM, 2018 &mdash; bar, rasuk dan kerangka dengan MATLAB.<\/span><\/div>\n<p><\/a><br \/>\n  <a href=\"https:\/\/people.utm.my\/arazin\/2d-plane-stress-fem-explorer\/\"><span class=\"k\">Alatan<\/span><\/p>\n<div><b>2D Plane Stress FEM Explorer<\/b><span>Langkah seterusnya: plane stress dengan empat jenis element.<\/span><\/div>\n<p><\/a><br \/>\n  <a href=\"https:\/\/people.utm.my\/arazin\/category\/fem\/\"><span class=\"k\">Nota<\/span><\/p>\n<div><b>Nota dan kod FEM<\/b><span>Nota kuliah dan kod MATLAB \/ Octave untuk SEAA4243 dan MKAE1143.<\/span><\/div>\n<p><\/a>\n<\/div>\n<p class=\"rz-note\">Berjalan sepenuhnya dalam pelayar anda; tiada data dihantar ke mana-mana. Kod sumber: <a href=\"https:\/\/github.com\/RazinUTM\/rz-tools\" target=\"_blank\" rel=\"noopener\">github.com\/RazinUTM\/rz-tools<\/a>. Jumpa pepijat atau ada idea untuk alatan baharu? E-mel <a href=\"mailto:arazin@utm.my\">arazin@utm.my<\/a>.<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Interactive tool &middot; Finite element method 1D Bar FEM Explorer About this tool An axially loaded bar, fixed at one end. Change the material, geometry, loads and mesh, and compare the finite element displacement and stress with the exact solution. Alatan interaktif &middot; Finite element method 1D Bar FEM Explorer Tentang alatan ini Bar yang [&hellip;]<\/p>\n","protected":false},"author":6455,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-1673","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/people.utm.my\/arazin\/wp-json\/wp\/v2\/pages\/1673","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/people.utm.my\/arazin\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/people.utm.my\/arazin\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/people.utm.my\/arazin\/wp-json\/wp\/v2\/users\/6455"}],"replies":[{"embeddable":true,"href":"https:\/\/people.utm.my\/arazin\/wp-json\/wp\/v2\/comments?post=1673"}],"version-history":[{"count":2,"href":"https:\/\/people.utm.my\/arazin\/wp-json\/wp\/v2\/pages\/1673\/revisions"}],"predecessor-version":[{"id":1725,"href":"https:\/\/people.utm.my\/arazin\/wp-json\/wp\/v2\/pages\/1673\/revisions\/1725"}],"wp:attachment":[{"href":"https:\/\/people.utm.my\/arazin\/wp-json\/wp\/v2\/media?parent=1673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}