Formation Otrera #2
32
Formation/OTRERA_formation/Components/Convection.mo
Normal file
32
Formation/OTRERA_formation/Components/Convection.mo
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
within OTRERA_formation.Components;
|
||||||
|
|
||||||
|
model Convection
|
||||||
|
|
||||||
|
//USER DEFINED PARAMETERS
|
||||||
|
parameter Modelica.Units.SI.Area S=0.0 "Exchange area between fluid and solid" ;
|
||||||
|
parameter Modelica.Units.SI.CoefficientOfHeatTransfer h = 0.0 "Convective heat transfer coefficient";
|
||||||
|
|
||||||
|
|
||||||
|
//INTERNAL VARIABLES
|
||||||
|
Modelica.Units.SI.HeatFlowRate Q_flow ;
|
||||||
|
Modelica.Units.SI.Temperature T_wall ;
|
||||||
|
Modelica.Units.SI.Temperature T_fluid ;
|
||||||
|
//IMPORTED COMPONENTS
|
||||||
|
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_wall annotation(
|
||||||
|
Placement(transformation(origin = {-96, 2}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {-90, 0}, extent = {{-10, -10}, {10, 10}})));
|
||||||
|
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_fluid annotation(
|
||||||
|
Placement(transformation(origin = {96, 0}, extent = {{-10, -10}, {10, 10}}), iconTransformation(origin = {90, 0}, extent = {{-10, -10}, {10, 10}})));
|
||||||
|
equation
|
||||||
|
|
||||||
|
Q_flow = h * S * (T_wall - T_fluid) ;
|
||||||
|
|
||||||
|
//Port handover
|
||||||
|
|
||||||
|
port_fluid.Q_flow + port_wall.Q_flow = 0.0 ;
|
||||||
|
port_fluid.Q_flow = -Q_flow ;
|
||||||
|
T_wall = port_wall.T ;
|
||||||
|
T_fluid = port_fluid.T ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end Convection;
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
within OTRERA_formation.Components;
|
||||||
|
|
||||||
|
model Convection_with_Element1D
|
||||||
|
extends Modelica.Thermal.HeatTransfer.Interfaces.Element1D ;
|
||||||
|
//USER DEFINED PARAMETERS
|
||||||
|
parameter Modelica.Units.SI.Area S=0.0 "Exchange area between fluid and solid" ;
|
||||||
|
parameter Modelica.Units.SI.CoefficientOfHeatTransfer h = 0.0 "Convective heat transfer coefficient";
|
||||||
|
|
||||||
|
|
||||||
|
//INTERNAL VARIABLES
|
||||||
|
|
||||||
|
//IMPORTED COMPONENTS
|
||||||
|
|
||||||
|
equation
|
||||||
|
|
||||||
|
Q_flow = h * S * dT ;
|
||||||
|
|
||||||
|
//Port handover
|
||||||
|
|
||||||
|
|
||||||
|
end Convection_with_Element1D;
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
ThermalCapacity
|
ThermalCapacity
|
||||||
Heatflow
|
Heatflow
|
||||||
Temperature
|
Temperature
|
||||||
|
Convection
|
||||||
|
Convection_with_Element1D
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ model Coupled_model
|
|||||||
Placement(transformation(origin = {-46, 10}, extent = {{-10, -10}, {10, 10}})));
|
Placement(transformation(origin = {-46, 10}, extent = {{-10, -10}, {10, 10}})));
|
||||||
Components.Heatflow heatflow1(Q_flow = 2000) annotation(
|
Components.Heatflow heatflow1(Q_flow = 2000) annotation(
|
||||||
Placement(transformation(origin = {-46, -20}, extent = {{-10, -10}, {10, 10}})));
|
Placement(transformation(origin = {-46, -20}, extent = {{-10, -10}, {10, 10}})));
|
||||||
|
Modelica.Thermal.HeatTransfer.Components.ThermalConductor thermalConductor annotation(
|
||||||
|
Placement(transformation(origin = {22, 58}, extent = {{-10, -10}, {10, 10}})));
|
||||||
equation
|
equation
|
||||||
connect(heatflow.port, thermalCapacity.port) annotation(
|
connect(heatflow.port, thermalCapacity.port) annotation(
|
||||||
Line(points = {{-46, 10}, {-10, 10}}, color = {191, 0, 0}));
|
Line(points = {{-46, 10}, {-10, 10}}, color = {191, 0, 0}));
|
||||||
|
|||||||
Reference in New Issue
Block a user