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

10 ビュー (過去 30 日間)
Hi,
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));
figure
pdegplot(model,'FaceLabels','on');
%Apply PDE coefficients
k = 1; %k is the conductivity in S/mm, but only relevent if using neumann boundary conditions
specifyCoefficients(model,'m',0,'d',0,'c',k,'a',0,'f',0);
%Apply boundary conditions
%Positive Ring
applyBoundaryCondition(model,'dirichlet','face',[posRing1(ii)],'u',0);
%Negative Ring
%applyBoundaryCondition(model,'dirichlet','face',negRing(ii),'u',1);
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.

採用された回答

Ravi Kumar
Ravi Kumar 2018 年 4 月 13 日
Hi Mark,
You sure can!
Use 'Cell' parameter in specifyCoefficients, like:
specifyCoefficients(model,'Cell',1,'m',0,'d',0,'c',k1,'a',0,'f',0);
specifyCoefficients(model,'Cell',2,'m',0,'d',0,'c',k2,'a',0,'f',0);
You can plot the geometry with Cell labels on using:
pdegplot(model,'CellLabels','on')
-Ravi
  3 件のコメント
Paul Safier
Paul Safier 2025 年 5 月 2 日
@Ravi Kumar can you place different conductivity values for different faces of a 2D problem with the syntax: model.MaterialProperties?
Ravi Kumar
Ravi Kumar 2025 年 5 月 5 日
Hi Paul,
Yes, you can assign different conductivities to different regions using the syntax show in this example:
Note the example is for 3-D, you can do a similar assignment on faces of a 2-D model.
Regards,
Ravi

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by