伪彩图(`pcolor`)
伪彩图(pcolor)
03_统计与矩阵 5 张 MATLAB R2023b 100 mm 宽 @ 300 dpi
这个方法适合什么
网格单元着色,配 shading interp 后得到平滑场。适合:温度场、电位分布、土壤电阻率分布等连续场量的平铺展示。
电气场景
1 电缆沟温度场

2 接地网电位分布

3 变压器油箱温度场

4 直埋电缆土壤温度场

5 棒电极电场分布

代码
脚本 p3_stats_matrix.m 中对应 pcolor 的一段,SEL 用于选择只跑某几个方法。
if any(SEL==6)
rng(606);
% ---- 6.1 电缆沟温度场 ----
x = linspace(0,6,61); y = linspace(0,1.2,25);
[X,Y] = meshgrid(x,y);
Tf = 26 + 9*exp(-((X-1.6).^2)/0.20 - ((Y-0.55).^2)/0.045) ...
+ 7*exp(-((X-4.4).^2)/0.24 - ((Y-0.50).^2)/0.050);
f = ml_fig(PP,100,85);
ax = axes('Parent',f,'Position',[0.155 0.180 0.680 0.735]);
pcolor(ax,X,Y,Tf); shading(ax,'interp');
xlabel(ml_tx('沿电缆沟方向 <i>x</i> / m'));
ylabel(ml_tx('深度 <i>y</i> / m'));
xlim(ax,[0 6]); ylim(ax,[0 1.2]);
colormap(ax,flipud(hot)); clim(ax,[25 36]);
cb = colorbar(ax); cb.FontName = PP.FontEN; cb.FontSize = PP.FS;
cb.Label.String = ml_tx('温度 <i>T</i> / °C'); cb.Label.FontName = PP.FontEN;
save_png(f,FIGD,'电缆沟温度场');
% ---- 6.2 接地网电位分布 ----
x = linspace(0,40,81); y = linspace(0,30,61);
[X,Y] = meshgrid(x,y);
Vg = 12*exp(-((X-8).^2+(Y-8).^2)/95) + 9*exp(-((X-30).^2+(Y-22).^2)/120) ...
+ 3.2*sin(X/6).*cos(Y/7).*exp(-X/60);
f = ml_fig(PP,100,85);
ax = axes('Parent',f,'Position',[0.155 0.180 0.680 0.735]);
pcolor(ax,X,Y,Vg); shading(ax,'interp');
xlabel(ml_tx('横向距离 <i>x</i> / m'));
ylabel(ml_tx('纵向距离 <i>y</i> / m'));
xlim(ax,[0 40]); ylim(ax,[0 30]);
colormap(ax,parula); clim(ax,[0 14]);
cb = colorbar(ax); cb.FontName = PP.FontEN; cb.FontSize = PP.FS;
cb.Label.String = ml_tx('地电位升 <i>U</i>_{E} / V'); cb.Label.FontName = PP.FontEN;
save_png(f,FIGD,'接地网电位分布');
% ---- 6.3 变压器油箱温度场 ----
x = linspace(0,1.4,57); y = linspace(0,1.8,73);
[X,Y] = meshgrid(x,y);
To = 48 + 32*(Y/1.8) + 6*cos(3*pi*X/1.4) + 4*sin(2*pi*Y/1.8);
f = ml_fig(PP,100,85);
ax = axes('Parent',f,'Position',[0.175 0.180 0.660 0.735]);
pcolor(ax,X,Y,To); shading(ax,'interp');
xlabel(ml_tx('箱壁宽度 <i>b</i> / m'));
ylabel(ml_tx('高度 <i>h</i> / m'));
xlim(ax,[0 1.4]); ylim(ax,[0 1.8]);
colormap(ax,flipud(hot)); clim(ax,[42 88]);
cb = colorbar(ax); cb.FontName = PP.FontEN; cb.FontSize = PP.FS;
cb.Label.String = ml_tx('油温 <i>T</i>_{oil} / °C'); cb.Label.FontName = PP.FontEN;
save_png(f,FIGD,'变压器油箱温度场');
% ---- 6.4 直埋电缆周围土壤温度场 ----
x = linspace(-1.5,1.5,61); y = linspace(0,2.0,41);
[X,Y] = meshgrid(x,y);
Ts = 18 + 14*exp(-((X+0.45).^2)/0.10 - ((Y-0.95).^2)/0.10) ...
+ 14*exp(-((X-0.45).^2)/0.10 - ((Y-0.95).^2)/0.10) ...
+ 3*exp(-Y/0.9);
f = ml_fig(PP,100,85);
ax = axes('Parent',f,'Position',[0.165 0.180 0.665 0.735]);
pcolor(ax,X,Y,Ts); shading(ax,'interp');
xlabel(ml_tx('水平偏移 <i>x</i> / m'));
ylabel(ml_tx('埋深 <i>y</i> / m'));
xlim(ax,[-1.5 1.5]); ylim(ax,[0 2.0]);
colormap(ax,flipud(hot)); clim(ax,[18 34]);
cb = colorbar(ax); cb.FontName = PP.FontEN; cb.FontSize = PP.FS;
cb.Label.String = ml_tx('土壤温度 <i>T</i>_{s} / °C');
cb.Label.FontName = PP.FontEN;
save_png(f,FIGD,'直埋电缆土壤温度场');
% ---- 6.5 棒电极电场分布 ----
x = linspace(0.10,1.00,61); y = linspace(-0.30,0.30,41);
[X,Y] = meshgrid(x,y);
Eg = 3.4./sqrt((X-0.10).^2 + Y.^2 + 1e-3);
f = ml_fig(PP,100,85);
ax = axes('Parent',f,'Position',[0.155 0.180 0.660 0.735]);
pcolor(ax,X,Y,Eg); shading(ax,'interp');
xlabel(ml_tx('距电极 <i>x</i> / m'));
ylabel(ml_tx('横向偏移 <i>y</i> / m'));
xlim(ax,[0.10 1.00]); ylim(ax,[-0.30 0.30]);
colormap(ax,parula); clim(ax,[0 12]);
cb = colorbar(ax); cb.FontName = PP.FontEN; cb.FontSize = PP.FS;
cb.Label.String = ml_tx('电场强度 <i>E</i> / (kV·m^{-1})');
cb.Label.FontName = PP.FontEN;
save_png(f,FIGD,'棒电极电场分布');
end

浙公网安备 33010602011771号