Skip to content

Commit 8f82b6e

Browse files
committed
add periodic boundary script and example
1 parent 4050fc9 commit 8f82b6e

File tree

12 files changed

+290
-1
lines changed

12 files changed

+290
-1
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,8 @@ This page uses animated gifs. In Firefox, you might want to install the plugin [
191191
width="200"
192192
title="Tensile test of an FDM structure perpendicular to the layer plane, generalized plane strain">
193193
](RVE/PlaneOrtho1)
194+
[<img
195+
src="RVE/Periodic/se-rot.png"
196+
width="200"
197+
title="Representative volume element with periodic boundary conditions">
198+
](RVE/Periodic)

RVE/Periodic/README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# RVE with periodic boundary conditions
2+
Tested with CGX/CCX 2.11
3+
4+
This is a generic RVE of a fiber-matrix compound.
5+
6+
+ Brick-shaped unit cell
7+
+ Structured mesh
8+
+ Location based assignment of material to elements
9+
+ Periodic boundary conditions applied via helper script `periodic.py`
10+
11+
Todo:
12+
+ Output of the average nominal stress
13+
+ Comfortable specification of load histories
14+
15+
16+
| File | Contents |
17+
| :------------- | :------------- |
18+
| [RVE.fbd](RVE.fbd) | Pre-processing script for CGX (parametrized with valu commands) |
19+
| [post.fbd](post.fbd) | Post-processing script for CGX (stress-strain curve and deformed plot) |
20+
| [Solve.inp](Solve.inp) | CCX input |
21+
22+
## Preprocessing
23+
24+
```
25+
> cgx -b RVE.fbd
26+
> periodic.py all.msh
27+
```
28+
29+
The RVE represents a matrix material with unidirectional fibers arranged at a rectangular grid. Dimension `lx` is irrelevant, as the material is uniform
30+
in x direction. Dimensions `ly` and `lz` represent the fiber grid lengths.
31+
32+
The mesh consists of C3D8I elements and is controlled by a global node distance.
33+
34+
| Parameter | Value | Meaning |
35+
| :------------- | :------------- | :------------- |
36+
| `lx` | 1 | length in x in mm |
37+
| `ly` | 1 | length in y in mm |
38+
| `lz` | 1 | length in z in mm |
39+
| `rad` | 0.2 | fiber radius |
40+
| `le` | 0.1 | node distance |
41+
42+
Constraints:
43+
44+
* `periodic.py` produces set definitions for control nodes and the equations for periodicity.
45+
* Components of the average deformation gradient or of the average nominal stress (first Piola-Kirchhoff stress) can be specified as displacements or forces at the control nodes.
46+
47+
<img src="matrix.png" width="400"><img src="fiber.png" width="400">
48+
49+
## Solving
50+
```
51+
> ccx Solve
52+
```
53+
54+
## Postprocessing
55+
56+
Plots of the equivalent stress, the periodicity of the deformation is visible.
57+
```
58+
> cgx -b post.fbd
59+
```
60+
61+
62+
<img src="se.png" width="400" title="Displacement in x">
63+
<img src="se-rot.png" width="400" title="Displacement in y">

RVE/Periodic/RVE.fbd

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
valu lx 1
2+
valu ly 1
3+
valu lz 1
4+
valu le 0.1
5+
valu rad 0.21
6+
valu tol 0.00001
7+
8+
# create the cube
9+
pnt p0 0 0 0
10+
swep all new tra lx 0 0
11+
swep all new tra 0 ly 0
12+
swep all new tra 0 0 lz
13+
14+
# meshing
15+
div all auto le
16+
elty all he8i
17+
mesh all
18+
send all abq
19+
20+
# create fiber (cylinder along x in the center)
21+
valu two 2
22+
valu my / ly two
23+
valu mz / lz two
24+
seta nodes n all
25+
enq nodes fiber rec _ my mz rad
26+
comp fiber up
27+
28+
# define set for the matrix
29+
seta matrix se all
30+
setr matrix e fiber
31+
32+
# write set definitions
33+
send all abq nam
34+
35+
# images
36+
view elem
37+
frame
38+
plot e fiber r
39+
hcpy png
40+
sys mv hcpy_1.png fiber.png
41+
plot e matrix n
42+
hcpy png
43+
sys mv hcpy_2.png matrix.png

RVE/Periodic/Solve.inp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
*include,input=all.msh
2+
*include,input=fiber.nam
3+
*include,input=matrix.nam
4+
** constraints
5+
*include,input=periodic.equ
6+
*boundary
7+
n0, 1,3
8+
*material, name=matrix
9+
*elastic
10+
2000,0.3,0
11+
*material, name=fiber
12+
*elastic
13+
150000,0.3,0
14+
*solid section, elset=Ematrix, material=matrix
15+
*solid section, elset=Efiber, material=fiber
16+
*STEP, NLGEOM,inc=200
17+
*STATIC
18+
*boundary
19+
nx,1,1,0.2
20+
nx,2,3
21+
ny,3,3,0.2
22+
nz,2,2,0
23+
*el file
24+
S
25+
*node file
26+
U
27+
*end step

RVE/Periodic/fiber.png

9.67 KB
Loading

RVE/Periodic/matrix.png

14.7 KB
Loading

RVE/Periodic/mesh.png

11.7 KB
Loading

RVE/Periodic/post.fbd

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
read Solve.frd
2+
3+
ds 2 e 7
4+
view disp
5+
view elem
6+
plot fv all
7+
rot -x
8+
rot c -90
9+
frame
10+
hcpy png
11+
sys mv hcpy_1.png se.png
12+
rot r 20
13+
rot u 20
14+
frame
15+
hcpy png
16+
sys mv hcpy_2.png se-rot.png

RVE/Periodic/se-rot.png

21.3 KB
Loading

RVE/Periodic/se.png

17.4 KB
Loading

0 commit comments

Comments
 (0)