File: tankex.fe

package info (click to toggle)
evolver 2.70+ds-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 17,148 kB
  • sloc: ansic: 127,395; makefile: 209; sh: 98
file content (101 lines) | stat: -rw-r--r-- 2,715 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// tankex.fe

// Equilibrium shape of liquid in flat-ended cylindrical tank.

// Tank has axis along y-axis and flat bottom in x-z plane.  This
// is so gravity acting vertically draws liquid toward wall.

// Straight edges cannot conform exactly to curved walls.  
// We need to give them an area so that area cannot shrink by straght edges 
// pulling away from the walls. The gaps are also accounted for
// in volume and gravitational energy.

SYMMETRIC_CONTENT     // for volume calculations

// Contact angles, initially for 45 degrees.
PARAMETER ENDT  = 0.707   /* surface tension of uncovered base   */
PARAMETER WALLT = 0.707   /* surface tension of uncovered side wall */

// Gravity components
PARAMETER GY = 0
PARAMETER GZ = -1

SPRING_CONSTANT 1  // for most accurate gap areas for constraint 2

#define  TR  1.00       /* tank radius */
#define  RHO 1.00       /* fuel density */

constraint 1  // flat base
function:  y = 0
energy:               // for contact energy line integral
e1:   -ENDT*z
e2:   0
e3:   0

#define wstuff (WALLT*TR*y/(x^2 + z^2))   // common wall area term
#define vstuff (TR^2/3*y/(x^2 + z^2))     // common wall volume term
#define gstuff (GY*TR^2*y^2/4/(x^2 + z^2) + GZ*TR^3*y*z/3/(x^2+z^2)**1.5)
                                          // common gap gravity term

constraint 2  CONVEX         // cylindrical wall
function:  x^2 + z^2 = TR^2
energy:                // for contact energy and gravity
e1:  -wstuff*z  + RHO*GY*y^2*z/4 + RHO*GZ*y*z^2/3 - RHO*gstuff*z
e2:    0
e3:   wstuff*x  - RHO*GY*y^2*x/4 - RHO*GZ*y*z*x/3 + RHO*gstuff*x
content:               // so volumes calculated correctly
c1:   vstuff*z - z*y/6 + vstuff*z/2
c2:    0
c3:  -vstuff*x + x*y/6 - vstuff*x/2

// named quantity for arbitrary direction gravity on facets
quantity arb_grav energy method facet_vector_integral global
vector_integrand:
q1:  0
q2:  -RHO*GY*y^2/2 - RHO*GZ*y*z
q3:  0


// Now the specification of the initial shape

vertices
1    0.5  0.0  0.5  constraint 1
2    0.5  0.0 -0.5  constraint 1
3   -0.5  0.0 -0.5  constraint 1
4   -0.5  0.0  0.5  constraint 1
5    1.0  0.5  0.0  constraint 2
6    0.0  0.5 -1.0  constraint 2
7   -1.0  0.5  0.0  constraint 2
8    0.0  0.5  1.0  constraint 2

edges
1    2  1  constraint 1
2    1  4  constraint 1
3    4  3  constraint 1
4    3  2  constraint 1
5    5  6  constraint 2
6    6  7  constraint 2
7    7  8  constraint 2
8    8  5  constraint 2
9    1  8
10   1  5
11   2  5
12   2  6
13   3  6
14   3  7
15   4  7
16   4  8

faces
1   13   6 -14
2    3  14 -15 
3   15   7 -16
4    2  16  -9
5    9   8 -10
6    1  10 -11
7   11   5 -12
8    4  12 -13

bodies
1    1 2 3 4 5 6 7 8   volume 0.6  density 0  /* no default gravity */