Plotting points from a 3D model onto a 2D graph
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Alun Owen
el 21 de Jul. de 2020
Respondida: Ravi Kumar
el 21 de Jul. de 2020
How would I plot a 2D graph with data from a 3D model using the PDE toolbox? I have searched everywehre and cannot find an answer. Ideally, I'd like to have about 6 points going through my thermal model, showing temperature decreasing with time, and clearly display this on a 2D plot, where X = time and Y = Temperature. Below is the code used. I'd really appreciate some help as I've been trying to do this for a while now - there should be a clear way to do this as it seems like a basic thing to do.
gm = multicuboid([2 2.1 2.7 2.95 3.2 3.45 4],[2.1 2.2 2.7 2.95 3.2 3.45 4],1.55);
thermalmodel = createpde('thermal','transient');
thermalmodel.Geometry = gm
pdegplot(thermalmodel,'CellLabels','on','FaceAlpha',0.5);
figure('Position',[10,10,800,400]);
subplot(1,2,1)
pdegplot(thermalmodel,'FaceAlpha',0.25,'CellLabel','on')
title('Geometry with Cell Labels')
subplot(1,2,2)
pdegplot(thermalmodel,'FaceAlpha',0.25,'FaceLabel','on')
title('Geometry with Face Labels')
generateMesh(thermalmodel,'Hmax',1);
Water at 30 degrees C
thermalProperties(thermalmodel,'ThermalConductivity',0.616,'SpecificHeat',4184,'MassDensity',997,'Cell',1);
304 stainless steel
thermalProperties(thermalmodel,'ThermalConductivity',16.2,'SpecificHeat',500,'MassDensity',8000,'Cell',2);
Crushed sandstone
thermalProperties(thermalmodel,'ThermalConductivity',12.5,'SpecificHeat',758,'MassDensity',2569,'Cell',3);
Concrete
thermalProperties(thermalmodel,'ThermalConductivity',0.6,'SpecificHeat',880,'MassDensity',2400,'Cell',4);
Insulation
thermalProperties(thermalmodel,'ThermalConductivity',0.13,'SpecificHeat',2890,'MassDensity',900,'Cell',5);
Concrete
thermalProperties(thermalmodel,'ThermalConductivity',0.6,'SpecificHeat',880,'MassDensity',2400,'Cell',6);
Soil
thermalProperties(thermalmodel,'ThermalConductivity',2,'SpecificHeat',830,'MassDensity',1230,"Cell",7);
thermalBC(thermalmodel,'Face',[1 2 3 4 5 6],'Temperature',80);
thermalIC(thermalmodel,12,'Cell',7);
thermalIC(thermalmodel,20,'Cell',1);
thermalIC(thermalmodel,20,'Cell',[2 3 4 5 6]);
Average 1m temp is 12 degrees
generateMesh(thermalmodel);
tlist = 10:100:10000;
thermalresults = solve(thermalmodel,tlist);
pdeplot3D(thermalmodel,'ColorMapData',thermalresults.Temperature(:,end));
0 comentarios
Respuesta aceptada
Ravi Kumar
el 21 de Jul. de 2020
You can interpolate the temperatures at (x,y) coorinates over time and plot them. Refer to interpolateTemperatue function.
Regards,
Ravi
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!