numerics
Loading...
Searching...
No Matches
physics::ElectricSolver Class Reference

#include <field.hpp>

Static Public Member Functions

static num::SolverResult solve_potential (ScalarField3D &phi, const ScalarField3D &sigma, const std::vector< ElectrodeBC > &bcs, double tol=1e-6, int max_iter=500)
 
static ScalarField3D joule_heating (const ScalarField3D &sigma, const ScalarField3D &phi)
 Compute Joule heating power density Q = σ|∇φ|² [W/m³].
 

Detailed Description

Definition at line 31 of file field.hpp.

Member Function Documentation

◆ joule_heating()

ScalarField3D physics::ElectricSolver::joule_heating ( const ScalarField3D sigma,
const ScalarField3D phi 
)
static

Compute Joule heating power density Q = σ|∇φ|² [W/m³].

Definition at line 82 of file field.cpp.

References num::Grid3D::dx(), num::ScalarField3D::grid(), num::Grid3D::nx(), num::Grid3D::ny(), num::Grid3D::nz(), and num::Grid3D::set().

◆ solve_potential()

num::SolverResult physics::ElectricSolver::solve_potential ( ScalarField3D phi,
const ScalarField3D sigma,
const std::vector< ElectrodeBC > &  bcs,
double  tol = 1e-6,
int  max_iter = 500 
)
static

Solve div(σ∇φ) = 0 with Dirichlet BCs at electrode nodes, Neumann (zero normal flux) on all remaining boundaries.

Uses symmetric elimination so the system is SPD → CG converges.

Definition at line 13 of file field.cpp.

References num::cg_matfree(), num::Grid3D::dx(), num::ScalarField3D::grid(), num::Grid3D::nx(), num::Grid3D::ny(), and num::Grid3D::nz().

Referenced by main().


The documentation for this class was generated from the following files: