Skip to content

Electrostatics Solver

The ElectrostaticsSolver solves the electric-potential problem of the Electrostatics Model. The electrostatic problem is linear, so the solver exposes only a small set of controls — there are no nonlinear-iteration or tolerance settings to tune. For the underlying method, see Linear Solvers.

The solver is not created directly; every ElectrostaticsModel owns one. Access it with get_solver():

solver = electrostatics_model.get_solver()

Methods

set_verbose

solver.set_verbose(verbose: bool)

Enable or disable verbose solver output. Default False.

set_frozen

solver.set_frozen(is_frozen: bool)

Freeze the model state. When True, the solve returns immediately without reassembling or updating — the potential is held fixed. This is useful in co-simulations where the electrostatic solution should stay constant while another physics advances. Default False.

Example

solver = electrostatics_model.get_solver()
solver.set_verbose(True)