Skip to content

Commit 3e8975b

Browse files
committed
add example
1 parent 05a773b commit 3e8975b

File tree

15 files changed

+308
-0
lines changed

15 files changed

+308
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,8 @@ This page uses animated gifs. In Firefox, you might want to install the plugin [
186186
width="200"
187187
title="Tensile test of an FDM structure perpendicular to the layer plane">
188188
](RVE/PlanarSlide)
189+
[<img
190+
src="RVE/PlaneOrtho1/exp.png"
191+
width="200"
192+
title="Tensile test of an FDM structure perpendicular to the layer plane, generalized plane strain">
193+
](RVE/PlaneOrtho1)

RVE/PlaneOrtho1/README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Tensile Test of FDM layers, plane and orthogonal boundaries
2+
Tested with CGX/CCX 2.11
3+
4+
Tensile test of unidirectional FDM (3D printed) layers with load application perpendicular to the printing plane. The layed roads only partially bond between each other and to the layer below. The localized strains at the resulting notches lead to material failure at global strains much below the maximum elongation of the base material (embrittlement).
5+
6+
The test specimen is a quarter unit cell out of an infinite Block of layers. This is not restricting the deformation as long as no global shear is to be applied. A uniaxial tensile test can be performed without restricting the overall transverse strain.
7+
8+
+ Large displacements
9+
+ Plasticity
10+
+ The structure is parametrized using CGX valu due to it's simplicity
11+
+ Enforced brick shape of the unit cell using MPCs
12+
+ Handover of load parameters to the CCX file
13+
+ Handover of parameters to the gnuplot file
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+
| [verify.fbd](verify.fbd) | Post-processing script for CGX (displacement plots) |
21+
| [pe.gnu](pe.gnu) | Gnuplot control script |
22+
| [Zug.inp](Zug.inp) | CCX input |
23+
24+
## Preprocessing
25+
26+
```
27+
> cgx -b RVE.fbd
28+
```
29+
30+
The geometry consists of brick with a fillet along a single edge, representing a quarter section of an FDM road.
31+
32+
The mesh is controlled by a global node distance.
33+
34+
| Parameter | Value | Meaning |
35+
| :------------- | :------------- | :------------- |
36+
| `lx` | 0.02 | length in axial direction in mm |
37+
| `ly` | 0.5 | road width in mm |
38+
| `lz` | 0.25 | layer thickness in mm |
39+
| `rad` | 0.1 | fillet radius |
40+
| `le` | 0.01 | node distance on edges |
41+
| `ez` | 0.1 | global engineering strain in z direction |
42+
43+
44+
Boundary conditions:
45+
* ux = 0 at x = 0 (symmetry boundary)
46+
* uy = 0 at y = 0 (symmetry boundary)
47+
* uz = 0 at z = 0 (symmetry boundary)
48+
* uz = ez/100*lz at z = lz (prescribed displacement)
49+
* ux all equal at x = lx (parallel to yz plane)
50+
* uy all equal at y = ly/2 (parallel to xz plane)
51+
52+
<img src="mesh.png" width="400">
53+
54+
Compared to the less sophisticated [example](RVE/PlanarSlide), the model require only a fraction (a single layer) of the elements in x-direction and just one quarter of the section.
55+
56+
## Solving
57+
58+
```
59+
> ccx Zug
60+
> monitor.py Zug
61+
```
62+
The second command generates a convergence history plot of the solution.
63+
<img src="Zug.png" title="Convergence history">
64+
65+
## Postprocessing
66+
67+
First, let's verify the boundary conditions.
68+
* Uniform UX at x = lx
69+
* Uniform UY at y = ly
70+
71+
```
72+
> cgx -b verify.fbd
73+
```
74+
75+
76+
<img src="dx.png" width="400" title="Displacement in x">
77+
<img src="dy.png" width="400" title="Displacement in y">
78+
79+
80+
81+
```
82+
> cgx -b post.fbd
83+
```
84+
This creates a stress-strain curve and an expanded plot of the equivalent plastic strain.
85+
86+
<img src="exp.png" width="400" title="Equivalent plastic strain">
87+
<img src="pe.png" width="500" title="Local strain and global stress">
88+
89+
You can generate the curves separately using the commands:
90+
91+
```
92+
> dat2txt.py Zug
93+
> gnuplot pe.gnu
94+
```

RVE/PlaneOrtho1/RVE.fbd

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
valu lx 0.02
2+
valu width 0.5
3+
valu height 0.25
4+
valu rad 0.1
5+
valu le 0.01
6+
valu ez 0.1
7+
8+
valu factor 0.01
9+
valu tol * factor le
10+
valu two 2
11+
valu ly / width two
12+
valu lz / height two
13+
# create rectangle with fillet
14+
pnt p0 0 0 0
15+
pnt py 0 ly 0
16+
pnt pz 0 0 lz
17+
pnt pyz 0 ly lz
18+
line l1 p0 py
19+
line l2 py pyz
20+
line l3 pyz pz
21+
line l4 pz p0
22+
fil l4 l1 rad
23+
# plot entity labels
24+
plot la all
25+
plus pa all
26+
frame
27+
rot x
28+
rot c 90
29+
hcpy png
30+
sys mv hcpy_1.png section.png
31+
# create surface and extrusion
32+
surf s1 l1 l2 l3 l4 L001
33+
swep all new tra lx 0 0
34+
35+
# meshing
36+
# control nodes for plane xl
37+
seta control p p0
38+
div all auto le
39+
elty all te10
40+
mesh all
41+
send all abq
42+
plot f all n
43+
view elem
44+
# definitions of sets
45+
seta nodes n all
46+
enq nodes x0 rec 0 _ _ tol
47+
enq nodes y0 rec _ 0 _ tol
48+
enq nodes z0 rec _ _ 0 tol
49+
enq nodes zl rec _ _ lz tol
50+
enq nodes yl rec _ ly _ tol
51+
enq nodes xl rec lx _ _ tol
52+
enq nodes monitor rec 0 rad 0 tol
53+
send all abq nam
54+
# set displacement
55+
valu disp * ez lz
56+
sys echo Nzl,3,3, disp > disp.inc
57+
# set uy at three points in y=ly to be equal
58+
# define control nodes
59+
stack on
60+
enq xl n110 rec lx ly 0 tol
61+
valu v110 pop
62+
enq xl n111 rec lx ly lz tol
63+
valu v111 pop
64+
enq x0 n010 rec 0 ly 0 tol
65+
valu v010 pop
66+
enq xl n101 rec lx 0 lz tol
67+
valu v101 pop
68+
# control nodes found: v110 v111 v010 v101
69+
# write equations
70+
sys echo *equation > equations.inc
71+
sys echo 2 >> equations.inc
72+
sys echo v110 , 2, -1, v111 , 2, 1 >> equations.inc
73+
sys echo 2 >> equations.inc
74+
sys echo v010 , 2 ,-1, v111 , 2, 1 >> equations.inc
75+
sys echo 2 >> equations.inc
76+
sys echo v110 , 1, -1, v111 , 1, 1 >> equations.inc
77+
sys echo 2 >> equations.inc
78+
sys echo v101 , 1 ,-1, v111 , 1, 1 >> equations.inc
79+
sys echo *mpc >> equations.inc
80+
sys echo Plane, v111 , v110 , v101 , Nxl >> equations.inc
81+
sys echo *mpc >> equations.inc
82+
sys echo Plane, v110 , v111 , v010 , Nyl >> equations.inc
83+
# define reduced sets (remove control nodes)
84+
setr xl n v110 v111 v101
85+
setr yl n v110 v111 v010
86+
send all abq nam
87+
88+
# export values to gnuplot
89+
valu area * lx ly
90+
sys echo ez= ez > ez.gnu
91+
sys echo area= area >> ez.gnu
92+
# mesh image
93+
plot f all n
94+
frame
95+
rot x
96+
rot c 90
97+
rot r 30
98+
rot u 30
99+
hcpy png
100+
sys mv hcpy_2.png mesh.png

RVE/PlaneOrtho1/Zug.inp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
*include,input=all.msh
2+
*include,input=x0.nam
3+
*include,input=y0.nam
4+
*include,input=z0.nam
5+
*include,input=xl.nam
6+
*include,input=yl.nam
7+
*include,input=zl.nam
8+
** symmetry
9+
*boundary
10+
Nx0, 1
11+
Ny0, 2
12+
Nz0, 3
13+
** parallelity constraints
14+
*include,input=equations.inc
15+
** material definition
16+
*material, name=ABS
17+
*elastic
18+
2000,0.3,0
19+
*density
20+
1e-9
21+
*plastic
22+
20, 0, 0
23+
30, 2, 0
24+
*solid section, elset=Eall, material=ABS
25+
*STEP, NLGEOM,inc=200
26+
*STATIC
27+
0.01,1,,0.1
28+
** displacement control at top
29+
*boundary
30+
*include,input=disp.inc
31+
*el file
32+
S,PEEQ
33+
*node file
34+
U
35+
*node print, totals=only, nset=Nz0
36+
RF
37+
*end step

RVE/PlaneOrtho1/Zug.png

83.4 KB
Loading

RVE/PlaneOrtho1/dx.png

15.8 KB
Loading

RVE/PlaneOrtho1/dy.png

18.9 KB
Loading

RVE/PlaneOrtho1/exp.png

23.2 KB
Loading

RVE/PlaneOrtho1/hcpy_3.png

5.84 KB
Loading

RVE/PlaneOrtho1/mesh.png

11.7 KB
Loading

0 commit comments

Comments
 (0)