.pre File Structure

We will begin by discussing general .pre file syntax and concepts, including:

  • Comments

  • Variables

  • Globals

  • Blocks

    • Top-level Blocks

    • Nested Blocks

We will then move into properties that you will want to be able to implement and alter to fit your specific simulation needs:

  • Geometries

  • Grids

    • Decomposition

  • Fields

    • Field Boundary Conditions

    • EmField and MultiField

  • Particles

    • Particle Sources

    • Particle Sinks

  • Fluids

  • Macros

  • XDesc and XVar Concepts

The concepts and properties discussed in this section are only introductory. It may be worthwhile to open Text-based Setup examples and explore their .pre files in order to more clearly see the above concepts in action.

More information on specific types, parameters,and other options can be found in the XSim Reference . For details on further simulation customization, including information on importing your own analyzers and macros, can also be found in XSim Customization.

Comments

Comments are helpful in either describing various parts and functions within your code, and can also be used to visually break up your code into different sections. The loosely defined “sections” that will be used to describe .pre file structure are technically commented sections.

Comments can be entered through one of two ways:

  • Type in a pound sign (#), and then either start your comment on the same line or a new line.

  • Use the opening and closing tags <Comment>, </Comment> before and after your comment text.

Note

Tech-X recommends that you always update your comments when you make changes to an input file. The reasoning behind a change may become unclear if you do not provide comments that explain why you made the change. Input files with old, out-of-date comments are difficult to work with.