Skip to main content

 

  • About
  • News & Media
  • Careers
  • Events

Breadcrumb

E4D User Guide

  • Travel-time Run Modes
    • Mesh Generation
    • Forward Modeling
    • Inverse Modeling
  • Files
    • Input
    • Output
    • Syntax Rules
  • Using E4D
    • Running E4D
    • Visualization Utilities
    • Dictionary of Terms

Breadcrumb

  1. E4D Website
  2. E4D User Guide

Travel-time Tomography Mesh Configuration File (*.cfg)

The mesh configuration file provides E4D with instructions for building the mesh. It must be named <e4d_mesh.cfg>, where e4d_mesh is a user chosen mesh file name. Additional mesh block details can be found here.

See File Syntax Rules for specific details.

  • Mesh Blocks

The mesh configuration file is comprised of six blocks.

General Block: Mesh quality, lower boundary elevation, and locations of the tetgen and triangle

Variable Name Description
m_qual

(real)

m_qual is the maximum radius-to-edge ratio of any element in the mesh (see tetgen documentation). Recommended values are in the range of 1.3 to 1.5, with 1.3 specifying a higher quality mesh.
max_evol_def

(real)

max_evol_def is the default maximum volume of all elements in the mesh. Maximum volumes for each zone are specified using mz_vol (see zone configuration block).
m_bot

(real)

m_bot is the elevation of the bottom of the computational mesh.
tet_build_flag

(int)

tet_build_flag specifies whether tetgen should be called to generate the mesh.

tet_build_flag = 0

Builds the .poly input file for tetgen, but will not call tetgen to build the mesh

tet_build_flag = 1

Calls tetgen to build the mesh

tet_loc

(char)

tet_loc specifies the location of (path to) the tetgen executable, and must be enclosed in single quotes.
tri_loc

(char)

tri_loc specifies the location of (path to) the triangle executable, and must be enclosed in single quotes.

Control Points Block: Defines points that describe mesh geometry

Variable Name Description
n_cpts

(int)

n_cpts is the total number of control points.
cp_num  x       y       z       b_flag

(int)       (real) (real) (real)  (int)

repeat icon repeat for n_cpts


cp_num is the index of the control point specified on this line and should be numbered consecutively from 1 to n_cpts.

x, y and z are the coordintate positions of control point cp_num.

b_flag is the boundary flag for the control point cp_num.
Additional Control Points Block details here

Internal Boundary Configuration Block: Defines internal planes that separate regions or zones

Variable Name Description
n_plc

(int)

n_plc is the total number of user-defined piecewise linear complexes (i.e. planes).
np     b_num

(int)   (int)

repeat repeat for n_plc


np is the number of control points used to define this plane (recommended value = 3, i.e. triangle).

b_num is the user specified boundary number for this plane.

Note: b_num is a value greater than 2. b_num can be any value except 0, 1, or 2, which are reserved within E4D.
p1     p2 ... p_np

(int)   (int)

p1 p2 ... p_np is the list of control points defining this plane. These values reference the control point indices specified in the control points block. Control points must be specified in order to define a plane such that no segment connecting two consecutive control points crosses any other segment connecting two consecutive control points (i.e the list of control points should be either clockwise or counter-clockwise). E4D does not check this condition prior to executing tetgen, and tetgen will fail if this condition is violated. Also, each of the points specified must lie in the same plane according to numerical precision or tetgen will fail.
Additional Internal Boundary Configuration Block details here

Hole Configuration Block: Defines holes or voids in the mesh.

Variable Name Description
nholes

(int)

nholes is the number of holes in the mesh.
hn    xh     yh     zh

(int) (real) (real) (real)

repeat repeat for n_holes


hn is the index for this hole.

xh yh and zh are the easting, northing, and elevation of any point within this hole.

Additional Hole Configuration Block details here

Zone Configuration Block: Maximum element volumes, velocity values and zone assignments

Variable Name Description
nzones

(int)

nzones is the number of user defined zones.
zn    xz      yz       zz    mz_vol  zvel

(int) (real) (real) (real) (real)     (real)

repeat repeat for n_zones


zn is the zone number.

xh yh and zh are the easting, northing, and elevation of any point within this zone.

mz_vol is the maximum volume of any element within this zone.

zvel is the velocity of this zone.

Visualization Options Block: Specifies creation of a visualization file

Variable Name Description
vis_flag

(int)

vis_flag specifies whether E4D should build a mesh visualization file.

vis_flag = 1

The visualization will be built

vis_flag = any other integer

The visualization will NOT be built

vis_loc

(char)

vis_loc is the location of (path to) the visulization utility program bx or px.

Travel-time Example with two blocks

<GENERAL BLOCK> do not include this line in actual file
1.3	1e12		mesh quality (m_qual), max volume (max_evol_def)
-500			bottom of mesh elevation (m_bot)
1			flag to build mesh (tet_build_flag)
"tetgen"		command to run tetgen (tet_loc)
"triangle"		command to run triangle (tri_loc) *** END GENERAL BLOCK
<END GENERAL BLOCK> do not include this line in actual file

<CONTROL POINTS BLOCK> do not include this line in actual file
108					number of control points (n_cpts)
1	-7.5	-3	0	1	1 x1 y1 z1 b_flag_1
2	-6.5	-3	0	1	2 x2 y2 z2 b_flag_2
3	-5.5	-3	0	1	.
4	-4.5	-3	0	1	.
5	-3.5	-3	0	1	.
6	-2.5	-3	0	1
7	-1.5	-3	0	1
8	-0.5	-3	0	1
9	0.5	-3	0	1
10	1.5	-3	0	1
11	2.5	-3	0	1
12	3.5	-3	0	1
13	4.5	-3	0	1
14	5.5	-3	0	1
15	6.5	-3	0	1
16	7.5	-3	0	1
17	-7.5	0	0	1
18	-6.5	0	0	1
19	-5.5	0	0	1
20	-4.5	0	0	1
21	-3.5	0	0	1
22	-2.5	0	0	1
23	-1.5	0	0	1
24	-0.5	0	0	1
25	0.5	0	0	1
26	1.5	0	0	1
27	2.5	0	0	1
28	3.5	0	0	1
29	4.5	0	0	1
30	5.5	0	0	1
31	6.5	0	0	1
32	7.5	0	0	1
33	-7.5	3	0	1
34	-6.5	3	0	1
35	-5.5	3	0	1
36	-4.5	3	0	1
37	-3.5	3	0	1
38	-2.5	3	0	1
39	-1.5	3	0	1
40	-0.5	3	0	1
41	0.5	3	0	1
42	1.5	3	0	1
43	2.5	3	0	1
44	3.5	3	0	1
45	4.5	3	0	1
46	5.5	3	0	1
47	6.5	3	0	1
48	7.5	3	0	1

49	-10	-5	0	1	upper control points for foreground (zone 1)
50	-10	5	0	1
51	10	5	0	1
52	10	-5	0	1

53	-500	-500	0	2	boundary control points
54	-500	500	0	2
55	500	500	0	2
56	500	-500	0	2

57	-10	-5	-40	0	lower control points for forground (zone 1)
58	-10	5	-40	0
59	10	5	-40	0
60	10	-5	-40	0

61	-4.0	-4.0	-10.0	0	Upper control points for upper block (zone 2)
62	-4.0	4.0	-10.0	0
63	4.0	4.0	-10.0	0
64	4.0	-4.0	-10.0	0

65	-4.0	-4.0	-15.0	0	lower control points for upper block (zone 2)
66	-4.0	4.0	-15.0	0
67	4.0	4.0	-15.0	0
68	4.0	-4.0	-15.0	0

69	-4.0	-4.0	-25.0	0	upper control points for  lower block (zone 3)
70	-4.0	4.0	-25.0	0
71	4.0	4.0	-25.0	0
72	4.0	-4.0	-25.0	0

73	-4.0	-4.0	-30.0	0	lower control points for lower block (zone 3)
74	-4.0	4.0	-30.0	0
75	4.0	4.0	-30.0	0
76	4.0	-4.0	-30.0	0

77	-7.5	0	-6	0
78	-7.5	0	-10	0
79	-7.5	0	-14	0
80	-7.5	0	-18	0
81	-7.5	0	-22	0
82	-7.5	0	-26	0
83	-7.5	0	-30	0
84	-7.5	0	-34	0

85	7.5	0	-6	0
86	7.5	0	-10	0
87	7.5	0	-14	0
88	7.5	0	-18	0
89	7.5	0	-22	0
90	7.5	0	-26	0
91	7.5	0	-30	0
92	7.5	0	-34	0

93	-7.5	0	-6.05	0
94	-7.5	0	-10.05	0
95	-7.5	0	-14.05	0
96	-7.5	0	-18.05	0
97	-7.5	0	-22.05	0
98	-7.5	0	-26.05	0
99	-7.5	0	-30.05	0
100	-7.5	0	-34.05	0

101	7.5	0	-6.05	0
102	7.5	0	-10.05	0
103	7.5	0	-14.05	0
104	7.5	0	-18.05	0
105	7.5	0	-22.05	0
106	7.5	0	-26.05	0
107	7.5	0	-30.05	0
108	7.5	0	-34.05	0
<END CONTROL POINTS BLOCK> do not include this line in actual file
<INTERNAL BOUNDARY CONFIGURATION BLOCK> do not include this line in actual file
17		number of internal planes (n_plc)
4  10           number of points in plc 1 (np1), boundary number(b_num_1)
49 50 58 57     control points in plc 1: western boundary of zone 1
4 10            np2 b_num_2
50 51 59 58     control points in plc 2: northern boundary of zone 1
4 10            .
51 52 60 59     eastern boundary of zone 1
4 10  	 	.
52 49 57 60     southern boundary of zone 1
4 10            .
57 58 59 60     bottom boundary of zone 1

4 11
61 62 66 65	western boundary of zone 2
4 11
62 63 67 66     northern boundary of zone 2
4 11
63 64 68 67	eastern boundary of zone 2
4 11
64 61 65 68     southern boundary of zone 2
4 11
61 62 63 64   	upper boundary of zone 2
4 11
65 66 67 68     lower boundary of zone 2

4 12
69 70 74 73	eastern boundary of zone 3
4 12
70 71 75 74	northern boundary of zone 3
4 12
71 72 76 75	western boundary of zone 3
4 12
72 69 73 76	southern boundary of zone 3
4 12
69 70 71 72	upper boundary of zone 3
4 12
73 74 75 76	lower boundary of zone 3
<END INTERNAL BOUNDARY CONFIGURATION BLOCK> do not include this line in actual file

<HOLE CONFIGURATION BLOCK> do not include this line in actual file
0			         number of holes(n_holes) *** END
<END HOLE CONFIGURATION BLOCK> do not include this line in actual file

<ZONE CONFIGURATION BLOCK> do not include this line in actual file
4			         ZONE CONFIGURATION BLOCK *** number of zones(n_zones)
1 0.0 0.0 -5.0   0.2  1.0      1 xz_1 yz_1 zz_1 mz_vol_1 vel_1
2 -0.0 0.0 -12.0  0.2 0.5      2 xz_2 yz_2 zz_2 mz_vol_2 vel_2
3  0.0 0.0 -27.0  0.2 2.0
4  0.0 0.0 -50.0 1e12 1.0     *** END ZONE CONIFIGURATION BLOCK
<END ZONE CONFIGURATION BLOCK> do not include this line in actual file

<VISUALIZATION OPTIONS BLOCK> do not include this line in actual file
1	   flag to build mesh visualization file	(bex_flag)
'px'	   command to build mesh visualization file	(bex_loc)
<END VISUALIZATION OPTIONS BLOCK> do not include this line in actual file

PNNL

  • Get in Touch
    • Contact
    • Careers
    • Doing Business
    • Security & Privacy
  • Research
    • Scientific Discovery
    • Energy Resiliency
    • National Security
Sign up for our newsletter
Department of Energy Logo Battelle Logo
Pacific Northwest National Laboratory (PNNL) is managed and operated by Battelle for the Department of Energy
  • YouTube
  • Facebook
  • Twitter
  • Instagram
  • LinkedIn