E4D User Guide
E4D User Guide
Visualization Utilities
Two utility programs, named px and bx are provided with the E4D distribution for visualization of meshes, and potential and complex resistivity distributions. These can be viewed in VisIt, a highly flexible visualization software capable of performing and visualizing a number of transforms on conductivity and potential fields, or any specific function of those fields. Users are encouraged to review the VisIt documentation for details.
px is a python-language utility program that creates visualization files in xdmf/h5 format. The xdmf file is loaded into VisIt which references an h5 file which contains the data. The px program reads a list of command line specifications, and based on those specifications, reads E4D generated files as input and creates a corresponding xdmf and h5 file. The command line sequence for px is as follows:
px in_opt e4d_mesh file_opt out_fil t_stamp variable_name (optional)
Command line option | Description |
---|---|
in_opt
(string) |
in_opt determines whether a new visualization file is created or an existing visualization file is appended.
in_opt = -fCreates a new visualization file. If a file exists with the same name, it will be overwritten. in_opt = -afAppend an existing visualization file. |
e4d_mesh
(string) |
e4d_mesh is the prefix to the mesh files. For example, if the mesh file names are block.1.node, block.1.ele, block.1.neigh, block.1.face, and block.trn, then <e4d_mesh> is block
If the file append option –af is specified, then <e4d_mesh> must specify the same mesh that was used to build the original visualization files. |
file_opt
(string) |
file_opt specifies either:
A single file nameEither a conductivity, complex conductivity or potential distribution. A list file containing the file namesIn the same format as the conductivity list file Files must have the same number of nodes (for a potential distribution) or elements (for a conductivity distribution) as in the <e4d_mesh>.node or <e4d_mesh>.ele file. |
out_file
(string) |
out_file is the prefix of the existing or new xdmf and h5 file. |
t_stamp
(string) |
t_stamp is the time stamp specification for file_opt that is used in VisIt. |
variable_name (optional)
(string) |
variable_name is the name of the variable(s) to be visualized in outfile in VisIT. For mesh element file visualization, the default variable name(s) are Real_conductivity and Imag_conductivity. In node file visualization, the default variable name(s) are Real_potential and Imag_potential. If files to be visualized contains two variables, these names are separated by a space. |
Example: Conductivity visualization
px -f two_blocks two_blocks.sig two_blocks 0A new visualization file is created using the mesh element file two_blocks.1.ele with a conductivity distribution specified in two_blocks.sig. Two files will be created called two_blocks.h5 and two_blocks.xmf. Within VisIt, a Real_conductivity variable will be viewable.
Example: Multiple file complex conductivity visualization
px -f two_blocks two_blocks_complex.list two_blocks_complex 0A new visualization file is created using the mesh element file two_blocks.1.ele with a complex conductivity distribution specified as a list of files in in two_blocks_complex.list. Two files will be created called two_blocks_complex.h5 and two_blocks_complex.xmf which will contain time steps as specified in the file list. Within VisIt, Real_conductivity and Imag_conductivity variables will be viewable for each time step.
Example: Adding to an existing potential visualization
px -af two_blocks two_blocks1.pot two_blocks_pot 10Existing visualization files, two_blocks_pot.xmf and two_blocks_pot.h5 are appended using the mesh node file two_blocks.1.node with a potential distribution specified in two_blocks1.pot. two_blocks_pot.h5 and two_blocks_pot.xmf will now contain the two_blocks1.pot distribution at time step 10. Within VisIt, a Real_potential variable will be viewable for each time step.
Example: Multiple file visualization using a custom variable name
px -f two_blocks two_blocks.list two_blocks 0 r_condA new visualization file is created using the mesh element file two_blocks.1.ele with a conductivity distribution specified as a list of files in in two_blocks.list. A file named two_blocks.xmf and two_blocks.h5 will be created which will contain time steps as specified in the file list. Within VisIt, r_cond variables will be viewable for each time step.
bx is a fortran-language utility program that creates visualization files in exodus II format. The .exo file can be loaded into VisIt for viewing. The bx program reads a list of command line specifications, and based on those specifications, reads E4D generated files as input and creates a corresponding .exo file. The command line sequence for bx is as follows:
bx in_opt e4d_mesh file_opt out_fil t_stamp
Command line option | Description |
---|---|
in_opt
(string) |
in_opt determines whether a new visualization file is created or an existing visualization file is appended.
in_opt = -fCreate a new visualization file. An existing file, if one exists, will be overwritten. in_opt = -afAppend an existing visualization file |
e4d_mesh
(string) |
e4d_mesh is the prefix to the mesh files. For example, if the mesh file names are block.1.node, block.1.ele, block.1.neigh, block.1.face, and block.trn, then <e4d_mesh> is block.1
Note: When using bx, e4d_mesh includes the suffix '.1.' For px, the '.1' is omitted. If the file append option –af is specified, then <e4d_mesh> must specify the same mesh that was used to build the original visualization files. |
file_opt
(string) |
file_opt specifies either:
A single file nameEither a conductivity, complex conductivity or potential distribution. A list file containing the file namesIn the same format as the conductivity list file Files must have the same number of nodes (for a potential distribution) or elements (for a conductivity distribution) as in the <e4d_mesh>.node or <e4d_mesh>.ele file. |
out_file
(string) |
out_file is the prefix of the existing or new exodus II file. |
t_stamp
(string) |
t_stamp is the time stamp specification for file_opt. |
Example: Conductivity visualization
bx -f two_blocks.1 two_blocks.sig two_blocks 0A new visualization file is created using the mesh element file two_blocks.1.ele with a conductivity distribution specified in two_blocks.sig. A files named two_blocks.exo will be created. Within VisIt, a real_conductivity variable will be viewable.
Example: Multiple file complex conductivity visualization
bx -f two_blocks.1 two_blocks_complex.list two_blocks_complex 0A new visualization file is created using the mesh element file two_blocks.1.ele with a complex conductivity distribution specified as a list of files in in two_blocks_complex.list. A file named two_blocks_complex.exo will be created which will contain time steps as specified in the file list. Within VisIt, real_conductivity and imag_conductivity variables will be viewable for each time step.
Example: Adding to an existing potential visualization
bx -af two_blocks.1 two_blocks1.pot two_blocks_pot 10An existing visualization file, two_blocks_pot.exo is appended using the mesh node file two_blocks.1.node with a potential distribution specified in two_blocks1.pot. two_blocks_pot.exo will now contain the two_blocks1.pot distribution at time step 10. Within VisIt, a real_potential variable will be viewable for each time step.