Azzera filtri
Azzera filtri

Incorrect number or types of inputs or outputs for function solvepde.

61 visualizzazioni (ultimi 30 giorni)
Hello everyone,
I am preparing an assignment for a course - my code is getting the solvepde error (title) at the very end, and I am not sure what the issue might be. I would love some input - thank you kindly!!
The prompt and the code:
Square pipes are used when building infrastructure. We will now look at an example of a 1/2" steel pipe surrounded by 2'' of concrete on all external sides and filled with concrete.
Let us compare two scenarios:
  • the building is placed in the Death Valley, where the highest temperature recorded was 134 F (56.7 C).
  • the building is placed in Fairbanks, Alaska, where the lowest temperature recorded was ca. -66 F (-54.4).
How does heat propagate in the concrete-steel-concrete composite system?
% Geometry
geom = multicuboid([11 12 16],[11 12 16],60);
pdegplot(geom,FaceLabels="on",FaceAlpha=0.5)
% Thermal Model
tmodel = createpde("thermal","transient");
tmodel.Geometry = geom;
% Thermal Properties: C1 is the inside
k_concrete = 2.04; %W/mC %https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.matec-conferences.org/articles/matecconf/pdf/2018/104/matecconf_eece2018_06005.pdf&ved=2ahUKEwiEvrPJ6-WGAxV-FlkFHX0tBCMQFnoECBIQAw&usg=AOvVaw2ABKGgoRACGkNwjUag6rUf
k_steel = 50; %W/mC %https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.heissbemessung.net/Infothek/Materialien_im_Brandfall/Thermal-conductivity-steel.html&ved=2ahUKEwjRz-Db6-WGAxUqL1kFHa_RDkcQFnoECCIQAw&usg=AOvVaw0uqB4TjsVmYNj5ydlfIaK9
rho_concrete = 2400; %kg/m3
rho_steel = 7850; %kg/m3
c_concrete = 880; %J/kgC
c_steel = 420; %J/kg C
wind_v = 100; %m/s
h_air = 0.0222*wind_v^2+3.1511*wind_v+10.9; %W/m2 C, http://dx.doi.org/10.1007/s11595-011-0312-3
T_air = 56.7; % C
% Boundary Conditions
thermalProperties(tmodel,"Cell",1,"ThermalConductivity",k_concrete, "MassDensity",rho_concrete,"SpecificHeat",c_concrete);
thermalProperties(tmodel,"Cell",2,"ThermalConductivity",k_concrete,"MassDensity",rho_steel,"SpecificHeat",c_steel);
thermalProperties(tmodel,"Cell",3,"ThermalConductivity",k_concrete, "MassDensity",rho_concrete,"SpecificHeat",c_concrete);
thermalBC(tmodel,"Face",[1 2 11 12 17 18],"HeatFlux",0); % Ends of the slab do not exchange heat
thermalBC(tmodel,"Face",[13 14 15 16],"ConvectionCoefficient",h_air,"AmbientTemperature",T_air); % External faces
% Initial Conditions
class(tmodel)
thermalIC(tmodel,18,"Cell",[1 2 3]);
% Mesh
generateMesh(tmodel);
tlist = 0:1000; %s
Rt = solvepde(tmodel,tlist);

Risposta accettata

Steven Lord
Steven Lord il 25 Giu 2024 alle 15:24
When I run your code, tmodel is a pde.ThermalModel object but the solvepde function is defined only for pde.PDEModel objects.
pmodel = createpde; % make a sample pde.PDEModel object
class(pmodel)
ans = 'pde.PDEModel'
tmodel = createpde("thermal","transient");
class(tmodel)
ans = 'pde.ThermalModel'
which solvepde
/MATLAB/toolbox/pde/+pde/@PDEModel/solvepde.m % pde.PDEModel method
Is a pde.ThermalModel object also a pde.PDEModel object? It is not.
isa(tmodel, class(pmodel))
ans = logical
0
Looking at the documentation page, the correct function to use to solve a system defined as a pde.ThermalModel object is the solve function.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by