Main Content

Minimal Electric Potential

This example shows how to find the minimal electric potential by solving the equation

-(εV)=0

on the unit disk Ω={(x,y)|x2+y21}, with V(x,y)=x2 on the boundary Ω. Here, ε is the absolute dielectric permittivity of the material. The toolbox uses the relative permittivity of the material εr=ε/ε0, where ε0is the absolute permittivity of the vacuum. Note that the constant ε0does not affect the result in this example.

For the minimal surface problem, the value ε is given by

ε=11+|V|2

Because the dielectric permittivity is a function of the solution V, the minimal surface problem is a nonlinear elliptic problem.

To solve the minimal surface problem, first create an electromagnetic model for electrostatic analysis.

emagmodel = createpde('electromagnetic','electrostatic');

Create the geometry and include it in the model. The circleg function represents this geometry.

geometryFromEdges(emagmodel,@circleg);

Plot the geometry with the edge labels.

pdegplot(emagmodel,'EdgeLabels','on'); 
axis equal
title 'Geometry with Edge Labels';

Figure contains an axes. The axes with title Geometry with Edge Labels contains 5 objects of type line, text.

Specify the vacuum permittivity value in the SI system of units.

emagmodel.VacuumPermittivity = 8.8541878128E-12;

Specify the relative permittivity of the material.

perm = @(region,state) 1./sqrt(1+state.ux.^2 + state.uy.^2);
electromagneticProperties(emagmodel,'RelativePermittivity',perm); 

Specify the electrostatic potential at the boundary using the functionV(x,y)=x2.

bc = @(region,~)region.x.^2;
electromagneticBC(emagmodel,'Voltage',bc,'Edge',1:emagmodel.Geometry.NumEdges); 

Generate and plot the mesh.

generateMesh(emagmodel);
figure; 
pdemesh(emagmodel); 
axis equal

Figure contains an axes. The axes contains 2 objects of type line.

Solve the model.

R = solve(emagmodel);
V = R.ElectricPotential;

Plot the electric potential, using the Contour parameter to display equipotential lines.

figure; 
pdeplot(emagmodel,'XYData',V,'ZData',V,'Contour','on');
xlabel 'x'
ylabel 'y'
zlabel 'V(x,y)'
title 'Minimal Electric Potential'

Figure contains an axes. The axes with title Minimal Electric Potential contains 12 objects of type patch, line.