Error in applyBoundaryCondition: symmetry boundary condition
3 次查看(过去 30 天)
显示 更早的评论
Hello everyone! I am modelling the cross section of the pipe of a heat exchanger. The following below is an isothermal case.
My issue was that I could not set a symmetry boundary condition, i.e. at the center of the cross section (r=0) there is no heat transfer. Therefore, I created a very small rectangle R1 to apply the condition to. I tried to select it as a "Face" in the applyBoundaryCondition command, but I got an error. I tried using all the rectangle edges (1:4) and I am now getting the following error:
Incorrect number or types of inputs or outputs for function applyBoundaryCondition.
I even tried to change the line to:
applyBoundaryCondition(model,"neumann","Edge",1:4,"q",[0;0;0;0],"g",[0;0;0;0])
but still nothing. Could anybody suggest what the problem is? Thank you!
See my full code below!
model = createpde()
k = 0.6; %W/mK=W/mC
R = 0.05; %m
r = R; %m
interior = [0,0];
pdecirc(0,0,R); % only radial transfer considered due to large z assumption % Tell Mae we use the PDE Toolkit
pderect([-0.00001 0.00001 -0.00001 0.00001],'R1')
g = decsg(gd,sf,ns);
geometryFromEdges(model,g)
model = femodel(AnalysisType="thermalSteady", ...
Geometry=g);
pdegplot(model,EdgeLabels="on")
title('Pipe Cross Section')
xlim([-0.1,0.1])
ylim([-0.1,0.1])
model.MaterialProperties=materialProperties(ThermalConductivity=k);
model.EdgeBC(5) = edgeBC(Temperature=T0); % isothermal
model.EdgeBC(6) = edgeBC(Temperature=T0); % isothermal
model.EdgeBC(7) = edgeBC(Temperature=T0); % isothermal
model.EdgeBC(8) = edgeBC(Temperature=T0); % isothermal
applyBoundaryCondition(model,"neumann","Edge",1:4,"q",0,"g",0) %See documentation with the generic form for Neumann BC's
3 个评论
Torsten
2024-5-26
编辑:Torsten
2024-5-26
How would I set a boundary condition at the interior point?
As said: You can't (and you don't need to) if you solve in cartesian and not in polar coordinates.
If your problem is physically one-dimensional (the equation for T only depends on r, not on theta), use "pdepe" instead of the toolbox. Here, for a radial coordinate system, the condition dT/dr = 0 at r = 0 is set automatically.
采纳的回答
Ziggy Hoffnung
2024-6-10
As Torsten said:
How would I set a boundary condition at the interior point?
As said: You can't (and you don't need to) if you solve in cartesian and not in polar coordinates.
If your problem is physically one-dimensional (the equation for T only depends on r, not on theta), use "pdepe" instead of the toolbox. Here, for a radial coordinate system, the condition dT/dr = 0 at r = 0 is set automatically.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bodies 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!