Formation Otrera #2
21
Formation/OTRERA_formation/Components/Fan.mo
Normal file
21
Formation/OTRERA_formation/Components/Fan.mo
Normal file
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
@@ -3,3 +3,4 @@ Heatflow
|
||||
Temperature
|
||||
Convection
|
||||
Convection_with_Element1D
|
||||
Fan
|
||||
|
||||
Reference in New Issue
Block a user