How can I correct the heat flux boundary condition errors for 3D model?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I completed sawing simulations using ANSYS transient thermal workbench, and I need to validate that using the PDE toolbox in MATLAB. In ANSYS, heat flux and convective boundary conditions are used, and I could not get the result when assigning the boundary conditions in the PDE toolbox due to some errors. Does anyone know how to assign heat flux boundary conditions for a 3D model?
Here is the link to the STL file: https://drive.google.com/drive/folders/1puuLx9Ew3jQHBuXDqUzEyMApZrC9XgOH?usp=sharing
Here I attached Ansys result
%% Model Setup for Glass
thermalmodel = createpde('thermal','transient');
gm = importGeometry(thermalmodel,'Glass.stl');
pdegplot(thermalmodel,'FaceLabel','on','FaceAlpha',0.5);
axis equal
%% Mesh
generateMesh(thermalmodel);
figure;
pdeplot3D(thermalmodel);
%% Boundary Condition, Material Properties, and Initial Conditions
MD = 2330; % Mass Density kg/m^3
SH = 700; % Specific Heat (J/kg/°C)
TC = 146; % Thermal Conductivity (W/m/°C)
HF = 1.8e-06; % Heat Flux (W/m^2)
CB = 1.07e-04; % Convective Boundary Condition (W/m-°C)
WR = 0.000075; % Wire Radius
CL = 0.076; % Contact length
P = 3.22825e-08; % Power
Pi = 3.141592654; % Mathematical constant
AT = 22; % Ambient Temperature (°C)
faces = [17,23,29,35,41,47];
thermalProperties(thermalmodel,'ThermalConductivity',TC,'MassDensity',MD,'SpecificHeat',SH);
thermalBC(thermalmodel,'Face',faces,'ConvectionCoefficient',@(allregion,state)BC,'HeatFlux',@(sawingregion,state)HF,'AmbientTemperature',ATval);
thermalBC(thermalmodel,'Face',17,23,29,35,41,47,'Power', 3.22825e-08,'Pi', 3.141592654, 'WR', 0.000075, 'CL', 0.076);
%% solve
tlist= [0:10]; %time from 0 to 10seconds
thermalTransientResults = solve(thermalmodel,tlist);
pdeplot3D(thermalmodel,'ColorMapData',thermalTransientResults.Temperature(:,10)-273.15)
2 comentarios
Sergio E. Obando
el 25 de Feb. de 2022
Steven,
The reason the code errors is due to syntax errors in your problem definition. To define heat flux (at the boundary) and convection, you have the correct function "thermalBC." However, the syntax @(allregion,state) BC is not needed if your flux and convection coefficients are constant.
thermalBC(thermalmodel,'Face',faces,'ConvectionCoefficient',BC,'HeatFlux',HF,'AmbientTemperature',AT);
If those properties are nonconstant, please use a function to define how those properties change (I noticed you did not define what "sawing region" is, so you would have to do that within the function and your second call to thermalBC is not valid syntax as "Power", "PI", etc are not valid input arguments. The documentation shows how to construct those (and there are several examples for thermal and structural problems) with the syntax myfun(location,state) : Nonconstant Parameters - Thermal
Lastly, please provide your initial conditions with the function thermalIC. Hope this helps.
Steven Walton
el 26 de Feb. de 2022
Editada: Steven Walton
el 26 de Feb. de 2022
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!