diff --git a/.gitignore b/.gitignore index d918ec5..6ad4124 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *~ .DS_Store .ipynb_checkpoints +docs/build/html diff --git a/notebooks/2015-06-25-elasticity-solver-example.ipynb b/notebooks/2015-06-25-elasticity-solver-example.ipynb index c50297c..c999049 100644 --- a/notebooks/2015-06-25-elasticity-solver-example.ipynb +++ b/notebooks/2015-06-25-elasticity-solver-example.ipynb @@ -11,6 +11,15 @@ "**Abstract**: A workflow to solve typical elasticity problem. This document also tries to give some quidelines how to develop JuliaFEM." ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Bottom-up design\n", + "\n", + "We go piece by piece starting from something simple and going up to more complicated programming model." + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -58,7 +67,7 @@ "\n", "*Design principle 5*: we use 4 space indentation like in Python.\n", "\n", - "First we write some elementary functions to calculate stiffness matrix. Our development direction is \"bottom-up\" to interface." + "First we write some elementary functions to calculate stiffness matrix." ] }, { @@ -191,16 +200,16 @@ "name": "stderr", "output_type": "stream", "text": [ - "01-Aug 14:05:35:DEBUG:root:Converged in 6 iterations.\n", - "01-Aug 14:05:36:DEBUG:root:solution vector: \n", + "10-Aug 19:18:44:DEBUG:root:Converged in 6 iterations.\n", + "10-Aug 19:18:45:DEBUG:root:solution vector: \n", " [0.0 -0.39914506095474317 -0.07228582695592449 0.0\n", " 0.0 -2.1779892317073504 -2.222244754401764 0.0]\n", - "01-Aug 14:05:36:DEBUG:root:norm of u: 3.1292483947150043\n", - "01-Aug 14:05:37:DEBUG:root:Converged in 6 iterations.\n", - "01-Aug 14:05:37:DEBUG:root:solution vector: \n", + "10-Aug 19:18:45:DEBUG:root:norm of u: 3.1292483947150043\n", + "10-Aug 19:18:45:DEBUG:root:Converged in 6 iterations.\n", + "10-Aug 19:18:45:DEBUG:root:solution vector: \n", " [0.0 0.7433248532717793 1.0485210147234858 0.0\n", " 0.0 -2.085766534304891 -1.9606633242166027 0.0]\n", - "01-Aug 14:05:37:DEBUG:root:norm of u: 3.129248394715006\n" + "10-Aug 19:18:45:DEBUG:root:norm of u: 3.129248394715006\n" ] }, { @@ -301,16 +310,16 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 55, "metadata": { "collapsed": false }, "outputs": [], "source": [ - "type Node\n", - " id :: Int\n", - " elements :: Array{Int64, 1}\n", - "end" + "#type Node\n", + "# id :: Int\n", + "# #elements :: Array{Int64, 1}\n", + "#end" ] }, { @@ -323,7 +332,7 @@ "source": [ "type Element\n", " id :: Int\n", - " nodes :: Array{Int64, 1}\n", + " node_ids :: Array{Int64, 1}\n", " coordinates :: Array{Float64, 2}\n", " attributes :: Dict{ASCIIString, Any}\n", "end" @@ -352,7 +361,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 56, "metadata": { "collapsed": false }, @@ -360,10 +369,10 @@ { "data": { "text/plain": [ - "get_shape_functions (generic function with 1 method)" + "get_integration_scheme (generic function with 2 methods)" ] }, - "execution_count": 8, + "execution_count": 56, "metadata": {}, "output_type": "execute_result" } @@ -382,6 +391,7 @@ "\"\"\"\n", "function get_shape_functions(el::Element)\n", " ndim, nnodes = size(el.coordinates)\n", + " #Logging.debug(\"ndim = $ndim, nnodes=$nnodes\")\n", " if (nnodes == 4) & (ndim == 2)\n", " basis(xi) = [\n", " (1-xi[1])*(1-xi[2])/4\n", @@ -393,45 +403,56 @@ " (1+xi[2])/4.0 (1+xi[1])/4.0\n", " -(1+xi[2])/4.0 (1-xi[1])/4.0]\n", " return basis, dbasis\n", + " elseif (nnodes == 10) & (ndim == 3)\n", + " basis(xi) = [(xi[1] + xi[2] + xi[3] - 1)*(2*xi[1] + 2*xi[2] + 2*xi[3] - 1)\n", + " -xi[1]*(-2*xi[1] + 1)\n", + " -xi[2]*(-2*xi[2] + 1)\n", + " -xi[3]*(-2*xi[3] + 1)\n", + " 4*xi[1]*(-xi[1] - xi[2] - xi[3] + 1)\n", + " 4*xi[1]*xi[2]\n", + " 4*xi[2]*(-xi[1] - xi[2] - xi[3] + 1)\n", + " 4*xi[1]*xi[3]\n", + " 4*xi[2]*xi[3]\n", + " 4*xi[3]*(-xi[1] - xi[2] - xi[3] + 1)]\n", + "\n", + " dbasis(xi) = [\n", + " 4*xi[1] + 4*xi[2] + 4*xi[3] - 3 4*xi[1] + 4*xi[2] + 4*xi[3] - 3 4*xi[1] + 4*xi[2] + 4*xi[3] - 3\n", + " 4*xi[1] - 1 0 0\n", + " 0 4*xi[2] - 1 0\n", + " 0 0 4*xi[3] - 1\n", + " -8*xi[1] - 4*xi[2] - 4*xi[3] + 4 -4*xi[1] -4*xi[1]\n", + " 4*xi[2] 4*xi[1] 0\n", + " -4*xi[2] -4*xi[1] - 8*xi[2] - 4*xi[3] + 4 -4*xi[2]\n", + " 4*xi[3] 0 4*xi[1]\n", + " 0 4*xi[3] 4*xi[2]\n", + " -4*xi[3] -4*xi[3] -4*xi[1] - 4*xi[2] - 8*xi[3] + 4]\n", + " return basis, dbasis\n", " end\n", - " throw(\"Unknown function space\")\n", - "end" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "get_integration_scheme (generic function with 2 methods)" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ + " throw(\"Unknown function space, ndim=$ndim, nnodes=$nnodes\")\n", + "end\n", + "\n", "\"\"\"\n", "\"\"\"\n", "function get_integration_scheme(el::Element, order=2)\n", " ndim, nnodes = size(el.coordinates)\n", - " if (nnodes == 4) & (order == 2)\n", + " if (nnodes == 4) & (order == 2) & (ndim == 2)\n", " ipoints = 1/sqrt(3)*[-1 -1; 1 -1; 1 1; -1 1]\n", " iweights = [1, 1, 1, 1]\n", " return ipoints, iweights\n", + " elseif (nnodes == 10) & (order == 2) & (ndim == 3) # c3d10\n", + " # from code aster documentation\n", + " a = 1/20*(5-sqrt(5))\n", + " b = 1/20*(5+3*sqrt(5))\n", + " ipoints = [a a a; a a b; a b a; b a a]\n", + " iweights = 1/24*[1 1 1 1]\n", + " return ipoints, iweights\n", " end\n", "end" ] }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 79, "metadata": { "collapsed": false }, @@ -442,7 +463,7 @@ "assemble_element! (generic function with 2 methods)" ] }, - "execution_count": 10, + "execution_count": 79, "metadata": {}, "output_type": "execute_result" } @@ -464,6 +485,7 @@ " K = el.attributes[\"displacement tangent stiffness\"]\n", "\n", " gdofs = ass.gdofs[el.id]\n", + " Logging.debug(\"Assemble element to gdofs $gdofs\")\n", " basis, dbasis = get_shape_functions(el)\n", " ipoints, iweights = get_integration_scheme(el, io)\n", " calc_local_matrices!(X, u, R, K, basis, dbasis, la, mu, ipoints, iweights)\n", @@ -494,7 +516,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 58, "metadata": { "collapsed": false }, @@ -510,63 +532,65 @@ "name": "stderr", "output_type": "stream", "text": [ - "01-Aug 14:07:09:DEBUG:root:Creating nodes\n", - "01-Aug 14:07:09:DEBUG:root:Creating elements\n", - "01-Aug 14:07:09:DEBUG:root:Starting iteration 1\n", - "01-Aug 14:07:09:DEBUG:root:Assembling\n", - "01-Aug 14:07:10:DEBUG:root:Solution norm = 3.090022136728999\n", - "01-Aug 14:07:10:DEBUG:root:Starting iteration 2\n", - "01-Aug 14:07:10:DEBUG:root:Assembling\n", - "01-Aug 14:07:10:DEBUG:root:Solution norm = 0.3212131602153504\n", - "01-Aug 14:07:10:DEBUG:root:Starting iteration 3\n", - "01-Aug 14:07:10:DEBUG:root:Assembling\n", - "01-Aug 14:07:10:DEBUG:root:Solution norm = 0.040431781940005365\n", - "01-Aug 14:07:10:DEBUG:root:Starting iteration 4\n", - "01-Aug 14:07:10:DEBUG:root:Assembling\n", - "01-Aug 14:07:10:DEBUG:root:Solution norm = 0.0009291101052064257\n", - "01-Aug 14:07:10:DEBUG:root:Starting iteration 5\n", - "01-Aug 14:07:10:DEBUG:root:Assembling\n", - "01-Aug 14:07:10:DEBUG:root:Solution norm = 1.5638899025378415e-7\n", - "01-Aug 14:07:10:DEBUG:root:Starting iteration 6\n", - "01-Aug 14:07:10:DEBUG:root:Assembling\n", - "01-Aug 14:07:10:DEBUG:root:Solution norm = 1.0355045356935844e-14\n", - "01-Aug 14:07:10:DEBUG:root:Converged in 6 iterations.\n", - "01-Aug 14:07:10:DEBUG:root:Displacement of element = \n", + "10-Aug 21:03:06:DEBUG:root:Adding nodes to array\n", + "10-Aug 21:03:06:DEBUG:root:Creating elements\n", + "10-Aug 21:03:06:DEBUG:root:Starting iteration 1\n", + "10-Aug 21:03:06:DEBUG:root:Assembling\n", + "10-Aug 21:03:06:DEBUG:root:Solution norm = 3.090022136728999\n", + "10-Aug 21:03:06:DEBUG:root:Starting iteration 2\n", + "10-Aug 21:03:06:DEBUG:root:Assembling\n", + "10-Aug 21:03:06:DEBUG:root:Solution norm = 0.3212131602153504\n", + "10-Aug 21:03:06:DEBUG:root:Starting iteration 3\n", + "10-Aug 21:03:06:DEBUG:root:Assembling\n", + "10-Aug 21:03:06:DEBUG:root:Solution norm = 0.040431781940005365\n", + "10-Aug 21:03:06:DEBUG:root:Starting iteration 4\n", + "10-Aug 21:03:06:DEBUG:root:Assembling\n", + "10-Aug 21:03:06:DEBUG:root:Solution norm = 0.0009291101052064257\n", + "10-Aug 21:03:06:DEBUG:root:Starting iteration 5\n", + "10-Aug 21:03:06:DEBUG:root:Assembling\n", + "10-Aug 21:03:06:DEBUG:root:Solution norm = 1.5638899025378415e-7\n", + "10-Aug 21:03:06:DEBUG:root:Starting iteration 6\n", + "10-Aug 21:03:06:DEBUG:root:Assembling\n", + "10-Aug 21:03:06:DEBUG:root:Solution norm = 1.0355045356935844e-14\n", + "10-Aug 21:03:06:DEBUG:root:Converged in 6 iterations.\n", + "10-Aug 21:03:06:DEBUG:root:Displacement of element = \n", "[-0.39914506095474334 -0.07228582695592464 0.0 0.0\n", " -2.1779892317073504 -2.222244754401764 0.0 0.0]\n" ] }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1 fact verified.\n" - ] - }, { "data": { "text/plain": [ "delayed_handler (generic function with 4 methods)" ] }, - "execution_count": 11, + "execution_count": 58, "metadata": {}, "output_type": "execute_result" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1 fact verified.\n" + ] } ], "source": [ "facts(\"one element assembly\") do\n", " # Create model\n", - " Logging.debug(\"Creating nodes\")\n", - " n1 = Node(1, Int64[])\n", - " n2 = Node(2, Int64[])\n", - " n3 = Node(3, Int64[])\n", - " n4 = Node(4, Int64[])\n", - " nodes = [n1.id, n2.id, n3.id, n4.id]\n", + " #Logging.debug(\"Creating nodes\")\n", + " #n1 = Node(1)\n", + " #n2 = Node(2)\n", + " #n3 = Node(3)\n", + " #n4 = Node(4)\n", + " Logging.debug(\"Adding nodes to array\")\n", + " #nodes = [n1.id, n2.id, n3.id, n4.id]\n", + " node_ids = [1, 2, 3, 4]\n", " coordinates = [10.0 0.0; 10.0 1.0; 0.0 1.0; 0.0 0.0]'\n", " attributes = Dict(\"Young\" => 90, \"Poisson\" => 0.25)\n", " Logging.debug(\"Creating elements\")\n", - " el = Element(1, nodes, coordinates, attributes)\n", + " el = Element(1, node_ids, coordinates, attributes)\n", "\n", " # Initialize elements ready for solution\n", " el.attributes[\"displacement\"] = zeros(2, 4)\n", @@ -622,7 +646,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 14, "metadata": { "collapsed": false }, @@ -636,7 +660,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 82, "metadata": { "collapsed": false, "scrolled": false @@ -653,86 +677,704 @@ "name": "stderr", "output_type": "stream", "text": [ - "01-Aug 20:51:27:DEBUG:root:Creating nodes\n", - "01-Aug 20:51:27:DEBUG:root:Creating elements\n", - "01-Aug 20:51:27:DEBUG:root:Problem size = 8\n", - "01-Aug 20:51:27:DEBUG:root:Starting iteration 1\n", - "01-Aug 20:51:27:DEBUG:root:Assembling\n", - "01-Aug 20:51:27:DEBUG:root:Adding Dirichlet boundary conditions\n", - "01-Aug 20:51:27:DEBUG:root:dof 5 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 6 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 7 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 8 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:Added 4 Lagrange multipliers to model\n", - "01-Aug 20:51:27:DEBUG:root:Adding Neumann boundary conditions\n", - "01-Aug 20:51:27:DEBUG:root:Solving system of equations. Total size = 12\n", - "01-Aug 20:51:27:DEBUG:root:Solution norm = 3.0900221367289444\n", - "01-Aug 20:51:27:DEBUG:root:Starting iteration 2\n", - "01-Aug 20:51:27:DEBUG:root:Assembling\n", - "01-Aug 20:51:27:DEBUG:root:Adding Dirichlet boundary conditions\n", - "01-Aug 20:51:27:DEBUG:root:dof 5 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 6 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 7 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 8 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:Added 4 Lagrange multipliers to model\n", - "01-Aug 20:51:27:DEBUG:root:Adding Neumann boundary conditions\n", - "01-Aug 20:51:27:DEBUG:root:Solving system of equations. Total size = 12\n", - "01-Aug 20:51:27:DEBUG:root:Solution norm = 0.32121316021534363\n", - "01-Aug 20:51:27:DEBUG:root:Starting iteration 3\n", - "01-Aug 20:51:27:DEBUG:root:Assembling\n", - "01-Aug 20:51:27:DEBUG:root:Adding Dirichlet boundary conditions\n", - "01-Aug 20:51:27:DEBUG:root:dof 5 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 6 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 7 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 8 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:Added 4 Lagrange multipliers to model\n", - "01-Aug 20:51:27:DEBUG:root:Adding Neumann boundary conditions\n", - "01-Aug 20:51:27:DEBUG:root:Solving system of equations. Total size = 12\n", - "01-Aug 20:51:27:DEBUG:root:Solution norm = 0.04043178194002483\n", - "01-Aug 20:51:27:DEBUG:root:Starting iteration 4\n", - "01-Aug 20:51:27:DEBUG:root:Assembling\n", - "01-Aug 20:51:27:DEBUG:root:Adding Dirichlet boundary conditions\n", - "01-Aug 20:51:27:DEBUG:root:dof 5 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 6 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 7 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 8 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:Added 4 Lagrange multipliers to model\n", - "01-Aug 20:51:27:DEBUG:root:Adding Neumann boundary conditions\n", - "01-Aug 20:51:27:DEBUG:root:Solving system of equations. Total size = 12\n", - "01-Aug 20:51:27:DEBUG:root:Solution norm = 0.0009291101052060104\n", - "01-Aug 20:51:27:DEBUG:root:Starting iteration 5\n", - "01-Aug 20:51:27:DEBUG:root:Assembling\n", - "01-Aug 20:51:27:DEBUG:root:Adding Dirichlet boundary conditions\n", - "01-Aug 20:51:27:DEBUG:root:dof 5 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 6 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 7 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 8 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:Added 4 Lagrange multipliers to model\n", - "01-Aug 20:51:27:DEBUG:root:Adding Neumann boundary conditions\n", - "01-Aug 20:51:27:DEBUG:root:Solving system of equations. Total size = 12\n", - "01-Aug 20:51:27:DEBUG:root:Solution norm = 1.563889898905983e-7\n", - "01-Aug 20:51:27:DEBUG:root:Starting iteration 6\n", - "01-Aug 20:51:27:DEBUG:root:Assembling\n", - "01-Aug 20:51:27:DEBUG:root:Adding Dirichlet boundary conditions\n", - "01-Aug 20:51:27:DEBUG:root:dof 5 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 6 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 7 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:dof 8 => 0.0\n", - "01-Aug 20:51:27:DEBUG:root:Added 4 Lagrange multipliers to model\n", - "01-Aug 20:51:27:DEBUG:root:Adding Neumann boundary conditions\n", - "01-Aug 20:51:27:DEBUG:root:Solving system of equations. Total size = 12\n", - "01-Aug 20:51:27:DEBUG:root:Solution norm = 1.2782462771683917e-14\n", - "01-Aug 20:51:27:DEBUG:root:Converged in 4 iterations.\n", - "01-Aug 20:51:27:DEBUG:root:Displacement of element = \n", - "[-0.3991450609547439 -0.07228582695592495 0.0 0.0\n", - " -2.1779892317073513 -2.2222447544017654 0.0 0.0]\n" + "10-Aug 22:55:49:DEBUG:root:Creating nodes\n", + "10-Aug 22:55:49:DEBUG:root:Creating elements\n", + "10-Aug 22:55:49:INFO:root:create_ldof2gdofmap: dofs per node: 2\n", + "10-Aug 22:55:49:DEBUG:root:Dict(4=>[7,8],2=>[3,4],3=>[5,6],1=>[1,2])\n", + "10-Aug 22:55:50:INFO:root:solve!: dofs per node: 2\n", + "10-Aug 22:55:50:DEBUG:root:Problem size = 8\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 1\n", + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "1 fact verified.\n" + "Element stiffness matrix\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "10-Aug 22:55:50:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:dof 5 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 6 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:50:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:Solving system of equations. Total size = 12\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:Solution norm = 3.0900221367289444\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 2\n", + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n", + "10-Aug 22:55:50:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:dof 5 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 6 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:50:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:Solving system of equations. Total size = 12\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:Solution norm = 0.32121316021534363\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 3\n", + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n", + "10-Aug 22:55:50:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:dof 5 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 6 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:50:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:Solving system of equations. Total size = 12\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:Solution norm = 0.04043178194002483\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 4\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 123.2 -15.0 -118.4 -03.0 -61.6 15.0 56.8 03.0\n", + " -15.0 321.2 03.0 -319.4 15.0 -160.6 -03.0 158.8\n", + " -118.4 03.0 123.2 15.0 56.8 -03.0 -61.6 -15.0\n", + " -03.0 -319.4 15.0 321.2 03.0 158.8 -15.0 -160.6\n", + " -61.6 15.0 56.8 03.0 123.2 -15.0 -118.4 -03.0\n", + " 15.0 -160.6 -03.0 158.8 -15.0 321.2 03.0 -319.4\n", + " 56.8 -03.0 -61.6 -15.0 -118.4 03.0 123.2 15.0\n", + " 03.0 158.8 -15.0 -160.6 -03.0 -319.4 15.0 321.2\n", + "Array(Float64,(12,12)) 12x12 Array{Float64,2}:\n", + " 123.2 -15.0 -118.4 -03.0 -61.6 15.0 56.8 03.0 0.0 0.0 0.0 0.0\n", + " -15.0 321.2 03.0 -319.4 15.0 -160.6 -03.0 158.8 0.0 0.0 0.0 0.0\n", + " -118.4 03.0 123.2 15.0 56.8 -03.0 -61.6 -15.0 0.0 0.0 0.0 0.0\n", + " -03.0 -319.4 15.0 321.2 03.0 158.8 -15.0 -160.6 0.0 0.0 0.0 0.0\n", + " -61.6 15.0 56.8 03.0 123.2 -15.0 -118.4 -03.0 1.0 0.0 0.0 0.0\n", + " 15.0 -160.6 -03.0 158.8 -15.0 321.2 03.0 -319.4 0.0 1.0 0.0 0.0\n", + " 56.8 -03.0 -61.6 -15.0 -118.4 03.0 123.2 15.0 0.0 0.0 1.0 0.0\n", + " 03.0 158.8 -15.0 -160.6 -03.0 -319.4 15.0 321.2 0.0 0.0 0.0 1.0\n", + " 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,12)) 1x12 Array{Float64,2}:\n", + " 0.0 0.0 0.0 02.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 147.61 36.88 -149.16 -55.03 -66.97 1.91 68.52 16.24\n", + " 36.88 343.08 -48.76 -334.42 1.81 -174.07 10.06 165.4 \n", + " -149.16 -48.76 160.72 65.4 63.17 10.41 -74.73 -27.06\n", + " -55.03 -334.42 65.4 330.06 16.65 163.39 -27.02 -159.04\n", + " -66.97 1.81 63.17 16.65 128.11 -15.44 -124.3 -3.03\n", + " 1.91 -174.07 10.41 163.39 -15.44 338.21 3.11 -327.53\n", + " 68.52 10.06 -74.73 -27.02 -124.3 3.11 130.51 13.85\n", + " 16.24 165.4 -27.06 -159.04 -3.03 -327.53 13.85 321.16\n", + "Array(Float64,(12,12)) 12x12 Array{Float64,2}:\n", + " 147.6 36.9 -149.2 -55.0 -67.0 1.9 68.5 16.2 0.0 0.0 0.0 0.0\n", + " 36.9 343.1 -48.8 -334.4 1.8 -174.1 10.1 165.4 0.0 0.0 0.0 0.0\n", + " -149.2 -48.8 160.7 65.4 63.2 10.4 -74.7 -27.1 0.0 0.0 0.0 0.0\n", + " -55.0 -334.4 65.4 330.1 16.7 163.4 -27.0 -159.0 0.0 0.0 0.0 0.0\n", + " -67.0 1.8 63.2 16.7 128.1 -15.4 -124.3 -03.0 1.0 0.0 0.0 0.0\n", + " 1.9 -174.1 10.4 163.4 -15.4 338.2 3.1 -327.5 0.0 1.0 0.0 0.0\n", + " 68.5 10.1 -74.7 -27.0 -124.3 3.1 130.5 13.8 0.0 0.0 1.0 0.0\n", + " 16.2 165.4 -27.1 -159.0 -03.0 -327.5 13.8 321.2 0.0 0.0 0.0 1.0\n", + " 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,12)) 1x12 Array{Float64,2}:\n", + " -2.3 -15.7 05.0 15.2 -20.2 12.2 17.5 -9.6 0.0 0.0 0.0 0.0\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 131.01 35.45 -132.72 -52.73 -60.29 1.77 62.0 15.51\n", + " 35.45 313.79 -46.75 -305.49 1.71 -163.9 9.58 155.6 \n", + " -132.72 -46.75 143.74 62.55 56.75 10.12 -67.77 -25.93\n", + " -52.73 -305.49 62.55 301.12 16.11 153.51 -25.93 -149.13\n", + " -60.29 1.71 56.75 16.11 117.72 -14.75 -114.18 -3.07\n", + " 1.77 -163.9 10.12 153.51 -14.75 327.07 2.86 -316.69\n", + " 62.0 9.58 -67.77 -25.93 -114.18 2.86 119.94 13.49\n", + " 15.51 155.6 -25.93 -149.13 -3.07 -316.69 13.49 310.22\n", + "Array(Float64,(12,12)) 12x12 Array{Float64,2}:\n", + " 131.0 35.4 -132.7 -52.7 -60.3 1.8 62.0 15.5 0.0 0.0 0.0 0.0\n", + " 35.4 313.8 -46.7 -305.5 1.7 -163.9 9.6 155.6 0.0 0.0 0.0 0.0\n", + " -132.7 -46.7 143.7 62.6 56.7 10.1 -67.8 -25.9 0.0 0.0 0.0 0.0\n", + " -52.7 -305.5 62.6 301.1 16.1 153.5 -25.9 -149.1 0.0 0.0 0.0 0.0\n", + " -60.3 1.7 56.7 16.1 117.7 -14.8 -114.2 -3.1 1.0 0.0 0.0 0.0\n", + " 1.8 -163.9 10.1 153.5 -14.8 327.1 2.9 -316.7 0.0 1.0 0.0 0.0\n", + " 62.0 9.6 -67.8 -25.9 -114.2 2.9 119.9 13.5 0.0 0.0 1.0 0.0\n", + " 15.5 155.6 -25.9 -149.1 -3.1 -316.7 13.5 310.2 0.0 0.0 0.0 1.0\n", + " 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,12)) 1x12 Array{Float64,2}:\n", + " -0.0 -0.6 0.1 0.6 -19.7 3.2 19.6 -1.1 0.0 0.0 0.0 0.0\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n", + "10-Aug 22:55:50:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:dof 5 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 6 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:50:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:Solving system of equations. Total size = 12\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:Solution norm = 0.0009291101052060104\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 5\n", + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n", + "10-Aug 22:55:50:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:dof 5 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 6 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:50:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:Solving system of equations. Total size = 12\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:Solution norm = 1.563889898905983e-7\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 6\n", + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,5,6,7,8]\n", + "10-Aug 22:55:50:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:dof 5 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 6 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:50:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:Solving system of equations. Total size = 12\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:Solution norm = 1.2782462771683917e-14\n", + "10-Aug 22:55:50:DEBUG:root:Converged in 6 iterations.\n", + "10-Aug 22:55:50:DEBUG:root:Displacement of element = \n", + "[-0.3991450609547439 -0.07228582695592495 0.0 0.0\n", + " -2.1779892317073513 -2.2222447544017654 0.0 0.0]\n", + "10-Aug 22:55:50:DEBUG:root:Creating elements\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 130.66 36.04 -132.46 -53.26 -60.05 1.58 61.86 15.64\n", + " 36.04 312.24 -47.29 -303.89 1.52 -163.43 9.73 155.09\n", + " -132.46 -47.29 143.55 63.02 56.54 10.29 -67.63 -26.02\n", + " -53.26 -303.89 63.02 299.46 16.27 152.96 -26.02 -148.53\n", + " -60.05 1.52 56.54 16.27 117.21 -14.68 -113.7 -3.11\n", + " 1.58 -163.43 10.29 152.96 -14.68 326.61 2.81 -316.14\n", + " 61.86 9.73 -67.63 -26.02 -113.7 2.81 119.47 13.49\n", + " 15.64 155.09 -26.02 -148.53 -3.11 -316.14 13.49 309.58\n", + "Array(Float64,(12,12)) 12x12 Array{Float64,2}:\n", + " 130.7 36.0 -132.5 -53.3 -60.1 1.6 61.9 15.6 0.0 0.0 0.0 0.0\n", + " 36.0 312.2 -47.3 -303.9 1.5 -163.4 9.7 155.1 0.0 0.0 0.0 0.0\n", + " -132.5 -47.3 143.5 63.0 56.5 10.3 -67.6 -26.0 0.0 0.0 0.0 0.0\n", + " -53.3 -303.9 63.0 299.5 16.3 153.0 -26.0 -148.5 0.0 0.0 0.0 0.0\n", + " -60.1 1.5 56.5 16.3 117.2 -14.7 -113.7 -3.1 1.0 0.0 0.0 0.0\n", + " 1.6 -163.4 10.3 153.0 -14.7 326.6 2.8 -316.1 0.0 1.0 0.0 0.0\n", + " 61.9 9.7 -67.6 -26.0 -113.7 2.8 119.5 13.5 0.0 0.0 1.0 0.0\n", + " 15.6 155.1 -26.0 -148.5 -3.1 -316.1 13.5 309.6 0.0 0.0 0.0 1.0\n", + " 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,12)) 1x12 Array{Float64,2}:\n", + " 0.0 -0.0 -0.0 0.0 -19.9 2.8 19.9 -0.8 0.0 0.0 0.0 0.0\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 130.66 36.06 -132.47 -53.28 -60.05 1.57 61.86 15.64\n", + " 36.06 312.22 -47.3 -303.88 1.51 -163.43 9.73 155.08\n", + " -132.47 -47.3 143.56 63.03 56.54 10.29 -67.63 -26.02\n", + " -53.28 -303.88 63.03 299.44 16.27 152.96 -26.02 -148.52\n", + " -60.05 1.51 56.54 16.27 117.21 -14.67 -113.69 -3.11\n", + " 1.57 -163.43 10.29 152.96 -14.67 326.61 2.81 -316.14\n", + " 61.86 9.73 -67.63 -26.02 -113.69 2.81 119.46 13.49\n", + " 15.64 155.08 -26.02 -148.52 -3.11 -316.14 13.49 309.58\n", + "Array(Float64,(12,12)) 12x12 Array{Float64,2}:\n", + " 130.7 36.1 -132.5 -53.3 -60.1 1.6 61.9 15.6 0.0 0.0 0.0 0.0\n", + " 36.1 312.2 -47.3 -303.9 1.5 -163.4 9.7 155.1 0.0 0.0 0.0 0.0\n", + " -132.5 -47.3 143.6 63.0 56.5 10.3 -67.6 -26.0 0.0 0.0 0.0 0.0\n", + " -53.3 -303.9 63.0 299.4 16.3 153.0 -26.0 -148.5 0.0 0.0 0.0 0.0\n", + " -60.1 1.5 56.5 16.3 117.2 -14.7 -113.7 -3.1 1.0 0.0 0.0 0.0\n", + " 1.6 -163.4 10.3 153.0 -14.7 326.6 2.8 -316.1 0.0 1.0 0.0 0.0\n", + " 61.9 9.7 -67.6 -26.0 -113.7 2.8 119.5 13.5 0.0 0.0 1.0 0.0\n", + " 15.6 155.1 -26.0 -148.5 -3.1 -316.1 13.5 309.6 0.0 0.0 0.0 1.0\n", + " 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,12)) 1x12 Array{Float64,2}:\n", + " 0.0 -0.0 0.0 0.0 -19.9 2.8 19.9 -0.8 0.0 0.0 0.0 0.0\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 130.66 36.06 -132.47 -53.28 -60.05 1.57 61.86 15.64\n", + " 36.06 312.22 -47.3 -303.88 1.51 -163.43 9.73 155.08\n", + " -132.47 -47.3 143.56 63.03 56.54 10.29 -67.63 -26.02\n", + " -53.28 -303.88 63.03 299.44 16.27 152.96 -26.02 -148.52\n", + " -60.05 1.51 56.54 16.27 117.21 -14.67 -113.69 -3.11\n", + " 1.57 -163.43 10.29 152.96 -14.67 326.61 2.81 -316.14\n", + " 61.86 9.73 -67.63 -26.02 -113.69 2.81 119.46 13.49\n", + " 15.64 155.08 -26.02 -148.52 -3.11 -316.14 13.49 309.58\n", + "Array(Float64,(12,12)) 12x12 Array{Float64,2}:\n", + " 130.7 36.1 -132.5 -53.3 -60.1 1.6 61.9 15.6 0.0 0.0 0.0 0.0\n", + " 36.1 312.2 -47.3 -303.9 1.5 -163.4 9.7 155.1 0.0 0.0 0.0 0.0\n", + " -132.5 -47.3 143.6 63.0 56.5 10.3 -67.6 -26.0 0.0 0.0 0.0 0.0\n", + " -53.3 -303.9 63.0 299.4 16.3 153.0 -26.0 -148.5 0.0 0.0 0.0 0.0\n", + " -60.1 1.5 56.5 16.3 117.2 -14.7 -113.7 -3.1 1.0 0.0 0.0 0.0\n", + " 1.6 -163.4 10.3 153.0 -14.7 326.6 2.8 -316.1 0.0 1.0 0.0 0.0\n", + " 61.9 9.7 -67.6 -26.0 -113.7 2.8 119.5 13.5 0.0 0.0 1.0 0.0\n", + " 15.6 155.1 -26.0 -148.5 -3.1 -316.1 13.5 309.6 0.0 0.0 0.0 1.0\n", + " 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,12)) 1x12 Array{Float64,2}:\n", + " 0.0 -0.0 -0.0 0.0 -19.9 2.8 19.9 -0.8 0.0 0.0 0.0 0.0\n", + "1 fact verified.\n", + "solve two element problem\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "10-Aug 22:55:50:INFO:root:create_ldof2gdofmap: dofs per node: 2\n", + "10-Aug 22:55:50:DEBUG:root:Dict(4=>[7,8],2=>[3,4],3=>[5,6],5=>[9,10],6=>[11,12],1=>[1,2])\n", + "10-Aug 22:55:50:INFO:root:solve!: dofs per node: 2\n", + "10-Aug 22:55:50:DEBUG:root:Problem size = 12\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 1\n", + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n", + "10-Aug 22:55:50:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:dof 1 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 2 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:50:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:Solving system of equations. Total size = 16\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:Solution norm = 12.031677381267034\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 2\n", + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n", + "10-Aug 22:55:50:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:dof 1 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 2 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:50:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:Solving system of equations. Total size = 16\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:Solution norm = 8.151050361276255\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 3\n", + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 66.4 15.0 23.6 -03.0 -33.2 -15.0 -56.8 03.0\n", + " 15.0 162.4 03.0 77.6 -15.0 -81.2 -03.0 -158.8\n", + " 23.6 03.0 66.4 -15.0 -56.8 -03.0 -33.2 15.0\n", + " -03.0 77.6 -15.0 162.4 03.0 -158.8 15.0 -81.2\n", + " -33.2 -15.0 -56.8 03.0 66.4 15.0 23.6 -03.0\n", + " -15.0 -81.2 -03.0 -158.8 15.0 162.4 03.0 77.6\n", + " -56.8 -03.0 -33.2 15.0 23.6 03.0 66.4 -15.0\n", + " 03.0 -158.8 15.0 -81.2 -03.0 77.6 -15.0 162.4\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 66.4 15.0 23.6 -03.0 -33.2 -15.0 -56.8 03.0\n", + " 15.0 162.4 03.0 77.6 -15.0 -81.2 -03.0 -158.8\n", + " 23.6 03.0 66.4 -15.0 -56.8 -03.0 -33.2 15.0\n", + " -03.0 77.6 -15.0 162.4 03.0 -158.8 15.0 -81.2\n", + " -33.2 -15.0 -56.8 03.0 66.4 15.0 23.6 -03.0\n", + " -15.0 -81.2 -03.0 -158.8 15.0 162.4 03.0 77.6\n", + " -56.8 -03.0 -33.2 15.0 23.6 03.0 66.4 -15.0\n", + " 03.0 -158.8 15.0 -81.2 -03.0 77.6 -15.0 162.4\n", + "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n", + " 66.4 15.0 23.6 -03.0 0.0 0.0 -56.8 03.0 -33.2 -15.0 0.0 0.0 1.0 0.0 0.0 0.0\n", + " 15.0 162.4 03.0 77.6 0.0 0.0 -03.0 -158.8 -15.0 -81.2 0.0 0.0 0.0 1.0 0.0 0.0\n", + " 23.6 03.0 132.8 0.0 23.6 -03.0 -33.2 15.0 -113.6 0.0 -33.2 -15.0 0.0 0.0 0.0 0.0\n", + " -03.0 77.6 0.0 324.8 03.0 77.6 15.0 -81.2 0.0 -317.6 -15.0 -81.2 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 23.6 03.0 66.4 -15.0 0.0 0.0 -33.2 15.0 -56.8 -03.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -03.0 77.6 -15.0 162.4 0.0 0.0 15.0 -81.2 03.0 -158.8 0.0 0.0 0.0 0.0\n", + " -56.8 -03.0 -33.2 15.0 0.0 0.0 66.4 -15.0 23.6 03.0 0.0 0.0 0.0 0.0 1.0 0.0\n", + " 03.0 -158.8 15.0 -81.2 0.0 0.0 -15.0 162.4 -03.0 77.6 0.0 0.0 0.0 0.0 0.0 1.0\n", + " -33.2 -15.0 -113.6 0.0 -33.2 15.0 23.6 -03.0 132.8 0.0 23.6 03.0 0.0 0.0 0.0 0.0\n", + " -15.0 -81.2 0.0 -317.6 15.0 -81.2 03.0 77.6 0.0 324.8 -03.0 77.6 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -33.2 -15.0 -56.8 03.0 0.0 0.0 23.6 -03.0 66.4 15.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -15.0 -81.2 -03.0 -158.8 0.0 0.0 03.0 77.6 15.0 162.4 0.0 0.0 0.0 0.0\n", + " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 02.0 0.0 0.0 0.0 0.0\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 520.78 72.26 330.9 62.7 -397.04 -45.87 -454.64 -89.09\n", + " 72.26 461.85 83.07 254.3 -47.57 -243.98 -107.75 -472.18\n", + " 330.9 83.07 874.92 211.87 -895.33 -206.2 -310.49 -88.74\n", + " 62.7 254.3 211.87 708.11 -183.65 -617.73 -90.92 -344.68\n", + " -397.04 -47.57 -895.33 -183.65 983.14 157.73 309.22 73.49\n", + " -45.87 -243.98 -206.2 -617.73 157.73 615.62 94.34 246.08\n", + " -454.64 -107.75 -310.49 -90.92 309.22 94.34 455.91 104.34\n", + " -89.09 -472.18 -88.74 -344.68 73.49 246.08 104.34 570.77\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 520.78 72.26 330.9 62.7 -397.04 -45.87 -454.64 -89.09\n", + " 72.26 461.85 83.07 254.3 -47.57 -243.98 -107.75 -472.18\n", + " 330.9 83.07 874.92 211.87 -895.33 -206.2 -310.49 -88.74\n", + " 62.7 254.3 211.87 708.11 -183.65 -617.73 -90.92 -344.68\n", + " -397.04 -47.57 -895.33 -183.65 983.14 157.73 309.22 73.49\n", + " -45.87 -243.98 -206.2 -617.73 157.73 615.62 94.34 246.08\n", + " -454.64 -107.75 -310.49 -90.92 309.22 94.34 455.91 104.34\n", + " -89.09 -472.18 -88.74 -344.68 73.49 246.08 104.34 570.77\n", + "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n", + " 520.8 72.3 330.9 62.7 0.0 0.0 -454.6 -89.1 -397.0 -45.9 0.0 0.0 1.0 0.0 0.0 0.0\n", + " 72.3 461.9 83.1 254.3 0.0 0.0 -107.8 -472.2 -47.6 -244.0 0.0 0.0 0.0 1.0 0.0 0.0\n", + " 330.9 83.1 1395.7 284.1 330.9 62.7 -310.5 -88.7 -1350.0 -295.3 -397.0 -45.9 0.0 0.0 0.0 0.0\n", + " 62.7 254.3 284.1 1170.0 83.1 254.3 -90.9 -344.7 -291.4 -1089.9 -47.6 -244.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 330.9 83.1 874.9 211.9 0.0 0.0 -310.5 -88.7 -895.3 -206.2 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 62.7 254.3 211.9 708.1 0.0 0.0 -90.9 -344.7 -183.7 -617.7 0.0 0.0 0.0 0.0\n", + " -454.6 -107.8 -310.5 -90.9 0.0 0.0 455.9 104.3 309.2 94.3 0.0 0.0 0.0 0.0 1.0 0.0\n", + " -89.1 -472.2 -88.7 -344.7 0.0 0.0 104.3 570.8 73.5 246.1 0.0 0.0 0.0 0.0 0.0 1.0\n", + " -397.0 -47.6 -1350.0 -291.4 -310.5 -90.9 309.2 73.5 1439.1 262.1 309.2 94.3 0.0 0.0 0.0 0.0\n", + " -45.9 -244.0 -295.3 -1089.9 -88.7 -344.7 94.3 246.1 262.1 1186.4 73.5 246.1 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -397.0 -47.6 -895.3 -183.7 0.0 0.0 309.2 73.5 983.1 157.7 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -45.9 -244.0 -206.2 -617.7 0.0 0.0 94.3 246.1 157.7 615.6 0.0 0.0 0.0 0.0\n", + " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n", + " -453.5 -212.6 -1168.0 -759.0 -714.5 -546.4 300.0 466.2 1168.0 759.0 868.1 294.8 0.0 0.0 0.0 0.0\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 43.42 28.69 48.59 17.79 -57.52 -15.59 -34.48 -30.89\n", + " 28.69 51.46 22.52 33.82 -15.89 -22.99 -35.32 -62.29\n", + " 48.59 22.52 142.25 54.77 -152.3 -53.31 -38.54 -23.98\n", + " 17.79 33.82 54.77 88.5 -48.04 -72.78 -24.51 -49.53\n", + " -57.52 -15.89 -152.3 -48.04 168.56 42.6 41.26 21.33\n", + " -15.59 -22.99 -53.31 -72.78 42.6 67.46 26.29 28.32\n", + " -34.48 -35.32 -38.54 -24.51 41.26 26.29 31.77 33.54\n", + " -30.89 -62.29 -23.98 -49.53 21.33 28.32 33.54 83.5 \n", + "Element stiffness matrix\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "10-Aug 22:55:50:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:dof 1 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 2 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:50:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:Solving system of equations. Total size = 16\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:Solution norm = 3.886954756970209\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 4\n", + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n", + "10-Aug 22:55:50:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:dof 1 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 2 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:50:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:Solving system of equations. Total size = 16\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:Solution norm = 2.9651628976855293\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 5\n", + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n", + "10-Aug 22:55:50:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:dof 1 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 2 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:50:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:Solving system of equations. Total size = 16\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 43.42 28.69 48.59 17.79 -57.52 -15.59 -34.48 -30.89\n", + " 28.69 51.46 22.52 33.82 -15.89 -22.99 -35.32 -62.29\n", + " 48.59 22.52 142.25 54.77 -152.3 -53.31 -38.54 -23.98\n", + " 17.79 33.82 54.77 88.5 -48.04 -72.78 -24.51 -49.53\n", + " -57.52 -15.89 -152.3 -48.04 168.56 42.6 41.26 21.33\n", + " -15.59 -22.99 -53.31 -72.78 42.6 67.46 26.29 28.32\n", + " -34.48 -35.32 -38.54 -24.51 41.26 26.29 31.77 33.54\n", + " -30.89 -62.29 -23.98 -49.53 21.33 28.32 33.54 83.5 \n", + "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n", + " 43.4 28.7 48.6 17.8 0.0 0.0 -34.5 -30.9 -57.5 -15.6 0.0 0.0 1.0 0.0 0.0 0.0\n", + " 28.7 51.5 22.5 33.8 0.0 0.0 -35.3 -62.3 -15.9 -23.0 0.0 0.0 0.0 1.0 0.0 0.0\n", + " 48.6 22.5 185.7 83.5 48.6 17.8 -38.5 -24.0 -186.8 -84.2 -57.5 -15.6 0.0 0.0 0.0 0.0\n", + " 17.8 33.8 83.5 140.0 22.5 33.8 -24.5 -49.5 -83.4 -135.1 -15.9 -23.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 48.6 22.5 142.2 54.8 0.0 0.0 -38.5 -24.0 -152.3 -53.3 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 17.8 33.8 54.8 88.5 0.0 0.0 -24.5 -49.5 -48.0 -72.8 0.0 0.0 0.0 0.0\n", + " -34.5 -35.3 -38.5 -24.5 0.0 0.0 31.8 33.5 41.3 26.3 0.0 0.0 0.0 0.0 1.0 0.0\n", + " -30.9 -62.3 -24.0 -49.5 0.0 0.0 33.5 83.5 21.3 28.3 0.0 0.0 0.0 0.0 0.0 1.0\n", + " -57.5 -15.9 -186.8 -83.4 -38.5 -24.5 41.3 21.3 200.3 76.1 41.3 26.3 0.0 0.0 0.0 0.0\n", + " -15.6 -23.0 -84.2 -135.1 -24.0 -49.5 26.3 28.3 76.1 151.0 21.3 28.3 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -57.5 -15.9 -152.3 -48.0 0.0 0.0 41.3 21.3 168.6 42.6 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -15.6 -23.0 -53.3 -72.8 0.0 0.0 26.3 28.3 42.6 67.5 0.0 0.0 0.0 0.0\n", + " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n", + " 27.5 08.5 22.1 17.8 -5.4 9.3 -21.6 -15.8 -22.1 -17.8 -0.5 -0.0 0.0 0.0 0.0 0.0\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 116.19 1.61 71.4 10.34 -89.72 1.21 -97.86 -13.16\n", + " 1.61 96.17 17.73 49.31 0.67 -49.8 -20.01 -95.68\n", + " 71.4 17.73 191.45 46.09 -197.12 -40.75 -65.73 -23.07\n", + " 10.34 49.31 46.09 167.18 -32.77 -134.57 -23.66 -81.92\n", + " -89.72 0.67 -197.12 -32.77 219.04 18.96 67.81 13.14\n", + " 1.21 -49.8 -40.75 -134.57 18.96 135.27 20.58 49.1 \n", + " -97.86 -20.01 -65.73 -23.66 67.81 20.58 95.78 23.09\n", + " -13.16 -95.68 -23.07 -81.92 13.14 49.1 23.09 128.5 \n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 116.19 1.61 71.4 10.34 -89.72 1.21 -97.86 -13.16\n", + " 1.61 96.17 17.73 49.31 0.67 -49.8 -20.01 -95.68\n", + " 71.4 17.73 191.45 46.09 -197.12 -40.75 -65.73 -23.07\n", + " 10.34 49.31 46.09 167.18 -32.77 -134.57 -23.66 -81.92\n", + " -89.72 0.67 -197.12 -32.77 219.04 18.96 67.81 13.14\n", + " 1.21 -49.8 -40.75 -134.57 18.96 135.27 20.58 49.1 \n", + " -97.86 -20.01 -65.73 -23.66 67.81 20.58 95.78 23.09\n", + " -13.16 -95.68 -23.07 -81.92 13.14 49.1 23.09 128.5 \n", + "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n", + " 116.2 1.6 71.4 10.3 0.0 0.0 -97.9 -13.2 -89.7 1.2 0.0 0.0 1.0 0.0 0.0 0.0\n", + " 1.6 96.2 17.7 49.3 0.0 0.0 -20.0 -95.7 0.7 -49.8 0.0 0.0 0.0 1.0 0.0 0.0\n", + " 71.4 17.7 307.6 47.7 71.4 10.3 -65.7 -23.1 -295.0 -53.9 -89.7 1.2 0.0 0.0 0.0 0.0\n", + " 10.3 49.3 47.7 263.4 17.7 49.3 -23.7 -81.9 -52.8 -230.3 0.7 -49.8 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 71.4 17.7 191.5 46.1 0.0 0.0 -65.7 -23.1 -197.1 -40.8 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 10.3 49.3 46.1 167.2 0.0 0.0 -23.7 -81.9 -32.8 -134.6 0.0 0.0 0.0 0.0\n", + " -97.9 -20.0 -65.7 -23.7 0.0 0.0 95.8 23.1 67.8 20.6 0.0 0.0 0.0 0.0 1.0 0.0\n", + " -13.2 -95.7 -23.1 -81.9 0.0 0.0 23.1 128.5 13.1 49.1 0.0 0.0 0.0 0.0 0.0 1.0\n", + " -89.7 0.7 -295.0 -52.8 -65.7 -23.7 67.8 13.1 314.8 42.0 67.8 20.6 0.0 0.0 0.0 0.0\n", + " 1.2 -49.8 -53.9 -230.3 -23.1 -81.9 20.6 49.1 42.0 263.8 13.1 49.1 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -89.7 0.7 -197.1 -32.8 0.0 0.0 67.8 13.1 219.0 19.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 1.2 -49.8 -40.8 -134.6 0.0 0.0 20.6 49.1 19.0 135.3 0.0 0.0 0.0 0.0\n", + " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n", + " -02.5 8.8 -27.7 -26.3 -25.2 -35.2 -10.3 26.0 27.7 26.3 38.0 2.3 0.0 0.0 0.0 0.0\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 80.58 18.37 53.97 14.28 -64.27 -7.29 -70.28 -25.36\n", + " 18.37 29.48 19.23 20.58 -7.58 -16.78 -30.02 -33.28\n", + " 53.97 19.23 139.54 47.2 -146.69 -42.11 -46.81 -24.33\n", + " 14.28 20.58 47.2 74.51 -36.82 -59.55 -24.66 -35.54\n", + " -64.27 -7.58 -146.69 -36.82 159.26 28.44 51.7 15.96\n", + " -7.29 -16.78 -42.11 -59.55 28.44 56.47 20.96 19.86\n", + " -70.28 -30.02 -46.81 -24.66 51.7 20.96 65.39 33.72\n", + " -25.36 -33.28 -24.33 -35.54 15.96 19.86 33.72 48.96\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 80.58 18.37 53.97 14.28 -64.27 -7.29 -70.28 -25.36\n", + " 18.37 29.48 19.23 20.58 -7.58 -16.78 -30.02 -33.28\n", + " 53.97 19.23 139.54 47.2 -146.69 -42.11 -46.81 -24.33\n", + " 14.28 20.58 47.2 74.51 -36.82 -59.55 -24.66 -35.54\n", + " -64.27 -7.58 -146.69 -36.82 159.26 28.44 51.7 15.96\n", + " -7.29 -16.78 -42.11 -59.55 28.44 56.47 20.96 19.86\n", + " -70.28 -30.02 -46.81 -24.66 51.7 20.96 65.39 33.72\n", + " -25.36 -33.28 -24.33 -35.54 15.96 19.86 33.72 48.96\n", + "Array(Float64,(16,16)) 16x16 Array{Float64,2}" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:Solution norm = 2.638889456564507\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 6\n", + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n", + "10-Aug 22:55:50:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:dof 1 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 2 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:50:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:50:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:50:DEBUG:root:Solving system of equations. Total size = 16\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:nothing\n", + "10-Aug 22:55:50:DEBUG:root:Solution norm = 2.5846689771724556\n", + "10-Aug 22:55:50:DEBUG:root:Starting iteration 7\n", + "10-Aug 22:55:50:DEBUG:root:Assembling\n", + "10-Aug 22:55:50:DEBUG:root:Assemble element to gdofs [1,2,3,4,9,10,7,8]\n", + "10-Aug 22:55:51:DEBUG:root:Assemble element to gdofs [3,4,5,6,11,12,9,10]\n", + "10-Aug 22:55:51:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 22:55:51:DEBUG:root:dof 1 => 0.0\n", + "10-Aug 22:55:51:DEBUG:root:dof 2 => 0.0\n", + "10-Aug 22:55:51:DEBUG:root:dof 7 => 0.0\n", + "10-Aug 22:55:51:DEBUG:root:dof 8 => 0.0\n", + "10-Aug 22:55:51:DEBUG:root:Added 4 Lagrange multipliers to model\n", + "10-Aug 22:55:51:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 22:55:51:DEBUG:root:Solving system of equations. Total size = 16\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + ":\n", + " 80.6 18.4 54.0 14.3 0.0 0.0 -70.3 -25.4 -64.3 -7.3 0.0 0.0 1.0 0.0 0.0 0.0\n", + " 18.4 29.5 19.2 20.6 0.0 0.0 -30.0 -33.3 -7.6 -16.8 0.0 0.0 0.0 1.0 0.0 0.0\n", + " 54.0 19.2 220.1 65.6 54.0 14.3 -46.8 -24.3 -217.0 -67.5 -64.3 -7.3 0.0 0.0 0.0 0.0\n", + " 14.3 20.6 65.6 104.0 19.2 20.6 -24.7 -35.5 -66.8 -92.8 -7.6 -16.8 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 54.0 19.2 139.5 47.2 0.0 0.0 -46.8 -24.3 -146.7 -42.1 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 14.3 20.6 47.2 74.5 0.0 0.0 -24.7 -35.5 -36.8 -59.6 0.0 0.0 0.0 0.0\n", + " -70.3 -30.0 -46.8 -24.7 0.0 0.0 65.4 33.7 51.7 21.0 0.0 0.0 0.0 0.0 1.0 0.0\n", + " -25.4 -33.3 -24.3 -35.5 0.0 0.0 33.7 49.0 16.0 19.9 0.0 0.0 0.0 0.0 0.0 1.0\n", + " -64.3 -7.6 -217.0 -66.8 -46.8 -24.7 51.7 16.0 224.7 62.2 51.7 21.0 0.0 0.0 0.0 0.0\n", + " -7.3 -16.8 -67.5 -92.8 -24.3 -35.5 21.0 19.9 62.2 105.4 16.0 19.9 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -64.3 -7.6 -146.7 -36.8 0.0 0.0 51.7 16.0 159.3 28.4 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -7.3 -16.8 -42.1 -59.6 0.0 0.0 21.0 19.9 28.4 56.5 0.0 0.0 0.0 0.0\n", + " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n", + " 28.6 5.9 32.9 14.7 4.3 8.7 -24.6 -14.9 -32.9 -14.7 -8.3 2.2 0.0 0.0 0.0 0.0\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 138.24 6.59 72.3 13.02 -91.67 -1.46 -118.87 -18.14\n", + " 6.59 95.68 20.35 47.41 -1.83 -47.79 -25.11 -95.3 \n", + " 72.3 20.35 177.29 48.61 -182.78 -43.91 -66.81 -25.05\n", + " 13.02 47.41 48.61 159.72 -36.21 -128.01 -25.42 -79.12\n", + " -91.67 -1.83 -182.78 -36.21 203.7 23.62 70.75 14.42\n", + " -1.46 -47.79 -43.91 -128.01 23.62 126.88 21.75 48.93\n", + " -118.87 -25.11 -66.81 -25.42 70.75 21.75 114.93 28.77\n", + " -18.14 -95.3 -25.05 -79.12 14.42 48.93 28.77 125.49\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 138.24 6.59 72.3 13.02 -91.67 -1.46 -118.87 -18.14\n", + " 6.59 95.68 20.35 47.41 -1.83 -47.79 -25.11 -95.3 \n", + " 72.3 20.35 177.29 48.61 -182.78 -43.91 -66.81 -25.05\n", + " 13.02 47.41 48.61 159.72 -36.21 -128.01 -25.42 -79.12\n", + " -91.67 -1.83 -182.78 -36.21 203.7 23.62 70.75 14.42\n", + " -1.46 -47.79 -43.91 -128.01 23.62 126.88 21.75 48.93\n", + " -118.87 -25.11 -66.81 -25.42 70.75 21.75 114.93 28.77\n", + " -18.14 -95.3 -25.05 -79.12 14.42 48.93 28.77 125.49\n", + "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n", + " 138.2 6.6 72.3 13.0 0.0 0.0 -118.9 -18.1 -91.7 -1.5 0.0 0.0 1.0 0.0 0.0 0.0\n", + " 6.6 95.7 20.3 47.4 0.0 0.0 -25.1 -95.3 -1.8 -47.8 0.0 0.0 0.0 1.0 0.0 0.0\n", + " 72.3 20.3 315.5 55.2 72.3 13.0 -66.8 -25.0 -301.6 -62.1 -91.7 -1.5 0.0 0.0 0.0 0.0\n", + " 13.0 47.4 55.2 255.4 20.3 47.4 -25.4 -79.1 -61.3 -223.3 -1.8 -47.8 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 72.3 20.3 177.3 48.6 0.0 0.0 -66.8 -25.0 -182.8 -43.9 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 13.0 47.4 48.6 159.7 0.0 0.0 -25.4 -79.1 -36.2 -128.0 0.0 0.0 0.0 0.0\n", + " -118.9 -25.1 -66.8 -25.4 0.0 0.0 114.9 28.8 70.7 21.8 0.0 0.0 0.0 0.0 1.0 0.0\n", + " -18.1 -95.3 -25.0 -79.1 0.0 0.0 28.8 125.5 14.4 48.9 0.0 0.0 0.0 0.0 0.0 1.0\n", + " -91.7 -1.8 -301.6 -61.3 -66.8 -25.4 70.7 14.4 318.6 52.4 70.7 21.8 0.0 0.0 0.0 0.0\n", + " -1.5 -47.8 -62.1 -223.3 -25.0 -79.1 21.8 48.9 52.4 252.4 14.4 48.9 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -91.7 -1.8 -182.8 -36.2 0.0 0.0 70.7 14.4 203.7 23.6 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -1.5 -47.8 -43.9 -128.0 0.0 0.0 21.8 48.9 23.6 126.9 0.0 0.0 0.0 0.0\n", + " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n", + " -06.5 7.6 -25.7 -24.5 -19.1 -32.0 -4.1 20.8 25.7 24.5 29.7 5.7 0.0 0.0 0.0 0.0\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 105.18 18.96 58.01 14.76 -69.33 -6.94 -93.85 -26.77\n", + " 18.96 36.86 19.89 21.5 -7.13 -18.68 -31.72 -39.68\n", + " 58.01 19.89 135.28 46.75 -141.88 -41.41 -51.41 -25.23\n", + " 14.76 21.5 46.75 74.5 -36.07 -59.09 -25.44 -36.91\n", + " -69.33 -7.13 -141.88 -36.07 154.31 27.5 56.9 15.7 \n", + " -6.94 -18.68 -41.41 -59.09 27.5 56.13 20.86 21.65\n", + " -93.85 -31.72 -51.41 -25.44 56.9 20.86 88.36 36.3 \n", + " -26.77 -39.68 -25.23 -36.91 15.7 21.65 36.3 54.93\n", + "Element stiffness matrix\n", + "Array(Float64,(8,8)) 8x8 Array{Float64,2}:\n", + " 105.18 18.96 58.01 14.76 -69.33 -6.94 -93.85 -26.77\n", + " 18.96 36.86 19.89 21.5 -7.13 -18.68 -31.72 -39.68\n", + " 58.01 19.89 135.28 46.75 -141.88 -41.41 -51.41 -25.23\n", + " 14.76 21.5 46.75 74.5 -36.07 -59.09 -25.44 -36.91\n", + " -69.33 -7.13 -141.88 -36.07 154.31 27.5 56.9 15.7 \n", + " -6.94 -18.68 -41.41 -59.09 27.5 56.13 20.86 21.65\n", + " -93.85 -31.72 -51.41 -25.44 56.9 20.86 88.36 36.3 \n", + " -26.77 -39.68 -25.23 -36.91 15.7 21.65 36.3 54.93\n", + "Array(Float64,(16,16)) 16x16 Array{Float64,2}:\n", + " 105.2 19.0 58.0 14.8 0.0 0.0 -93.9 -26.8 -69.3 -6.9 0.0 0.0 1.0 0.0 0.0 0.0\n", + " 19.0 36.9 19.9 21.5 0.0 0.0 -31.7 -39.7 -7.1 -18.7 0.0 0.0 0.0 1.0 0.0 0.0\n", + " 58.0 19.9 240.5 65.7 58.0 14.8 -51.4 -25.2 -235.7 -68.2 -69.3 -6.9 0.0 0.0 0.0 0.0\n", + " 14.8 21.5 65.7 111.4 19.9 21.5 -25.4 -36.9 -67.8 -98.8 -7.1 -18.7 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 58.0 19.9 135.3 46.7 0.0 0.0 -51.4 -25.2 -141.9 -41.4 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 14.8 21.5 46.7 74.5 0.0 0.0 -25.4 -36.9 -36.1 -59.1 0.0 0.0 0.0 0.0\n", + " -93.9 -31.7 -51.4 -25.4 0.0 0.0 88.4 36.3 56.9 20.9 0.0 0.0 0.0 0.0 1.0 0.0\n", + " -26.8 -39.7 -25.2 -36.9 0.0 0.0 36.3 54.9 15.7 21.6 0.0 0.0 0.0 0.0 0.0 1.0\n", + " -69.3 -7.1 -235.7 -67.8 -51.4 -25.4 56.9 15.7 242.7 63.8 56.9 20.9 0.0 0.0 0.0 0.0\n", + " -6.9 -18.7 -68.2 -98.8 -25.2 -36.9 20.9 21.6 63.8 111.1 15.7 21.6 0.0 0.0 0.0 0.0\n", + " 0.0 " + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "10-Aug 22:55:51:DEBUG:root:nothing\n", + "10-Aug 22:55:51:DEBUG:root:nothing\n", + "10-Aug 22:55:51:DEBUG:root:Solution norm = 2.4116101594574446\n", + "10-Aug 22:55:51:DEBUG:root:Displacement of element = \n", + "[-3.0265017801117513 -5.464687844270099 -4.5022205763589715 -2.2188310526354926\n", + " -1.2759688848713764 -6.757003969576785 -7.2218353000897295 -1.8649226742660745]\n" ] }, { @@ -741,35 +1383,83 @@ "delayed_handler (generic function with 4 methods)" ] }, - "execution_count": 49, + "execution_count": 82, "metadata": {}, "output_type": "execute_result" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.0 -69.3 -7.1 -141.9 -36.1 0.0 0.0 56.9 15.7 154.3 27.5 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 -6.9 -18.7 -41.4 -59.1 0.0 0.0 20.9 21.6 27.5 56.1 0.0 0.0 0.0 0.0\n", + " 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + " 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0\n", + "Array(Float64,(1,16)) 1x16 Array{Float64,2}:\n", + " 22.9 4.1 28.6 11.8 5.6 7.6 -19.5 -12.4 -28.6 -11.8 -09.0 2.6 0.0 0.0 0.0 0.0\n", + "0 facts verified.\n" + ] } ], "source": [ - "function solve!(elements, neumann_bcs, dirichlet_bcs; dofs=2, max_iterations=10)\n", + "\"\"\"\n", + "Create local dof to global dof mapping for given elements\n", + "\"\"\"\n", + "function create_ldof2gdofmap(elements; ndofs=2)\n", + " Logging.info(\"create_ldof2gdofmap: dofs per node: $ndofs\")\n", + "\n", + " all_node_ids = Int64[]\n", + " for el in elements\n", + " eldim, elnodes = size(el.coordinates)\n", + " for nid in el.node_ids\n", + " push!(all_node_ids, nid)\n", + " end\n", + " end\n", + " all_node_ids = unique(all_node_ids)\n", + " sort!(all_node_ids)\n", + "\n", + " # Assign global dof for each node\n", + " pdim = 1\n", + " ngdofs = Dict{Int64, Array{Int64,1}}()\n", + " for nid in all_node_ids\n", + " ngdofs[nid] = collect(pdim:pdim+ndofs-1)\n", + " pdim += ndofs\n", + " end\n", + "\n", + " return ngdofs\n", + "end\n", + "\n", + "function solve!(elements, dofmap, neumann_bcs, dirichlet_bcs; ndofs=2, max_iterations=10)\n", + " \n", + " Logging.info(\"solve!: dofs per node: $ndofs\")\n", + " pdim = length(dofmap)*ndofs\n", + " Logging.debug(\"Problem size = $pdim\")\n", "\n", " # Initialize elements ready for solution\n", " for el in elements\n", - " el.attributes[\"displacement\"] = zeros(2, 4)\n", - " el.attributes[\"displacement nodal force\"] = zeros(2, 4)\n", - " el.attributes[\"displacement tangent stiffness\"] = zeros(8, 8)\n", + " eldim, elnodes = size(el.coordinates)\n", + " el.attributes[\"displacement\"] = zeros(ndofs, elnodes)\n", + " el.attributes[\"displacement nodal force\"] = zeros(ndofs, elnodes)\n", + " el.attributes[\"displacement tangent stiffness\"] = zeros(ndofs*elnodes, ndofs*elnodes)\n", " end\n", "\n", " # Assign global dofs for elements\n", - " gdofs = Dict{Int64,Array{Int64,1}}()\n", - " pdim = 1\n", + " gdofs = Dict{Int64, Array{Int64,1}}()\n", " for el in elements\n", - " edofs = length(el.nodes)*dofs-1\n", - " gdofs[el.id] = pdim:pdim+edofs\n", - " pdim += edofs\n", + " gdofs[el.id] = Int64[]\n", + " for nid in el.node_ids\n", + " for ndof in dofmap[nid]\n", + " push!(gdofs[el.id], ndof)\n", + " end\n", + " end\n", " end\n", - " Logging.debug(\"Problem size = $pdim\")\n", "\n", " ass = Assembly(Int64[], Int64[], Float64[], Int64[], Float64[], gdofs)\n", "\n", - " for i=1:max_iterations\n", - " Logging.debug(\"Starting iteration $i\")\n", + " for iter=1:max_iterations\n", + " Logging.debug(\"Starting iteration $iter\")\n", " ass.I = []\n", " ass.J = []\n", " ass.A = []\n", @@ -779,6 +1469,8 @@ " Logging.debug(\"Assembling\")\n", " for el in elements\n", " assemble_element!(ass, el)\n", + " println(\"Element stiffness matrix\")\n", + " dump(round(el.attributes[\"displacement tangent stiffness\"], 2))\n", " end\n", "\n", " Logging.debug(\"Adding Dirichlet boundary conditions\")\n", @@ -815,8 +1507,9 @@ " K = sparse(ass.I, ass.J, ass.A)\n", " R = full(sparsevec(ass.i, ass.b))\n", " R = R - F\n", - " #println(full(K))\n", - " #println(R)\n", + " Logging.debug(dump(round(full(K), 1)))\n", + " #print_matrix(full(K))\n", + " Logging.debug(dump(round(R', 1)))\n", "\n", " du = K \\ -R\n", "\n", @@ -825,38 +1518,272 @@ "\n", " # update solution back to elements\n", " for el in elements\n", + "\n", " eldu = du[ass.gdofs[el.id]]\n", - " eldu = reshape(eldu, (2, round(Int, length(eldu)/2)))\n", + " eldu = reshape(eldu, (ndofs, round(Int, length(eldu)/ndofs)))\n", " el.attributes[\"displacement\"] += eldu\n", " end\n", " if solnorm < 1.0e-9\n", - " Logging.debug(\"Converged in $i iterations.\")\n", + " Logging.debug(\"Converged in $iter iterations.\")\n", " break\n", " end\n", " end\n", "\n", "end\n", "\n", + "ENV[\"COLUMNS\"] = 160\n", + "\n", "facts(\"solve one element problem\") do\n", " # Create model\n", " Logging.debug(\"Creating nodes\")\n", - " n1 = Node(1, Int64[])\n", - " n2 = Node(2, Int64[])\n", - " n3 = Node(3, Int64[])\n", - " n4 = Node(4, Int64[])\n", - " nodes = [n1.id, n2.id, n3.id, n4.id]\n", + " node_ids = [1, 2, 3, 4]\n", " coordinates = [10.0 0.0; 10.0 1.0; 0.0 1.0; 0.0 0.0]'\n", " attributes = Dict(\"Young\" => 90, \"Poisson\" => 0.25)\n", " Logging.debug(\"Creating elements\")\n", - " el = Element(1, nodes, coordinates, attributes)\n", + " el = Element(1, node_ids, coordinates, attributes)\n", " elements = [el]\n", + " dofmap = create_ldof2gdofmap(elements)\n", + " Logging.debug(dofmap)\n", " # Boundary conditions\n", - " bc1 = BC([4], [-2.0]) # force boundary condition, third dof -2\n", - " bc2 = BC([5, 6, 7, 8], [0.0, 0.0, 0.0, 0.0]) # dirichlet bc, set dx=dy=0 on support\n", - " solve!(elements, [bc1], [bc2]; max_iterations=7)\n", + " # here we want to create nodal force for third dof, that is, node id 2, second dof\n", + " bc1 = BC([dofmap[2][2]], [-2.0])\n", + " # dirichlet bc, set dx=dy=0 on support\n", + " bc2 = BC([dofmap[3][1], dofmap[3][2], dofmap[4][1], dofmap[4][2]], [0.0, 0.0, 0.0, 0.0])\n", + " solve!(elements, dofmap, [bc1], [bc2]; max_iterations=7)\n", " disp = elements[1].attributes[\"displacement\"]\n", " Logging.debug(\"Displacement of element = \\n$disp\")\n", " @fact norm(disp) => roughly(3.1292483947150043)\n", + "end\n", + "\n", + "facts(\"solve two element problem\") do\n", + " # Create model\n", + " attributes = Dict(\"Young\" => 90, \"Poisson\" => 0.25)\n", + "\n", + " Logging.debug(\"Creating elements\")\n", + " nids1 = [1, 2, 5, 4]\n", + " coords1 = [0.0 0.0; 5.0 0.0; 5.0 1.0; 0.0 1.0]'\n", + " el1 = Element(1, nids1, coords1, attributes)\n", + " nids2 = [2, 3, 6, 5]\n", + " coords2 = [5.0 0.0; 10.0 0.0; 10.0 1.0; 5.0 1.0]'\n", + " el2 = Element(2, nids2, coords2, attributes)\n", + " elements = [el1, el2]\n", + "\n", + " dofmap = create_ldof2gdofmap(elements)\n", + " Logging.debug(dofmap)\n", + " # Boundary conditions\n", + " # here we want to create nodal force for third dof, that is, node id 2, second dof\n", + " bc1 = BC([dofmap[6][2]], [-2.0])\n", + " # dirichlet bc, set dx=dy=0 on support\n", + " bc2 = BC([dofmap[1][1], dofmap[1][2], dofmap[4][1], dofmap[4][2]], [0.0, 0.0, 0.0, 0.0])\n", + " solve!(elements, dofmap, [bc1], [bc2]; max_iterations=7)\n", + " disp = elements[2].attributes[\"displacement\"]\n", + " Logging.debug(\"Displacement of element = \\n$disp\")\n", + " #@fact norm(disp) => roughly(3.1292483947150043)\n", + "end" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Top-down design\n", + "\n", + "Next we see this problem from \"other direction\", by parsing ABAQUS .inp file and making 3d simulation." + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "text/plain": [ + "1x1 sparse matrix with 1 Float64 entries:\n", + "\t[1, 1] = 2.0" + ] + }, + "execution_count": 74, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sparse([1, 1], [1, 1], [1.0, 1.0])" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "10-Aug 20:59:55:INFO:root:Registered handlers: Any[\"ELEMENT\",\"NODE\",\"NSET\"]\n", + "10-Aug 20:59:55:DEBUG:root:Found NODE section\n", + "10-Aug 20:59:56:DEBUG:root:Found ELEMENT section\n", + "10-Aug 20:59:57:DEBUG:root:120 elements found\n", + "10-Aug 20:59:57:INFO:root:Creating ELSET Body1\n", + "10-Aug 20:59:57:DEBUG:root:Found NSET section\n", + "10-Aug 20:59:57:DEBUG:root:Creating node set SUPPORT\n", + "10-Aug 20:59:57:DEBUG:root:Found NSET section\n", + "10-Aug 20:59:57:DEBUG:root:Creating node set LOAD\n", + "10-Aug 20:59:57:DEBUG:root:Found NSET section\n", + "10-Aug 20:59:57:DEBUG:root:Creating node set TOP\n" + ] + }, + { + "data": { + "text/plain": [ + "Dict{Any,Any} with 4 entries:\n", + " \"nodes\" => Dict{Any,Any}(288=>[97.5,7.5,10.0],11=>[92.5,2.5,5.0],134=>[45.…\n", + " \"elements\" => Dict{Any,Any}(68=>[71,144,149,198,51,150,57,43,50,214],2=>[204,…\n", + " \"elsets\" => Dict{Any,Any}(\"Body1\"=>[1,2,3,4,5,6,7,8,9,10 … 111,112,113,11…\n", + " \"nsets\" => Dict{Any,Any}(\"LOAD\"=>[82,84,87,179,197,246,249,256,257],\"SUPPO…" + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "using JuliaFEM.abaqus_reader\n", + "fid = open(\"../geometry/3d_beam/palkki.inp\")\n", + "model = JuliaFEM.abaqus_reader.parse_abaqus(fid)\n", + "close(fid)\n", + "model" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": { + "collapsed": false, + "scrolled": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "solve 3d elasticity problem\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "10-Aug 21:16:13:DEBUG:root:Creating elements\n", + "10-Aug 21:16:13:INFO:root:dofs per node: 3\n", + "10-Aug 21:16:13:INFO:root:dofs per node: 3\n", + "10-Aug 21:16:13:DEBUG:root:Problem size = 894\n", + "10-Aug 21:16:13:DEBUG:root:Starting iteration 1\n", + "10-Aug 21:16:13:DEBUG:root:Assembling\n", + "10-Aug 21:16:15:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 21:16:15:DEBUG:root:Added 27 Lagrange multipliers to model\n", + "10-Aug 21:16:15:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 21:16:15:DEBUG:root:Solving system of equations. Total size = 921\n", + "10-Aug 21:16:15:DEBUG:root:Solution norm = 0.2429242363684311\n", + "10-Aug 21:16:15:DEBUG:root:Starting iteration 2\n", + "10-Aug 21:16:15:DEBUG:root:Assembling\n", + "10-Aug 21:16:16:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 21:16:16:DEBUG:root:Added 27 Lagrange multipliers to model\n", + "10-Aug 21:16:16:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 21:16:16:DEBUG:root:Solving system of equations. Total size = 921\n", + "10-Aug 21:16:16:DEBUG:root:Solution norm = 0.220339941648292\n", + "10-Aug 21:16:16:DEBUG:root:Starting iteration 3\n", + "10-Aug 21:16:16:DEBUG:root:Assembling\n", + "10-Aug 21:16:17:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 21:16:17:DEBUG:root:Added 27 Lagrange multipliers to model\n", + "10-Aug 21:16:17:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 21:16:17:DEBUG:root:Solving system of equations. Total size = 921\n", + "10-Aug 21:16:18:DEBUG:root:Solution norm = 31.956186974599095\n", + "10-Aug 21:16:18:DEBUG:root:Starting iteration 4\n", + "10-Aug 21:16:18:DEBUG:root:Assembling\n", + "10-Aug 21:16:19:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 21:16:19:DEBUG:root:Added 27 Lagrange multipliers to model\n", + "10-Aug 21:16:19:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 21:16:19:DEBUG:root:Solving system of equations. Total size = 921\n", + "10-Aug 21:16:19:DEBUG:root:Solution norm = 411.4719431105651\n", + "10-Aug 21:16:19:DEBUG:root:Starting iteration 5\n", + "10-Aug 21:16:19:DEBUG:root:Assembling\n", + "10-Aug 21:16:21:DEBUG:root:Adding Dirichlet boundary conditions\n", + "10-Aug 21:16:21:DEBUG:root:Added 27 Lagrange multipliers to model\n", + "10-Aug 21:16:21:DEBUG:root:Adding Neumann boundary conditions\n", + "10-Aug 21:16:21:DEBUG:root:Solving system of equations. Total size = 921\n", + "10-Aug 21:16:21:DEBUG:root:Solution norm = 7077.644216187514\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0 facts verified.\n" + ] + }, + { + "data": { + "text/plain": [ + "delayed_handler (generic function with 4 methods)" + ] + }, + "execution_count": 63, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "facts(\"solve 3d elasticity problem\") do\n", + "\n", + " attributes = Dict(\"Young\" => 90, \"Poisson\" => 0.25)\n", + "\n", + " Logging.debug(\"Creating elements\")\n", + " elements = Element[]\n", + " coordinates = zeros(3, 10)\n", + " for (elid, node_ids) in model[\"elements\"]\n", + " for (i, nid) in enumerate(node_ids)\n", + " coordinates[:,i] = model[\"nodes\"][nid]\n", + " end\n", + " el = Element(elid, node_ids, coordinates, attributes)\n", + " push!(elements, el)\n", + " end\n", + "\n", + " # create \"dofmap\" so that we know how to assemble global stiffness matrix\n", + " dofmap = create_ldof2gdofmap(elements; ndofs=3)\n", + "\n", + " # Boundary conditions\n", + "\n", + " # dirichlet bc, set dx=dy=dz for all nodes in set SUPPORT\n", + " bc_support = BC(Int64[], Float64[])\n", + " for nid in model[\"nsets\"][\"SUPPORT\"]\n", + " for i=1:3\n", + " push!(bc_support.dofs, dofmap[nid][i])\n", + " push!(bc_support.values, 0.0)\n", + " end\n", + " end\n", + "\n", + " # force boundary condition, put -1 to 2nd dof for each node in set LOAD\n", + " bc_load = BC(Int64[], Float64[])\n", + " for nid in model[\"nsets\"][\"LOAD\"]\n", + " push!(bc_load.dofs, dofmap[nid][2])\n", + " push!(bc_load.values, -0.1)\n", + " end\n", + "\n", + " #solve!(elements, [bc1], [bc2]; max_iterations=7)\n", + " neumann_bcs = [bc_load]\n", + " dirichlet_bcs = [bc_support]\n", + " # ndofs = dimension of unknown field in nodes\n", + " solve!(elements, dofmap, neumann_bcs, dirichlet_bcs; ndofs=3, max_iterations=5)\n", + "# disp = elements[1].attributes[\"displacement\"]\n", + "# Logging.debug(\"Displacement of element = \\n$disp\")\n", + "# @fact norm(disp) => roughly(3.1292483947150043)\n", "end" ] }, @@ -938,31 +1865,6 @@ "JuliaFEM.xdmf.xdmf_save_model(xdoc, \"/tmp/foo.xmf\")" ] }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAA5oAAAHhCAIAAACA7Vb3AAAgAElEQVR4Xu3dfaxteVkf8GefamxtjQHFEiiCgFNAcBheh5m5d15AUBRfqCIaVDIIWKqkI4oYLA4KAQShgKADDDPMDPNyQRBEyKi8pS1pmqaNbZqmjWnSpklbkzY1sa1G5+z+sfd62WvttX6/tc7Z5+zfOZ/PH961137Wb6+958r53uc8e63FcrkMAAAo00GqAAAA9pc4CwBAwcRZAAAKJs4CAFAwcRYAgIKJswAAFEycBQCgYOIsAAAFE2cBACiYOAsAQMHEWQAACibOAgBQMHEWAICCibMAABRMnAUAoGDiLAAABRNnAQAomDgLAEDBxFkAAAomzgIAUDBxFgCAgomzAAAUTJwFAKBg4iwAAAUTZwEAKJg4CwBAwcRZAAAKJs4CAFAwcRYAgIKJswAAFEycBQCgYOIsAAAFE2cBACiYOAsAQMHEWQAACibOAgBQMHEWAICCibMAABRMnAUAoGDiLAAABRNnAQAomDgLAEDBxFkAAAomzgIAUDBxFgCAgomzAAAUTJwFAKBg4iwAAAUTZwEAKJg4CwBAwcRZAAAKJs4CAFAwcRYAgIKJswAAFEycBQCgYOIsAAAFE2cBACiYOAsAQMHEWQAACibOAgBQMHEWAICCibMAABRMnAUAoGDiLAAABRNnAQAomDgLAEDBxFkAAAomzgIAUDBxFgCAgomzAAAUTJwFAKBg4iwAAAUTZwEAKJg4CwBAwcRZAAAKJs4CAFAwcRYAgIKJswAAFEycBQCgYOIsAAAFE2cBACiYOAsAQMHEWQAACibOAgBQMHEWAICCibMAABRMnA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ycBQCgYOIsAAAFE2cBACiYOAsAQMHEWQAACibOAgBQMHEWAICCibMAABRMnAUAoGDiLAAABRNnAQAomDgLAEDBxFkAAAomzgIAUDBxFgCAgomzAAAUTJwFAKBg4iwAAAUTZwEAKJg4CwBAwcRZAAAKJs4CAFAwcRYAgIKJswAAFEycBQCgYOIsAAAFE2cBACjY/weRifNSE6DioAAAAABJRU5ErkJggg==", - "text/plain": [ - "PyObject " - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "using PyCall\n", - "@pyimport IPython.display as d\n", - "d.Image(\"/tmp/displacement.png\")" - ] - }, { "cell_type": "markdown", "metadata": { @@ -972,82 +1874,6 @@ "## 3d beam with quadratic elements" ] }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "27-Jun 23:44:05:INFO:root:Registered handlers: Any[\"ELEMENT\",\"NODE\",\"NSET\"]\n", - "WARNING: beginswith is deprecated, use startswith instead.\n", - " in depwarn at /Applications/Julia-0.4.0-dev-539c818c4e.app/Contents/Resources/julia/lib/julia/sys.dylib\n", - " in beginswith at deprecated.jl:30\n", - " in parse_abaqus at /Users/jukka/.julia/v0.4/JuliaFEM/src/abaqus_reader.jl:113\n", - " in include_string at loading.jl:99\n", - " in execute_request_0x535c5df2 at /Users/jukka/.julia/v0.4/IJulia/src/execute_request.jl:157\n", - " in eventloop at /Users/jukka/.julia/v0.4/IJulia/src/IJulia.jl:123\n", - " in anonymous at task.jl:365\n", - "while loading In[4], in expression starting on line 2\n", - "WARNING: beginswith is deprecated, use startswith instead.\n", - " in depwarn at /Applications/Julia-0.4.0-dev-539c818c4e.app/Contents/Resources/julia/lib/julia/sys.dylib\n", - " in beginswith at deprecated.jl:30\n", - " in parse_abaqus at /Users/jukka/.julia/v0.4/JuliaFEM/src/abaqus_reader.jl:113\n", - " in include_string at loading.jl:99\n", - " in execute_request_0x535c5df2 at /Users/jukka/.julia/v0.4/IJulia/src/execute_request.jl:157\n", - " in eventloop at /Users/jukka/.julia/v0.4/IJulia/src/IJulia.jl:123\n", - " in anonymous at task.jl:365\n", - "while loading In[4], in expression starting on line 2\n", - "27-Jun 23:44:06:DEBUG:root:Found NODE section\n", - "27-Jun 23:44:07:DEBUG:root:Found ELEMENT section\n", - "WARNING: integer(s::AbstractString) is deprecated, use parse(Int,s) instead.\n", - " in depwarn at /Applications/Julia-0.4.0-dev-539c818c4e.app/Contents/Resources/julia/lib/julia/sys.dylib\n", - " in integer at deprecated.jl:49\n", - " in map at abstractarray.jl:1251\n", - " in parse_element_section at /Users/jukka/.julia/v0.4/JuliaFEM/src/abaqus_reader.jl:59\n", - " in process_section at /Users/jukka/.julia/v0.4/JuliaFEM/src/abaqus_reader.jl:108\n", - " in parse_abaqus at /Users/jukka/.julia/v0.4/JuliaFEM/src/abaqus_reader.jl:117\n", - " in include_string at loading.jl:99\n", - " in execute_request_0x535c5df2 at /Users/jukka/.julia/v0.4/IJulia/src/execute_request.jl:157\n", - " in eventloop at /Users/jukka/.julia/v0.4/IJulia/src/IJulia.jl:123\n", - " in anonymous at task.jl:365\n", - "while loading In[4], in expression starting on line 2\n", - "27-Jun 23:44:08:DEBUG:root:120 elements found\n", - "27-Jun 23:44:08:INFO:root:Creating ELSET Body1\n", - "27-Jun 23:44:08:DEBUG:root:Found NSET section\n", - "27-Jun 23:44:08:DEBUG:root:Creating node set SUPPORT\n", - "27-Jun 23:44:08:DEBUG:root:Found NSET section\n", - "27-Jun 23:44:08:DEBUG:root:Creating node set LOAD\n", - "27-Jun 23:44:08:DEBUG:root:Found NSET section\n", - "27-Jun 23:44:08:DEBUG:root:Creating node set TOP\n" - ] - }, - { - "data": { - "text/plain": [ - "Dict{Any,Any} with 4 entries:\n", - " \"nodes\" => Dict{Any,Any}(288=>[97.5,7.5,10.0],11=>[92.5,2.5,5.0],134=>[45.…\n", - " \"elements\" => Dict{Any,Any}(68=>[71,144,149,198,51,150,57,43,50,214],2=>[204,…\n", - " \"elsets\" => Dict{Any,Any}(\"Body1\"=>[1,2,3,4,5,6,7,8,9,10 … 111,112,113,11…\n", - " \"nsets\" => Dict{Any,Any}(\"LOAD\"=>[82,84,87,179,197,246,249,256,257],\"SUPPO…" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "fid = open(\"../geometry/3d_beam/palkki.inp\")\n", - "model = JuliaFEM.abaqus_reader.parse_abaqus(fid)\n", - "close(fid)\n", - "model" - ] - }, { "cell_type": "code", "execution_count": 5, @@ -1153,98 +1979,6 @@ "Shape functions and integration points" ] }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "dNtet (generic function with 1 method)" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "Ntet(xi) = [(xi[1] + xi[2] + xi[3] - 1)*(2*xi[1] + 2*xi[2] + 2*xi[3] - 1)\n", - " -xi[1]*(-2*xi[1] + 1)\n", - " -xi[2]*(-2*xi[2] + 1)\n", - " -xi[3]*(-2*xi[3] + 1)\n", - " 4*xi[1]*(-xi[1] - xi[2] - xi[3] + 1)\n", - " 4*xi[1]*xi[2]\n", - " 4*xi[2]*(-xi[1] - xi[2] - xi[3] + 1)\n", - " 4*xi[1]*xi[3]\n", - " 4*xi[2]*xi[3]\n", - " 4*xi[3]*(-xi[1] - xi[2] - xi[3] + 1)]\n", - "\n", - "dNtet(xi) = [\n", - " 4*xi[1] + 4*xi[2] + 4*xi[3] - 3 4*xi[1] + 4*xi[2] + 4*xi[3] - 3 4*xi[1] + 4*xi[2] + 4*xi[3] - 3\n", - " 4*xi[1] - 1 0 0\n", - " 0 4*xi[2] - 1 0\n", - " 0 0 4*xi[3] - 1\n", - "-8*xi[1] - 4*xi[2] - 4*xi[3] + 4 -4*xi[1] -4*xi[1]\n", - " 4*xi[2] 4*xi[1] 0\n", - " -4*xi[2] -4*xi[1] - 8*xi[2] - 4*xi[3] + 4 -4*xi[2]\n", - " 4*xi[3] 0 4*xi[1]\n", - " 0 4*xi[3] 4*xi[2]\n", - " -4*xi[3] -4*xi[3] -4*xi[1] - 4*xi[2] - 8*xi[3] + 4]" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "1" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "sum(Ntet([0, 1, 1]))" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "data": { - "text/plain": [ - "1x4 Array{Float64,2}:\n", - " 0.0416667 0.0416667 0.0416667 0.0416667" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# from code aster documentation\n", - "a = 1/20*(5-sqrt(5))\n", - "b = 1/20*(5+3*sqrt(5))\n", - "ipoints = [a a a; a a b; a b a; b a a]\n", - "iweights = 1/24*[1 1 1 1]" - ] - }, { "cell_type": "markdown", "metadata": {},