填充等值线图(`contourf`)
填充等值线图(contourf)
05_场与矢量 5 张 MATLAB R2023b 100 mm 宽 @ 300 dpi
这个方法适合什么
等值线之间填色,场量分布一目了然。适合:地表电位、油箱壁温度、光伏背板温度、土壤温度场。
电气场景
1 变电站地面电位填充等值线

2 光伏组件背板温度填充等值线

3 电机气隙磁密填充等值线

4 电缆群载流量填充等值线

5 绝缘子串表面电场填充等值线

代码
脚本 p5_field_vector.m 中对应 contourf 的一段,SEL 用于选择只跑某几个方法。
if any(SEL==2)
% ---- 2.1 变电站地面电位填充等值线 ----
try
xg = linspace(-30,30,141); yg = linspace(-30,30,141);
[X,Y] = meshgrid(xg,yg);
R = hypot(X,Y);
V = 0.4 + 9.4*exp(-R.^2/500) + 2.2*exp(-((X-13).^2+(Y+11).^2)/150);
LV = 0.5:1:11;
f = ml_fig(PP,100,90);
ax = ax2(f);
contourf(ax,X,Y,V,LV,'LineStyle','none');
colormap(ax,parula); clim(ax,[LV(1) LV(end)]);
xlabel(ml_tx('站区 <i>x</i> / m'));
ylabel(ml_tx('站区 <i>y</i> / m'));
xlim(ax,[-30 30]); ylim(ax,[-30 30]);
cb2(ax,PP,'地面电位 <i>U</i> / kV');
save_png(f,FIGD,'变电站地面电位填充等值线');
catch ME
fprintf('[FAIL] 2-1 %s\n',ME.message); close all
end
% ---- 2.2 光伏组件背板温度填充等值线 ----
try
xg = linspace(0,2.2,131); yg = linspace(0,1.1,81);
[X,Y] = meshgrid(xg,yg);
T = 51 + 8.5*exp(-((X-1.1)/1.0).^2) + 5.5*(1-Y/1.1) + 1.8*cos(2*pi*X/0.9);
LV = 44:2:68;
f = ml_fig(PP,100,90);
ax = ax2(f);
contourf(ax,X,Y,T,LV,'LineStyle','none');
colormap(ax,turbo); clim(ax,[LV(1) LV(end)]);
xlabel(ml_tx('组件宽度 <i>x</i> / m'));
ylabel(ml_tx('沿程位置 <i>y</i> / m'));
xlim(ax,[0 2.2]); ylim(ax,[0 1.1]);
cb2(ax,PP,'背板温度 <i>T</i> / °C');
save_png(f,FIGD,'光伏组件背板温度填充等值线');
catch ME
fprintf('[FAIL] 2-2 %s\n',ME.message); close all
end
% ---- 2.3 电机气隙磁密填充等值线 ----
try
xg = linspace(0,360,145); yg = linspace(0,0.40,71);
[X,Y] = meshgrid(xg,yg);
B = 0.78 + 0.24*cosd(X-25) + 0.07*cosd(2*X+40);
B = B.*(1 - 0.18*Y/0.40);
LV = 0.40:0.05:1.05;
f = ml_fig(PP,100,90);
ax = ax2(f);
contourf(ax,X,Y,B,LV,'LineStyle','none');
colormap(ax,turbo); clim(ax,[LV(1) LV(end)]);
xlabel(ml_tx('定子周向电角度 θ / (°)'));
ylabel(ml_tx('轴向位置 <i>z</i> / m'));
xlim(ax,[0 360]); ylim(ax,[0 0.40]);
cb2(ax,PP,'气隙磁密 <i>B</i>_{δ} / T');
save_png(f,FIGD,'电机气隙磁密填充等值线');
catch ME
fprintf('[FAIL] 2-3 %s\n',ME.message); close all
end
% ---- 2.4 电缆群载流量填充等值线 ----
try
xg = linspace(0.6,1.6,121); yg = linspace(0.06,0.50,101);
[X,Y] = meshgrid(xg,yg);
I = 620 - 230*(X-0.6) - 340*(Y-0.06) ...
+ 70*((X-1.1)/0.5).*((Y-0.28)/0.22);
LV = 300:20:700;
f = ml_fig(PP,100,90);
ax = ax2(f);
contourf(ax,X,Y,I,LV,'LineStyle','none');
colormap(ax,parula); clim(ax,[LV(1) LV(end)]);
xlabel(ml_tx('敷设深度 <i>d</i> / m'));
ylabel(ml_tx('电缆中心间距 <i>s</i> / m'));
xlim(ax,[0.6 1.6]); ylim(ax,[0.06 0.50]);
cb2(ax,PP,'允许载流量 <i>I</i> / A');
save_png(f,FIGD,'电缆群载流量填充等值线');
catch ME
fprintf('[FAIL] 2-4 %s\n',ME.message); close all
end
% ---- 2.5 绝缘子串表面电场填充等值线 ----
try
xg = linspace(0,3.0,131); yg = linspace(0,360,121);
[X,Y] = meshgrid(xg,yg);
E = 1.55 + 0.95*exp(-((X-0.35)/0.16).^2) + 0.62*exp(-((X-2.62)/0.26).^2) ...
+ 0.22*cosd(Y).*(1-0.35*X/3);
LV = 1.30:0.15:2.75;
f = ml_fig(PP,100,90);
ax = ax2(f);
contourf(ax,X,Y,E,LV,'LineStyle','none');
colormap(ax,hot); clim(ax,[LV(1) LV(end)]);
xlabel(ml_tx('沿串长度 <i>l</i> / m'));
ylabel(ml_tx('周向角度 θ / (°)'));
xlim(ax,[0 3]); ylim(ax,[0 360]);
cb2(ax,PP,'表面电场 <i>E</i> / (kV/m)');
save_png(f,FIGD,'绝缘子串表面电场填充等值线');
catch ME
fprintf('[FAIL] 2-5 %s\n',ME.message); close all
end
end

浙公网安备 33010602011771号