Commit 88cf9567 by florez

### changes

parent 72d66e9e
cotree.pos 0 → 100644
This diff is collapsed.
 SetFactory("OpenCASCADE"); Circle(1) = {0,0,0,0.5,0,Pi}; //Point 1, 2 Circle(2) = {0, 0, 1, 0.5, 0, Pi}; //Point 3, 4 Circle(3) = {0,0,0,0.5, Pi, 2*Pi}; //Point 1, 2 Circle(4) = {0, 0, 1, 0.5, Pi, 2*Pi}; //Point 3, 4 Line(5) = {1, 3}; Line(6) = {2, 4}; Line(7) = {1, 2}; Line(8) = {3, 4}; Line Loop(9) = {1, 6, -2, -5}; Line Loop(10) = {3, 5, -4, -6}; Curve Loop(11) = {1, 7}; Curve Loop(12) = {2, 8}; Curve Loop(13) = {3, 7}; Curve Loop(14) = {4, 8}; Curve Loop(15) = {5, 8, -6, -7}; Point(1) = {0, 0, 0}; Point(2) = {0, .5, 0}; Plane Surface(1) = {11}; Plane Surface(2) = {12}; // Plane Surface(100) = {13}; // Plane Surface(101) = {14}; Plane Surface(102) = {15}; Circle(1) = {0,0,0,0.5,0,2*Pi}; Curve Loop(2) = {1}; Plane Surface(1) = {2}; Surface(3) = {9}; // Surface(4) = {10}; // Surface Loop(5) = {4, 101, 102, 100}; Surface Loop(6) = {3, 1, 102, 2}; Physical Surface("bottom") = {1}; Physical Surface("top") = {2}; Extrude {0, 0, 1} { Surface{1}; } // Volume(1) = {5}; Volume(2) = {6}; Physical Volume("volume") = {2}; Plane Surface(3) = {3} Volume(2) = {2}; Physical Surface("bottom") = {1}; Physical Surface("top") = {3}; Surface Loop(2) = {3, 2, 1}; Physical Volume("volume") = {1};
 ... ... @@ -38,8 +38,9 @@ "metadata": {}, "outputs": [], "source": [ "mesh = aka.Mesh(3)\n", "mesh.read('cyl_02.msh')\n", "spatial_dimension = 3\n", "mesh = aka.Mesh(spatial_dimension)\n", "mesh.read('cyl_03.msh')\n", "\n", "model = aka.SolidMechanicsModel(mesh)\n", "model.initFull(_analysis_method=aka._static)" ... ... @@ -52,7 +53,6 @@ "metadata": {}, "outputs": [], "source": [ "mesh.createBoundaryGroupFromGeometry()\n", "aka.parseInput(material_file)" ] }, ... ... @@ -65,9 +65,9 @@ { "data": { "text/plain": [ "array([[0.00000000e+00, 0.00000000e+00, 0.00000000e+00],\n", " [0.00000000e+00, 0.00000000e+00, 1.00506689e-05],\n", "array([[0.00000000e+00, 0.00000000e+00, 7.84378210e-06],\n", " [0.00000000e+00, 0.00000000e+00, 0.00000000e+00],\n", " [0.00000000e+00, 0.00000000e+00, 8.40429458e-06],\n", " ...,\n", " [0.00000000e+00, 0.00000000e+00, 0.00000000e+00],\n", " [0.00000000e+00, 0.00000000e+00, 0.00000000e+00],\n", ... ... @@ -103,14 +103,14 @@ "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mException\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0msolver\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"convergence_type\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maka\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSolveConvergenceCriteria\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresidual\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0mmodel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msolveStep\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0msolver\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"convergence_type\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0maka\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSolveConvergenceCriteria\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresidual\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0mmodel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msolveStep\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;31mException\u001b[0m: akantu::debug::CriticalError : Error in mumps during solve process, check mumps user guide INFO(1) = -3 [/tmp/app/spack-stage/spack-stage-akantu-master-t5tv2fws2j5an4dr4sqytng27g7b3fyr/spack-src/src/solver/sparse_solver_mumps.cc:445]" ] } ], "source": [ "solver = model.getNonLinearSolver()\n", "solver.set(\"max_iterations\", 2)\n", "solver.set(\"max_iterations\", 100)\n", "solver.set(\"threshold\", 1e-10)\n", "solver.set(\"convergence_type\", aka.SolveConvergenceCriteria.residual)\n", "\n", ... ...
 %% Cell type:code id:59a9f2d7-aadb-4d96-9b19-0cfcf7c950dc tags: ``` python import numpy as np import akantu as aka ``` %% Cell type:code id:c1339e28-e6b1-4155-b25e-f3b848025838 tags: ``` python material_file = """ material elastic [ name = steel rho = 1 # density E = 1 # young's modulus nu = 0.3 # poisson's ratio ]""" # writing the material file open('material.dat', 'w').write(material_file) #reading the material file material_file = 'material.dat' ``` %% Cell type:code id:30c1bb68-80b2-41ea-9aa6-a08daf741c9b tags: ``` python mesh = aka.Mesh(3) mesh.read('cyl_02.msh') spatial_dimension = 3 mesh = aka.Mesh(spatial_dimension) mesh.read('cyl_03.msh') model = aka.SolidMechanicsModel(mesh) model.initFull(_analysis_method=aka._static) ``` %% Cell type:code id:23cdc1b2-692e-4457-a454-89d49722e94a tags: ``` python mesh.createBoundaryGroupFromGeometry() aka.parseInput(material_file) ``` %% Cell type:code id:a1d797dd-c63c-4b8b-9aaa-5d00947a414a tags: ``` python for dir in [aka._x, aka._y, aka._z]: model.applyBC(aka.FixedValue(0, dir), "bottom") # trac = np.eye(3) trac = [0, 0, 1] model.applyBC(aka.FromTraction(trac), "top") np.set_printoptions(threshold=10) model.getExternalForce() ``` %%%% Output: execute_result array([[0.00000000e+00, 0.00000000e+00, 0.00000000e+00], [0.00000000e+00, 0.00000000e+00, 1.00506689e-05], array([[0.00000000e+00, 0.00000000e+00, 7.84378210e-06], [0.00000000e+00, 0.00000000e+00, 0.00000000e+00], [0.00000000e+00, 0.00000000e+00, 8.40429458e-06], ..., [0.00000000e+00, 0.00000000e+00, 0.00000000e+00], [0.00000000e+00, 0.00000000e+00, 0.00000000e+00], [0.00000000e+00, 0.00000000e+00, 0.00000000e+00]]) %% Cell type:code id:e26678ea-2a60-44fb-8956-6ce84db4174f tags: ``` python solver = model.getNonLinearSolver() solver.set("max_iterations", 2) solver.set("max_iterations", 100) solver.set("threshold", 1e-10) solver.set("convergence_type", aka.SolveConvergenceCriteria.residual) model.solveStep() ``` %%%% Output: error --------------------------------------------------------------------------- Exception Traceback (most recent call last) in in 4 solver.set("convergence_type", aka.SolveConvergenceCriteria.residual) 5 ----> 6 model.solveStep() Exception: akantu::debug::CriticalError : Error in mumps during solve process, check mumps user guide INFO(1) = -3 [/tmp/app/spack-stage/spack-stage-akantu-master-t5tv2fws2j5an4dr4sqytng27g7b3fyr/spack-src/src/solver/sparse_solver_mumps.cc:445] ... ...
This diff is collapsed.
This diff is collapsed.
 View " "{ SL(-0.5,-6.12323e-17,1,-0.5,-6.12323e-17,0.9){0,0}; SL(0.4,1.04095e-16,0,0.5,6.12323e-17,0){1,1}; SL(-0.5,-6.12323e-17,0,-0.4,-4.28626e-17,0){2,2}; SL(0.5,6.12323e-17,1,0.490393,-0.0975452,1){3,3}; SL(-0.490393,-0.0975452,1,-0.5,-6.12323e-17,1){4,4}; SL(0.490393,-0.0975452,1,0.46194,-0.191342,1){5,5}; SL(0.46194,-0.191342,1,0.415735,-0.277785,1){6,6}; SL(0.415735,-0.277785,1,0.353553,-0.353553,1){7,7}; SL(0.353553,-0.353553,1,0.277785,-0.415735,1){8,8}; SL(0.277785,-0.415735,1,0.191342,-0.46194,1){9,9}; SL(0.191342,-0.46194,1,0.0975452,-0.490393,1){10,10}; SL(0.0975452,-0.490393,1,1.80697e-15,-0.5,1){11,11}; SL(1.80697e-15,-0.5,1,-0.0975452,-0.490393,1){12,12}; SL(-0.0975452,-0.490393,1,-0.191342,-0.46194,1){13,13}; SL(-0.191342,-0.46194,1,-0.277785,-0.415735,1){14,14}; SL(-0.277785,-0.415735,1,-0.353553,-0.353553,1){15,15}; SL(-0.353553,-0.353553,1,-0.415735,-0.277785,1){16,16}; SL(-0.415735,-0.277785,1,-0.46194,-0.191342,1){17,17}; SL(-0.46194,-0.191342,1,-0.490393,-0.0975452,1){18,18}; SL(-0.4,-4.28626e-17,0,-0.3,-2.44929e-17,0){19,19}; SL(-0.3,-2.44929e-17,0,-0.2,-6.12323e-18,0){20,20}; SL(-0.2,-6.12323e-18,0,-0.1,1.22465e-17,0){21,21}; SL(-0.1,1.22465e-17,0,0,3.06162e-17,0){22,22}; SL(0,3.06162e-17,0,0.1,4.89859e-17,0){23,23}; SL(0.1,4.89859e-17,0,0.2,6.73556e-17,0){24,24}; SL(0.2,6.73556e-17,0,0.3,8.57253e-17,0){25,25}; SL(0.3,8.57253e-17,0,0.4,1.04095e-16,0){26,26}; SL(-0.5,-6.12323e-17,1,-0.4,-4.28626e-17,1){27,27}; SL(-0.4,-4.28626e-17,1,-0.3,-2.44929e-17,1){28,28}; SL(-0.3,-2.44929e-17,1,-0.2,-6.12323e-18,1){29,29}; SL(-0.2,-6.12323e-18,1,-0.1,1.22465e-17,1){30,30}; SL(-0.1,1.22465e-17,1,0,3.06162e-17,1){31,31}; SL(0,3.06162e-17,1,0.1,4.89859e-17,1){32,32}; SL(0.1,4.89859e-17,1,0.2,6.73556e-17,1){33,33}; SL(0.2,6.73556e-17,1,0.3,8.57253e-17,1){34,34}; SL(0.4,1.04095e-16,1,0.5,6.12323e-17,1){35,35}; SL(-0.5,-6.12323e-17,0.1,-0.5,-6.12323e-17,0){36,36}; SL(-0.5,-6.12323e-17,0.2,-0.5,-6.12323e-17,0.1){37,37}; SL(-0.5,-6.12323e-17,0.3,-0.5,-6.12323e-17,0.2){38,38}; SL(-0.5,-6.12323e-17,0.4,-0.5,-6.12323e-17,0.3){39,39}; SL(-0.5,-6.12323e-17,0.5,-0.5,-6.12323e-17,0.4){40,40}; SL(-0.5,-6.12323e-17,0.6,-0.5,-6.12323e-17,0.5){41,41}; SL(-0.5,-6.12323e-17,0.7,-0.5,-6.12323e-17,0.6){42,42}; SL(-0.5,-6.12323e-17,0.8,-0.5,-6.12323e-17,0.7){43,43}; SL(-0.5,-6.12323e-17,0.9,-0.5,-6.12323e-17,0.8){44,44}; SL(0.5,6.12323e-17,1,0.490393,-0.0975452,1){45,45}; SL(0.490393,-0.0975452,1,0.46194,-0.191342,1){46,46}; SL(0.46194,-0.191342,1,0.415735,-0.277785,1){47,47}; SL(0.415735,-0.277785,1,0.353553,-0.353553,1){48,48}; SL(0.353553,-0.353553,1,0.277785,-0.415735,1){49,49}; SL(0.277785,-0.415735,1,0.191342,-0.46194,1){50,50}; SL(0.191342,-0.46194,1,0.0975452,-0.490393,1){51,51}; SL(0.0975452,-0.490393,1,1.80697e-15,-0.5,1){52,52}; SL(1.80697e-15,-0.5,1,-0.0975452,-0.490393,1){53,53}; SL(-0.0975452,-0.490393,1,-0.191342,-0.46194,1){54,54}; SL(-0.191342,-0.46194,1,-0.277785,-0.415735,1){55,55}; SL(-0.277785,-0.415735,1,-0.353553,-0.353553,1){56,56}; SL(-0.353553,-0.353553,1,-0.415735,-0.277785,1){57,57}; SL(-0.415735,-0.277785,1,-0.46194,-0.191342,1){58,58}; SL(-0.490393,-0.0975452,1,-0.5,-6.12323e-17,1){59,59}; SL(0.5,6.12323e-17,0,0.5,1.22465e-16,0.1){60,60}; SL(0.5,1.22465e-16,0.1,0.5,1.22465e-16,0.2){61,61}; SL(0.5,1.22465e-16,0.2,0.5,1.22465e-16,0.3){62,62}; SL(0.5,1.22465e-16,0.3,0.5,1.22465e-16,0.4){63,63}; SL(0.5,1.22465e-16,0.4,0.5,1.22465e-16,0.5){64,64}; SL(0.5,1.22465e-16,0.5,0.5,1.22465e-16,0.6){65,65}; SL(0.5,1.22465e-16,0.6,0.5,1.22465e-16,0.7){66,66}; SL(0.5,1.22465e-16,0.7,0.5,1.22465e-16,0.8){67,67}; SL(0.5,1.22465e-16,0.9,0.5,6.12323e-17,1){68,68}; SL(0.3,8.57253e-17,1,0.4,1.04095e-16,1){69,69}; SL(-0.46194,-0.191342,1,-0.490393,-0.0975452,1){70,70}; SL(0.5,1.22465e-16,0.8,0.5,1.22465e-16,0.9){71,71}; };
This diff is collapsed.
cyl_03.geo 0 → 100644
 //+ SetFactory("OpenCASCADE"); //+ Cylinder(1) = {0, 0, 0, 0, 0, 1, 0.5, 2*Pi}; //+ Surface Loop(2) = {1, 2, 3}; //+ Volume(2) = {2}; Physical Surface("bottom") = {3}; Physical Surface("top") = {2};
cyl_03.msh 0 → 100644
This diff is collapsed.
gc.pos 0 → 100644
This diff is collapsed.
sing.pos 0 → 100644
 View "S"{ SP(0.239464,0.263392,0){1}; SP(-0.246467,0.235298,0){1}; SP(0.239464,0.263392,1){1}; SP(-0.246467,0.235298,1){1}; SP(-0.239415,-0.263395,0){1}; SP(0.234488,-0.263872,0){1}; SP(-0.239415,-0.263395,1){1}; SP(0.234488,-0.263872,1){1}; };
sq_01.geo 0 → 100644
 //+ SetFactory("OpenCASCADE"); Box(1) = {0, 0, 0, 1, 1, 1}; //+ Physical Surface("top") = {6}; //+ Physical Surface("bottom") = {5};
sq_01.msh 0 → 100644
This diff is collapsed.
tree.pos 0 → 100644
This diff is collapsed.
visited.pos 0 → 100644
 View""{ VL(0.5,1.22465e-16,0.9,0.496604,-0.0950963,0.843682){-0.0051873,0.0115274,0.99992,-0.0051873,0.0115274,0.99992}; VL(0.496604,-0.0950963,0.843682,0.5,1.22465e-16,0.8){-0.0148623,0.0125251,0.999811,-0.0148623,0.0125251,0.999811}; };
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!