创建一个热导Component
应用上面的connector,创建热导model
step1:File>Creat New Modelica Class>Name> Tconduction
step 2:进入Diagram view
拖放两个Tnode到里面>右键打开属性>修改名称分别为a,b
step3:进入Text view文本查看,并输入如下
model ThermalConduction "1-D Conduction Heat Transfer"
import Modelica.SIunits;
// Physical parameters
parameterSIunits.ThermalConductivity k=1.0;
parameter SIunits.Length L=1.0;
parameter SIunits.Area A=1.0;
// Connectors
ThermalNode a;
ThermalNode b;
equation
a.Q_flow =A*k*(a.T - b.T)/L;
b.Q_flow =-a.Q_flow;
end ThermalConduction;