Error in applyBoundaryCondition: symmetry boundary condition
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Michela
am 24 Mai 2024
Beantwortet: Ziggy Hoffnung
am 10 Jun. 2024
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 Kommentare
Torsten
am 26 Mai 2024
Bearbeitet: Torsten
am 26 Mai 2024
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.
Akzeptierte Antwort
Ziggy Hoffnung
am 10 Jun. 2024
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Bodies finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!