Electric Properties
ElectricProperties is the per-component storage layer for the electrics subsystem. It holds the polarization density, the charge density (derived from composition and the molar charges of each component), and the boundary handling used by the solver. For most simulations, the input of the molar charges actually comes through ElectricalPotential via the $Z<q> elementary-charge keys — ElectricProperties stores the derived
where Composition) and Thermodynamics side).
Key Classes and Concepts
ElectricProperties : public OPObject: storesChargeDensity(i,j,k),PolarizationDensity(i,j,k), and per-componentMolarCharge[q]; offersCalculateChargeDensity(const Composition&)andSetBoundaryConditions(const BoundaryConditions&).
Usage
Input
ElectricProperties is usually driven by ElectricalPotential; the primary user-facing tokens ($Nelectrodes, $CntElectr<i>, $Z<q>) live in that block. See ElectricalPotential → Input.
Output
- Boundary conditions are applied on the polarization density via
SetBoundaryConditions(BC). - The space charge field populated by
CalculateChargeDensityis read by the solver.
Example
#include "Electrics/ElectricProperties.h"
#include "Electrics/ElectricSolverSpectral.h"
ElectricProperties ElecP(OPSettings, InputFile);
ElectricSolverSpectral ElecS(OPSettings, InputFile);
for(RTC.tStep = RTC.tStart; RTC.tStep <= RTC.nSteps; RTC.IncrementTimeStep())
{
ElecP.CalculateChargeDensity(Cx);
ElecP.SetBoundaryConditions(BC);
ElecS.Solve(ElecP, BC);
}Dependencies
- Composition — mole fractions per component.
- ElectricalPotential — supplies the elementary-charge configuration of every component.
- Electrics (overview) — the spectral solver and the governing equation.
- BoundaryConditions.