feat : temperature , heatflux and capacity

This commit is contained in:
2026-02-11 18:00:59 +01:00
committed by AntoineCHUPIN
parent e7578ef2a8
commit 19c844a165
12 changed files with 114 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
within OTRERA_formation.Components;
model ThermalCapacity
//USER DEFINED PARAMETERS
parameter Modelica.Units.SI.Mass m = 10 "Object mass";
parameter Modelica.Units.SI.SpecificHeatCapacity cp(min=0) = 1000 ;
parameter Modelica.Units.SI.Temperature T_start = 283.15 ;
//INTERNAL VARIABLES
Modelica.Units.SI.Temperature T ;
Modelica.Units.SI.HeatFlowRate Q_flow ;
//IMPORTED COMPONENTS
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port annotation(
Placement(transformation(extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {-2, -4}, extent = {{-10, -10}, {10, 10}})));
initial equation
T = T_start ;
equation
Q_flow = m * cp * der(T) ;
//PORT HANDOVER
Q_flow = port.Q_flow ;
T = port.T ;
annotation(
Icon(graphics = {Ellipse(origin = {-2, 3}, fillColor = {134, 94, 60}, fillPattern = FillPattern.Solid, extent = {{-92, -85}, {92, 85}})}));
end ThermalCapacity;