E4D User Guide
E4D User Guide
Electrical Methods 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.
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 = 0Builds the .poly input file for tetgen, but will not call tetgen to build the mesh tet_build_flag = 1Calls 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 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 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 greater than 2 unless this boundary is an infinite conductivity (i.e. metallic) boundary, in which case b_num should be set to the same negative integer as b_flag, where b_flag is the boundary flag specified for each of the np control points used to defined this plane, as listed on the next line. All boundaries sharing the same negative b_num value are modeled as infinite conductivity and electrically connected structures within E4D. 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 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, conductivity values and zone assignments
Variable Name | Description |
---|---|
nzones
(int) |
nzones is the number of user defined zones. |
zn xz yz zz mz_vol zcond
(int) (real) (real) (real) (real) (real) |
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 point within this zone. zcond is the conductivity 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 = 1The visualization will be built vis_flag = any other integerThe visualization will NOT be built |
vis_loc
(char) |
vis_loc is the location of (path to) the visulization utility program bx or px. |
ERT 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 124 number of control points (n_cpts) 1 -7.5 -5 0 1 1 x1 y1 z1 b_flag_1 2 -6.5 -5 0 1 2 x2 y2 z2 b_flag_2 3 -5.5 -5 0 1 . 4 -4.5 -5 0 1 . 5 -3.5 -5 0 1 . 6 -2.5 -5 0 1 7 -1.5 -5 0 1 8 -0.5 -5 0 1 9 0.5 -5 0 1 10 1.5 -5 0 1 11 2.5 -5 0 1 12 3.5 -5 0 1 13 4.5 -5 0 1 14 5.5 -5 0 1 15 6.5 -5 0 1 16 7.5 -5 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 5 0 1 34 -6.5 5 0 1 35 -5.5 5 0 1 36 -4.5 5 0 1 37 -3.5 5 0 1 38 -2.5 5 0 1 39 -1.5 5 0 1 40 -0.5 5 0 1 41 0.5 5 0 1 42 1.5 5 0 1 43 2.5 5 0 1 44 3.5 5 0 1 45 4.5 5 0 1 46 5.5 5 0 1 47 6.5 5 0 1 48 7.5 5 0 1 49 -8 -6 0 1 upper control points for foreground (zone 1) 50 -8 6 0 1 51 8 6 0 1 52 8 -6 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 -8 -6 -10 0 lower control points for forground (zone 1) 58 -8 6 -10 0 59 8 6 -10 0 60 8 -6 -10 0 61 -4.0 -1.0 -1.0 0 Upper control points for left block (zone 2) 62 -4.0 1.0 -1.0 0 63 -2.0 1.0 -1.0 0 64 -2.0 -1.0 -1.0 0 65 -4.0 -1.0 -3.0 0 lower control points for left block (zone 2) 66 -4.0 1.0 -3.0 0 67 -2.0 1.0 -3.0 0 68 -2.0 -1.0 -3.0 0 69 4.0 -1.0 -1.0 0 upper control points for right block (zone 3) 70 4.0 1.0 -1.0 0 71 2.0 1.0 -1.0 0 72 2.0 -1.0 -1.0 0 73 4.0 -1.0 -3.0 0 lower control points for right block (zone 3) 74 4.0 1.0 -3.0 0 75 2.0 1.0 -3.0 0 76 2.0 -1.0 -3.0 0 77 -7.5 -5 -0.05 0 additional points for electrode refinement 78 -6.5 -5 -0.05 0 79 -5.5 -5 -0.05 0 80 -4.5 -5 -0.05 0 81 -3.5 -5 -0.05 0 82 -2.5 -5 -0.05 0 83 -1.5 -5 -0.05 0 84 -0.5 -5 -0.05 0 85 0.5 -5 -0.05 0 86 1.5 -5 -0.05 0 87 2.5 -5 -0.05 0 88 3.5 -5 -0.05 0 89 4.5 -5 -0.05 0 90 5.5 -5 -0.05 0 91 6.5 -5 -0.05 0 92 7.5 -5 -0.05 0 93 -7.5 0 -0.05 0 94 -6.5 0 -0.05 0 95 -5.5 0 -0.05 0 96 -4.5 0 -0.05 0 97 -3.5 0 -0.05 0 98 -2.5 0 -0.05 0 99 -1.5 0 -0.05 0 100 -0.5 0 -0.05 0 101 0.5 0 -0.05 0 102 1.5 0 -0.05 0 103 2.5 0 -0.05 0 104 3.5 0 -0.05 0 105 4.5 0 -0.05 0 106 5.5 0 -0.05 0 107 6.5 0 -0.05 0 108 7.5 0 -0.05 0 109 -7.5 5 -0.05 0 110 -6.5 5 -0.05 0 111 -5.5 5 -0.05 0 112 -4.5 5 -0.05 0 113 -3.5 5 -0.05 0 114 -2.5 5 -0.05 0 115 -1.5 5 -0.05 0 116 -0.5 5 -0.05 0 117 0.5 5 -0.05 0 118 1.5 5 -0.05 0 119 2.5 5 -0.05 0 120 3.5 5 -0.05 0 121 4.5 5 -0.05 0 122 5.5 5 -0.05 0 123 6.5 5 -0.05 0 124 7.5 5 -0.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.1 0.002 1 xz_1 yz_1 zz_1 mz_vol_1 zcond_1 2 -2.5 0.0 -2.5 0.01 0.002 2 xz_2 yz_2 zz_2 mz_vol_2 zcond_2 3 2.5 0.0 -2.5 0.01 0.002 4 0.0 0.0 -20.0 1e12 0.0002 *** 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
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 = 0Builds the .poly input file for tetgen, but will not call tetgen to build the mesh. tet_build_flag = 1Calls tetgen to build the mesh |
tet_loc
(char) |
tet_loc specifies the location of the tetgen executable, and must be enclosed in single quotes. |
tri_loc
(char) |
tri_loc specifies the location of 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 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 specified on this line |
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 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 greater than 2 unless this boundary is an infinite conductivity (i.e. metallic) boundary, in which case b_num should be set to the same negative integer as b_flag, where b_flag is the boundary flag specified for each of the np control points used to defined this plane, as listed on the next line. All boundaries sharing the same negative b_num value are modeled as infinite conductivity and electrically connected structures within E4D. b_num can be any value except 0, 1, or 2, which are reserved within E4D. |
p1 p2 ... p_np
(int) (int) (int) |
p1 p2 ... p_np is the list of control points defining this plane. These values references the control point indexes 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 list the control points 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 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, conductivity values and zone assignments
Variable Name | Description |
---|---|
nzones
(int) |
nzones is the number of user defined zones |
zn xz yz zz mz_vol zcond zphase
(int) (real) (real) (real) (real) (real) (real) |
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 point within this zone zcond is the conductivity of this zone zphase is the phase angle 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.
vis_flag = 1The visualization will be built vis_flag = any other integerThe visualization will NOT be built |
vis_loc
(char) |
vis_loc is the location of the vis utility program bx or px. |
SIP 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 124 number of control points (n_cpts) 1 -7.5 -5 0 1 1 x1 y1 z1 b_flag_1 2 -6.5 -5 0 1 2 x2 y2 z2 b_flag_2 3 -5.5 -5 0 1 . 4 -4.5 -5 0 1 . 5 -3.5 -5 0 1 . 6 -2.5 -5 0 1 7 -1.5 -5 0 1 8 -0.5 -5 0 1 9 0.5 -5 0 1 10 1.5 -5 0 1 11 2.5 -5 0 1 12 3.5 -5 0 1 13 4.5 -5 0 1 14 5.5 -5 0 1 15 6.5 -5 0 1 16 7.5 -5 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 5 0 1 34 -6.5 5 0 1 35 -5.5 5 0 1 36 -4.5 5 0 1 37 -3.5 5 0 1 38 -2.5 5 0 1 39 -1.5 5 0 1 40 -0.5 5 0 1 41 0.5 5 0 1 42 1.5 5 0 1 43 2.5 5 0 1 44 3.5 5 0 1 45 4.5 5 0 1 46 5.5 5 0 1 47 6.5 5 0 1 48 7.5 5 0 1 49 -8 -6 0 1 upper control points for foreground (zone 1) 50 -8 6 0 1 51 8 6 0 1 52 8 -6 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 -8 -6 -10 0 lower control points for forground (zone 1) 58 -8 6 -10 0 59 8 6 -10 0 60 8 -6 -10 0 61 -4.0 -1.0 -1.0 0 Upper control points for left block (zone 2) 62 -4.0 1.0 -1.0 0 63 -2.0 1.0 -1.0 0 64 -2.0 -1.0 -1.0 0 65 -4.0 -1.0 -3.0 0 lower control points for left block (zone 2) 66 -4.0 1.0 -3.0 0 67 -2.0 1.0 -3.0 0 68 -2.0 -1.0 -3.0 0 69 4.0 -1.0 -1.0 0 upper control points for right block (zone 3) 70 4.0 1.0 -1.0 0 71 2.0 1.0 -1.0 0 72 2.0 -1.0 -1.0 0 73 4.0 -1.0 -3.0 0 lower control points for right block (zone 3) 74 4.0 1.0 -3.0 0 75 2.0 1.0 -3.0 0 76 2.0 -1.0 -3.0 0 77 -7.5 -5 -0.05 0 additional points for electrode refinement 78 -6.5 -5 -0.05 0 79 -5.5 -5 -0.05 0 80 -4.5 -5 -0.05 0 81 -3.5 -5 -0.05 0 82 -2.5 -5 -0.05 0 83 -1.5 -5 -0.05 0 84 -0.5 -5 -0.05 0 85 0.5 -5 -0.05 0 86 1.5 -5 -0.05 0 87 2.5 -5 -0.05 0 88 3.5 -5 -0.05 0 89 4.5 -5 -0.05 0 90 5.5 -5 -0.05 0 91 6.5 -5 -0.05 0 92 7.5 -5 -0.05 0 93 -7.5 0 -0.05 0 94 -6.5 0 -0.05 0 95 -5.5 0 -0.05 0 96 -4.5 0 -0.05 0 97 -3.5 0 -0.05 0 98 -2.5 0 -0.05 0 99 -1.5 0 -0.05 0 100 -0.5 0 -0.05 0 101 0.5 0 -0.05 0 102 1.5 0 -0.05 0 103 2.5 0 -0.05 0 104 3.5 0 -0.05 0 105 4.5 0 -0.05 0 106 5.5 0 -0.05 0 107 6.5 0 -0.05 0 108 7.5 0 -0.05 0 109 -7.5 5 -0.05 0 110 -6.5 5 -0.05 0 111 -5.5 5 -0.05 0 112 -4.5 5 -0.05 0 113 -3.5 5 -0.05 0 114 -2.5 5 -0.05 0 115 -1.5 5 -0.05 0 116 -0.5 5 -0.05 0 117 0.5 5 -0.05 0 118 1.5 5 -0.05 0 119 2.5 5 -0.05 0 120 3.5 5 -0.05 0 121 4.5 5 -0.05 0 122 5.5 5 -0.05 0 123 6.5 5 -0.05 0 124 7.5 5 -0.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.1 0.002 0.01 1 xz_1 yz_1 zz_1 mz_vol_1 zcond_1 zphase_1 2 -2.5 0.0 -2.5 0.01 0.002 0.01 2 xz_2 yz_2 zz_2 mz_vol_2 zcond_2 zphase_2 3 2.5 0.0 -2.5 0.01 0.002 0.01 4 0.0 0.0 -20.0 1e12 0.0002 0.01 *** 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