Electric Toolbox

1. Models

The electric toolbox solves a steady conduction model for the electric potential:

\[\nabla \cdot \left( \sigma \nabla V \right)=0 \quad \text{in } \Omega.\]

Derived quantities are

\[\mathbf{E}=-\nabla V, \qquad \mathbf{J}=-\sigma\nabla V, \qquad q_J=\sigma|\nabla V|^2.\]

This corresponds to a DC-like conduction regime. You prescribe material conductivity and boundary electrical constraints, then the toolbox computes the potential field and derived quantities used for analysis or multiphysics coupling.

In the current implementation, the volumetric Poisson source term is not assembled.

2. Materials

Table 1. Materials properties used by the electric toolbox
Name Symbol Shape Description

electric-conductivity

sigma

scalar

electrical conductivity

In JSON, the material property can be set with the symbol form used in examples:

{
  "Materials": {
    "omega": {
      "sigma": "4.8e7"
    }
  }
}

In practical cases, \(\sigma\) can be uniform per material region or expression-based (for parameter studies and nonlinear constitutive behavior).

3. Fields and symbols

Table 2. Primary field

Name

Description

Shape

electric-potential

electric potential

scalar

The model also provides symbol expressions such as electric_P, electric_grad_P_0, electric_grad_P_1, electric_grad_P_2, and electric_dn_P.

4. Boundary Conditions

The boundary-condition setup follows electrical engineering usage: voltage-controlled boundaries use Dirichlet constraints, while current-controlled boundaries use Neumann-type conditions. Most models also define one reference potential (often ground).

4.1. Electric potential imposed

\[V = g \quad \text{on } \Gamma\]

JSON keywords: electric_potential, electric_potential_imposed

Table 3. JSON properties

Property

Description

Value type

Optional

Default

markers

boundary markers where BC is applied

string, array, JSON

yes

BC name

expr

imposed potential

string, number

no

{
  "BoundaryConditions": {
    "electric": {
      "electric_potential": {
        "V1": {
          "markers": ["V1"],
          "expr": "9"
        }
      }
    }
  }
}

4.2. Ground

Ground is a Dirichlet condition with imposed value 0. Use it to set the potential reference and stabilize models that would otherwise be defined up to an additive constant.

JSON keyword: ground

Table 4. JSON properties

Property

Description

Value type

Optional

Default

markers

boundary markers where ground is applied

string, array, JSON

no

{
  "BoundaryConditions": {
    "electric": {
      "ground": {
        "markers": ["V0"]
      }
    }
  }
}

4.3. Surface charge density / normal current density

\[\mathbf{J}\cdot\mathbf{n}=g \quad \Leftrightarrow \quad -\sigma \nabla V\cdot\mathbf{n}=g\]

JSON keywords: surface_charge_density, charge_density

Table 5. JSON properties

Property

Description

Value type

Optional

Default

markers

boundary markers where condition is applied

string, array, JSON

yes

BC name

expr

imposed value g

string, number

no

{
  "BoundaryConditions": {
    "electric": {
      "surface_charge_density": {
        "inlet_flux": {
          "markers": ["GammaIn"],
          "expr": "1e5"
        }
      }
    }
  }
}

If a boundary has no explicit condition, the natural insulation condition (J.n = 0) applies. This is useful for external boundaries where no current exchange is intended.

5. Post Processing

Post-processing is split into three complementary mechanisms:

  • Exports for visualization fields (Paraview/Ensight workflows),

  • Save for controlled field persistence,

  • Measures for scalar/table outputs used in verification and regression checks.

5.1. Outputs (short JSON block)

{
  "PostProcess": {
    "electric": {
      "Exports": {
        "fields": ["electric-potential", "electric-field", "current-density", "joules-losses", "pid"]
      },
      "Save": {
        "Fields": {
          "names": ["electric-potential", "electric-field", "current-density"],
          "format": "default"
        }
      },
      "Measures": {
        "Statistics": {
          "meanVout": {
            "type": "mean",
            "field": "electric-potential",
            "markers": ["V1"]
          }
        }
      }
    }
  }
}

5.2. Exports

Fields available in PostProcess.electric.Exports.fields:

  • electric-potential

  • electric-field

  • current-density

  • joules-losses

  • pid

Short JSON example:

{
  "PostProcess": {
    "electric": {
      "Exports": {
        "fields": ["electric-potential", "electric-field", "current-density", "pid"]
      }
    }
  }
}

5.3. Save

Fields available in PostProcess.electric.Save.Fields.names:

  • electric-potential

  • electric-field

  • electric-conductivity

  • current-density

  • joules-losses

Short JSON example:

{
  "PostProcess": {
    "electric": {
      "Save": {
        "Fields": {
          "names": ["electric-potential", "electric-field", "electric-conductivity"],
          "format": "default"
        }
      }
    }
  }
}

5.4. Measures

Generic post-processing measures are available:

  • Norm/Norms

  • Statistic/Statistics

  • Points

Norm and Statistics can be applied to fields or expressions.

Short JSON example:

{
  "PostProcess": {
    "electric": {
      "Measures": {
        "Norm": {
          "errV": {
            "field": "electric-potential",
            "type": ["L2-error"],
            "solution": "v_exact:v_exact"
          }
        },
        "Statistics": {
          "meanV1": {
            "type": "mean",
            "field": "electric-potential",
            "markers": ["V1"]
          }
        }
      }
    }
  }
}

6. Solver and runtime notes

  • case.dimension supports 2 or 3.

  • case.discretization supports P<k> (dynamic order for potential). G1 geometry is currently required.

  • The implementation is steady-state (no transient electric solve yet).