Attachments mentioned in last e-mail are attached.
Andy
----------------------
Andrew Reeve
Dept. of Earth Science
University of Maine
Orono, ME 04469
On Tue, 25 Mar 2008, asreeve wrote:
Date: Tue, 25 Mar 2008 13:51:19 -0400 (EDT)
From: asreeve <[EMAIL PROTECTED]>
To: Multiple recipients of list <[email protected]>
Subject: FiPy vertex numbering and cell volumes.
Jonathan and Daniel,
We've managed to figure out how to generate quads using gmsh and the cell
numbering isn't as much of an issue, but we're still running into cell volume
problems. I've attached a simple example, in which I extrude a gmsh file
once, making one layer. The vertical spacing between vertices is 5, except of
one point were the spacing is 10. All cells have a basal area of 1 (1 by 1 in
x-y plane), but the cell volumes I get are not correct, with one cell having
a volume of 7.5 and one having a volume of 2.5. These two cells should have
the same volume.
Does the top surface have to be defined by a plane?
Andy
----------------------
Andrew Reeve
Dept. of Earth Science
University of Maine
Orono, ME 04469
from fipy import *
import numpy as N
def myFunc(verts):
addArray=verts.copy()
addArray[:]=0
addArray[2]=5.
for i in range(len(addArray[2])):
if verts[0][i]==1 and verts[1][i]==0:
addArray[2][i]=10.
print verts
print verts + addArray
return verts + addArray
mesh=GmshImporter2D('./geo.msh').extrude(layers=1,extrudeFunc=myFunc)
## var = CellVariable(name='var', mesh=mesh) ##initial head guess
## viewer=make(var,limits={'datamax':'','datamin':''})
## viewer.plot()
$MeshFormat
2 0 8
$EndMeshFormat
$Nodes
22
1 0 0 0
2 10 0 0
3 0 1 0
4 10 1 0
5 1 1 0
6 2 1 0
7 3 1 0
8 4 1 0
9 5 1 0
10 6 1 0
11 7 1 0
12 8 1 0
13 9 1 0
14 9 0 0
15 8 0 0
16 7 0 0
17 6 0 0
18 5 0 0
19 4 0 0
20 3 0 0
21 2 0 0
22 1 0 0
$EndNodes
$Elements
36
1 15 2 0 1 1
2 15 2 0 2 2
3 15 2 0 3 3
4 15 2 0 4 4
5 1 3 0 1 0 1 3
6 1 3 0 2 0 3 5
7 1 3 0 2 0 5 6
8 1 3 0 2 0 6 7
9 1 3 0 2 0 7 8
10 1 3 0 2 0 8 9
11 1 3 0 2 0 9 10
12 1 3 0 2 0 10 11
13 1 3 0 2 0 11 12
14 1 3 0 2 0 12 13
15 1 3 0 2 0 13 4
16 1 3 0 3 0 4 2
17 1 3 0 4 0 2 14
18 1 3 0 4 0 14 15
19 1 3 0 4 0 15 16
20 1 3 0 4 0 16 17
21 1 3 0 4 0 17 18
22 1 3 0 4 0 18 19
23 1 3 0 4 0 19 20
24 1 3 0 4 0 20 21
25 1 3 0 4 0 21 22
26 1 3 0 4 0 22 1
27 3 3 0 6 0 2 14 13 4
28 3 3 0 6 0 14 15 12 13
29 3 3 0 6 0 15 16 11 12
30 3 3 0 6 0 16 17 10 11
31 3 3 0 6 0 17 18 9 10
32 3 3 0 6 0 18 19 8 9
33 3 3 0 6 0 19 20 7 8
34 3 3 0 6 0 20 21 6 7
35 3 3 0 6 0 21 22 5 6
36 3 3 0 6 0 22 1 3 5
$EndElements