Examples

Running the Examples

  • Extract the examples with the pypeec examples command.

  • For running the examples from Python:

    • examples_config.py is used to select the example

    • run_mesher.py runs the mesher

    • run_viewer.py runs the viewer

    • run_solver.py runs the solver

    • run_plotter.py runs the plotter

  • For running the examples from the Shell:

    • examples_config.sh is used to select the example

    • run_mesher.sh runs the mesher

    • run_viewer.sh runs the viewer

    • run_solver.sh runs the solver

    • run_plotter.sh runs the plotter

  • For running the examples from a Jupyter notebook, use notebook.ipynb:

    • JupyterLab should be installed (not included in the default environment).

    • IPyWidgets, Trame, and ipympl are used for the rendering inside Jupyter notebooks.

STL Mesher Examples

examples_stl/inductor_air

  • Defined with STL files

  • 3D air-core spiral inductor

../_images/examples_stl_inductor_air.png

examples_stl/inductor_core

  • Defined with STL files

  • 3D inductor with a magnetic E-core

../_images/examples_stl_inductor_core.png

examples_stl/inductor_toroid

  • Defined with STL files

  • 3D inductor with a toroidal core

../_images/examples_stl_inductor_toroid.png

examples_stl/transformer

  • Defined with STL files

  • Planar transformer with two windings

  • Extraction of the impedance matrix from the solution

  • Example for the extraction of the impedance matrix: run_matrix.py

../_images/examples_stl_transformer.png

Shape Mesher Examples

examples_shape/busbar

  • Defined with 2D shapes

  • Coplanar L-shaped busbar

../_images/examples_shape_busbar.png

examples_shape/coplanar

  • Defined with 2D shapes

  • PCB with coplanar traces

../_images/examples_shape_coplanar.png

examples_shape/parallel

  • Defined with 2D shapes

  • Parallel wires with opposing currents

../_images/examples_shape_parallel.png

examples_shape/hole

  • Defined with 2D shapes

  • Single PCB trace with a hole

../_images/examples_shape_hole.png

examples_shape/wire

  • Defined with 2D shapes

  • Single straight round wire

../_images/examples_shape_wire.png

examples_shape/pwm

  • Defined with 2D shapes

  • Planar spiral inductor

  • Non-sinusoidal analysis with Fourier series

  • Example for the frequency domain analysis: run_fourier.py

../_images/examples_shape_pwm.png

PNG Mesher Examples

examples_png/inductor_spiral

  • Defined with PNG files

  • Planar spiral inductor

../_images/examples_png_inductor_spiral.png

examples_png/inductor_gap

  • Defined with PNG files

  • Gapped inductor with a magnetic E-core

../_images/examples_png_inductor_gap.png

examples_png/inductor_pot

  • Defined with PNG files

  • Pot-core inductor with external gap

../_images/examples_png_inductor_pot.png

examples_png/iron_core

  • Defined with PNG files

  • Iron magnetic core with a non-zero resistivity

../_images/examples_png_iron_core.png

examples_png/shield

  • Defined with PNG files

  • Conductor loop with a magnetic shield

../_images/examples_png_shield.png

examples_png/gerber

  • Defined with PNG files

  • PCB inductor defined with GERBER files

  • Generation of the PNG files from GERBER files

  • Example for parsing the GERBER files: run_gerber.py

../_images/examples_png_gerber.png

Voxel Mesher Examples

examples_voxel/slab

  • Defined with voxel indices

  • Simple slab conductor in free space

../_images/examples_voxel_slab.png

examples_voxel/transformer

  • Defined with voxel indices

  • Simple transformer with a short-circuited winding

../_images/examples_voxel_transformer.png

examples_voxel/anisotropic

  • Defined with voxel indices

  • L-shaped conductor with anisotropic resistivity

../_images/examples_voxel_anisotropic.png

examples_voxel/distributed

  • Defined with voxel indices

  • Slab conductor with space dependent resistivity

../_images/examples_voxel_distributed.png

examples_voxel/core

  • Defined with voxel indices

  • Simple slab conductor surrounded by a magnetic core

  • Procedural generation of the voxel indices (1D and 3D)

  • Example for generating the voxel indices: run_voxel.py

../_images/examples_voxel_core.png