next up previous
Next: Appendix 2: three_spheres.fe Up: "SURFACE EVOLVER" AS Previous: Acknowledgements:

Appendix 1: boundary_phase.fe

]  

/* boundary_phase.fe
--------
Rectangular prism of volume 1 and height="height"
Grain Boundaries at the prism faces.
Second Phase at prism edges,
with dihedral angle = "dihedral_angle"
Volume of Primary Phase = "theoretical_density"
All PARAMETERS adjustable with
the "A" single-letter evolver command.
Only upper octant of prism modeled,
other parts can be viewed
using the group generators included here (mmm).

Have Fun, Right to use unlimited.
W. Craig Carter, NIST, wcraig@pruffle.nist.gov
6 Feb. 1996

*/

PARAMETER theoretical_density = 0.75
PARAMETER dihedral_angle = 120
PARAMETER height = 1

#define width sqrt(1/height)
#define depth sqrt(1/height)
#define effective_tension (cos(dihedral_angle*pi/360))
#define offset 0.8

/** symmetry stuff, ignore this if you are new to Evolver *

view_transform_generators 3 //three mirror planes
//to generate full rectangular symmetry
//only the 3x3 upper submatrix matters
//for our purposes

-1 0 0 0 //a: mirror across X
0 1 0 0
0 0 1 0
0 0 0 1

1 0 0 0 //b: mirror across Y
0 -1 0 0
0 0 1 0
0 0 0 1

1 0 0 0 //c: mirror across Z
0 1 0 0
0 0 -1 0
0 0 0 1
/***** end of symmetry stuff **************************

constraint 1 //top of prism
formula: z = height //normal -k
energy: // vector integrand for effective energy
e1: effective_tension*y // components are: (e1,e2,e3)
e2: 0
e3: 0
content: //vector integrand for volume
c1: 0 // from constraint surface
c2: -height*x
c3: 0

constraint 2 //right side
formula: y = width//normal -j
energy:
e1: 0
e2: 0
e3: effective_tension*x

constraint 3 //front side
formula: x = depth //normal -i
energy:
e1: 0
e2: effective_tension*z
e3: 0

constraint 11 //mirror plane
formula: z = 0

constraint 12 //mirror plane
formula: y = 0

constraint 13 //mirror plane
formula: x = 0

vertices //given as: vertex_id x y x and which constraint
11 offset 0 1 constraint 1 12
12 offset offset 1 constraint 1
13 0 offset 1 constraint 1 13

21 0 1 height*offset constraint 2 13
22 offset 1 height*offset constraint 2
23 offset 1 0 constraint 2 11

31 1 offset 0 constraint 3 11
32 1 offset height*offset constraint 3
33 1 0 height*offset constraint 3 12

edges //given as: id head_vertex_id tail_vertex_id and constraint
// Evolver will do line integrals for edges on constraints
// to account for energy and volume
1133 11 33 constraint 12
3332 33 32 constraint 3
3212 32 12
1211 12 11 constraint 1

1222 12 22
2221 22 21 constraint 2
2113 21 13 constraint 13
1312 13 12 constraint 1

3123 31 23 constraint 11
2322 23 22 constraint 2
2232 22 32
3231 32 31 constraint 3

faces // given as list of oriented edges
1 1133 3332 3212 1211 color red //it is useful to use colors
2 1222 2221 2113 1312 color green //to identify which is which
3 3123 2322 2232 3231 color blue
4 -1222 -3212 -2232

bodies
1 1 2 3 4 volume theoretical_density
/* We have one body made up of four faces
the faces have edges which lie on constraints
which encloses the body and add volume through
line integral of content vector field.

read //i.e., read the rest as Evolver commands
//P 8 /*
Commented out, use only for fancy graphics, see manual for
graphics commands for the system you use.
*/
//r; g30 ; u ; V ; g30 ; r ; g30 ; quadratic ; U ; g50
/*
Suggested method to produce
decent result and one illustrated in figure.
*/

//transform_expr "abc"
/*If graphics are on, this generates,
by symmetry, the whole prism.*/


next up previous
Next: Appendix 2: three_spheres.fe Up: "SURFACE EVOLVER" AS Previous: Acknowledgements:

W. Craig Carter
Wed Feb 28 11:27:46 EST 1996