-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathteste_incrementos.py
More file actions
38 lines (27 loc) · 829 Bytes
/
teste_incrementos.py
File metadata and controls
38 lines (27 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import time
import pyFEM
# inicia contagem do tempo
start_time = time.time()
# carrega o arquivo de malha do gmsh
mesh = pyFEM.pre.Malha("malha.msh")
# define e aplica o material
mat = pyFEM.materiais.Material(2e+7, 0.3, 0.1)
mesh.defineElementos(mat)
# aplica os apoios
mesh.Apoios(mesh.grupos['apoio'])
# aplica as forças
mesh.Forcas(mesh.linhas['topo'], [0, -100])
# inicializa o solver
solv = pyFEM.solver.Solver(mesh)
# resolve e exporta
solv.calcularInc(10, "malhaA")
umx = solv.U[1*2+1]*1000
print("Deslocamento incremental = %.3f mm\n" % umx)
# resolve e exporta
solv.calcular()
solv.exportar("malhaB")
# tempo de processamento
elapsed_time = time.time() - start_time
# deslocamento vertical do nó inferior da extreminde livre (Nó #1)
umx = solv.U[1*2+1]*1000
print("Deslocamento normal = %.3f mm\n" % umx)