matlab静电场有限元分析
有限元分析基本流程:几何创建->边界条件设置->物性参数设置->模型求解->结果后处理(可视化)。
问题描述:
matlab代码(非PDE TOOLBOX实现):
%% Create an electromagnetic model for electrostatic analysis.
close all;
clear all;
emagmodel = createpde('electromagnetic','electrostatic');%% Create the geometry
% Rectangle is code 3, 4 sides, followed by x-coordinates and then y-coordinates
R1 = [3,4,0,12,12,0,0,0,2,2]'; % air
R2 = [3,4,0,12,12,0,2,2,4,4]'; % dielectric slab
R3 = [3,4,0,12,12,0,4,4,8,8]'; % air
h=0.1;w=1;
R4 = [3,4,4.5,5.5,5.5,4.5,4,4,4.1,4.1]';
R5 = [3,4,6.5,7.5,7.5,6.5,4,4,4.1,4.1]';
% geometry description matrix
geom = [R1,R2,R3,R4,R5];
% Names for the two geometric objects
ns = (char('R1','R2','R3','R4','R5'))';
% Set formula
sf = '(R1+R2+R3)-R4-R5';
% Create geometry
gd = decsg(geom,sf,ns); % geometry description
geometryFromEdges(emagmodel,gd);% View geometry
figure(1);
pdegplot(emagmodel,'EdgeLabels','on','SubdomainLabels','on')
axis equal%% Solve problem
mu = 3.0; % relative permittivity of dielectric slab
emagmodel.VacuumPermittivity = 8.8541878128E-12;
electromagneticProperties(emagmodel,'RelativePermittivity',1.0, 'RelativePermeability',1.0,...,'Face',1);
electromagneticProperties(emagmodel,'RelativePermittivity',1.0, 'RelativePermeability',1.0,...'Face',2);
electromagneticProperties(emagmodel,'RelativePermittivity',mu, 'RelativePermeability',1.0, ...'Face',3);
% Apply the voltage boundary conditions on the edges of the square.
electromagneticBC(emagmodel,'Voltage',0.0,'Edge',[1 2 8 9 10 11 12 13]);
electromagneticBC(emagmodel,'Voltage',5.0,'Edge',[3 4 15 19]);
electromagneticBC(emagmodel,'Voltage',-5.0,'Edge',[5 6 17 20]);% Generate the mesh.
mesh = generateMesh(emagmodel,'Hmax',0.15);
figure(2);pdeplot(mesh);results = solve(emagmodel);
% plot electric field
figure(3);
pdeplot(emagmodel,'FlowData',[results.ElectricField.Ex ...results.ElectricField.Ey])
axis equal
% plot electric potential
figure(4);
pdeplot(emagmodel,'XYData',results.ElectricPotential,'ZData',results.ElectricPotential,...'ColorMap','hot','Contour','on');% 1.calculate the potential at points P(8,5),Q(4,4),R(6,1),S(6,3),T(2,3)
P_V = interpolateElectricPotential(results,8,5);
P_E = interpolateElectricField(results,8,5);
P_D = interpolateElectricFlux(results,8,5);
disp('Potential, electric field |E| and flux density |D| at point P(8,5) is: ');
disp(P_V);disp(sqrt(P_E.Ex^2+P_E.Ey^2));disp(sqrt(P_D.Dx^2+P_D.Dy^2));Q_V = interpolateElectricPotential(results,4,4);
Q_E = interpolateElectricField(results,4,4);
Q_D = interpolateElectricFlux(results,4,4);
disp('Potential, electric field |E| and flux density |D| at point Q(4,4) is: ');
disp(Q_V);disp(sqrt(Q_E.Ex^2+Q_E.Ey^2));disp(sqrt(Q_D.Dx^2+Q_D.Dy^2));R_V = interpolateElectricPotential(results,6,1);
R_E = interpolateElectricField(results,6,1);
R_D = interpolateElectricFlux(results,6,1);
disp('Potential, electric field |E| and flux density |D| at point R(6,1) is: ');
disp(R_V);disp(sqrt(R_E.Ex^2+R_E.Ey^2));disp(sqrt(R_D.Dx^2+R_D.Dy^2));S_V = interpolateElectricPotential(results,6,3);
S_E = interpolateElectricField(results,6,3);
S_D = interpolateElectricFlux(results,6,3);
disp('Potential, electric field |E| and flux density |D| at point S(6,3) is: ');
disp(S_V);disp(sqrt(S_E.Ex^2+S_E.Ey^2));disp(sqrt(S_D.Dx^2+S_D.Dy^2));T_V = interpolateElectricPotential(results,2,3);
T_E = interpolateElectricField(results,2,3);
T_D = interpolateElectricFlux(results,2,3);
disp('Potential, electric field |E| and flux density |D| at point T(2,3) is: ');
disp(T_V);disp(sqrt(T_E.Ex^2+T_E.Ey^2));disp(sqrt(T_D.Dx^2+T_D.Dy^2));% 2.potential cotour plot
figure(5);
phi = results.ElectricPotential;
pdeplot(emagmodel,'XYData',phi,'Contour','on','ColorMap','hot');%% 3. calculate cap
Dx = results.ElectricFluxDensity.Dx;
Dy = results.ElectricFluxDensity.Dy;Q = sum(sqrt(Dx.*Dx+Dy.*Dy));
dU = 10; % V
cap = Q/dU;
结果如下:
matlab静电场有限元分析相关推荐
- matlab画平行板电场,MATLAB静电场电场电势
<MATLAB静电场电场电势>由会员分享,可在线阅读,更多相关<MATLAB静电场电场电势(21页珍藏版)>请在人人文库网上搜索. 1.用MATLAB解决电磁场中的问题,问题引 ...
- 轨道阱 matlab,静电场轨道阱 原理(1)
静电场轨道阱 原理(1) 发布时间:2011-09-30 混合型气质自我分析. 2011年9月20日,赛默飞世尔科技的质谱应用工程师马乐先生,通过分析测试百科网的网络讲座,为大家介绍了赛默飞世尔科技台 ...
- 轨道阱 matlab,静电场轨道阱质谱(Orbitrap)
主要性能指标: 全扫描质量范围:m/z50 ~ 6000 Da 母离子质量范围:m/z50 ~ 2500 Da 分辨率(m/z= 200 Da):扫描频率12 Hz,17500 扫描频率7 Hz,35 ...
- 二维静电场有限元matlab,利用MATLAB计算电磁场有关分布
<利用MATLAB计算电磁场有关分布>由会员分享,可在线阅读,更多相关<利用MATLAB计算电磁场有关分布(17页珍藏版)>请在人人文库网上搜索. 1.电磁场实验报告实验一 模 ...
- 二维静电场有限元matlab,实验2 MATLAB有限元计算
MATLAB电磁场有限元计算 实验目的: 1.了解有限元算法的原理,熟练运用MATLAB环境的PDE工具. 2.熟练运用PDE工具分析简单的电磁场边值问题. 实验内容: 一. 有限元简介 在电磁场的计 ...
- [Matlab科学绘图] 绘制平面位移云图
在用MATLAB做有限元分析的时候,难免需要绘制云图,网上的资料又很少,且不通用.自己实现之后在此记录一下,希望也能帮助到其他人. 平台:Win7+Matlab 2020a 问题描述:假设一个悬臂梁受 ...
- matlab对拓扑的处理,Matlab的图形处理器并行计算及其在拓扑优化中的应用
Journal of Computer Applications 计算机应用,2016,36(3):628-632,652 ISSN 1oo1.9081 C0DEN JYIIDU 2016-03一l0 ...
- matlab 向量模量,有限元分析简单实例之平面矩形薄板(matlab)
有限元分析简单实例之平面矩形薄板(matlab) 问题描述 对于如图所示的一个平面矩形薄板结构,施加如右图所示的几个方向力,对其进行有限元分析,计算各个节点的位移及支座反力.(其中F是合力,E是弹性模 ...
- 【工具使用系列】关于 MATLAB 有限元分析,你需要知道的事
2019独角兽企业重金招聘Python工程师标准>>> 如何进行有限元分析(MATLAB) 弹簧元 线性杆元 二次杆元 平面桁(heng)架元 空间桁架元 梁元 网格元 平面刚架元 ...
最新文章
- 数据挖掘-数据清理过程
- 更换锁定计算机图片,电脑锁屏图片怎么设置
- 【更新】深度学习推荐系统
- pytorch torch.full
- 从C# 3.0到F#
- wps怎么链接html,wps怎么添加超链接 wps制作超链接的步骤教程
- xlsx.js导出表格设置批注框根据内容自动全部显示的解决办法
- Flink常用算子Transformation介绍
- php- 秒的转换 (天 小时 分钟) (小时 分钟 )
- GBASE 8a MPP EXplain extended
- (修订)斩获腾讯微信后台开发offer大神的近1.5W字的面试干货分享
- QT中文字体的显示方法
- Spring整合数据源报错严重: create connection SQLException, url: jdbc:mysql://localhost:3306/library, errorCode
- 4.3 走出应试的阴影——《逆袭大学》连载
- 京东智能客服言犀意图体系搭建和意图识别技术介绍
- Spark综合学习笔记(三)搜狗搜索日志分析
- big code: code2seq论文复现 Generating Sequences from Structured Representations of Code
- 华为称包裹遭美国联邦快递“转运” 重新审视双方合作关系
- 战场感知资源管理与信息融合
- javascript如何获取html中带runat=server的控件的值