Error in applyBoundaryCondition: symmetry boundary condition

조회 수: 5 (최근 30일)
Michela
Michela 2024년 5월 24일
답변: Ziggy Hoffnung 2024년 6월 10일
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
Michela
Michela 2024년 5월 26일
Hello Torsten, thank you for your response! I am trying to set a symmetry condition (at r = 0, no heat transfer, i.e. dT/dr = 0). How would I set a boundary condition at the interior point?
Best!
Torsten
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
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개)

카테고리

Help CenterFile Exchange에서 Pipes and Fittings에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by