... | @@ -27,18 +27,19 @@ In general, the strain averaging theorem and the Hill-Mandel condition are sasti |
... | @@ -27,18 +27,19 @@ In general, the strain averaging theorem and the Hill-Mandel condition are sasti |
|
Geometry and mesh are prepared using Gmsh. Note that the solver identifies the group of elements through *Physical* groups.
|
|
Geometry and mesh are prepared using Gmsh. Note that the solver identifies the group of elements through *Physical* groups.
|
|
|
|
|
|
# Python code structure
|
|
# Python code structure
|
|
## include python library after compiling the code
|
|
## Include python library after compiling the code
|
|
The PYTHONPATH to the compiled directory must be specified in .bashrc for both gmsh and the solve, then the following line must be added in the beginning of the python file:
|
|
The PYTHONPATH to the compiled directory must be specified in .bashrc for both gmsh and the solve, then the following line must be added in the beginning of the python file:
|
|
```python
|
|
```python
|
|
from gmshpy import *
|
|
from gmshpy import *
|
|
from dG3Dpy import*
|
|
from dG3Dpy import*
|
|
```
|
|
```
|
|
## define Material law and Domain
|
|
## Define Material law and Domain
|
|
The basic principle of the FE implementation is to divide the whole domain of interest by domains. Each domain possesses its own constitutive behavior govering by a material law. Mechanical, thermal, or multi-physical coupled domain-material law can be used.
|
|
The basic principle of the FE implementation is to divide the whole domain of interest by domains. Each domain possesses its own constitutive behavior govering by a material law. Mechanical, thermal, or multi-physical coupled domain-material law can be used.
|
|
### *Material law*
|
|
### *Material law*
|
|
```python
|
|
```python
|
|
law = MaterialLawName(matNum, Arguments)
|
|
law = MaterialLawName(matNum, Arguments)
|
|
```
|
|
```
|
|
|
|
where the number *matNum* must be a unique integer to identify the law, *MaterialLawName* and its arguments *Arguments* can be found in the source of the code. For example, a *J2* plastic model can be defined as follows:
|
|
```python
|
|
```python
|
|
lawnum1 = 11 # unique number of law
|
|
lawnum1 = 11 # unique number of law
|
|
E = 210E3
|
|
E = 210E3
|
... | | ... | |