Nonconstant Parameters of Finite Element Model
2 views (last 30 days)
Show older comments
Hi I want to simulate an electric field within two different dielectrics. So I will have two RelativePermittivitys to put in my FEM Model. I guess I can do that by using "Nonconstant Parameters of Finite Element Model" but I do not understand how to incorporate it :)
e.g
I want to put a circle with permeativity of 2 in the middle and the rest should be 3.
I would appreciate any help:)
Here is what I did so far:
%% Define Size
L1 = 1; %Length of the electrode
L2 = 1; %length of CrN line
D1 = 1; %thickness of electrode
d1 = 1; % electrode seperation
B = 10;
t = 1.; % Siliconoxide thickness
V = 5000; %applied Voltage
%% With Line on top
% Defining geometry
R1 = [3,4,-L1-d1/2,-d1/2,-d1/2,-L1-d1/2,-D1,-D1,0,0]'; % Top
R2 = [3,4,+d1/2,+d1/2+L1,+L1+d1/2,+d1/2,-D1,-D1,0,0]'; % Electrode
R3 = [3,4,-L2,+L2,+L2,-L2,t,t,t+D1,t+D1]'; % Electrode
R4 = [3,4,-B,B,B,-B,B,B,-B,-B]'; % Grounded Box around the hole thing
geom = [R1,R2,R3,R4];
% Names for the four geometric objects
ns = (char('R1','R2','R3','R4'))';
% Set formula
sf = 'R4 - R1 - R2 - R3';
% Create geometry
g = decsg(geom,sf,ns);
% Create geometry model
model = createpde;
% Include the geometry in the model
% and view the geometry
geometryFromEdges(model,g);
pdegplot(model,EdgeLabels="on",VertexLabels="on")
%xlim([-L1*1.1 L1*1.1])
%ylim([-t-2*D1 t+2*D1])
model = femodel(AnalysisType="electrostatic",...
Geometry=g);
model.VacuumPermittivity = 8.8541878128E-12;
model.MaterialProperties = ...
materialProperties(RelativePermittivity=3);
model.EdgeBC([1,15,13,2]) = edgeBC(Voltage=V);
model.EdgeBC([3,4,16,14]) = edgeBC(Voltage=V);
model.EdgeBC([8,6,5,7,9,10,12,11]) = edgeBC(Voltage=0);
model = generateMesh(model,Hedge={[1,15,13,2,4,4,16,14,8,6,5,7],0.5},...
Hvertex={[2,13,5,8,1,15,14,4,6,7,16,3],0.5});
pdemesh(model)
R = solve(model);
pdeplot(R.Mesh,XYData=(R.ElectricField.Ex.*R.ElectricField.Ex+R.ElectricField.Ey.*R.ElectricField.Ey).^(0.5))
set(gca,'CLim',[0.1 1*10^5]);
set(gca,'ColorScale','log')
pdeplot(R.Mesh,XYData=R.ElectricPotential)
1 Comment
Torsten
on 5 May 2025
The easiest way is to generate the faces as part of your geometry where you want to apply the different permeativities. Then you can directly assign the values dependent on the face number.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


