# Thin Wire Meshing Guidance

**URL:** <https://forum.spis.org/t/thin-wire-meshing-guidance/1558>\
**Category:** SPIS\
**Created:** [6 February 2026 18:25 UTC](https://forum.spis.org/t/thin-wire-meshing-guidance/1558 "2026-02-06T18:25:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtbyrnes123](https://forum.spis.org/letter_avatar_proxy/v4/letter/j/aca169/32.png) [@jtbyrnes123](https://forum.spis.org/u/jtbyrnes123)\
**Post date:** [6 February 2026 18:25 UTC](https://forum.spis.org/t/thin-wire-meshing-guidance/1558/1 "2026-02-06T18:25:26Z")

</div>

I am creating a model that, for simplicities sake, has a main spacecraft body (cylinder) and a thin wire coming out of the body that’s attached to a particle detector (smaller cylinder), all within a sphere of plasma. I can get the model to mesh and physical groups identified in SPIS, but when I try to finalize and start a simulation in SPIS, I get this error:

spis.Util.Exception.SpisRuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 at spis.Solver.ElectroMag.Poisson.PotPoissonSolver.quicksort(PotPoissonSolver.java:501)

Which from what I know is a meshing error in the model. This is my first encounter with thin 1D elements, and knowledge from previous projects suggest points to the 1D element meshing. What steps can I take to try and resolve this?

---

<div class="post-metadata">

**Author:** ![frejon](https://forum.spis.org/letter_avatar_proxy/v4/letter/f/7feea3/32.png) [@frejon](https://forum.spis.org/u/frejon)\
**Post date:** [8 April 2026 14:51 UTC](https://forum.spis.org/t/thin-wire-meshing-guidance/1558/2 "2026-04-08T14:51:24Z")

</div>

> [@jtbyrnes123](#):
>
> am creating a model that, for simplicities sake, has a main spacecraft body (cylinder) and a thin wire coming out of the body that’s attached to a particle detector (smaller cylinder), all within a sphere of plasma. I can get the model to mesh and physical groups identified in SPIS, but when I try to finalize and start a simulation in SPIS, I get this error:
> 
> spis.Util.Exception.SpisRuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 at spis.Solver.ElectroMag.Poisson.PotPoissonSolver.quicksort(PotPoissonSolver.java:501)
> 
> Which from what I know is a meshing error in the model. This is my first encounter with thin 1D elements, and knowledge from previous projects suggest points to the 1D element meshing. What steps can I take to try and resolve this?

This is what my SPIS-trained LLM said to your question:

The error `java.lang.ArrayIndexOutOfBoundsException: 0` occurring in `spis.Solver.ElectroMag.Poisson.PotPoissonSolver.quicksort` typically indicates that the Poisson solver is attempting to process a thin element (like your wire) but cannot find the expected mesh entities (nodes or edges) to apply its numerical models to.

When using 1D thin elements in SPIS, the software applies an analytical model to handle the potential singularity around the wire, which requires a very specific topological setup between your CAD and the volume mesh.

To resolve this issue, you should verify the following steps in your modelling chain:

### 1. Verify CAD and Mesh Topology

The most common cause for this error is that the mesh nodes are not perfectly aligned with the wire.

- **1D Border Rule:** In your CAD tool (e.g., Gmsh), the wire must be defined as a **Physical Line** that acts as a border between two surfaces.

- **Volume Intersection:** These two surfaces must themselves be borders between two sub-volumes. These sub-volumes must then be gathered into a **unique Physical Volume** to ensure the wire is correctly integrated into the computational domain.

- **Alignment:** Nodes of the volume mesh **must** be exactly aligned on the wire for the solver to function.

### 2. Check Group Editor Settings

Ensure the physical group corresponding to the wire is correctly configured in the **Group Editor** :

- **Group Type:** The group type must be set to **“Wire”** or **“Spacecraft Thin Element 1D”**.

- **Mandatory Characteristics:** Ensure the following characteristics are defined and have valid values:

### 3. Check Group Priorities

In the Group Editor, the **priority levels** are crucial for the deployment of properties on the mesh.

- The **Volume Group** should always have the **lowest priority** (bottom of the list).

- The **Wire Group** and **Spacecraft Surface Groups** should have higher priorities than the volume to ensure their properties are correctly mapped to the mesh elements they occupy.

### 4. Version-Specific Considerations (SPIS 6.0.4+)

If you are using a version prior to **SPIS 6.0.4** , wires were required to be connected to a meshed surface on the same electrical node. In more recent versions, wires can be assigned to their own independent electrical node.

**Recommended Action:**

1. Open your mesh in **Gmsh** and verify that the wire edges are indeed part of the volume mesh connectivity.

2. If the topology is correct, try re-running the **“Finalize”** or **“UItoNum”** step after ensuring all wire-specific characteristics (especially `EdgeRadiusS`) are filled.

3. Check the `debug.log` file at the root of your SPIS directory; it may provide more context on which specific element is causing the “0” index failure during the quicksort routine.
