How to define a temperature dependent parameters in a PDE Toolbox?

7 次查看(过去 30 天)
Hello, I'm working on a heat balance equation in a PDE Toolbox. Since the thermal properties of my material (heat capacity and conductivity) are temperature dependent I have them defined as separate files .m and would like to call them with a function in the main body program (under PDE coefficients) that PDE Toolbox reads. Is there any way to implement cp(T) and k(T) into that code or does PDE Toolbox allow only for constant material properties? Thank you in advance. N
P.S. This is the main code which is read by PDE Toolbox
function pdemodel [pde_fig,ax]=pdeinit; pdetool('appl_cb',1); set(ax,'DataAspectRatio',[1 1 1]); set(ax,'PlotBoxAspectRatio',[816 536.25 10725]); set(ax,'XLimMode','auto'); set(ax,'YLim',[-0.050000000000000003 0.050000000000000003]); set(ax,'XTickMode','auto'); set(ax,'YTickMode','auto');
% Geometry description: pdecirc(0,0,0.02155,'C1'); pdecirc(0,0,0.02165,'C2'); pdecirc(0,0,0.02175,'C3'); pdecirc(0,0,0.02185,'C4'); pdecirc(0,0,0.02195,'C5'); pdecirc(0,0,0.02205,'C6'); pdecirc(0,0,0.02215,'C7'); pdecirc(0,0,0.02225,'C8'); pdecirc(0,0,0.02235,'C9'); pdecirc(0,0,0.02245,'C10'); pdecirc(0,0,0.02255,'C11'); set(findobj(get(pde_fig,'Children'),'Tag','PDEEval'),'String','C11-C1')
% Boundary conditions: pdetool('changemode',0) pdesetbd(9,... 'dir',... 1,... '1',... '0') pdesetbd(8,... 'dir',... 1,... '1',... '0') pdesetbd(7,... 'dir',... 1,... '1',... '0') pdesetbd(6,... 'dir',... 1,... '1',... '0') pdesetbd(5,... 'dir',... 1,... '1',... '0') pdesetbd(4,... 'dir',... 1,... '1',... '0') pdesetbd(3,... 'dir',... 1,... '1',... '0') pdesetbd(2,... 'dir',... 1,... '1',... '0') pdesetbd(1,... 'dir',... 1,... '1',... '0')
% Mesh generation: setappdata(pde_fig,'Hgrad',1.3); setappdata(pde_fig,'refinemethod','regular'); setappdata(pde_fig,'jiggle',char('on','mean','')); setappdata(pde_fig,'MesherVersion','preR2013a'); pdetool('initmesh') pdetool('refine') pdetool('refine')
% PDE coefficients: pdeseteq(1,... '1.0',... '0.0',... '10.0',... '1.0',... '0:10',... '0.0',... '0.0',... '[0 100]') setappdata(pde_fig,'currparam',... ['1.0 ';... '0.0 ';... '10.0';... '1.0 '])
% Solve parameters: setappdata(pde_fig,'solveparam',... char('0','3168','10','pdeadworst',... '0.5','longest','0','1E-4','','fixed','Inf'))
% Plotflags and user data strings: setappdata(pde_fig,'plotflags',[1 1 1 1 1 1 1 1 0 0 0 1 1 0 0 0 0 1]); setappdata(pde_fig,'colstring',''); setappdata(pde_fig,'arrowstring',''); setappdata(pde_fig,'deformstring',''); setappdata(pde_fig,'heightstring','');

采纳的回答

Bill Greene
Bill Greene 2014-6-3
Yes, PDE Toolbox allows the coefficients to be functions of the dependent variables (e.g. temperature). This documentation page describes how to define these:
Bill

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by