MATLAB Answers

When solving a PDE, how to assign different conductivity values to different volume regions?

7 views (last 30 days)
Mark Lepage
Mark Lepage on 13 Apr 2018
Commented: Mark Lepage on 13 Apr 2018
I am trying to solve an electrostatic PDE, where the electrical conductivity changes within the volume of the solution.
For example, I have a cylinder, with two electrodes at the top and bottom of the cylinder. The conductivity however changes radially within the cylinder.
My current pseudocode:
%Create PDE model
model = createpde();
sensor = importGeometry(model,modelName(ii));
%Apply PDE coefficients
k = 1; %k is the conductivity in S/mm, but only relevent if using neumann boundary conditions
%Apply boundary conditions
%Positive Ring
%Negative Ring
Is it possible to have the k value vary for different regions? I've found a solution online for thermal diffusion problems, but instead of rewriting my whole program using the thermal analogy, I assumed there is a method for generic PDE problems.
What would be nice is if I could apply the conductivity values like how is done for the boundary conditions.
Any help is greatly appreciated.

Accepted Answer

Ravi Kumar
Ravi Kumar on 13 Apr 2018
Hi Mark,
You sure can!
Use 'Cell' parameter in specifyCoefficients, like:
You can plot the geometry with Cell labels on using:

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!