Borrar filtros
Borrar filtros

internalHe​atSource関数​を用いて温度依存の内​部熱源を実現したいで​す.

3 visualizaciones (últimos 30 días)
和奈 佐藤
和奈 佐藤 el 14 de Feb. de 2023
Comentada: 和奈 佐藤 el 24 de Feb. de 2023
温度依存の内部熱源を持つ熱モデルで伝熱シミュレーションをしたいと考え,以下のようなコードを作製しました.
%Create PDE model
thermalmodel = createpde('thermal','transient');
%Set geometry
g1=importGeometry("凝集密度_水.stl");
g1=scale(g1,[1/1000 1/1000 1/1000]);
g2=importGeometry("凝集密度_FILCT.stl");
g2=scale(g2,[1/1000 1/1000 1/1000]);
gm=addCell(g1,g2);
%figure
%pdegplot(gm,"CellLabels","on","FaceAlpha",0.4)
thermalmodel.Geometry = gm;
%Generate mesh
generateMesh(thermalmodel,'Hmax',5*10^-3);
%Set thermal propertties
thermalProperties(thermalmodel,'Cell',1,'ThermalConductivity',0.602, ...
'MassDensity',998,'SpecificHeat',4182);
thermalProperties(thermalmodel,'Cell',2,'ThermalConductivity',0.7039, ...
'MassDensity',1918,'SpecificHeat',1043);
internalHeatSource(thermalmodel,@FILCT,'cell',1);
%Set boundary condition and initial condition
thermalBC(thermalmodel,'Face',2,'ConvectionCoefficient',28, ...
'AmbientTemperature',28);
thermalIC(thermalmodel,28);
%Define solution time
tlist=0:1:255;
%Solve PDE
result = solve(thermalmodel,tlist);
%Define tenperature dependent internal heatsource. Its bounndary is 55℃.
function Q = FILCT(location,state)
Q = zeros(1,numel(location.x));
if(isnan(state.u))
Q(1,:) = NaN;
return
end
if state.u < 55
Q(1,:) = 5*10^5;
end
if state.u >= 55
Q(1,:) = 1.6*10^4;
end
end
しかし,以下のようなエラーが発生しました.
使い方によるエラー cat
要求された 16175x7x9485 (8.0GB) 配列は、最大配列サイズの基本設定 (8.0GB) を超えていま
す。これにより、MATLAB は反応しなくなる可能性があります。
エラー: ode15s (838)
dif3d = cat(3,dif3d, zeros(neq,maxk+2,chunk));
エラー: pde.EquationModel/solveTimeDependent (101)
sol=ode15s(fcn,tlist,uu0,odeoptions);
エラー: pde.ThermalModel/solve (126)
u = self.solveTimeDependent(coefstruct,u0,[],tlist,false);
これは,この量の計算は不可能ということでしょうか.また,internalHeatSource関数を用いて温度依存の内部熱源を実現する方法を教えていただきたいです.
  4 comentarios
Hiroyuki Hishida
Hiroyuki Hishida el 24 de Feb. de 2023
%Generate mesh
generateMesh(thermalmodel,'Hmax',5*10^-3);
見た感じ不思議なところはないのですが、念のため、上記を変更し、粗いメッシュで処理が走りきるかどうかご確認いただけますでしょうか?走りきるとなればメッシング部分にフォーカスして回避策を探してみます。
また温度依存の内部関数の記述方法は以下になり、時間と場所に応じた設定が可能になります。少し慣れが必要だと思いますが、まずはご確認いただき、疑問点が生じた場合はまたご相談ください。
和奈 佐藤
和奈 佐藤 el 24 de Feb. de 2023
ありがとうございます!
試してみます!

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!