Skip to main content

 

  • About
  • News & Media
  • Careers
  • Events

Breadcrumb

E4D User Guide

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

Breadcrumb

  1. E4D Website
  2. 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
  • bx

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 = -f

Creates a new visualization file. If a file exists with the same name, it will be overwritten.

in_opt = -af

Append 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 name

Either a conductivity, complex conductivity or potential distribution.

A list file containing the file names

In 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 0
A 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 0
A 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 10
Existing 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_cond
A 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 = -f

Create a new visualization file. An existing file, if one exists, will be overwritten.

in_opt = -af

Append 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 name

Either a conductivity, complex conductivity or potential distribution.

A list file containing the file names

In 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 0
A 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 0
A 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 10
An 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.

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