HYP2MAT(1)

πŸ“¦ version 0.0.18, in nixos 26.05, nixpkgs unstable

πŸ’… hyp2mat(1) β€” the hyp2mat man page, but make it make sense πŸŽ€

okay so. bestie. you've got a HyperLynx file and you want electromagnetic simulation out of it. that's literally what this whole thing is for. it's a User Command, it's called hyp2mat, and we're gonna read the manual together like it's a group chat. no cap, it's all here. πŸ¦‹


✨ NAME ✨

hyp2mat β€” the little icon that converts hyperlynx files to octave/matlab scripts for electromagnetic simulation. that's the whole vibe. πŸ’–


🌸 SYNOPSIS 🌸

hyp2mat [-h] [ -o outfile ] [ -f pdf|csxcad|qucs ] [-n net]...
[OPTIONS]... [-v]

(and yeah, the description block literally opens with [infile] β€” it's the input file, she's just listed a little weirdly. we love her anyway. πŸ™ˆ)


🫢 DESCRIPTION 🫢

Converts Hyperlynx Signal-Integrity Transfer Format files to Octave/matlab scripts.

that's it. that's the whole job. it takes your .hyp board situation and turns it into something Octave or matlab can chew on. slay. ✨


πŸ‘‘ OPTIONS πŸ‘‘

  • -h, --help β€” Print help and exit. the classic "what is going on" button.
  • -V, --version β€” Print version and exit. identity check.
  • -o, --output=filename β€” Output file. (default=-)
  • -f, --output-format=ENUM β€” Output file format. (possible values="csxcad", "pdf", "qucs" default=pdf)

🧚 Processing options

  • -n, --net=STRING β€” Import net. Repeat to import several nets. Default is importing all nets.
  • -l, --layer=STRING β€” Import layer. Repeat to import several layers. Default is importing all layers.
  • -x, --xmin=DOUBLE β€” Crop pcb. Set lower bound of x coordinate.
  • -X, --xmax=DOUBLE β€” Crop pcb. Set upper bound of x coordinate.
  • -y, --ymin=DOUBLE β€” Crop pcb. Set lower bound of y coordinate.
  • -Y, --ymax=DOUBLE β€” Crop pcb. Set upper bound of y coordinate.
  • -z, --zmin=DOUBLE β€” Crop pcb. Set lower bound of z coordinate.
  • -Z, --zmax=DOUBLE β€” Crop pcb. Set upper bound of z coordinate.
  • --grid=DOUBLE β€” Set output grid size. (default=10e-6)
  • --arc-precision=DOUBLE β€” Set maximum difference between perfect arc and polygonal approximation. (default=0)
  • --clearance=DOUBLE β€” Set default trace-to-plane clearance. (default=0.0002)
  • --flood=STRING β€” Flood layer with copper. Repeat to flood several layers. The value "plane_layers" floods all plane layers.

πŸ”₯ Physical properties

  • --epsilonr=DOUBLE β€” Set epsilon r of dielectric.
  • --loss-tangent=DOUBLE β€” Set loss tangent of dielectric.
  • --bulk-resistivity=DOUBLE β€” Set bulk resistivity of copper (in Ohm meter).

🌈 CSXCAD output options

  • --pcb-outline β€” Detailed board outline. (default=off)
  • --lossy-copper β€” Model copper as lossy. Default is modeling copper as perfect conductor. (default=off)
  • --metal-3d β€” Model copper layers as 3D. Default is modeling metal as 2D sheet. (default=off)

⭐ PDF output options

  • --hue=DOUBLE β€” Set PDF color hue. Range 0.0 to 1.0 (default=0.0)
  • --saturation=DOUBLE β€” Set PDF color saturation. Range 0.0 to 1.0 (default=0.6)
  • --brightness=DOUBLE β€” Set PDF color brightness. Range 0.0 to 1.0 (default=0.9)

πŸ’€ Debugging options

  • -r, --raw β€” Raw output. Do not join adjacent or overlapping copper. (default=off)
  • -d, --debug β€” Increase debugging level. Repeat for more detailed debugging.
  • -v, --verbose β€” Print board summary.

Hyperlynx input files conventionally end in .hyp .

hyp2mat reads input from file infile. If no input file is specified input is read from standard in.

If no output file is specified output is to standard out.

If a syntax error occurs during conversion, error recovery is attempted. hyp2mat exits with zero status if conversion was succesful and non-zero if not.

The --verbose option can be used to list board dimensions. πŸ‘€

If only a small region of the board needs to be simulated the --xmin --xmax --ymin --ymax --zmin and --zmax options can be used to crop the board to a smaller region. lowkey the most useful thing in here ngl.

If not all layers of the board need to be simulated, the --layers option may be used to specify layers of interest.

If not all nets of the board need to be simulated, the --nets option may be used to specify nets of interest. The option --net=? lists all available nets. very "who's there" of her. 🫢

Circles and arcs are approximated by polygons. By default a circle is approximated by an octagon. If higher accuracy is needed, set --arc-precision to the desired precision. This will increase the number of line segments used to draw circular, oval and oblong pads, amongst others.

To simulate a lossy dielectric, copy AddHyperLynxDielectric.m to your project directory and customize.

The --flood option floods layers with copper. The flooded copper respects trace-to-plane clearances. Copper net name is identical to layer name.

Typical use of hyp2mat is with simulation packages such as OpenEMS.

All lengths are in meters. ⚠️ every single one. don't come at her with mils unless you're doing the math yourself.

πŸŽ€ NOTES πŸŽ€

Board outlines and copper polygons should not be self-intersecting. like, just don't. 😭

Common causes of syntax errors are unquoted strings, and unassigned component values.

πŸ™ˆ Unquoted strings

Error: syntax error, unexpected STRING at 'Logo'

Source:

(? REF=My Logo BOT1 L=Bottom_Layer)

Cause: An unquoted string contains a space (' ').

Solution: Edit the .hyp file and put the string between double quotes:

(? REF="My Logo BOT1" L=Bottom_Layer)

πŸ’œ Unassigned component values

Error: syntax error, unexpected L, expecting FLOAT or STRING at 'L'

Source:

(R REF="R1" VAL= L="Top")

Cause: Component has not been assigned a value (VAL=).

Solution: Edit the .hyp file and assign a value to resistor R1:

(R REF="R1" VAL=0 L="Top")

or assign the resistor a value in the schematics editor and re-export to HyperLynx.


πŸ“ FILES πŸ“

  • /usr/share/hyp2mat/matlab/ β€” Supporting matlab routines for OpenEMS.
  • /usr/share/hyp2mat/eagle/ β€” Examples and tutorial.

πŸ’– EXAMPLES πŸ’–

Convert pcb.hyp to pdf:

hyp2mat -o pcb.pdf pcb.hyp

Examine original Hyperlynx file:

hyp2mat -o pcb.pdf --raw pcb.hyp

Draw arcs with an accuracy of 10 mil or better:

hyp2mat -o pcb.pdf --arc-precision 0.000254 pcb.hyp

ate. no crumbs. ✨


🌸 AUTHOR 🌸

Koen De Vleeschauwer, http://www.kdvelectronics.eu β€” icon behavior, honestly. πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

  • octave(1)
  • OpenEMS, a free and open-source electromagnetic field solver using the FDTD method.

and that's the whole page bestie, ily, go simulate something 🫢 this was hyp2mat version 0.0.18, dated January 1980 (yes, really, she's been iconic since forever πŸ’…) β€” bye!! πŸŽ€βœ¨

πŸ“¦ where this page comes from