-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathmain.py
56 lines (38 loc) · 914 Bytes
/
main.py
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
39
40
41
42
43
44
45
46
47
# Nicolo Grilli
# University of Oxford
# AWE project 2020
# 4 giugno 2020
# main function
import numpy as np
from numpy import genfromtxt
from abaqusparser import AbaqusParser
from mesh import Mesh
from interfnode import Interfnode
from newmesh import NewMesh
# parse abaqus input file
inpfile = AbaqusParser('Job-1')
inpfile.ReadElsets()
inpfile.ReadNodes()
inpfile.ReadBulkElems()
# create mesh and parse file
m = Mesh('Job-1')
m.ReadElsets('Job-1')
# operations on the mesh
m.CreateConnectivity()
m.FindInterfNodes()
m.FindInterfElems()
m.CreateFaces()
m.CreateOrderCohNodes()
# create new mesh and operations
nm = NewMesh(m)
nm.CreateTwinNodes()
nm.MakeNewBulkElems()
nm.MakeNewInterfElems()
# write new mesh to file
nm.WriteNewNodeFile('Job-1')
nm.WriteNewElemsFile('Job-1')
# cohesive elements
nm.CreateCohesiveElems()
nm.WriteCohElems('Job-1')
# dummy elements
nm.WriteDummyElems('Job-1')