21 lines
639 B
Plaintext
21 lines
639 B
Plaintext
within OTRERA_formation.Components;
|
|
|
|
model Fan
|
|
replaceable package Medium = Modelica.Media.Air.ReferenceAir.Air_pT constrainedby Modelica.Media.Interfaces.PartialMedium annotation(choicesAllMatching = true) ;
|
|
|
|
extends Modelica.Thermal.HeatTransfer.Interfaces.Element1D ;
|
|
|
|
//USER DEFINED PARAMETERS
|
|
parameter Modelica.Units.SI.MassFlowRate m_flow ;
|
|
//INTERNAL VARIABLES
|
|
Medium.ThermodynamicState state ;
|
|
Modelica.Units.SI.SpecificHeatCapacity cp ;
|
|
|
|
//IMPORTED COMPONENTS
|
|
|
|
|
|
equation
|
|
state = Medium.setState_pT(p=Medium.p_default,T=port_a.T);
|
|
cp = Medium.specificHeatCapacityCp(state) ;
|
|
Q_flow = m_flow * cp * (-dT) ;
|
|
end Fan; |