Files
JuliaFEM.jl/notebooks/2015-06-25-elasticity-solver-example.ipynb
T
2015-07-30 00:13:14 +03:00

2161 lines
102 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Solving elasticity problems using JuliaFEM\n",
"\n",
"Author(s): Jukka Aho\n",
"\n",
"**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": [
"*Design principle 1*: we introduce new ideas using Notebooks."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Design principle 2*: we use ``Logging``. Forget ``println``."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"Logger(root,DEBUG,Pipe(open, 0 bytes waiting),root)"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"using Logging\n",
"Logging.configure(level=DEBUG)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Design principle 3*: we write docstrings using [numpy style](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt).\n",
"\n",
"*Design principle 4*: we don't use greek characters in code which is implemented to JuliaFEM. In notebooks they are ok.\n",
"\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."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"calc_local_matrices! (generic function with 1 method)"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\"\"\"\n",
"Calculate local tangent stiffness matrix and residual force vector\n",
"R = T - F for elasticity problem.\n",
"\n",
"Parameters\n",
"----------\n",
"X : Element coordinates\n",
"u : Displacement field\n",
"R : Residual force vector\n",
"K : Tangent stiffness matrix\n",
"basis : Basis functions\n",
"dbasis : Derivative of basis functions\n",
"lambda : Material parameter\n",
"mu : Material parameter\n",
"ipoints : integration points\n",
"iweights : integration weights\n",
"\n",
"Returns\n",
"-------\n",
"None\n",
"\n",
"Notes\n",
"-----\n",
"If material parameters are given in list, they are interpolated to gauss\n",
"points using shape functions.\n",
"\n",
"Examples\n",
"--------\n",
"\n",
"\"\"\"\n",
"function calc_local_matrices!(X, u, R, K, basis, dbasis, lambda_, mu_, ipoints, iweights)\n",
" dim, nnodes = size(X)\n",
" I = eye(dim)\n",
" R[:,:] = 0.0\n",
" K[:,:] = 0.0\n",
"\n",
" dF = zeros(dim, dim)\n",
"\n",
" for m = 1:length(iweights)\n",
" w = iweights[m]\n",
" xi = ipoints[m, :]\n",
" # calculate material parameters\n",
" lambda = typeof(lambda_) == Float64 ? lambda_ : dot(lambda_, basis(xi))\n",
" mu = typeof(mu_) == Float64 ? mu_ : dot(mu_, basis(xi))\n",
" Jt = X*dbasis(xi)\n",
" detJ = det(Jt)\n",
" dbasisdX = dbasis(xi)*inv(Jt)\n",
"\n",
" gradu = u*dbasisdX\n",
" F = I + gradu # Deformation gradient\n",
" E = 1/2*(gradu' + gradu + gradu'*gradu) # Green-Lagrange strain tensor\n",
" S = lambda*trace(E)*I + 2*mu*E # PK2 stress tensor\n",
" P = F*S # PK1 stress tensor\n",
"\n",
" R[:,:] += w*P*dbasisdX'*detJ\n",
"\n",
" for p = 1:nnodes\n",
" for i = 1:dim\n",
" dF[:,:] = 0.0\n",
" dF[i,:] = dbasisdX[p,:]\n",
" dE = 1/2*(F'*dF + dF'*F)\n",
" dS = lambda*trace(dE)*I + 2*mu*dE\n",
" dP = dF*S + F*dS\n",
" for q = 1:nnodes\n",
" for j = 1:dim\n",
" K[dim*(p-1)+i,dim*(q-1)+j] += w*(dP[j,:]*dbasisdX[q,:]')[1]*detJ\n",
" end\n",
" end\n",
" end\n",
" end\n",
"\n",
" end\n",
"end"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"*Design principle 6*: we test our code. We use FactCheck for testing."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"using FactCheck"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"test solve one element model\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"29-Jul 23:12:24:DEBUG:root:Converged in 6 iterations.\n",
"29-Jul 23:12:24:DEBUG:root:solution vector: \n",
" [0.0 -0.39914506095474317 -0.07228582695592449 0.0\n",
" 0.0 -2.1779892317073504 -2.222244754401764 0.0]\n",
"29-Jul 23:12:24:DEBUG:root:norm of u: 3.1292483947150043\n",
"29-Jul 23:12:25:DEBUG:root:Converged in 6 iterations.\n",
"29-Jul 23:12:25:DEBUG:root:solution vector: \n",
" [0.0 0.7433248532717793 1.0485210147234858 0.0\n",
" 0.0 -2.085766534304891 -1.9606633242166027 0.0]\n",
"29-Jul 23:12:25:DEBUG:root:norm of u: 3.129248394715006\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2 facts verified.\n"
]
},
{
"data": {
"text/plain": [
"delayed_handler (generic function with 4 methods)"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"facts(\"test solve one element model\") do\n",
" X = [0.0 0.0; 10.0 0.0; 10.0 1.0; 0.0 1.0]'\n",
" F = [0 0; 0 0; 0 -2; 0 0]'\n",
"\n",
" # Material properties\n",
" E = 90\n",
" nu = 0.25\n",
" mu = E/(2*(1+nu))\n",
" la = E*nu/((1+nu)*(1-2*nu))\n",
" la = 2*la*mu/(la + 2*mu)\n",
"\n",
" u = zeros(2, 4)\n",
" du = zeros(2, 4)\n",
" R = zeros(2, 4)\n",
" K = zeros(8, 8)\n",
"\n",
" basis(xi) = [\n",
" (1-xi[1])*(1-xi[2])/4\n",
" (1+xi[1])*(1-xi[2])/4\n",
" (1+xi[1])*(1+xi[2])/4\n",
" (1-xi[1])*(1+xi[2])/4]\n",
"\n",
" dbasis(xi) = [-(1-xi[2])/4.0 -(1-xi[1])/4.0\n",
" (1-xi[2])/4.0 -(1+xi[1])/4.0\n",
" (1+xi[2])/4.0 (1+xi[1])/4.0\n",
" -(1+xi[2])/4.0 (1-xi[1])/4.0]\n",
"\n",
" ipoints = 1/sqrt(3)*[-1 -1; 1 -1; 1 1; -1 1]\n",
" iweights = [1, 1, 1, 1]\n",
" free_dofs = [3, 4, 5, 6]\n",
"\n",
" for i=1:10\n",
" calc_local_matrices!(X, u, R, K, basis, dbasis, la, mu, ipoints, iweights)\n",
" du[free_dofs] = K[free_dofs, free_dofs] \\ -(R - F)[free_dofs]\n",
" u += du\n",
" if norm(du) < 1.0e-9\n",
" Logging.debug(\"Converged in $i iterations.\")\n",
" break\n",
" end\n",
" end\n",
"\n",
" # Tested against Elmer solution\n",
" Logging.debug(\"solution vector: \\n $u\")\n",
" @fact u[2, 3] => roughly(-2.222244754401764)\n",
" norm1 = norm(u)\n",
" Logging.debug(\"norm of u: $(norm(u))\")\n",
"\n",
" # We rotate model a bit and make sure that L2 norm is same\n",
" phi = 30/180*pi\n",
" rmat = [\n",
" cos(phi) -sin(phi)\n",
" sin(phi) cos(phi)]\n",
" X = rmat*X\n",
" F = rmat*F\n",
" u = zeros(2, 4)\n",
" for i=1:10\n",
" calc_local_matrices!(X, u, R, K, basis, dbasis, la, mu, ipoints, iweights)\n",
" du[free_dofs] = K[free_dofs, free_dofs] \\ -(R - F)[free_dofs]\n",
" u += du\n",
" if norm(du) < 1.0e-9\n",
" Logging.debug(\"Converged in $i iterations.\")\n",
" break\n",
" end\n",
" end\n",
" Logging.debug(\"solution vector: \\n $u\")\n",
" Logging.debug(\"norm of u: $(norm(u))\")\n",
" @fact norm(u) => roughly(norm1) \n",
"end"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"One element solutions are not particularly interesting so next step is to create function that assembles global matrix from local matrices. Some data types:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"type Node\n",
" id :: Int\n",
" elements :: Array{Int64, 1}\n",
"end"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"type Element\n",
" id :: Int\n",
" nodes :: Array{Int64, 1}\n",
" coordinates :: Array{Float64, 2}\n",
" attributes :: Dict{ASCIIString, Any}\n",
"end"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"type Assembly\n",
" # LHS\n",
" I :: Array{Int64, 1}\n",
" J :: Array{Int64, 1}\n",
" A :: Array{Float64, 1}\n",
" # RHS\n",
" i :: Array{Int64, 1}\n",
" b :: Array{Float64, 1}\n",
" # global dofs for each element\n",
" gdofs :: Dict{Int64, Array{Int64, 1}}\n",
"end"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"get_shape_functions (generic function with 1 method)"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\"\"\"\n",
"Return shape functions and their derivatives for a element.\n",
"\n",
"Parameters\n",
"----------\n",
"element::Element\n",
"\n",
"Returns\n",
"-------\n",
"tuple (basis, dbasis)\n",
"\"\"\"\n",
"function get_shape_functions(el::Element)\n",
" ndim, nnodes = size(el.coordinates)\n",
" if (nnodes == 4) & (ndim == 2)\n",
" basis(xi) = [\n",
" (1-xi[1])*(1-xi[2])/4\n",
" (1+xi[1])*(1-xi[2])/4\n",
" (1+xi[1])*(1+xi[2])/4\n",
" (1-xi[1])*(1+xi[2])/4]\n",
" dbasis(xi) = [-(1-xi[2])/4.0 -(1-xi[1])/4.0\n",
" (1-xi[2])/4.0 -(1+xi[1])/4.0\n",
" (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",
" end\n",
" throw(\"Unknown function space\")\n",
"end"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"get_integration_scheme (generic function with 2 methods)"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\"\"\"\n",
"\"\"\"\n",
"function get_integration_scheme(el::Element, order=2)\n",
" ndim, nnodes = size(el.coordinates)\n",
" if (nnodes == 4) & (order == 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",
" end\n",
"end"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"assemble_element! (generic function with 2 methods)"
]
},
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"function assemble_element!(ass::Assembly, el::Element, io=2)\n",
"\n",
" # Material properties\n",
" E = el.attributes[\"Young\"]\n",
" nu = el.attributes[\"Poisson\"]\n",
" mu = E/(2*(1+nu))\n",
" la = E*nu/((1+nu)*(1-2*nu))\n",
" la = 2*la*mu/(la + 2*mu)\n",
"\n",
" dofs = prod(size(el.coordinates))\n",
" X = el.coordinates\n",
" u = el.attributes[\"displacement\"]\n",
" R = el.attributes[\"displacement nodal force\"]\n",
" K = el.attributes[\"displacement tangent stiffness\"]\n",
"\n",
" gdofs = ass.gdofs[el.id]\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",
"\n",
" for i=1:dofs\n",
" for j=1:dofs\n",
" push!(ass.I, gdofs[i])\n",
" push!(ass.J, gdofs[j])\n",
" push!(ass.A, K[i,j])\n",
" end\n",
" push!(ass.i, gdofs[i])\n",
" push!(ass.b, R[i])\n",
" end\n",
"end"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Time to test again. From last test we know that correct solution is\n",
"\n",
" [0.0 -0.39914506095474317 -0.07228582695592449 0.0\n",
" 0.0 -2.1779892317073504 -2.222244754401764 0.0]\n",
"\n",
"This time we assemble global stiffness matrix in different order, 2 3 4 1"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"one element assembly\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"30-Jul 00:08:18:DEBUG:root:Creating nodes\n",
"30-Jul 00:08:18:DEBUG:root:Creating elements\n",
"30-Jul 00:08:18:DEBUG:root:Starting iteration 1\n",
"30-Jul 00:08:18:DEBUG:root:Assembling\n",
"30-Jul 00:08:18:DEBUG:root:Solving\n",
"30-Jul 00:08:18:DEBUG:root:Solution norm = 3.0814821107320176\n",
"30-Jul 00:08:18:DEBUG:root:Starting iteration 2\n",
"30-Jul 00:08:18:DEBUG:root:Assembling\n",
"30-Jul 00:08:18:DEBUG:root:Solving\n",
"30-Jul 00:08:18:DEBUG:root:Solution norm = 0.32007464366194766\n",
"30-Jul 00:08:18:DEBUG:root:Starting iteration 3\n",
"30-Jul 00:08:18:DEBUG:root:Assembling\n",
"30-Jul 00:08:18:DEBUG:root:Solving\n",
"30-Jul 00:08:18:DEBUG:root:Solution norm = 0.040279810888447135\n",
"30-Jul 00:08:18:DEBUG:root:Starting iteration 4\n",
"30-Jul 00:08:18:DEBUG:root:Assembling\n",
"30-Jul 00:08:18:DEBUG:root:Solving\n",
"30-Jul 00:08:18:DEBUG:root:Solution norm = 0.000925649536063315\n",
"30-Jul 00:08:18:DEBUG:root:Starting iteration 5\n",
"30-Jul 00:08:18:DEBUG:root:Assembling\n",
"30-Jul 00:08:18:DEBUG:root:Solving\n",
"30-Jul 00:08:18:DEBUG:root:Solution norm = 1.5582555024825817e-7\n",
"30-Jul 00:08:18:DEBUG:root:Starting iteration 6\n",
"30-Jul 00:08:18:DEBUG:root:Assembling\n",
"30-Jul 00:08:18:DEBUG:root:Solving\n",
"30-Jul 00:08:18:DEBUG:root:Solution norm = 1.0317166868587156e-14\n",
"30-Jul 00:08:18:DEBUG:root:Converged in 6 iterations.\n",
"30-Jul 00:08:18:DEBUG:root:Displacement of element = \n",
"[-0.39914506095474334 -0.07228582695592464 0.0 0.0\n",
" -2.1779892317073504 -2.222244754401764 0.0 0.0]\n"
]
},
{
"data": {
"text/plain": [
"delayed_handler (generic function with 4 methods)"
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"1 fact verified.\n"
]
}
],
"source": [
"facts(\"one element assembly\") do\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",
" coordinates = [10.0 0.0; 10.0 1.0; 0.0 1.0; 0.0 0.0]'\n",
" attributes = Dict(\n",
" \"Young\" => 90, \"Poisson\" => 0.25,\n",
" \"displacement\" => zeros(2, 4),\n",
" \"displacement nodal force\" => zeros(2, 4),\n",
" \"displacement tangent stiffness\" => zeros(8, 8))\n",
" Logging.debug(\"Creating elements\")\n",
" el = Element(1, nodes, coordinates, attributes)\n",
" for i=1:10\n",
" Logging.debug(\"Starting iteration $i\")\n",
" ass = Assembly(Int64[], Int64[], Float64[], Int64[], Float64[], Dict{Int64,Array{Int64,1}}())\n",
" ass.gdofs[el.id] = [1, 2, 3, 4, 5, 6, 7, 8]\n",
" Logging.debug(\"Assembling\")\n",
" assemble_element!(ass, el)\n",
" Logging.debug(\"Solving\")\n",
" du = zeros(2, 4) # must be determined from ass\n",
" F = [0 0; 0 -2; 0 0; 0 0]'\n",
" free_dofs = [1, 2, 3, 4]\n",
"\n",
" # solution\n",
" K = sparse(ass.I, ass.J, ass.A)\n",
" R = full(sparsevec(ass.i, ass.b))\n",
" R = reshape(R, (2, round(Int, length(R)/2)))\n",
" du[free_dofs] = K[free_dofs, free_dofs] \\ -(R - F)[free_dofs]\n",
"\n",
" Logging.debug(\"Solution norm = $(norm(du))\")\n",
" #Logging.debug(\"Solution increment = \\n$du\")\n",
"\n",
" # update solution back to elements\n",
" eldu = du[ass.gdofs[el.id]]\n",
" eldu = reshape(eldu, (2, round(Int, length(eldu)/2)))\n",
" el.attributes[\"displacement\"] += eldu\n",
" if norm(du) < 1.0e-9\n",
" Logging.debug(\"Converged in $i iterations.\")\n",
" break\n",
" end\n",
" end\n",
" disp = el.attributes[\"displacement\"]\n",
" Logging.debug(\"Displacement of element = \\n$disp\")\n",
" @fact norm(disp) => roughly(3.1292483947150043)\n",
"end"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Seems to be working. But we still need to handle boundary conditions more \"cleverly\" and generalize assembly to several elements (which is not problem)."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Converged\n"
]
},
{
"data": {
"text/plain": [
"2x4 Array{Float64,2}:\n",
" 0.0 -0.399145 -0.0722858 0.0\n",
" 0.0 -2.17799 -2.22224 0.0"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#(X, u, du, elmap, nodalloads, dirichletbc,\n",
"# la, mu, N, dNdξ, ipoints, iweights) = one_elem_fixture()\n",
"function solve_one_element()\n",
"\n",
" # create nodes separately ...\n",
"\n",
" # .. or create somewhat simpler syntax\n",
" # nodes = Dict(1 => [0.0, 0.0], 2 => [10.0, 0.0], 3 => [10.0, 1.0], 4 => [0.0, 1.0])\n",
" # add_nodes(m, \"NALL\", nodes)\n",
"\n",
" # create element (hard way)\n",
" e = new_element()\n",
" set_element_id(1)\n",
" set_node_ids(e, [1, 2, 3, 4])\n",
"\n",
" # we can set function spaces and integration schema for element-wise ...\n",
" set_function_space(e, \"Lagrange(1)\") # use linear Lagrange function space to approximate unknown field\n",
" set_integration_schema(e, \"FPG4\") # use four integration points\n",
" # or for model as a \"default value\"\n",
" # set_function_space(m, \"Lagrange\", 1)\n",
" # set_integration_schema(m, \"FPG4\")\n",
"\n",
" # set necessary material parameters\n",
" E = 90\n",
" nu = 0.25\n",
" mu = E/(2*(1+nu))\n",
" la = E*nu/((1+nu)*(1-2*nu))\n",
" la = 2*la*mu/(la + 2*mu)\n",
"\n",
" # we can add attribute for each element node ...\n",
" #add_attribute(e, \"lambda\", [la, la, la, la])\n",
" #add_attribute(e, \"mu\", [mu, mu, mu, mu])\n",
" # or just one for each element ...\n",
" add_attribute(e, \"lambda\", lambda)\n",
" add_attribute(e, \"mu\", mu)\n",
" # .. or just for model as a default value\n",
" # add_attribute(m, \"lambda\", lambda)\n",
" # add_attribute(m, \"mu\", mu)\n",
" # note that we don't assign attributes to nodes here so we can describe discontinous fields\n",
" # in attributes\n",
"\n",
" # or we can use convenient syntax\n",
" # e = new_element(element_id=1, node_ids=[1, 2, 3, 4], function_space=\"Lagrange(1)\",\n",
" # integration_schema=\"FPG4\", attributes=Dict(\"lambda\" => lambda, \"mu\" => mu))\n",
"\n",
" elements = [e]\n",
" add_elements(m, \"EALL\", elements)\n",
"\n",
" # boundary conditions are always assignet to sets\n",
"\n",
" # element boundary conditions\n",
" \n",
" # add load for element surface S1 in normal-tangential coordinate system\n",
" # add_attribute(e, \"displacement S1 normal load\", 1)\n",
" # add load for element surface S1 from -1 to -2\n",
" # add_attribute(e, \"displacement S1 load\", [-1, -2])\n",
"\n",
" # nodal boundary conditions\n",
" # add neumann boundary condition to node 3, in y direction\n",
" add_attribute(n3, \"displacement 2 load\", -2)\n",
" # add dirichlet boundary condition to nodes 1 and 2 (encastre)\n",
" add_attribute(n1, \"displacement\", [0.0, 0.0])\n",
" # or\n",
" # add_attribute(n1, \"displacement 1\", 0.0)\n",
" # add_attribute(n1, \"displacement 2\", 0.0)\n",
" add_attribute(n2, \"displacement\", [0.0, 0.0])\n",
" # or, for example, add dirichlet boundary conditions in directions 1 and 3 for node\n",
" #add_attribute(n2, \"displacement 1,3\", [0.0, 1.0])\n",
" # or fix all dofs of a nodes in nodeset \"SUPPORT\"\n",
" # support_bc = add_nodeset(m, \"SUPPORT\", [n1, n2])\n",
" # add_attribute(support_bc, \"displacement\", 0)\n",
"\n",
"\n",
"\n",
" # Everything is very general so far. Datamodel is well defined and in this point\n",
" # we can save or load it to disk\n",
"\n",
" # save_model(m, \"mymodel\") # save model to xml/h5 (Xdmf)\n",
" # m = load_model(\"mymodel\") # load model from file\n",
"\n",
" \n",
" # END OF MODEL DEFINITON\n",
" \n",
" # Now we kick in elasticity iterations and solve displacement\n",
" # field but of course it could be something else too\n",
"\n",
"\n",
" # m1, m2 = make_domain_decomposition(parts=2, keep_in_one_domain=[\"CONTACT_BOUNDARY\"])\n",
"\n",
"\n",
" \n",
" # In newton iteration, there might be situations where we just want to update RHS\n",
" # like in radiation problems, it makes no sense to update stiffness matrix in that\n",
" # case. For this reason local element matrix and force vector can be updated both\n",
" # or just one of them. This time we don't have anything nonlinear in RHS so we can\n",
" # calculate it outside of iteration loop\n",
" p = new_problem(\"displacement\")\n",
" \n",
" RHS = zeros(length(nodes)*dofs)\n",
" \n",
" for i=1:10\n",
" \n",
" solve_elasticity_increment!(X, u, du, elmap, nodalloads, dirichletbc,\n",
" la, mu, N, dNdξ, ipoints, iweights)\n",
" u += du\n",
" if norm(du) < 1.0e-9\n",
" println(\"Converged\")\n",
" break\n",
" end\n",
" end\n",
" return u\n",
"end\n",
"\n",
"u"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"\"\"\"\n",
"#### Parameters\n",
"X : Array{Float64, 2}\n",
" \n",
"\"\"\"\n",
"function solve_elasticity_increment!(X, u, du, elmap, nodalloads,\n",
" dirichletbc, lambda, mu, N, dNdchi, ipoints,\n",
" iweights)\n",
" if length(size(elmap)) == 1\n",
" # quick hack for just one element\n",
" elmap = elmap''\n",
" end\n",
" nelnodes, nelements = size(elmap)\n",
" dim, nnodes = size(u)\n",
" dofs = dim*nelnodes\n",
"\n",
" Imat = Int64[]\n",
" Jmat = Int64[]\n",
" Vmat = Float64[]\n",
" Ivec = Int64[]\n",
" Vvec = Float64[]\n",
"\n",
" # FIXME: different number of nodes/element\n",
" R = zeros(dim, nelnodes)\n",
" Kt = zeros(dofs, dofs)\n",
"\n",
" # this can be parallelized\n",
" for i in 1:nelements\n",
" eldofs = elmap[:,i]\n",
" calc_local_matrices!(X[:, eldofs], u[:, eldofs], R, Kt, N, dNdchi,\n",
" lambda[eldofs], mu[eldofs], ipoints, iweights)\n",
" assemble!(Kt, eldofs, Imat, Jmat, Vmat)\n",
" assemble!(R, eldofs, Ivec, Vvec)\n",
" end\n",
"\n",
" # add additional neumann boundary conditions to force vector\n",
" for (i, nodal_load) in enumerate(nodalloads)\n",
" if nodal_load == 0\n",
" continue\n",
" end\n",
" push!(Ivec, i)\n",
" push!(Vvec, -nodal_load)\n",
" end\n",
"\n",
" # Create sparse matrix and vector\n",
" A = sparse(Imat, Jmat, Vmat)\n",
" b = sparsevec(Ivec, Vvec)\n",
"\n",
" # Remove dirichlet boundary conditions\n",
" free_dofs = find(isnan(dirichletbc))\n",
" #Imat, Jmat, Vmat = eliminate_boundary_conditions(dirichletbc, Imat, Jmat, Vmat)\n",
" b = b[free_dofs]\n",
" A = A[free_dofs, free_dofs]\n",
"\n",
" # solution\n",
" du[free_dofs] = lufact(A) \\ -full(b)\n",
"end\n",
"\n",
"function one_elem_fixture()\n",
" X = [0.0 0.0; 10.0 0.0; 10.0 1.0; 0.0 1.0]'\n",
" elmap = [1; 2; 3; 4]\n",
" nodalloads = [0 0; 0 0; 0 -2; 0 0]'\n",
" dirichletbc = [0 0; NaN NaN; NaN NaN; 0 0]'\n",
"\n",
" E = 90\n",
" nu = 0.25\n",
" mu = E/(2*(1+nu))\n",
" la = E*nu/((1+nu)*(1-2*nu))\n",
" la = 2*la*mu/(la + 2*mu)\n",
"\n",
" la = la*ones(1, 4)\n",
" mu = mu*ones(1, 4)\n",
" u = zeros(2, 4)\n",
" du = zeros(2, 4)\n",
"\n",
" N(xi) = [\n",
" (1-xi[1])*(1-xi[2])/4\n",
" (1+xi[1])*(1-xi[2])/4\n",
" (1+xi[1])*(1+xi[2])/4\n",
" (1-xi[1])*(1+xi[2])/4\n",
" ]\n",
"\n",
" dNdξ(ξ) = [-(1-ξ[2])/4.0 -(1-ξ[1])/4.0\n",
" (1-ξ[2])/4.0 -(1+ξ[1])/4.0\n",
" (1+ξ[2])/4.0 (1+ξ[1])/4.0\n",
" -(1+ξ[2])/4.0 (1-ξ[1])/4.0]\n",
"\n",
" ipoints = 1/sqrt(3)*[-1 -1; 1 -1; 1 1; -1 1]\n",
" iweights = [1 1 1 1]\n",
"\n",
" return (X, u, du, elmap, nodalloads, dirichletbc,\n",
" la, mu, N, dNdξ, ipoints, iweights)\n",
"end"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"u3d = [u; 0 0 0 0] # extend to 3d vector field\n",
"X3d = [X; 0 0 0 0]\n",
"elmap2 = [0x5; elmap]'';"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
"<Xdmf xmlns:xi=\"http://www.w3.org/2001/XInclude\" Version=\"2.1\">\n",
" <Domain>\n",
" <Grid CollectionType=\"Temporal\" GridType=\"Collection\" Name=\"Collection\">\n",
" <Geometry Type=\"None\"/>\n",
" <Topology Dimensions=\"0\" Type=\"NoTopology\"/>\n",
" <Grid Name=\"Grid\">\n",
" <Time Value=\"0\"/>\n",
" <Geometry Type=\"XYZ\">\n",
" <DataItem DataType=\"Float\" Dimensions=\"12\" Format=\"XML\" Precision=\"4\">0.0 0.0 0.0 10.0 0.0 0.0 10.0 1.0 0.0 0.0 1.0 0.0</DataItem>\n",
" </Geometry>\n",
" <Topology Dimensions=\"1\" Type=\"Mixed\">\n",
" <DataItem DataType=\"Int\" Dimensions=\"5\" Format=\"XML\" Precision=\"4\">5 0 1 2 3</DataItem>\n",
" </Topology>\n",
" <Attribute Center=\"Node\" Name=\"Displacement\" Type=\"Vector\">\n",
" <DataItem DataType=\"Float\" Dimensions=\"12\" Format=\"XML\" Precision=\"4\">0.0 0.0 0.0 -0.3991450609547433 -2.17798923170735 0.0 -0.07228582695592455 -2.222244754401764 0.0 0.0 0.0 0.0</DataItem>\n",
" </Attribute>\n",
" </Grid>\n",
" </Grid>\n",
" </Domain>\n",
"</Xdmf>\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING: int(x) is deprecated, use Int(x) instead.\n"
]
},
{
"data": {
"text/plain": [
"1015"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
" in depwarn at /Applications/Julia-0.4.0-dev-539c818c4e.app/Contents/Resources/julia/lib/julia/sys.dylib\n",
" in int at deprecated.jl:49\n",
" in save_file at /Users/jukka/.julia/v0.4/LightXML/src/document.jl:108\n",
" in xdmf_save_model at /Users/jukka/.julia/v0.4/JuliaFEM/src/xdmf.jl:106\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 7\n"
]
}
],
"source": [
"xdoc, model = JuliaFEM.xdmf.xdmf_new_model()\n",
"temporal_collection = JuliaFEM.xdmf.xdmf_new_temporal_collection(model)\n",
"grid = JuliaFEM.xdmf.xdmf_new_grid(temporal_collection; time=0)\n",
"JuliaFEM.xdmf.xdmf_new_mesh(grid, X3d, elmap2)\n",
"JuliaFEM.xdmf.xdmf_new_field(grid, \"Displacement\", \"nodes\", u3d)\n",
"print(xdoc)\n",
"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+958r53uc8e63FcrkMAAAo00GqAAAA9pc4CwBAwcRZAAAKJs4CAFAwcRYAgIKJswAAFEycBQCgYOIsAAAFE2cBACiYOAsAQMHEWQAACibOAgBQMHEWAICCibMAABRMnAUAoGDiLAAABRNnAQAomDgLAEDBxFkAAAomzgIAUDBxFgCAgomzAAAUTJwFAKBg4iwAAAUTZwEAKJg4CwBAwcRZAAAKJs4CAFAwcRYAgIKJswAAFEycBQCgYOIsAAAFE2cBACiYOAsAQMHEWQAACibOAgBQMHEWAICCibMAABRMnAUAoGDiLAAABRNnAQAomDgLAEDBxFkAAAomzgIAUDBxFgCAgomzAAAUTJwFAKBg4iwAAAUTZwEAKJg4CwBAwcRZAAAKJs4CAFAwcRYAgIKJswAAFEycBQCgYOIsAAAFE2cBACiYOAsAQMHEWQAACibOAgBQMHEWAICCibMAABRMnAUAoGDiLAAABRNnAQAomDgLAEDBxFkAAAomzgIAUDBxFgCAgomzAAAUTJwFAKBg4iwAAAUTZwEAKJg4CwBAwcRZAAAKJs4CAFAwcRYAgIKJswAAFEycBQCgYOIsAAAFE2cBACiYOAsAQMHEWQAACibOAgBQMHEWAICCibMAABRMnAUAoGDiLAAABRNnAQAomDgLAEDBxFkAAAomzgIAUDBxFgC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AICCibMAABRMnAUAoGDiLAAABRNnAQAomDgLAEDBxFkAAAomzgIAUDBxFgCAgomzAAAUTJwFAKBg4iwAAAUTZwEAKJg4CwBAwcRZAAAKJs4CAFAwcRYAgIKJswAAFEycBQCgYOIsAAAFE2cBACjY/weRifNSE6DioAAAAABJRU5ErkJggg==",
"text/plain": [
"PyObject <IPython.core.display.Image object>"
]
},
"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": {
"collapsed": true
},
"source": [
"## 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,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"10x120 Array{Int64,2}:\n",
" 243 204 259 145 96 96 236 285 … 217 69 154 179 203 96 259\n",
" 240 199 70 175 88 101 88 179 216 144 114 91 204 267 199\n",
" 191 175 69 199 236 164 285 178 278 78 278 178 259 95 204\n",
" 117 130 130 130 178 97 178 83 155 71 218 83 199 97 130\n",
" 245 207 265 177 141 102 290 12 219 146 20 181 206 268 39\n",
" 242 208 72 208 290 171 289 182 … 282 152 280 180 263 272 207\n",
" 244 209 5 202 291 9 287 11 33 79 32 182 262 98 263\n",
" 1 3 6 174 7 99 237 13 224 74 223 14 205 99 6\n",
" 2 4 132 176 8 103 8 14 225 51 284 93 207 24 4\n",
" 196 176 134 4 237 10 11 15 17 80 283 15 39 100 3"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"nnodes = length(model[\"nodes\"])\n",
"nelements = length(model[\"elements\"])\n",
"dim = 3\n",
"E = 90\n",
"nu = 0.25\n",
"mu = E/(2*(1+nu))\n",
"la = E*nu/((1+nu)*(1-2*nu))\n",
"\n",
"X = zeros(dim, nnodes)\n",
"u = zeros(dim, nnodes)\n",
"du = zeros(dim, nnodes)\n",
"elmap = zeros(Int, 10, nelements)\n",
"nodalloads = zeros(3, nnodes)\n",
"dirichletbc = NaN*ones(3, nnodes)\n",
"la = la*ones(1, nnodes)\n",
"mu = mu*ones(1, nnodes)\n",
"\n",
"# calculate permutation which maps node ids to matrix indices\n",
"perm = Dict()\n",
"for (j, k) in enumerate(keys(model[\"nodes\"]))\n",
" perm[k] = j\n",
"end\n",
"\n",
"for j=1:nnodes\n",
" #X[:,j] = model[\"nodes\"][perm[j]]\n",
" X[:,j] = model[\"nodes\"][j]\n",
"end\n",
"\n",
"for (j, k) in enumerate(keys(model[\"elements\"]))\n",
" #node_ids = model[\"elements\"][j]\n",
" elmap[:,j] = model[\"elements\"][j]\n",
" #for l=1:10\n",
" # elmap[l, j] = perm[node_ids[l]]\n",
" #end\n",
"end\n",
"\n",
"elmap"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"3x298 Array{Float64,2}:\n",
" NaN NaN NaN NaN NaN NaN NaN NaN … NaN NaN NaN NaN NaN NaN NaN\n",
" NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN\n",
" NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Handle dirichlet boundaries on SUPPORT\n",
"for j in model[\"nsets\"][\"SUPPORT\"]\n",
" #dirichletbc[perm[j]] = 0.0\n",
" dirichletbc[j] = 0.0\n",
"end\n",
"dirichletbc"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"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": {},
"source": [
"Add point force to LOAD nodeset"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"9-element Array{Int64,1}:\n",
" 82\n",
" 84\n",
" 87\n",
" 179\n",
" 197\n",
" 246\n",
" 249\n",
" 256\n",
" 257"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"model[\"nsets\"][\"LOAD\"]"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[100.0,10.0,0.0]\n"
]
}
],
"source": [
"#nodalloads[3, perm[82]] = -0.06\n",
"nodalloads[3, 82] = -50.0\n",
"println(model[\"nodes\"][82])"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"iteration 1, norm = 93.13879357262775\n",
"iteration 2, norm = 14.241640589907869\n",
"iteration 3, norm = 2.3999534862146534\n",
"iteration 4, norm = 0.8191634532858331\n",
"iteration 5, norm = 0.08574651168344295\n",
"iteration 6, norm = 0.00032306479346201524\n",
"iteration 7, norm = 8.052462405199464e-9\n",
"iteration 8, norm = 3.0878906643174355e-14\n"
]
},
{
"data": {
"text/plain": [
"3x298 Array{Float64,2}:\n",
" -0.0479657 -0.0483971 -0.0497284 … -0.0155295 -0.0150513 -0.0462958\n",
" -0.474054 -0.418817 -0.254176 -0.229641 -0.283098 -0.694379 \n",
" 0.232677 0.198051 0.0948355 0.128246 0.162511 0.371043 "
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Converged\n"
]
}
],
"source": [
"u = zeros(dim, nnodes)\n",
"du = zeros(dim, nnodes)\n",
"\n",
"for i=1:10\n",
" JuliaFEM.elasticity_solver.solve_elasticity_increment!(X, u, du, elmap, nodalloads, dirichletbc,\n",
" la, mu, Ntet, dNtet, ipoints, iweights)\n",
" u += du\n",
" println(\"iteration $i, norm = $(norm(du))\")\n",
" if norm(du) < 1.0e-9\n",
" println(\"Converged\")\n",
" break\n",
" end\n",
"end\n",
"u"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"15.449170689704438"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"maximum(abs(u))"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"(10,120)"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"size(elmap)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"120"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"nelements"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"11x120 Array{Int64,2}:\n",
" 38 38 38 38 38 38 38 38 … 38 38 38 38 38 38 38\n",
" 243 204 259 145 96 96 236 285 217 69 154 179 203 96 259\n",
" 240 199 70 175 88 101 88 179 216 144 114 91 204 267 199\n",
" 191 175 69 199 236 164 285 178 278 78 278 178 259 95 204\n",
" 117 130 130 130 178 97 178 83 155 71 218 83 199 97 130\n",
" 245 207 265 177 141 102 290 12 … 219 146 20 181 206 268 39\n",
" 242 208 72 208 290 171 289 182 282 152 280 180 263 272 207\n",
" 244 209 5 202 291 9 287 11 33 79 32 182 262 98 263\n",
" 1 3 6 174 7 99 237 13 224 74 223 14 205 99 6\n",
" 2 4 132 176 8 103 8 14 225 51 284 93 207 24 4\n",
" 196 176 134 4 237 10 11 15 … 17 80 283 15 39 100 3"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"elcodes = 0x0026*ones(Int, nelements)\n",
"elmap2 = [elcodes'\n",
" elmap]"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING: int(x) is deprecated, use Int(x) instead.\n"
]
},
{
"data": {
"text/plain": [
"9568"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
" in depwarn at /Applications/Julia-0.4.0-dev-539c818c4e.app/Contents/Resources/julia/lib/julia/sys.dylib\n",
" in int at deprecated.jl:49\n",
" in save_file at /Users/jukka/.julia/v0.4/LightXML/src/document.jl:108\n",
" in xdmf_save_model at /Users/jukka/.julia/v0.4/JuliaFEM/src/xdmf.jl:140\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[17], in expression starting on line 7\n"
]
}
],
"source": [
"xdoc, xmodel = JuliaFEM.xdmf.xdmf_new_model()\n",
"temporal_collection = JuliaFEM.xdmf.xdmf_new_temporal_collection(xmodel)\n",
"grid = JuliaFEM.xdmf.xdmf_new_grid(temporal_collection; time=0)\n",
"JuliaFEM.xdmf.xdmf_new_mesh(grid, X, elmap2)\n",
"#JuliaFEM.xdmf.xdmf_new_field(grid, \"Displacement\", \"nodes\", u)\n",
"#print(xdoc)\n",
"JuliaFEM.xdmf.xdmf_save_model(xdoc, \"/tmp/foo3d2.xmf\")"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"10x2 Array{Int64,2}:\n",
" 243 145\n",
" 240 199\n",
" 191 69\n",
" 117 130\n",
" 245 202\n",
" 242 47\n",
" 244 148\n",
" 1 174\n",
" 2 4\n",
" 196 134"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"elmap[:,[1, 101]]"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"3x10 Array{Float64,2}:\n",
" 20.0 30.0 20.0 20.0 25.0 25.0 20.0 20.0 25.0 20.0\n",
" 0.0 0.0 0.0 10.0 0.0 0.0 0.0 5.0 5.0 5.0\n",
" 10.0 10.0 0.0 0.0 10.0 5.0 5.0 5.0 5.0 0.0"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tmp = elmap[:,[1]]\n",
"tmp = reshape(tmp, length(tmp))\n",
"X[:, tmp]"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"11x1 Array{Int64,2}:\n",
" 38\n",
" 1\n",
" 2\n",
" 3\n",
" 4\n",
" 5\n",
" 6\n",
" 7\n",
" 8\n",
" 9\n",
" 10"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#tmpelmap = [38 1 2 3 4 5 6 7 8 9 10; 38 11 12 13 14 15 16 17 18 19 20]'\n",
"tmpelmap = [38 1 2 3 4 5 6 7 8 9 10]'"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
"<Xdmf xmlns:xi=\"http://www.w3.org/2001/XInclude\" Version=\"2.1\">\n",
" <Domain>\n",
" <Grid CollectionType=\"Temporal\" GridType=\"Collection\" Name=\"Collection\">\n",
" <Geometry Type=\"None\"/>\n",
" <Topology Dimensions=\"0\" Type=\"NoTopology\"/>\n",
" <Grid Name=\"Grid\">\n",
" <Time Value=\"0\"/>\n",
" <Geometry Type=\"XYZ\">\n",
" <DataItem DataType=\"Float\" Dimensions=\"298 3\" Format=\"XML\" Precision=\"8\">\n",
"\t\t20.0 5.0 5.0\n",
"\t\t25.0 5.0 5.0\n",
"\t\t40.0 5.0 5.0\n",
"\t\t42.5 5.0 2.5\n",
"\t\t47.5 7.5 5.0\n",
"\t\t42.5 7.5 5.0\n",
"\t\t85.0 5.0 5.0\n",
"\t\t90.0 5.0 5.0\n",
"\t\t80.0 5.0 5.0\n",
"\t\t77.5 5.0 2.5\n",
"\t\t92.5 2.5 5.0\n",
"\t\t97.5 2.5 5.0\n",
"\t\t95.0 7.5 7.5\n",
"\t\t97.5 5.0 2.5\n",
"\t\t92.5 5.0 2.5\n",
"\t\t97.5 7.5 5.0\n",
"\t\t2.5 2.5 5.0\n",
"\t\t5.0 2.5 2.5\n",
"\t\t35.0 5.0 5.0\n",
"\t\t10.0 5.0 5.0\n",
"\t\t15.0 5.0 5.0\n",
"\t\t55.0 2.5 7.5\n",
"\t\t77.5 5.0 7.5\n",
"\t\t75.0 7.5 7.5\n",
"\t\t75.0 2.5 7.5\n",
"\t\t75.0 5.0 5.0\n",
"\t\t75.0 2.5 2.5\n",
"\t\t75.0 7.5 2.5\n",
"\t\t2.5 7.5 5.0\n",
"\t\t7.5 7.5 5.0\n",
"\t\t5.0 5.0 5.0\n",
"\t\t7.5 2.5 5.0\n",
"\t\t5.0 2.5 7.5\n",
"\t\t30.0 5.0 5.0\n",
"\t\t50.36999 4.749 5.47225\n",
"\t\t50.18499 2.3745 7.73613\n",
"\t\t47.68499 4.8745 7.73613\n",
"\t\t52.68499 4.8745 7.73613\n",
"\t\t45.0 2.5 7.5\n",
"\t\t47.68499 2.3745 5.23613\n",
"\t\t52.68499 2.3745 5.23613\n",
"\t\t55.0 7.5 7.5\n",
"\t\t55.0 5.0 5.0\n",
"\t\t52.68499 7.3745 5.23613\n",
"\t\t50.18499 7.3745 7.73613\n",
"\t\t50.18499 7.3745 2.73613\n",
"\t\t47.5 5.0 2.5\n",
"\t\t50.18499 2.3745 2.73613\n",
"\t\t52.68499 4.8745 2.73613\n",
"\t\t55.0 2.5 2.5\n",
"\t\t55.0 7.5 2.5\n",
"\t\t65.13577 4.94114 4.99547\n",
"\t\t62.56788 2.47057 7.49773\n",
"\t\t62.56788 2.47057 2.49773\n",
"\t\t60.06788 2.47057 4.99773\n",
"\t\t60.06788 7.47057 4.99773\n",
"\t\t57.5 5.0 2.5\n",
"\t\t57.5 5.0 7.5\n",
"\t\t62.56788 7.47057 7.49773\n",
"\t\t67.56788 7.47057 7.49773\n",
"\t\t67.56788 2.47057 7.49773\n",
"\t\t67.56788 2.47057 2.49773\n",
"\t\t70.06788 2.47057 4.99773\n",
"\t\t70.06788 7.47057 4.99773\n",
"\t\t72.5 5.0 7.5\n",
"\t\t70.06788 4.97057 2.49773\n",
"\t\t67.56788 7.47057 2.49773\n",
"\t\t62.56788 7.47057 2.49773\n",
"\t\t50.0 10.0 0.0\n",
"\t\t50.0 10.0 10.0\n",
"\t\t55.0 10.0 5.0\n",
"\t\t50.0 10.0 5.0\n",
"\t\t52.5 10.0 7.5\n",
"\t\t52.5 10.0 2.5\n",
"\t\t60.0 10.0 10.0\n",
"\t\t55.0 10.0 10.0\n",
"\t\t57.5 10.0 7.5\n",
"\t\t60.0 10.0 0.0\n",
"\t\t55.0 10.0 0.0\n",
"\t\t57.5 10.0 2.5\n",
"\t\t60.0 10.0 5.0\n",
"\t\t100.0 10.0 0.0\n",
"\t\t95.0 10.0 5.0\n",
"\t\t100.0 10.0 10.0\n",
"\t\t97.5 10.0 2.5\n",
"\t\t97.5 10.0 7.5\n",
"\t\t100.0 10.0 5.0\n",
"\t\t90.0 10.0 10.0\n",
"\t\t92.5 10.0 7.5\n",
"\t\t95.0 10.0 10.0\n",
"\t\t90.0 10.0 0.0\n",
"\t\t95.0 10.0 0.0\n",
"\t\t92.5 10.0 2.5\n",
"\t\t90.0 10.0 5.0\n",
"\t\t70.0 10.0 10.0\n",
"\t\t80.0 10.0 10.0\n",
"\t\t75.0 10.0 5.0\n",
"\t\t75.0 10.0 10.0\n",
"\t\t77.5 10.0 7.5\n",
"\t\t72.5 10.0 7.5\n",
"\t\t80.0 10.0 0.0\n",
"\t\t80.0 10.0 5.0\n",
"\t\t77.5 10.0 2.5\n",
"\t\t70.0 10.0 0.0\n",
"\t\t72.5 10.0 2.5\n",
"\t\t70.0 10.0 5.0\n",
"\t\t75.0 10.0 0.0\n",
"\t\t0.0 10.0 0.0\n",
"\t\t0.0 10.0 10.0\n",
"\t\t10.0 10.0 0.0\n",
"\t\t0.0 10.0 5.0\n",
"\t\t5.0 10.0 5.0\n",
"\t\t5.0 10.0 0.0\n",
"\t\t10.0 10.0 10.0\n",
"\t\t10.0 10.0 5.0\n",
"\t\t5.0 10.0 10.0\n",
"\t\t20.0 10.0 0.0\n",
"\t\t20.0 10.0 10.0\n",
"\t\t30.0 10.0 0.0\n",
"\t\t20.0 10.0 5.0\n",
"\t\t25.0 10.0 5.0\n",
"\t\t25.0 10.0 0.0\n",
"\t\t30.0 10.0 10.0\n",
"\t\t30.0 10.0 5.0\n",
"\t\t25.0 10.0 10.0\n",
"\t\t65.0 10.0 0.0\n",
"\t\t65.0 10.0 5.0\n",
"\t\t65.0 10.0 10.0\n",
"\t\t40.0 10.0 10.0\n",
"\t\t40.0 10.0 0.0\n",
"\t\t45.0 10.0 10.0\n",
"\t\t45.0 10.0 5.0\n",
"\t\t40.0 10.0 5.0\n",
"\t\t45.0 10.0 0.0\n",
"\t\t15.0 10.0 5.0\n",
"\t\t15.0 10.0 0.0\n",
"\t\t35.0 10.0 0.0\n",
"\t\t35.0 10.0 5.0\n",
"\t\t85.0 10.0 5.0\n",
"\t\t85.0 10.0 0.0\n",
"\t\t85.0 10.0 10.0\n",
"\t\t35.0 10.0 10.0\n",
"\t\t15.0 10.0 10.0\n",
"\t\t55.0 5.0 0.0\n",
"\t\t50.0 0.0 0.0\n",
"\t\t52.5 7.5 0.0\n",
"\t\t52.5 2.5 0.0\n",
"\t\t50.0 5.0 0.0\n",
"\t\t60.0 0.0 0.0\n",
"\t\t57.5 2.5 0.0\n",
"\t\t55.0 0.0 0.0\n",
"\t\t57.5 7.5 0.0\n",
"\t\t60.0 5.0 0.0\n",
"\t\t10.0 0.0 0.0\n",
"\t\t0.0 0.0 0.0\n",
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t42.5 0.0 7.5\n",
"\t\t42.5 0.0 2.5\n",
"\t\t40.0 0.0 5.0\n",
"\t\t52.5 0.0 7.5\n",
"\t\t60.0 0.0 10.0\n",
"\t\t57.5 0.0 7.5\n",
"\t\t55.0 0.0 10.0\n",
"\t\t57.5 0.0 2.5\n",
"\t\t60.0 0.0 5.0\n",
"\t\t0.0 0.0 10.0\n",
"\t\t5.0 0.0 5.0\n",
"\t\t10.0 0.0 10.0\n",
"\t\t2.5 0.0 7.5\n",
"\t\t7.5 0.0 7.5\n",
"\t\t5.0 0.0 10.0\n",
"\t\t7.5 0.0 2.5\n",
"\t\t10.0 0.0 5.0\n",
"\t\t2.5 0.0 2.5\n",
"\t\t0.0 0.0 5.0\n",
"\t\t75.0 0.0 5.0\n",
"\t\t77.5 0.0 2.5\n",
"\t\t72.5 0.0 2.5\n",
"\t\t70.0 0.0 10.0\n",
"\t\t72.5 0.0 7.5\n",
"\t\t70.0 0.0 5.0\n",
"\t\t80.0 0.0 10.0\n",
"\t\t80.0 0.0 5.0\n",
"\t\t77.5 0.0 7.5\n",
"\t\t75.0 0.0 10.0\n",
"\t\t90.0 0.0 10.0\n",
"\t\t90.0 0.0 5.0\n",
"\t\t85.0 0.0 5.0\n",
"\t\t85.0 0.0 10.0\n",
"\t\t30.0 0.0 10.0\n",
"\t\t30.0 0.0 5.0\n",
"\t\t25.0 0.0 5.0\n",
"\t\t20.0 0.0 10.0\n",
"\t\t20.0 0.0 5.0\n",
"\t\t25.0 0.0 10.0\n",
"\t\t100.0 0.0 10.0\n",
"\t\t95.0 0.0 5.0\n",
"\t\t95.0 0.0 10.0\n",
"\t\t100.0 0.0 5.0\n",
"\t\t65.0 0.0 5.0\n",
"\t\t35.0 0.0 5.0\n",
"\t\t15.0 0.0 5.0\n",
"\t\t15.0 0.0 10.0\n",
"\t\t35.0 0.0 10.0\n",
"\t\t65.0 0.0 10.0\n",
"\t\t100.0 5.0 5.0\n",
"\t\t100.0 5.0 10.0\n",
"\t\t55.0 5.0 10.0\n",
"\t\t45.0 5.0 10.0\n",
"\t\t52.5 2.5 10.0\n",
"\t\t50.0 5.0 10.0\n",
"\t\t47.5 2.5 10.0\n",
"\t\t42.5 2.5 10.0\n",
"\t\t42.5 7.5 10.0\n",
"\t\t47.5 7.5 10.0\n",
"\t\t40.0 5.0 10.0\n",
"\t\t75.0 5.0 10.0\n",
"\t\t77.5 7.5 10.0\n",
"\t\t77.5 2.5 10.0\n",
"\t\t80.0 5.0 10.0\n",
"\t\t72.5 2.5 10.0\n",
"\t\t72.5 7.5 10.0\n",
"\t\t70.0 5.0 10.0\n",
"\t\t52.5 7.5 10.0\n",
"\t\t57.5 7.5 10.0\n",
"\t\t57.5 2.5 10.0\n",
"\t\t60.0 5.0 10.0\n",
"\t\t5.0 5.0 10.0\n",
"\t\t2.5 7.5 10.0\n",
"\t\t7.5 7.5 10.0\n",
"\t\t0.0 5.0 10.0\n",
"\t\t2.5 2.5 10.0\n",
"\t\t7.5 2.5 10.0\n",
"\t\t10.0 5.0 10.0\n",
"\t\t95.0 5.0 10.0\n",
"\t\t97.5 2.5 10.0\n",
"\t\t92.5 2.5 10.0\n",
"\t\t97.5 7.5 10.0\n",
"\t\t92.5 7.5 10.0\n",
"\t\t90.0 5.0 10.0\n",
"\t\t85.0 5.0 10.0\n",
"\t\t65.0 5.0 10.0\n",
"\t\t15.0 5.0 10.0\n",
"\t\t25.0 5.0 10.0\n",
"\t\t20.0 5.0 10.0\n",
"\t\t35.0 5.0 10.0\n",
"\t\t30.0 5.0 10.0\n",
"\t\t0.0 5.0 5.0\n",
" </DataItem>\n",
" </Geometry>\n",
" <Topology TopologyType=\"Mixed\" NumberOfElements=\"120\">\n",
" <DataItem DataType=\"Int\" Dimensions=\"120 11\" Format=\"XML\" Precision=\"8\">\n",
"\t\t38 242 239 190 116 244 241 243 0 1 195\n",
"\t\t38 203 198 174 129 206 207 208 2 3 175\n",
"\t\t38 258 69 68 129 264 71 4 5 131 133\n",
"\t\t38 144 174 198 129 176 207 201 173 175 3\n",
"\t\t38 95 87 235 177 140 289 290 6 7 236\n",
"\t\t38 95 100 163 96 101 170 8 98 102 9\n",
"\t\t38 235 87 284 177 289 288 286 236 7 10\n",
"\t\t38 284 178 177 82 11 181 10 12 13 14\n",
"\t\t38 83 245 284 81 256 285 287 86 255 15\n",
"\t\t38 154 215 277 108 224 281 16 297 280 278\n",
"\t\t38 154 216 153 155 223 221 156 157 17 158\n",
"\t\t38 203 174 239 129 208 250 253 2 175 18\n",
"\t\t38 113 217 153 116 283 222 19 134 20 194\n",
"\t\t38 202 257 210 197 259 275 212 209 21 211\n",
"\t\t38 95 163 100 90 8 170 101 138 183 139\n",
"\t\t38 231 95 163 225 269 8 232 233 22 226\n",
"\t\t38 96 266 225 95 23 24 25 98 267 22\n",
"\t\t38 163 165 225 96 168 26 226 9 27 25\n",
"\t\t38 178 81 90 82 196 91 180 13 84 92\n",
"\t\t38 235 284 245 177 286 285 247 236 10 246\n",
"\t\t38 87 177 90 82 7 179 93 88 14 92\n",
"\t\t38 266 231 228 225 268 234 270 24 233 229\n",
"\t\t38 107 108 155 109 110 28 162 112 111 159\n",
"\t\t38 113 153 109 116 19 160 114 134 194 135\n",
"\t\t38 155 113 277 153 29 279 30 158 19 31\n",
"\t\t38 277 153 216 155 31 221 32 30 158 17\n",
"\t\t38 107 108 154 155 110 297 161 162 28 157\n",
"\t\t38 113 153 155 109 19 158 29 114 160 159\n",
"\t\t38 108 113 277 155 115 279 278 28 29 30\n",
"\t\t38 277 154 155 216 16 157 30 32 223 17\n",
"\t\t38 108 154 155 277 297 157 28 278 16 30\n",
"\t\t38 163 100 165 96 170 169 168 9 102 27\n",
"\t\t38 108 113 155 109 115 29 28 111 114 159\n",
"\t\t38 164 225 163 165 227 226 166 167 26 168\n",
"\t\t38 284 81 82 83 15 84 12 287 86 85\n",
"\t\t38 203 239 128 129 253 295 265 2 18 132\n",
"\t\t38 258 128 69 129 263 130 264 5 132 131\n",
"\t\t38 239 117 122 118 293 124 296 33 120 123\n",
"\t\t38 239 174 186 118 250 189 240 33 188 187\n",
"\t\t38 239 118 190 116 33 192 241 1 121 195\n",
"\t\t38 239 117 118 116 293 120 33 1 119 121\n",
"\t\t38 242 190 153 116 243 193 251 0 195 194\n",
"\t\t38 113 117 242 116 142 294 292 134 119 0\n",
"\t\t38 217 242 153 116 252 251 222 20 0 194\n",
"\t\t38 128 239 122 118 295 296 141 137 33 123\n",
"\t\t38 239 186 190 118 240 191 241 33 187 192\n",
"\t\t38 113 242 217 116 292 252 283 134 0 20\n",
"\t\t38 202 258 257 34 261 260 259 35 36 37\n",
"\t\t38 202 198 258 34 204 38 261 35 39 36\n",
"\t\t38 202 197 198 34 209 200 204 35 40 39\n",
"\t\t38 202 257 197 34 259 21 209 35 37 40\n",
"\t\t38 257 70 197 34 41 42 21 37 43 40\n",
"\t\t38 257 69 70 34 273 72 41 37 44 43\n",
"\t\t38 69 68 70 34 71 73 72 44 45 43\n",
"\t\t38 258 68 69 34 4 71 264 36 45 44\n",
"\t\t38 257 258 69 34 260 264 273 37 36 44\n",
"\t\t38 258 68 198 129 4 46 38 5 133 3\n",
"\t\t38 34 258 68 198 36 4 45 39 38 46\n",
"\t\t38 178 81 82 284 196 84 13 11 15 12\n",
"\t\t38 144 68 198 34 147 46 201 47 45 39\n",
"\t\t38 144 143 68 34 146 145 147 47 48 45\n",
"\t\t38 144 197 143 34 199 49 146 47 40 48\n",
"\t\t38 144 198 197 34 201 200 199 47 39 40\n",
"\t\t38 197 70 143 34 42 50 49 40 43 48\n",
"\t\t38 68 143 70 34 145 50 73 45 48 43\n",
"\t\t38 210 148 197 51 214 213 211 52 53 54\n",
"\t\t38 197 70 51 148 42 55 54 213 56 53\n",
"\t\t38 70 143 148 197 50 149 56 42 49 213\n",
"\t\t38 197 257 74 70 21 274 57 42 41 76\n",
"\t\t38 210 257 74 197 275 274 276 211 21 57\n",
"\t\t38 74 197 51 210 57 54 58 276 211 52\n",
"\t\t38 94 210 74 51 291 276 127 59 52 58\n",
"\t\t38 228 210 94 51 254 291 272 60 52 59\n",
"\t\t38 228 164 210 51 230 249 254 60 61 52\n",
"\t\t38 228 225 164 51 229 227 230 60 62 61\n",
"\t\t38 225 96 51 228 25 63 62 229 64 60\n",
"\t\t38 96 266 228 225 23 270 64 25 24 229\n",
"\t\t38 225 96 165 51 25 27 26 62 63 65\n",
"\t\t38 164 225 165 51 227 26 167 61 62 65\n",
"\t\t38 164 165 103 51 167 172 171 61 65 66\n",
"\t\t38 164 103 77 51 171 125 184 61 66 67\n",
"\t\t38 148 164 77 51 185 184 152 53 61 67\n",
"\t\t38 210 164 148 51 249 185 214 52 61 53\n",
"\t\t38 148 70 51 77 56 55 53 152 79 67\n",
"\t\t38 77 143 148 70 151 149 152 79 50 56\n",
"\t\t38 74 70 77 51 76 79 80 58 55 67\n",
"\t\t38 70 197 51 74 42 54 55 76 57 58\n",
"\t\t38 94 74 77 51 127 80 126 59 58 67\n",
"\t\t38 94 77 103 51 126 125 105 59 67 66\n",
"\t\t38 94 103 96 51 105 104 99 59 66 63\n",
"\t\t38 165 96 103 51 27 104 172 65 63 66\n",
"\t\t38 94 266 228 96 271 270 272 99 23 64\n",
"\t\t38 228 96 51 94 64 63 60 272 99 59\n",
"\t\t38 258 203 128 129 262 265 263 5 2 132\n",
"\t\t38 239 129 174 118 18 175 250 33 136 188\n",
"\t\t38 128 129 239 118 132 18 295 137 136 33\n",
"\t\t38 284 177 87 82 10 7 288 12 14 88\n",
"\t\t38 217 153 216 277 222 221 219 282 31 32\n",
"\t\t38 225 95 163 96 22 8 226 25 98 9\n",
"\t\t38 95 87 177 90 140 7 6 138 93 179\n",
"\t\t38 144 198 68 129 201 46 147 173 3 133\n",
"\t\t38 95 235 163 177 290 237 8 6 236 182\n",
"\t\t38 95 177 163 90 6 182 8 138 179 183\n",
"\t\t38 245 284 178 177 285 11 248 246 10 181\n",
"\t\t38 165 100 103 96 169 106 172 27 102 104\n",
"\t\t38 284 87 83 82 288 89 287 12 88 85\n",
"\t\t38 144 197 148 143 199 213 150 146 49 149\n",
"\t\t38 81 245 284 178 255 285 15 196 248 11\n",
"\t\t38 257 69 74 70 273 75 274 41 72 76\n",
"\t\t38 95 266 225 231 267 24 22 269 268 233\n",
"\t\t38 242 117 239 116 294 293 244 0 119 1\n",
"\t\t38 95 235 231 163 290 238 269 8 237 232\n",
"\t\t38 215 277 217 216 281 282 220 218 32 219\n",
"\t\t38 216 215 277 154 218 281 32 223 224 16\n",
"\t\t38 68 143 77 70 145 151 78 73 50 79\n",
"\t\t38 153 113 277 217 19 279 31 222 283 282\n",
"\t\t38 178 90 177 82 180 179 181 13 92 14\n",
"\t\t38 202 203 258 198 205 262 261 204 206 38\n",
"\t\t38 95 266 94 96 267 271 97 98 23 99\n",
"\t\t38 258 198 203 129 38 206 262 5 3 2\n",
"</DataItem>\n",
" </Topology>\n",
" <Attribute Center=\"Node\" Name=\"Displacement\" Type=\"Vector\">\n",
" <DataItem DataType=\"Float\" Dimensions=\"894\" Format=\"XML\" Precision=\"4\">-0.047965729097026406 -0.47405360694192544 0.23267688897869185 -0.04839712032381492 -0.4188173068079019 0.19805068341926818 -0.04972836397419108 -0.2541761950494791 0.09483546166701359 -0.06677485893350904 -0.2690782455890474 0.08210568032541768 -0.08178506070914221 -0.16363834779526634 0.02802453692971962 -0.08016199450682145 -0.22758038186903723 0.03479151154023378 -1.5804349184169515 0.011367993034710765 -7.480312028855505 -2.0676630077700833 0.03382986432510028 -9.754515438360277 -1.0462457612381162 -0.03644143935910425 -5.275667760899228 -1.726713436285188 -0.2060828623672494 -4.0860843843813255 -2.2137093789738853 0.07925610664268293 -10.710947653722311 -2.787437803216165 0.07167172350619123 -13.00814484395848 -1.6074491367545345 0.27882830716382606 -12.603139019122711 -4.043723685861553 -0.2034412125611042 -12.99195327474299 -3.4666151361860247 -0.18938985865702038 -10.64586945104657 -3.030383848950366 0.023033912807956938 -13.528178348150965 -0.018694549365319026 -0.6663622199230039 0.3940663781701929 -0.035755459571178094 -0.6793344824400395 0.37715517472979276 -0.049198663139684067 -0.3092376223887039 0.1280265760623059 -0.04714087652030377 -0.5842345312188942 0.3018567869325058 -0.047547269452917124 -0.529161839741 0.26727394542495425 0.06928108760818566 -0.015627413937322313 0.2595012942790379 0.0767624362004812 0.1655046187925633 -4.523061280826332 0.07901403707404484 0.14510639685209448 -3.7199300629611334 0.20971414214805742 0.1425775854583779 -3.427139715141933 -0.6478467913881932 -0.01194598181817827 -3.342148646620809 -1.4479561070974147 -0.18677944545003708 -3.0948023257062602 -1.5548104540952734 -0.1913388710335726 -3.379382376226174 -0.07431980244959735 -0.6673217756872455 0.3134257246813109 -0.07474304858230338 -0.6122504381178779 0.278832124031785 -0.04671874975343763 -0.6393056883230281 0.33644950069878476 -0.019117086827051457 -0.6112900526082293 0.35947369153310893 -0.0020568568078323042 -0.5983160776261545 0.37638464112010395 -0.04896452596291781 -0.36387373098173365 0.1632878696208949 -0.0319398111972994 -0.09222340428892116 0.08448044560169332 0.005285546875953886 -0.07797179838956966 0.0 0.0 -0.12203984359370061 0.0 -0.010982649581565213 -0.057750229417927026 0.12196508427419606 0.004183890009327347 -0.16429170544796834 0.08923533765153951 -0.018496996429775623 -0.1620011179730926 0.07527064114067424 -0.01753870441729097 -0.09395347711603876 0.18124328313616497 -0.0007776007507524766 -0.007955464055126803 0.17069980138556098 -0.0721044217940912 -0.047619282266660755 0.297893518711578 -0.06335370417180371 -0.0773063389442382 0.12745729054550167 -0.054685743666010665 -0.0779783279731788 0.06978496552976325 -0.10145146109919913 -0.1461780324423574 0.06663853374684127 -0.07780363983544336 -0.2057316778785314 0.07618293357915183 -0.03496652533659665 -0.1780999651492029 0.1596198836561621 -0.08852146924247566 -0.1347498168040807 0.15043019197952426 -0.1695618827519498 -0.13305064346559115 0.26071130497706146 -0.21796559512883132 -0.11947219651288987 0.1592972214589671 -0.2135129311674945 0.0 -0.5926904288415352 0.28369353412985393 0.12877922375902964 -0.13378996663099613 -0.5263939861681952 -0.11683879940758961 0.0 -0.10974398546956422 -0.013330577977185364 0.04624196825920747 -0.193516981457963 -0.0006148271887108712 -0.07437646117908586 -0.3297467387547477 -0.1048633517785947 0.24040130978664023 0.13325904592774976 0.029361752786866643 0.19137557692257412 0.14225465896795317 0.07773054156564677 -0.26920849795571533 0.18642946344449174 0.07568153589329588 -1.2780393524288247 0.33056414766573194 0.12245610753730929 -1.1371090921528515 -0.7994273568669944 -0.16842843093368637 -0.9498153406860345 -0.35675742414471423 -0.025253165246244158 -1.7538110264858364 -0.4699599291313302 -0.020220701912772896 -1.9946084312297603 0.18176143469822173 0.12030732193736497 -2.694400681395747 -1.0432796715548522 -0.1514170499202772 -1.7654297681197768 -0.9373011163016199 -0.12285660476993283 -1.271142111544261 -0.6195327416845549 -0.08066865844591749 -0.16505643215442242 -0.18469478264160283 -0.2055167878211854 0.025531244888579434 -0.07962436103466564 -0.0692937266073 -0.012230750661163194 -0.1761601644312843 -0.05489023567181979 0.15074026483224712 -0.12854045300848546 -0.12676052455328152 0.0 -0.10816952021390164 -0.05661450958071297 0.09475127219738581 -0.16770256353265753 -0.1255016156909703 0.0896955317096843 0.2754413948544713 0.07428396588726943 0.0 0.07871659565210719 0.021852559099717794 0.03822553912809209 0.05330335535551464 0.03575129680647851 0.08396589459413166 -0.7851967964595475 -0.15316809002998358 -0.08418956558599154 -0.35630046464236226 -0.14914729001559882 0.034405770951162484 -0.43453715092539363 -0.05283785933063878 0.07987085547895767 -0.16587012514719132 0.013965336696996409 -0.05004982365120022 -5.722660049041769 -0.5200069795964476 -14.52667328037748 -2.8539150952570123 0.02076916472850137 -12.535194322634458 -1.1641758713518928 0.5217737098367664 -15.449170689704438 -4.272352654390285 -0.25564976733865985 -13.472651480820652 -2.0039557914216313 0.26065471973583904 -14.019028479954342 -3.439878318475382 -0.008695127730949125 -14.935329497875086 -0.10084188993098371 0.4444090430827425 -10.666727210051148 -1.4583171194346642 0.25094895065301626 -11.639335770404061 -0.6095536247328149 0.4923525017243669 -13.09673271500324 -4.487606666749117 -0.4314764848184639 -9.611662927450727 -5.1351778722580805 -0.490723554037711 -12.002580048371243 -3.7019431837620345 -0.21940402555656036 -11.073245561411625 -2.2950426032773508 0.0 -10.153561398569527 0.7644783025637677 0.17659270005169025 -2.2506764640469212 0.7881830999734697 0.358562240737584 -6.076114778192403 -0.8094195671397438 -0.010638667411575835 -3.6596800793780173 0.8460253549690263 0.26345636944233214 -4.104283292756102 -0.06646680500717818 0.1663678113467481 -4.801762880834504 0.0 0.05088188065568029 -2.897167159442851 -3.211260767463459 -0.43742162502765536 -5.252531307168398 -1.231266826045317 -0.019173825258966597 -5.651583583760707 -1.913556966020636 -0.19704300405962422 -4.4034105004164985 -1.8509487580850996 -0.2751452518671518 -2.0229432077098832 -1.3138377231166645 -0.15175743468116942 -2.813098190258421 -0.49145072949190444 -0.0614749308538247 -2.0913527653978545 -2.423285086333881 -0.35509732649554243 -3.5593216894250097 -0.13562028121554442 -0.7763576425543823 0.2911718516414826 -0.06822290162700494 -0.6143196677574919 0.289632881489414 -0.1364635725568115 -0.6662121680366447 0.22198682115133725 -0.10192129190743907 -0.6953385010093142 0.2904020538530397 -0.10234483504406645 -0.6402676067379166 0.25580705547820554 -0.1360415192690181 -0.7212849084599603 0.25657767739220383 -0.06906520487631836 -0.5041703097132678 0.2204446025832387 -0.10277124168162215 -0.5851994121453588 0.22121405709445124 -0.06864471010018737 -0.5592469529325729 0.25503817033781584 -0.13732883135365861 -0.5560329621109351 0.15278808719504022 -0.06979350205503553 -0.3939536933122908 0.151189344244134 -0.13868846383820757 -0.44626371033613105 0.08264962775090069 -0.10363470876065228 -0.47509071801681074 0.15200810364079081 -0.10400043568754139 -0.4198191513465178 0.11722634301747097 -0.13777327418304808 -0.500776334518748 0.11822596096132337 -0.07046378225306367 -0.28404084583465633 0.08180352513206532 -0.10432336005612114 -0.3649136418132531 0.08219933926866091 -0.07008588015608205 -0.3389002086666551 0.11648307864968548 -1.3176630754924685 -0.21843469509647914 -0.9400075364376895 -0.13642162813274905 -0.007757044931628335 -0.9393273897074608 0.5590714754264643 0.12891962057742173 -1.0141521782369056 -0.07122196294186438 -0.17851718142218737 0.014341064299544367 -0.1369396110426348 -0.33497059522248007 0.01326951459494449 -0.08064823591635184 -0.12599468499497785 -0.008806942900384356 -0.11543997824071656 -0.19474506627465435 -0.016122403256118866 -0.10659695473642065 -0.25531917468180126 0.013297445179014909 -0.1323229387983942 -0.2722643114499709 -0.017332875697368143 -0.10319998549156792 -0.5301372595159655 0.1866226708216105 -0.13690111113997916 -0.6111404800984386 0.18739698799338209 -0.13916485414520863 -0.39105145200107333 0.04736714158837961 -0.10492523572033977 -0.30993771410049653 0.04712887420059887 -1.7541994357664783 -0.0005792311633284 -7.8616047926675785 -3.9061541991935314 -0.3993125724184914 -7.353289363755013 0.36592921859598865 0.40070633211835854 -8.402522688869404 -0.07090294944928281 -0.2304158305465479 0.04747654650607198 -0.06944103173641163 -0.4490744891987199 0.18584018533433988 -0.3379162755119088 -0.18004101855780588 0.2138703278463336 -0.057772497251470906 -0.24938199362522914 0.23397169182995128 -0.1992371235010566 -0.1882622459881342 0.11434109602451309 -0.1638043677618825 -0.2130591025954032 0.20527585233313717 -0.10504837042258369 -0.22162009564717283 0.11712881721857264 -0.6038245319800848 -0.22666133511991648 0.20319099679477254 -0.4453249751832846 -0.1841955004808417 0.24034147018409557 -0.25745874362345883 -0.2178760564167578 0.2512596997372918 -0.4940388681387688 -0.15782569336968238 0.08140117544735002 -0.7086015220411741 -0.16831780067917781 0.19262570794867515 -0.025213742491690123 -0.6642855937660482 0.38327189429099146 -0.024369285625460854 -0.7744378275333292 0.4524536292523566 -0.08041812858304163 -0.7203250696865323 0.33721888183020204 -0.024791259145738268 -0.7193632478460578 0.41786115202441454 -0.05239363226762076 -0.7473813916524793 0.39483635695410907 -0.05281632241398205 -0.6923071655426928 0.36024370291838226 -0.10844071757462344 -0.6932691630684207 0.2796014005025253 -0.08083915000906501 -0.6652524862117442 0.30262534328105845 -0.0799947310656859 -0.7753978385839632 0.3718127654359158 -0.10801881549417736 -0.7483410913238301 0.31419527136952957 -2.861312175356208 -0.40449443529868956 -4.491783964993224 -1.6447662828670482 -0.3255723406820727 -1.4291645315447814 -2.324502315279406 -0.34365770901486026 -3.1224832382742864 -2.2192879649562722 -0.36755447980193473 -2.90499037785823 -1.9889418607595064 -0.34462802491423694 -2.2471672565398015 -2.598937899850412 -0.3839677137714592 -3.792372094948321 -2.73992035965378 -0.39967020349842064 -4.137154497261919 -2.9939062352625747 -0.4280624553387076 -4.867255537430509 -1.7356171530687616 -0.3070393649247481 -1.673143683850175 -2.062562131215739 -0.30036806575948233 -2.5399989439944317 -0.07414657151351439 -0.28118889507163386 0.0700390845348723 -0.02545068136485103 -0.3374151388659947 0.1768345559341324 -0.08248573961563273 -0.33540247204920487 0.09373316648827278 -0.022705260568893205 -0.2850796198870722 0.18085321877016405 -4.031147806022462 -0.3727198331200897 -8.80548102123114 -5.220385984050723 -0.41603006712540447 -13.368455372234632 -4.270227559411124 -0.4074509447059446 -9.208428932554598 -4.889498644571033 -0.4431711544388824 -11.499072588559455 -4.634308727657519 -0.40162634390452573 -11.088162778734548 -3.4751712702748487 -0.40288218308820206 -6.6365553011638685 -3.7337487299914507 -0.4190340764186671 -6.97836794455023 -1.2169427992022834 -0.25111538021425817 -0.6151893666474478 -1.1185199779330708 -0.27236971108263597 -0.46985411075185324 -0.026672799730434446 -0.44455927335026374 0.2450529936818268 -0.08289081203328263 -0.44518196731152787 0.16383782070410652 -0.08350080590852561 -0.3899089385911751 0.12827370550847797 -0.026349637870557243 -0.3894965914267727 0.21056132065194208 -0.02607006689024707 -0.5541281162360233 0.31413418177273067 -0.02647304046685257 -0.4992324012446699 0.27949064649848837 -0.08227878040931949 -0.5001199767851968 0.19867321436490634 -0.025634448075775463 -0.609212899014135 0.34867854102931206 -0.08125110224735822 -0.610176349813134 0.26804593579688857 -0.08166682320757503 -0.5550820344133942 0.2334714119406424 -5.476535772910673 -0.4689258986847368 -13.931485467491994 0.015405199297464305 -0.05768223206291513 0.353254087307141 -0.004284059566232646 -0.20302461245378808 0.1423871529064458 -0.030279153735737762 -0.16219137202228495 0.2872951699539964 0.009893350122390645 -0.1455335596605565 0.21677540345565466 -0.022989385790295386 -0.22500035267620017 0.17691342169252813 0.0723268140144121 -0.04500703660259545 0.1913911016766751 0.03975225302392074 -0.17231367426974978 0.1767621221566391 0.039138786789668825 -0.12267294053160017 0.12966581805479893 0.05210593814124876 -0.10491614028091974 0.15813945004688956 0.019017646795029007 -0.1884798963638575 0.16202655967499668 -0.015287931629018505 -0.27094060234400735 0.15930445082060088 0.004367861501230276 -0.2545572362586046 0.17592054566098012 0.03673791419978042 -0.04342356410235774 0.24633119237984089 0.5564749250635144 0.15253172799693993 0.08300437302119189 0.24890524298566413 0.06341554244785445 0.33376248738031516 0.19830106213258958 0.08337923732507081 0.2189630436612385 -0.30781544081944057 -0.14139391606479979 0.32383903550587445 -0.09055376170303923 0.008758277742892139 0.23738035199205418 0.04302806618315445 -0.6123998442273875 0.45091291040744497 0.008906864425090597 -0.6383450360700776 0.4170895674834273 0.04218173828751821 -0.5022565952880745 0.3817212791452501 0.0259674626393265 -0.6253727241297466 0.43400131183637997 0.025543627932032322 -0.5703018579308011 0.39940679622838 0.042604918540645936 -0.5573289219121731 0.4163181004853647 -0.008153438279380877 -0.6513164421484274 0.4001796753641282 0.008484306556432106 -0.5832751597030574 0.38249591286600104 -0.007731228480324075 -0.7063916916706321 0.43477165328291195 0.009329388910927184 -0.6934188173908522 0.4516833582748249 -0.5768910710722052 -0.020817579122237292 -3.050608500142118 -1.6924013473850792 -0.23394930223377505 -3.7629154592296103 -1.13842377408308 -0.19793825889936395 -2.2150978063227234 1.0408930013298476 0.2809555562912507 -1.8735119143721761 0.26950982072523055 0.11810243154585093 -2.439776141913557 -0.34572405482245444 -0.046249051528531 -1.5704467535071216 1.0714332051133424 0.4106012479845788 -5.417347269208392 -0.8885482009921877 -0.0077584579372758505 -4.963321487611734 0.22904481975518634 0.19144954870495304 -4.183555352555141 1.0446510756762741 0.33070033444041164 -3.5464729854308548 0.3084510472903371 0.525711788907861 -9.833240801670238 -1.8169911384342474 0.07945355886834034 -9.352576061083182 -1.3059029375558169 0.03735769193328975 -7.139068107856563 0.6950582880091182 0.4653643411880185 -7.598626578284048 0.040453435251621574 -0.28213894343947377 0.2433409577726728 0.0067054149873055574 -0.3632840301928922 0.2439697286111284 0.00720946552359674 -0.41807725728833706 0.27872786460874843 0.04132513611292125 -0.39214488795517805 0.3124952291910621 0.007648788670507387 -0.4731403280181489 0.31330902632611374 0.04088032045174907 -0.3370592087004853 0.27793471854332086 -0.7006135613633653 0.5922572350966205 -14.450593002485887 -2.3822402379295213 0.09057146096663068 -11.630788254273844 -0.16366983743141195 0.5713167762055666 -12.16828923543039 -2.954477817259094 0.09273584197025529 -13.906275903237926 -0.3518758442986853 -0.041934834745262724 -0.5048611884102177 0.006440547751504181 -0.3087428533154893 0.20906115028142058 0.00806224084417239 -0.5282088659325198 0.3478868322853771 0.04175715289929721 -0.4471855733128842 0.34712369812518123 0.04026367315859773 -0.22726519126867822 0.2096831459864206 0.8116246703221361 0.24910663430630192 -0.7400685267700304 -3.1998914956705056 0.04164736776803859 -14.427044106642478 -0.9225775760338462 0.5625563690038407 -14.966984648665667 0.15813498952420885 0.04451062755336954 0.19432860288940448 -0.00023169456635840308 -0.12381098751066959 0.04451857461019447 0.05398555440349261 0.0023047341829060793 0.16143626181463736 0.012001268527900415 -0.04747747185161327 0.07447113699285579 0.029918965780170215 -0.07010107458517302 0.053967821511682224 0.019384380824443312 -0.14451204058796685 0.1083599024467668 -0.03784322617619329 -0.153909152476789 0.031128890458504994 -0.04928504968680727 -0.09316115390402904 0.006284167583016508 -0.013971330632081844 -0.17392143827105147 0.0946052606802253 0.9249513284253921 0.28462164248519795 -3.767121787536245 0.8744818704897865 0.32451039421454686 -4.90506896962685 1.0785830620009245 0.34737889091180424 -4.584364995402746 0.9199129150073241 0.3854289168265285 -5.754209400171687 0.9949021384742094 0.27588779023879245 -2.787869216120964 0.893632544973017 0.23281737185950901 -3.001293602568804 0.8992714361146932 0.21365722086430394 -1.9560941672902137 -0.005652557699938412 -0.021348042729725413 0.10102256783093026 0.21552429101438245 0.06915405630752935 0.09425621158000139 0.3145086238580911 0.10422405754179641 0.17372282157321245 0.46142305760993185 0.14023720250360783 0.10933687384675493 -0.013019227354410032 -0.5582864618360743 0.3356790340718974 -0.04062070421096781 -0.5863029273833091 0.31265572737092306 -0.0410422195165195 -0.531229530972922 0.2780615027833012 -0.012596234960148724 -0.6133598889995131 0.3702729276182241 0.015004314467624716 -0.585343247022487 0.39329629153147017 0.01458071509855983 -0.5302734140075925 0.3587018974517421 -0.01344375293594734 -0.5032141882644785 0.30108529882614404 -0.3620456247533485 0.5519867699907384 -12.620344556531794 -0.526966243814986 0.5761773089089341 -13.53252924781271 -0.010580716254271554 0.5370526569804701 -11.240538337103064 -0.7590766917007422 0.5424585404804543 -14.06075381984704 -0.2241267810324015 0.5080924245964678 -11.678636409861051 0.12435591418543097 0.4890125752209692 -10.2901175360841 0.5644461793934311 0.4452121362167419 -7.977671709359734 0.6877930605010911 0.1763463728609681 -0.8949858092003476 -0.013854912976747782 -0.44812265379862676 0.26650158133217267 -0.014668310361330275 -0.33793775862863673 0.1972625056180801 -0.014256902850070032 -0.3930499585001261 0.23188288965132975 -0.015529548039433162 -0.22964069733477832 0.12824581547933717 -0.01505131691402543 -0.28309752287511414 0.16251145574210094 -0.04629575533140819 -0.6943785848803764 0.37104295188956193</DataItem>\n",
" </Attribute>\n",
" </Grid>\n",
" </Grid>\n",
" </Domain>\n",
"</Xdmf>\n",
"\n"
]
},
{
"data": {
"text/plain": [
"28476"
]
},
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"using LightXML\n",
"\n",
"function xdmf_new_mesh(grid, X, elmap)\n",
" dim, nnodes = size(X)\n",
" geometry = new_child(grid, \"Geometry\")\n",
" set_attribute(geometry, \"Type\", \"XYZ\")\n",
" dataitem = new_child(geometry, \"DataItem\")\n",
" set_attribute(dataitem, \"DataType\", \"Float\")\n",
" set_attribute(dataitem, \"Dimensions\", \"$nnodes $dim\")\n",
" set_attribute(dataitem, \"Format\", \"XML\")\n",
" set_attribute(dataitem, \"Precision\", 8)\n",
" #add_text(dataitem, join(X, \" \"))\n",
" s = \"\\n\"\n",
" \n",
" for i=1:nnodes\n",
" s *= \"\\t\\t\" * join(X[:,i], \" \") * \"\\n\"\n",
" end\n",
" s *= \" \"\n",
" add_text(dataitem, s)\n",
"\n",
" elmap2 = copy(elmap)\n",
" elmap2[2:end,:] -= 1\n",
" dim, nelements = size(elmap2)\n",
"\n",
" topology = new_child(grid, \"Topology\")\n",
" #set_attribute(topology, \"Dimensions\", \"1\")\n",
" set_attribute(topology, \"TopologyType\", \"Mixed\")\n",
" set_attribute(topology, \"NumberOfElements\", nelements)\n",
" dataitem = new_child(topology, \"DataItem\")\n",
" set_attribute(dataitem, \"DataType\", \"Int\")\n",
" set_attribute(dataitem, \"Dimensions\", \"$nelements $dim\")\n",
" set_attribute(dataitem, \"Format\", \"XML\")\n",
" set_attribute(dataitem, \"Precision\", 8)\n",
" s = \"\\n\"\n",
" for i=1:nelements\n",
" s *= \"\\t\\t\" * join(elmap2[:,i], \" \") * \"\\n\"\n",
" end\n",
" add_text(dataitem, s)\n",
" #add_text(dataitem, join(elmap2, \" \"))\n",
" \n",
"end\n",
"\n",
"xdoc, xmodel = JuliaFEM.xdmf.xdmf_new_model()\n",
"temporal_collection = JuliaFEM.xdmf.xdmf_new_temporal_collection(xmodel)\n",
"grid = JuliaFEM.xdmf.xdmf_new_grid(temporal_collection; time=0)\n",
"xdmf_new_mesh(grid, X, elmap2)\n",
"JuliaFEM.xdmf.xdmf_new_field(grid, \"Displacement\", \"nodes\", u)\n",
"print(xdoc)\n",
"JuliaFEM.xdmf.xdmf_save_model(xdoc, \"/tmp/foo3d.xmf\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 0.4.0-dev",
"language": "julia",
"name": "julia-0.4"
},
"language_info": {
"name": "julia",
"version": "0.4.0"
}
},
"nbformat": 4,
"nbformat_minor": 0
}