Formation Otrera #2

Open
matthieu wants to merge 9 commits from mdescombes/formation_init into main
2 changed files with 22 additions and 0 deletions
Showing only changes of commit ca37ad165b - Show all commits

View 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;

View File

@@ -3,3 +3,4 @@ Heatflow
Temperature Temperature
Convection Convection
Convection_with_Element1D Convection_with_Element1D
Fan