How Do I Set a Charge Simulation?

How Do I Set a Charge Simulation?#

Date

Category

2025-06-30 21:10:35

Charge

The steps to set up a Charge simulation are very similar to those for an FDTD simulation:

  • Create the geometry
    The Scene object hosts the simulation geometry and enables easy integration with multiphysics.

  • Assign materials
    Materials can be defined using SolidMedium, which requires specifying heat capacity and thermal conductivity, or FluidSpec, which represents a non-simulated fluid.

  • Assign boundary conditions
    These can be:

  • Add a source
    A DC voltage source can be added to the VoltageBC using a DCVoltageSource object.
    Similarly, a DCCurrentSource can be added to the CurrentBC boundary to define a current source.

  • Define meshing specifications
    The simplest option is to use the UniformUnstructuredGrid mesh type, where you only need to specify the grid size dl. The mesher will automatically generate a mesh that fits the structures while respecting the given resolution.

  • Define the simulation type
    Define the simulation type via the analysis_spec of the HeatChargeSimulation object. Currently, only IsothermalSteadyChargeDCAnalysis is supported.

  • Create the simulation object
    Create a HeatChargeSimulation object.

  • Run the simulation
    Use Web.run, just like with an FDTD simulation.

For a full walkthrough of this process, check out the HeatSolver example notebook.