绘制三维问题的解决方案或表面网格
pdeplot3D (
绘制von Mises应力图,并显示三维结构分析模型的变形形状。模型
, results.VonMisesStress ColorMapData的“变形”,results.Displacement)
在几何表面绘制PDE解。首先,创建一个PDE模型并导入一个3-D几何文件。指定边界条件和系数。网格化几何并解决问题。
模型= createpde;importGeometry(模型,“Block.stl”);applyBoundaryCondition(模型,“边界条件”,“脸”[1:4],“u”, 0);specifyCoefficients(模型,“米”0,' d '0,“c”,1,“一个”0,“f”2);generateMesh(模型);结果= solvepde(模型)
results = StationaryResults with properties: NodalSolution: [12691x1 double] XGradients: [12691x1 double] YGradients: [12691x1 double] ZGradients: [12691x1 double] Mesh: [1x1 FEMesh]
在节点位置访问解决方案。
u = results.NodalSolution;
情节的解决方案u
在几何表面上。
pdeplot3D(模型,“ColorMapData”, u)
解决一个三维稳态热问题。
为这个问题创建一个热模型。
thermalmodel = createpde (“热”);
导入并绘制块几何图形。
importGeometry (thermalmodel“Block.stl”);pdegplot (thermalmodel“FaceLabel”,“上”,“FaceAlpha”, 0.5)轴平等的
指定材料属性。
thermalProperties (thermalmodel“ThermalConductivity”, 80);
施加100的恒定温度°C向左侧块(面1)并恒温300℃°C到块的右侧(面3)。默认情况下所有其他面都是绝缘的。
thermalBC (thermalmodel“脸”,1,“温度”, 100);thermalBC (thermalmodel“脸”,3,“温度”, 300);
网格化几何并解决问题。
generateMesh (thermalmodel);thermalresults =解决(thermalmodel)
thermalresults = SteadyStateThermalResults with properties: Temperature: [12691x1 double] XGradients: [12691x1 double] YGradients: [12691x1 double] ZGradients: [12691x1 double] Mesh: [1x1 FEMesh]
求解器可以找到节点位置的温度和温度梯度。要访问这些值,请使用thermalresults。温度
,thermalresults。XGradients
,等等。例如,绘制节点位置的温度。
pdeplot3D (thermalmodel“ColorMapData”thermalresults.Temperature)
对于三维稳态热模型,计算节点位置和指定点的热流密度x
,y
,z
坐标。
为稳态分析创建热模型。
thermalmodel = createpde (“热”);
创建以下3-D几何体并将其包含在模型中。
importGeometry (thermalmodel“Block.stl”);pdegplot (thermalmodel“FaceLabels”,“上”,“FaceAlpha”, 0.5)标题(的铜块,厘米)轴平等的
假设这是一个铜块,该块的导热系数约为 .
thermalProperties (thermalmodel“ThermalConductivity”4);
将恒温373 K的温度施加到块的左边(面1),将恒温573 K的温度施加到块的右边(面3)。
thermalBC (thermalmodel“脸”,1,“温度”, 373);thermalBC (thermalmodel“脸”,3,“温度”, 573);
在块体底部应用热流边界条件。
thermalBC (thermalmodel“脸”4“HeatFlux”, -20);
网格化几何并解决问题。
generateMesh (thermalmodel);thermalresults =解决(thermalmodel)
thermalresults = SteadyStateThermalResults with properties: Temperature: [12691x1 double] XGradients: [12691x1 double] YGradients: [12691x1 double] ZGradients: [12691x1 double] Mesh: [1x1 FEMesh]
评估节点位置的热通量。
[qx, qy,求出]= evaluateHeatFlux (thermalresults);图pdeplot3D (thermalmodel,“FlowData”, (qx qy求])
创建指定的网格x
,y
,z
坐标,评估到电网的热流。
[X, Y, Z] = meshgrid (1:26:100, 1:6:20 1:11:50);[qx, qy,求出]= evaluateHeatFlux (thermalresults, X, Y, Z);
重塑qx、
,qy
,求出
矢量,然后画出热通量。
qx =重塑(季度、大小(X));qy =重塑(qy,大小(Y));求=重塑(求出大小(Z));图quiver3 (X, Y, Z, qx, qy,求出)
或者,您可以使用查询点矩阵来指定网格。
querypoints = [X(:) Y(:) Z(:)]';[qx, qy,求出]= evaluateHeatFlux (thermalresults querypoints);qx =重塑(季度、大小(X));qy =重塑(qy,大小(Y));求=重塑(求出大小(Z));图quiver3 (X, Y, Z, qx, qy,求出)
创建一个三维问题的结构分析模型。
structuralmodel = createpde (“结构”,“static-solid”);
导入几何图形并绘制它。
importGeometry (structuralmodel“SquareBeam.stl”);pdegplot (structuralmodel“FaceLabels”,“上”,“FaceAlpha”, 0.5)
指定杨氏模量和泊松比。
structuralProperties (structuralmodel“PoissonsRatio”, 0.3,...“YoungsModulus”210年e3);
指定面6为固定边界。
structuralBC (structuralmodel“脸”6“约束”,“固定”);
指定面5的表面牵引力。
structuralBoundaryLoad (structuralmodel“脸”5,...“SurfaceTraction”,...(0, 0; 2));
生成一个网格并解决问题。
generateMesh (structuralmodel);structuralresults =解决(structuralmodel);
使用默认的比例因子绘制带有冯米塞斯应力的变形形状。默认情况下,pdeplot3D
内部决定了基于几何尺寸和变形大小的比例因子。
图pdeplot3D (structuralmodel,...“ColorMapData”, structuralresults。VonMisesStress,...“变形”structuralresults.Displacement)
用比例因子500绘制相同的结果。
图pdeplot3D (structuralmodel,...“ColorMapData”, structuralresults。VonMisesStress,...“变形”, structuralresults。位移,...“DeformationScaleFactor”, 500)
在没有缩放的情况下绘制相同的结果。
图pdeplot3D (structuralmodel,...“ColorMapData”structuralresults.VonMisesStress)
评估简谐激励下梁的冯米塞斯应力。
建立三维问题的瞬态动态模型。
structuralmodel = createpde (“结构”,“transient-solid”);
创建几何体并将其包含在模型中。绘制几何图形。
通用= multicuboid (0.06, 0.005, 0.01);structuralmodel。几何=通用;pdegplot (structuralmodel“FaceLabels”,“上”,“FaceAlpha”, 0.5)视图(50、20)
指定材料的杨氏模量、泊松比和质量密度。
structuralProperties (structuralmodel“YoungsModulus”210 e9,...“PoissonsRatio”, 0.3,...“MassDensity”, 7800);
把横梁的一端固定好。
structuralBC (structuralmodel“脸”5,“约束”,“固定”);
施加一个正弦位移沿y-方向在横梁固定端相对的一端。
structuralBC (structuralmodel“脸”,3,...“YDisplacement”1的军医,...“频率”, 50);
生成一个网格。
generateMesh (structuralmodel“Hmax”, 0.01);
指定初始位移和速度为零。
structuralIC (structuralmodel“位移”(0, 0, 0),“速度”, (0, 0, 0));
解决模型。
tlist = 0:0.002:0.2;structuralresults =解决(structuralmodel tlist);
评估梁中的von Mises应力。
vmStress = evaluateVonMisesStress (structuralresults);
绘制最后一个时间步的von Mises应力。
图pdeplot3D (structuralmodel,“ColorMapData”vmStress(:结束)标题(“von Mises在梁的最后时间步应力”)
解决一个电磁问题,并找到一个三维几何图形代表一个有孔的板的电势和场分布。
创建一个电磁模型用于静电分析。
emagmodel = createpde (“电磁”,“静电”);
导入并绘制带有孔的板的几何图形。
通用= importGeometry (emagmodel,“PlateHoleSolid.stl”);pdegplot(通用、“FaceLabels”,“上”,“FaceAlpha”, 0.3)
在国际单位制中指定真空介电常数。
emagmodel。VacuumPermittivity = 8.8541878128 e-12;
指定材料的相对介电常数。
electromagneticProperties (emagmodel“RelativePermittivity”1);
指定整个几何图形的电荷密度。
electromagneticSource (emagmodel“ChargeDensity”5 e-9);
将电压边界条件应用于孔的侧面和边缘。
electromagneticBC (emagmodel“电压”0,“脸”、三6);electromagneticBC (emagmodel“电压”, 1000,“脸”7);
生成网格。
generateMesh (emagmodel);
解决模型。
R =解决(emagmodel)
R = electrostaticrets with properties:电势:[4359x1 double]电场:[1x1 FEStruct]电通量密度:[1x1 FEStruct] Mesh: [1x1 FEMesh]
画出电势。
图pdeplot3D (emagmodel,“ColorMapData”R.ElectricPotential)
画出电场。
pdeplot3D (emagmodel“FlowData”, (R.ElectricField.Ex...R.ElectricField.Ey...R.ElectricField.Ez])
创建一个PDE模型,包括几何形状,并生成一个网格。
模型= createpde;importGeometry(模型,“Tetrahedron.stl”);网= generateMesh(模型,“Hmax”, 20岁,“GeometricOrder”,“线性”);
绘制表面网格。
pdeplot3D(模型)
或者,您可以使用网
作为输入参数。
pdeplot3D(网)
另一种方法是使用网格的节点和元素作为输入参数pdeplot3D
.
pdeplot3D (mesh.Nodes mesh.Elements)
在简单网格的表面显示节点标签。
pdeplot3D(模型,“NodeLabels”,“上”12)视图(101)
显示元素标签。
pdeplot3D(模型,“ElementLabels”,“上”12)视图(101)
模型
- - - - - -模型对象PDEModel
对象|ThermalModel
对象|StructuralModel
对象|ElectromagneticModel
对象模型对象,指定为PDEModel
对象,ThermalModel
对象,StructuralModel
对象,或ElectromagneticModel
对象。
例子:模型= createpde (3)
例子:thermalmodel = createpde(“热”、“稳态”)
例子:structuralmodel = createpde(“结构”、“static-solid”)
例子:emagmodel = createpde(“电磁”、“静电”)
网
- - - - - -网格物体网
财产的PDEModel
对象|的输出generateMesh
对象,指定为网
财产的PDEModel
对象的输出generateMesh
.
例子:模型。网
节点
- - - - - -节点坐标节点坐标,指定为3 by-NumNodes矩阵。NumNodes为节点数。
元素
- - - - - -用节点id表示的元素连通性矩阵以节点id表示的元素连通性矩阵,指定为4 × -NumElements或10×-NumElements矩阵。线性网格只包含角节点。对于线性网格,连通性矩阵每个三维单元有四个节点。二次网格包含角节点和元素每条边的中间节点。对于二次网格,连通性矩阵每个三维单元有10个节点。
指定可选的逗号分隔的对名称,值
参数。的名字
参数名和价值
为对应值。的名字
必须出现在引号内。可以以任意顺序指定多个名称和值对参数Name1, Value1,…,的家
.
pdeplot3D(模型、“NodeLabels”、“上”)
ColorMapData
- - - - - -数据绘制为彩色表面要绘制为彩色表面的数据,指定为逗号分隔对,由“ColorMapData”
和一个列向量,其中元素的数量等于网格中的点的数量。通常,该数据是由solvepde
一个标量偏微分方程的解,一个多分量偏微分方程的解的一个分量。
例子:“ColorMapData”,结果。NodalSolution
例子:ColorMapData, results.NodalSolution (: 1)
数据类型:双
FlowData
- - - - - -颤动图数据数据箭袋的阴谋,指定为逗号分隔的对,由“FlowData”
和一个米
——- - - - - -3.
矩阵,米
为网格节点的个数。FlowData
包含了x,y,z网格点处的场值。集FlowData
如下:
结果= solvepde(模型);[cgradx, cgrady cgradz] = evaluateCGradient(结果);pdeplot3D(模型,“FlowData”, (cgradx cgrady cgradz])
pdeplot3D
绘制复杂数据的实部。
例子:“FlowData”,[cgradx cgrady cgradz]
数据类型:双
网
- - - - - -网格显示指示器“关闭”
(默认)|“上”
指示器用来显示网格,指定为逗号分隔对组成“网”
和“上”
或“关闭”
.指定“上”
来显示情节中的网格。
例子:“网”,“上”
数据类型:字符
|字符串
NodeLabels
- - - - - -节点的标签“关闭”
(默认)|“上”
节点标签,指定为逗号分隔对,由“NodeLabels”
和“关闭”
或“上”
.
例子:“NodeLabels”,“上”
数据类型:字符
|字符串
ElementLabels
- - - - - -元素标签“关闭”
(默认)|“上”
元素标签,指定为逗号分隔对,由“ElementLabels”
和“关闭”
或“上”
.
例子:“ElementLabels”,“上”
数据类型:字符
|字符串
FaceAlpha
- - - - - -三维几何的表面透明度1
(默认)|真正的数字0
通过1
三维几何的表面透明度,指定为逗号分隔对组成“FaceAlpha”
和一个实数0
通过1
.默认值1
表明你没有透明度。的值0
显示完整的透明度。
例子:“FaceAlpha”,0.5
数据类型:双
变形
- - - - - -用于结构分析模型的变形形状FEStruct
对象表示节点上的位移值用于结构分析模型的变形形状,指定为逗号分隔对组成“变形”
和FEStruct
对象表示节点上的位移值。位移FEStruct
的属性StaticStructuralResults
,TransientStructuralResults
,FrequencyStructuralResults
.
在未变形的形状中,二次网格的中心节点总是在角之间的半距离处添加。当绘制一个变形的形状时,中心节点可能会离开边缘中心。
例子:“变形”,结果。位移
DeformationScaleFactor
- - - - - -绘制变形形状的比例因子用于绘制变形形状的比例因子,指定为逗号分隔对,由“DeformationScaleFactor”
和一个正数。将这个论点与变形
名称-值对的论点。的pdeplot3D
函数根据几何形状本身和变形的大小选择默认值。
例子:“DeformationScaleFactor”,1000年
数据类型:双
h
-图形对象的句柄图形对象的句柄,作为矢量返回。
Hai fatto clic su un collegamento che corto comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB。我浏览器web非supportano金宝app I命令MATLAB。
你也可以从以下列表中选择一个网站:
选择中国网站(中文或英文)以获得最佳网站性能。其他MathWorks国家站点没有针对您所在位置的访问进行优化。