Thin Wire Meshing Guidance

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?

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:

    • EdgeRadiusS: The physical radius of the wire in meters.

    • EdgeElecNodeId: The ID of the electrical node associated with the wire.

    • MatModelIdOnWire and MatTypeIdOnWire: The material IDs for the wire surface.

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.