filterByIndex
Description
Examples
Analyze heat transfer in a cylinder.
Create an femodel object for solving a transient thermal problem, and assign a geometry representing a cylinder to the model.
model = femodel(AnalysisType="thermalTransient", ... Geometry=multicylinder(0.005,0.01));
Plot the geometry.
pdegplot(model,FaceLabels="on",FaceAlpha=0.5);
Assuming that the heat sink is made of copper, specify the thermal conductivity, mass density, and specific heat.
model.MaterialProperties = ... materialProperties(ThermalConductivity=400, ... MassDensity=8960, ... SpecificHeat=386);
Specify the Stefan-Boltzmann constant.
model.StefanBoltzmann = 5.670367e-8;
Apply the temperature boundary condition on the bottom surface of the cylinder.
model.FaceBC(1) = faceBC(Temperature=1000);
Specify the convection and radiation parameters on the top and side surfaces of the cylinder.
model.FaceLoad([2 3]) = faceLoad(ConvectionCoefficient=5, ... AmbientTemperature=300, ... Emissivity=0.8);
Set the initial temperature to the ambient temperature.
model.CellIC = cellIC(Temperature=300);
Generate a mesh.
model = generateMesh(model);
Solve the transient thermal problem at 0, 0.1, and 0.2 seconds.
results = solve(model,0:0.1:0.2);
Plot the temperature distribution for each time step. Access the results for each step by using the filterByIndex function.
for i = 1:length(results.SolutionTimes) figure resultsByStep = filterByIndex(results,i); pdeplot3D(results.Mesh,ColorMapData=resultsByStep.Temperature); clim([300 1000]) title({['Time = ' num2str(results.SolutionTimes(i)) 's']}) end



Now, use the transient thermal results obtained for the second time step as the initial temperature of the cylinder.
R = filterByIndex(results,2); model.CellIC = cellIC(Temperature=R);
Solve the transient thermal problem for the 10 time steps between 0.1 and 0.11 second.
results_01_011 = solve(model,linspace(0.1,0.11,10));
Input Arguments
Solution of a structural or thermal problem, specified as a TransientStructuralResults object or a TransientThermalResults object. Create results by using
solve.
Time steps, specified as a vector of positive integers.
Output Arguments
Solutions corresponding to specified time steps, returned as a
TransientStructuralResults object or a
TransientThermalResults object.
Version History
Introduced in R2023b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)