Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ZibraMax committed Mar 21, 2021
1 parent 232e4e4 commit 328f93c
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 2 deletions.
80 changes: 79 additions & 1 deletion AFEM.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: AFEM
Version: 1.0.1
Version: 1.0.2
Summary: A finite element Python implementation
Home-page: https://github.com/ZibraMax/FEM
Author: Arturo Rodriguez
Expand Down Expand Up @@ -28,6 +28,84 @@ Description:
- Solve!
- For example: Test 2, Test 5, Test 11-14

#### Example without geometry file (Test 2):
```python
import matplotlib.pyplot as plt #Import libraries
import FEM #import AFEM
from FEM import Mesh #Import Meshing tools

#Define some variables with geometric properties
a = 0.3
b = 0.3
tw = 0.05
tf = 0.05

#Define material constants
E = 200000
v = 0.27
G = E / (2 * (1 + v))
phi = 1 #Rotation angle

#Define domain coordinates
vertices = [
[0, 0],
[a, 0],
[a, tf],
[a / 2 + tw / 2, tf],
[a / 2 + tw / 2, tf + b],
[a, tf + b],
[a, 2 * tf + b],
[0, 2 * tf + b],
[0, tf + b],
[a / 2 - tw / 2, tf + b],
[a / 2 - tw / 2, tf],
[0, tf],
]

#Define triangulation parameters with `_strdelaunay` method.
params = Mesh.Delaunay._strdelaunay(constrained=True, delaunay=True,
a='0.00003', o=2)
#**Create** geometry using triangulation parameters. Geometry can be imported from .msh files.
geometry = Mesh.Delaunay1V(vertices, params)

#Save geometry to .msh file
geometry.saveMesh('I_test')

#Create torsional 2D analysis.
O = FEM.Torsion2D(geometry, G, phi)
#Solve the equation in domain.
#Post process and show results
O.solve()
plt.show()

```

#### Example with geometry file (Test 2):

```python
import matplotlib.pyplot as plt #Import libraries
import FEM #import AFEM
from FEM import Mesh #Import Meshing tools

#Define material constants.
E = 200000
v = 0.27
G = E / (2 * (1 + v))
phi = 1 #Rotation angle

#Load geometry with file.
geometry = Mesh.Geometry.loadmsh('I_test.msh')

#Create torsional 2D analysis.
O = FEM.Torsion2D(geometry, G, phi)
#Solve the equation in domain.
#Post process and show results
O.solve()
plt.show()


```

### Creating equation classes

Note: Don't forget the docstring!
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
EMAIL = 'da.rodriguezh@uniandes.edu.co'
AUTHOR = 'Arturo Rodriguez'
REQUIRES_PYTHON = '>=3.6.0'
VERSION = '1.0.1'
VERSION = "1.0.2"

# What packages are required for this module to be executed?
REQUIRED = [
Expand Down

0 comments on commit 328f93c

Please sign in to comment.