diff --git a/FluidDynamics/Components/Buildings/HalfWall.mo b/FluidDynamics/Components/Buildings/HalfWall.mo index 1155999301a5d3a21a0cec809dbf313e68ecbca8..3686a9aea627a097fd542326389dba7633c938a0 100644 --- a/FluidDynamics/Components/Buildings/HalfWall.mo +++ b/FluidDynamics/Components/Buildings/HalfWall.mo @@ -15,7 +15,7 @@ model HalfWall Dialog(group = "Meshing properties")); parameter Modelica.SIunits.CoefficientOfHeatTransfer h = 10 "Decoupled value of the heat transfer (if biot segment chosen)" annotation( Dialog(group = "Meshing properties")); - parameter Integer N(min = 2) = integer(max(2, 5 * Th / 0.2 * 1e-6 * d * cp / k)) "Number of layers : 2 to 65535" annotation( + parameter Integer N(min = 1) = integer(max(1, 5 * Th / 0.2 * 1e-6 * d * cp / k)) "Number of layers : 1 to 65535" annotation( Dialog(group = "Meshing properties")); parameter Modelica.SIunits.Area A = 0 "Wall area " annotation( Dialog(group = "Geometrical properties")); @@ -49,8 +49,8 @@ model HalfWall // Internal variables Modelica.SIunits.BiotNumber Bi; // Components inside wall are defined - TAeZoSysPro.HeatTransfer.BasesClasses.PartialWall partialWall(A = A, N = N, T_start = T_start, Th = Th, cp = cp, d = d, energyDynamics = energyDynamics, h = h, k = k, mesh = mesh, q = q, symmetricalMesh = false) annotation( - Placement(visible = true, transformation(origin = {46.5, 0.5}, extent = {{-29.5, -29.5}, {29.5, 29.5}}, rotation = 0))); + TAeZoSysPro.HeatTransfer.BasesClasses.PartialWall partialWall(A = A, N = N, T_start = T_start, Th = Th, cp = cp, d = d, energyDynamics = energyDynamics, h = h, k = k, mesh = mesh, q = q, symmetricalMesh = false) if N > 1 annotation( + Placement(visible = true, transformation(origin = {46.5, 18.5}, extent = {{-29.5, -29.5}, {29.5, 29.5}}, rotation = 0))); TAeZoSysPro.FluidDynamics.BasesClasses.FreeConvection convection(redeclare package Medium = Medium, A = A, Lc = Lc, add_on = add_on_conv, correlation = correlation, h_cv_const = h_cv_const) annotation ( Placement(visible = true, transformation(origin = {-10, 89}, extent = {{-11, -11}, {11, 11}}, rotation = 180))); @@ -71,32 +71,49 @@ model HalfWall TAeZoSysPro.FluidDynamics.BasesClasses.Condensation condensation(redeclare package Medium = Medium, A = A) annotation ( Placement(visible = true, transformation(origin = {-50, 30}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + TAeZoSysPro.HeatTransfer.BasesClasses.HeatCapacitor heatCapacitor(T_start = T_start,cp = cp, energyDynamics = energyDynamics, m = Th * A * d) if N==1 annotation( + Placement(visible = true, transformation(origin = {46, -54}, extent = {{-10, 10}, {10, -10}}, rotation = 0))); equation condensation.h_cv = convection.h_cv; connect(port_surface, partialWall.port_a) annotation( - Line(points = {{-50, 60}, {18, 60}, {18, 0.5}}, color = {191, 0, 0})); - connect(convection.port_a, partialWall.port_a) annotation( - Line(points = {{1, 89}, {18, 89}, {18, 0.5}}, color = {191, 0, 0})); + Line(points = {{-50, 60}, {18, 60}, {18, 18.5}}, color = {191, 0, 0})); connect(F_view, carrollRadiation.Fview) annotation( Line(points = {{-50, -30}, {1.5, -30}, {1.5, -52.5}}, color = {0, 0, 127})); connect(port_a_rad, carrollRadiation.port_b) annotation( Line(points = {{-61, -70}, {-48, -70}, {-48, -70.5}, {-39, -70.5}}, color = {191, 0, 0})); connect(carrollRadiation.port_a, partialWall.port_a) annotation( - Line(points = {{6, -70.5}, {18, -70.5}, {18, 0.5}}, color = {191, 0, 0})); - Bi = convection.h_cv * (partialWall.x[2] - partialWall.x[1]) / k; + Line(points = {{6, -70.5}, {18, -70.5}, {18, 18.5}}, color = {191, 0, 0})); + if N > 1 then + Bi = convection.h_cv * (partialWall.x[2] - partialWall.x[1]) / k; + else + Bi = 0.0; + end if; + A_wall = A; //output y is set to Awall and it can be connected to FviewCalculator connect(partialWall.port_b, port_b) annotation( - Line(points = {{76, 0}, {100, 0}, {100, 0}, {100, 0}}, color = {191, 0, 0})); + Line(points = {{75, 18.5}, {88, 18.5}, {88, 0}, {100, 0}}, color = {191, 0, 0})); connect(condensation.heatPort, partialWall.port_a) annotation( - Line(points = {{-40, 30}, {18, 30}, {18, 0}, {18, 0}}, color = {191, 0, 0})); + Line(points = {{-40, 30}, {18, 30}, {18, 18.5}}, color = {191, 0, 0})); connect(port_a, condensation.flowPort) annotation( Line(points = {{-90, 90}, {-70, 90}, {-70, 30}, {-60, 30}, {-60, 30}}, color = {0, 85, 255})); connect(port_a, convection.port_b) annotation( Line(points = {{-90, 90}, {-20, 90}, {-20, 90}, {-20, 90}}, color = {0, 85, 255})); + connect(convection.port_a, partialWall.port_a) annotation( + Line(points = {{2, 90}, {18, 90}, {18, 18}}, color = {191, 0, 0})); + connect(convection.port_a, heatCapacitor.port) annotation( + Line(points = {{2, 90}, {18, 90}, {18, -44}, {46, -44}}, color = {191, 0, 0})); + connect(port_surface, heatCapacitor.port) annotation( + Line(points = {{-50, 60}, {18, 60}, {18, -44}, {46, -44}}, color = {191, 0, 0})); + connect(condensation.heatPort, heatCapacitor.port) annotation( + Line(points = {{-40, 30}, {18, 30}, {18, -44}, {46, -44}}, color = {191, 0, 0})); + connect(carrollRadiation.port_a, heatCapacitor.port) annotation( + Line(points = {{6, -70}, {18, -70}, {18, -44}, {46, -44}}, color = {191, 0, 0})); + connect(port_b, heatCapacitor.port) annotation( + Line(points = {{100, 0}, {88, 0}, {88, -44}, {46, -44}}, color = {191, 0, 0})); annotation( - Diagram(graphics = {Rectangle(origin = {43.5, -1}, fillColor = {218, 218, 218}, fillPattern = FillPattern.Solid, lineThickness = 1, extent = {{-42.5, 101}, {36.5, -99}})}, coordinateSystem(initialScale = 0.1)), - Icon(graphics = {Rectangle(origin = {11, 9}, fillColor = {191, 191, 191}, fillPattern = FillPattern.Cross, lineThickness = 1, extent = {{-51, 91}, {29, -109}}), Line(origin = {-70, 70.1389}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-60, 70.1389}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-61, 88.1389}, points = {{9, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-61, 52.1389}, points = {{9, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Text(origin = {-93, 93}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "Fluid"), Text(origin = {-93, -67}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "J_MRT"), Text(origin = {-73, -25}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "F_view"), Text(origin = {-73, -49}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "A_wall"), Line(origin = {-52.1559, -79.8606}, rotation = 180, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-52.5726, -99.7217}, rotation = 180, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Ellipse(origin = {-44, 88}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}, endAngle = 360), Ellipse(origin = {-44, 70}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}, endAngle = 360), Ellipse(origin = {-44, 52}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}, endAngle = 360), Line(origin = {-61.3433, 71.0195}, points = {{9, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled})}, coordinateSystem(initialScale = 0.1)), + Diagram(graphics = {Rectangle(origin = {43.5, -1}, fillColor = {218, 218, 218}, fillPattern = FillPattern.Solid, lineThickness = 1, extent = {{-42.5, 101}, {36.5, -99}}), Text(origin = {46, 52}, extent = {{-20, 10}, {20, -10}}, textString = "If N > 1"), Text(origin = {46, -32}, extent = {{-20, 10}, {20, -10}}, textString = "If N = 1")}, coordinateSystem(initialScale = 0.1)), + Icon(graphics = {Rectangle(origin = {11, 9}, fillColor = {191, 191, 191}, fillPattern = FillPattern.Cross, lineThickness = 1, extent = {{-51, 91}, {29, -109}}), Line(origin = {-70, 70.1389}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-60, 70.1389}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-61, 88.1389}, points = {{9, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-61, 52.1389}, points = {{9, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Text(origin = {-93, 93}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "Fluid"), Text(origin = {-93, -67}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "J_MRT"), Text(origin = {-73, -25}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "F_view"), Text(origin = {-73, -49}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "A_wall"), Line(origin = {-52.1559, -79.8606}, rotation = 180, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-52.5726, -99.7217}, rotation = 180, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Ellipse(origin = {-44, 88}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}), Ellipse(origin = {-44, 70}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}), Ellipse(origin = {-44, 52}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}), Line(origin = {-61.3433, 71.0195}, points = {{9, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled})}, coordinateSystem(initialScale = 0.1)), Documentation(info = " <html> <head> @@ -122,34 +139,20 @@ equation </p> <p> - This component is an assembly of the <b>PartialWall</b> module, the <b>FreeConvection</b> module, the <b>Condensation</b> and the <b>CarrollRadiation</b> module. - </p> + This component is an assembly of the <b>PartialWall</b> module, the <b>FreeConvection</b> module, the <b>CarrollRadiation</b> module and the <b>Condensation</b> module. The solid wall is dicretises in <b>N</b> along its depth to model the heat propagation. By defaut the value of <b>N</b> is computed from the depth and the thermal diffusivty of the wall. </br> + When the number of layers <b>N</b> is equal to one, the <b>PartialWall</b> is replaced by a <b>HeatCapacitor</b>. + </p> + <p> - To remain a generic as possible, a heatport directly connected to the first discrete layer of the wall has been added. For specific applications, The ForcedConvection module or another module for modelling radiation can be latter connected to this empty heat port when implementing the HalfWall + A port name <b>port_surface</b> is connected to the boundary port of the <b>PartialWall</b>. + It can be usefull for specific applications when another modules is required et can be latter connected to this empty heat port. </p> <p> - For the <b>CarrollRadiation</b> module, the HalfWall module proposes two approaches for passing information about the form factor. - - <h4> Explicit connection: <b>UseImplicitConnection = false</b> </h4> - - The HalfWall supplies as output the surface area of the wall, via its ports, to the FviewCalculator module and get from this last the Fview as input. - The connection is performed explicitely via the graphic connector. - The <b>RadiativeIndex</b> parameter is not evaluated. - The explicit method is longer and is source of mistakes when manually selecting the index of the connection. - - <h4> Implicit connection: <b>UseImplicitConnection = true</b> </h4> - - The implicit connection use the <b>inner</b> and <b>outer</b> key word to perform the passage of information. - The ports <b>Awall</b> and <b>Fview</b> have to remains without connection. - The <b>FviewCalculator</b> is declared as outer within the HalfWall module. - The equations corresponding to the 'connect' with graphic connection are done explicitely in the equation section. - To connect severals walls to the FviewCalculator, a <b>RadiativeIndex</b> is added. - The value of raditave index corresponds to the index of the current wall in the FviewCalculator. - Therefore, each wall needs to have a different RadiativeIndex. + The HalfWall supplies as output the surface area of the wall, via its <b>A_wall</b> port, to the FviewCalculator module and get from this last the form (or view) factor as input via the <b>F_view</b> port. The connection is performed explicitely via the graphic connectors. </p> </body> </html>"), experiment(StartTime = 0, StopTime = 3600, Tolerance = 1e-06, Interval = 36)); -end HalfWall; +end HalfWall; \ No newline at end of file diff --git a/FluidDynamics/Components/Buildings/Wall.mo b/FluidDynamics/Components/Buildings/Wall.mo index eddd01f02bca49981f94d7f3b9d4933f833a5da2..aec7e0dbcabf4af356088dd8ad724a62d69856f5 100644 --- a/FluidDynamics/Components/Buildings/Wall.mo +++ b/FluidDynamics/Components/Buildings/Wall.mo @@ -17,7 +17,7 @@ model Wall Dialog(group="Meshing properties")); parameter Modelica.SIunits.CoefficientOfHeatTransfer h = 10 "Decoupled value of the heat transfer (if biot segment chosen)" annotation( Dialog(group="Meshing properties")); - parameter Integer N(min=2) = integer(max(2, 5 * Th / 0.2 * 1e-6 * d * cp / k)) "Number of layers : 2 to 65535" annotation( + parameter Integer N(min=1) = integer(max(1, 5 * Th / 0.2 * 1e-6 * d * cp / k)) "Number of layers : 1 to 65535" annotation( Dialog(group="Meshing properties")); parameter Modelica.SIunits.Area A = 0 "Wall area " annotation( @@ -64,8 +64,8 @@ model Wall Modelica.SIunits.BiotNumber Bi_a, Bi_b ; // Components inside wall are defined - TAeZoSysPro.HeatTransfer.BasesClasses.PartialWall partialWall(A = A, N = N, T_start = T_start, Th = Th, cp = cp, d = d, energyDynamics = energyDynamics, h = h, k = k, mesh = mesh, q = q, symmetricalMesh = true) annotation( - Placement(visible = true, transformation(origin = {0.5, 0.5}, extent = {{-29.5, -29.5}, {29.5, 29.5}}, rotation = 0))); + TAeZoSysPro.HeatTransfer.BasesClasses.PartialWall partialWall(A = A, N = N, T_start = T_start, Th = Th, cp = cp, d = d, energyDynamics = energyDynamics, h = h, k = k, mesh = mesh, q = q, symmetricalMesh = true) if N > 1 annotation( + Placement(visible = true, transformation(origin = {0.5, 10.5}, extent = {{-29.5, -29.5}, {29.5, 29.5}}, rotation = 0))); TAeZoSysPro.FluidDynamics.BasesClasses.FreeConvection freeConvection_a(redeclare package Medium = Medium, A = A, Lc = Lc, add_on = add_on_conv, correlation = correlation_a, h_cv_const = h_cv_const_a) annotation( Placement(visible = true, transformation(origin = {-55, 70}, extent = {{-18, -18}, {18, 18}}, rotation = 180))); TAeZoSysPro.HeatTransfer.BasesClasses.CarrollRadiation carrollRadiation_a(A = A, add_on = add_on_rad, eps = eps_a) annotation( @@ -98,49 +98,73 @@ model Wall Placement(visible = true, transformation(origin = {-55, 21}, extent = {{-15, -15}, {15, 15}}, rotation = 0))); TAeZoSysPro.FluidDynamics.BasesClasses.Condensation condensation_b(redeclare package Medium = Medium, A = A, add_on = add_on_cond, h_cv = freeConvection_b.h_cv) annotation( Placement(visible = true, transformation(origin = {55, 21}, extent = {{15, -15}, {-15, 15}}, rotation = 0))); + TAeZoSysPro.HeatTransfer.BasesClasses.HeatCapacitor heatCapacitor(T_start = T_start,cp = cp, energyDynamics = energyDynamics, m = Th * A * d) if N==1 annotation( + Placement(visible = true, transformation(origin = {0, -70}, extent = {{-10, 10}, {10, -10}}, rotation = 0))); + equation connect(port_a_rad, carrollRadiation_a.port_b) annotation( Line(points = {{-101, -78}, {-88, -78}, {-88, -79.5}, {-79, -79.5}}, color = {191, 0, 0})); - Bi_a = freeConvection_a.h_cv * (partialWall.x[2] - partialWall.x[1]) / k; - Bi_b = freeConvection_b.h_cv * (partialWall.x[end] - partialWall.x[end-1]) / k; + + if N > 1 then + Bi_a = freeConvection_a.h_cv * (partialWall.x[2] - partialWall.x[1]) / k; + Bi_b = freeConvection_b.h_cv * (partialWall.x[end] - partialWall.x[end-1]) / k; + else + Bi_a = 0.0; + Bi_b = 0.0; + end if; A_wall_a = A; A_wall_b = A; //output y is set to Awall and it can be connected to FviewCalculator connect(freeConvection_a.port_a, partialWall.port_a) annotation( - Line(points = {{-36, 70}, {-28, 70}, {-28, 0}, {-28, 0}}, color = {191, 0, 0})); + Line(points = {{-36, 70}, {-28, 70}, {-28, 10.5}}, color = {191, 0, 0})); connect(carrollRadiation_a.port_a, partialWall.port_a) annotation( - Line(points = {{-40, -79.5}, {-28, -79.5}, {-28, 0}}, color = {191, 0, 0})); - connect(freeConvection_b.port_a, partialWall.port_b) annotation( - Line(points = {{39, 70}, {28, 70}, {28, 0}, {30, 0}}, color = {191, 0, 0})); + Line(points = {{-40, -79.5}, {-28, -79.5}, {-28, 10.5}}, color = {191, 0, 0})); + connect(freeConvection_b.port_a, partialWall.port_b) annotation( + Line(points = {{39, 70}, {28, 70}, {28, 10.5}, {29, 10.5}}, color = {191, 0, 0})); connect(carrollRadiation_b.port_a, partialWall.port_b) annotation( - Line(points = {{39, -80.5}, {28, -80.5}, {28, 0}, {30, 0}}, color = {191, 0, 0})); + Line(points = {{39, -80.5}, {28, -80.5}, {28, 10.5}, {29, 10.5}}, color = {191, 0, 0})); connect(carrollRadiation_b.port_b, port_b_rad) annotation( Line(points = {{80, -80.5}, {92, -80.5}, {92, -80}, {101, -80}}, color = {191, 0, 0})); - connect(port_surface_a, partialWall.port_a) annotation( - Line(points = {{-100, 0}, {-28, 0}}, color = {191, 0, 0})); - connect(port_surface_b, partialWall.port_b) annotation( - Line(points = {{101, 0}, {30, 0}}, color = {191, 0, 0})); + connect(port_surface_a, partialWall.port_a) annotation( + Line(points = {{-100, 0}, {-28, 0}, {-28, 10.5}}, color = {191, 0, 0})); + connect(port_surface_b, partialWall.port_b) annotation( + Line(points = {{101, 0}, {27.5, 0}, {27.5, 10.5}, {29, 10.5}}, color = {191, 0, 0})); connect(F_view_a, carrollRadiation_a.Fview) annotation( Line(points = {{-90, -50}, {-44, -50}, {-44, -64}}, color = {0, 0, 127})); connect(F_view_b, carrollRadiation_b.Fview) annotation( Line(points = {{90, -50}, {44, -50}, {44, -64}, {43, -64}}, color = {0, 0, 127})); connect(condensation_a.heatPort, partialWall.port_a) annotation( - Line(points = {{-41.5, 21}, {-28, 21}, {-28, 0}}, color = {191, 0, 0})); + Line(points = {{-41.5, 21}, {-28, 21}, {-28, 10.5}}, color = {191, 0, 0})); connect(port_a, freeConvection_a.port_b) annotation( Line(points = {{-100, 70}, {-74, 70}, {-74, 70}, {-72, 70}}, color = {0, 85, 255})); connect(port_a, condensation_a.flowPort) annotation( - Line(points = {{-100, 70}, {-86, 70}, {-86, 22}, {-68, 22}, {-68, 22}}, color = {0, 85, 255})); + Line(points = {{-100, 70}, {-86, 70}, {-86, 21}, {-69, 21}}, color = {0, 85, 255})); connect(condensation_b.heatPort, partialWall.port_b) annotation( - Line(points = {{41.5, 21}, {28, 21}, {28, 0}, {30, 0}}, color = {191, 0, 0})); + Line(points = {{41.5, 21}, {28, 21}, {28, 10.5}, {29, 10.5}}, color = {191, 0, 0})); connect(freeConvection_b.port_b, port_b) annotation( Line(points = {{74, 70}, {100, 70}, {100, 70}, {100, 70}}, color = {0, 85, 255})); connect(condensation_b.flowPort, port_b) annotation( - Line(points = {{68, 22}, {88, 22}, {88, 70}, {100, 70}, {100, 70}}, color = {0, 85, 255})); - + Line(points = {{69, 21}, {88, 21}, {88, 70}, {100, 70}}, color = {0, 85, 255})); + connect(freeConvection_a.port_a, heatCapacitor.port) annotation( + Line(points = {{-36, 70}, {-28, 70}, {-28, -60}, {0, -60}}, color = {191, 0, 0})); + connect(heatCapacitor.port, condensation_a.heatPort) annotation( + Line(points = {{0, -60}, {-28, -60}, {-28, 21}, {-41.5, 21}}, color = {191, 0, 0})); + connect(port_surface_a, heatCapacitor.port) annotation( + Line(points = {{-100, 0}, {-28, 0}, {-28, -60}, {0, -60}}, color = {191, 0, 0})); + connect(carrollRadiation_a.port_a, heatCapacitor.port) annotation( + Line(points = {{-40, -79.5}, {-28, -79.5}, {-28, -60}, {0, -60}}, color = {191, 0, 0})); + connect(freeConvection_b.port_a, heatCapacitor.port) annotation( + Line(points = {{40, 70}, {28, 70}, {28, -60}, {0, -60}}, color = {191, 0, 0})); + connect(condensation_b.heatPort, heatCapacitor.port) annotation( + Line(points = {{41.5, 21}, {28, 21}, {28, -60}, {0, -60}}, color = {191, 0, 0})); + connect(port_surface_b, heatCapacitor.port) annotation( + Line(points = {{101, 0}, {28, 0}, {28, -60}, {0, -60}}, color = {191, 0, 0})); + connect(carrollRadiation_b.port_a, heatCapacitor.port) annotation( + Line(points = {{39, -80.5}, {28, -80.5}, {28, -60}, {0, -60}}, color = {191, 0, 0})); annotation( - Diagram(graphics = {Rectangle(origin = {3.5, -1}, fillColor = {218, 218, 218}, fillPattern = FillPattern.Solid, lineThickness = 1, extent = {{-42.5, 101}, {36.5, -99}})}, coordinateSystem(initialScale = 0.1)), - Icon(graphics = {Rectangle(origin = {11, 9}, fillColor = {191, 191, 191}, fillPattern = FillPattern.Cross, lineThickness = 1, extent = {{-51, 91}, {29, -109}}), Line(origin = {-70, 70.1389}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-58, 70.1389}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-61, 88.1389}, points = {{7, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-61, 54.14}, points = {{7, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Text(origin = {-106, 93}, lineThickness = 1, extent = {{-14, 7}, {26, -13}}, textString = "Fluid"), Text(origin = {-93, -67}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "J_MRT"), Text(origin = {-73, -27}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "F_view_a"), Text(origin = {-73, -49}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "A_wall_a"), Line(origin = {-52.1559, -79.8606}, rotation = 180, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-52.5726, -99.7217}, rotation = 180, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Text(origin = {67, -47}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "A_wall_b"), Text(origin = {67, -27}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "F_view_b"), Line(origin = {52.8486, -80.2659}, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {52.4319, -100.127}, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {68.8387, 69.7336}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {59.8387, 53.7336}, rotation = 180, points = {{7, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {59.8387, 87.7336}, rotation = 180, points = {{7, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {56.8387, 69.7336}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Text(origin = {94, 93}, lineThickness = 1, extent = {{-14, 7}, {26, -13}}, textString = "Fluid"), Text(origin = {87, -67}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "J_MRT"), Ellipse(origin = {-46, 88}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}, endAngle = 360), Ellipse(origin = {-46, 70}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}, endAngle = 360), Ellipse(origin = {-46, 52}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}, endAngle = 360), Ellipse(origin = {46, 88}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}, endAngle = 360), Ellipse(origin = {46, 70}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}, endAngle = 360), Ellipse(origin = {46, 52}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}, endAngle = 360)}, coordinateSystem(initialScale = 0.1)), + Diagram(graphics = {Rectangle(origin = {3.5, -1}, fillColor = {218, 218, 218}, fillPattern = FillPattern.Solid, lineThickness = 1, extent = {{-42.5, 101}, {36.5, -99}}), Text(origin = {2, 46}, extent = {{-20, 10}, {20, -10}}, textString = "If N > 1"), Text(origin = {2, -46}, extent = {{-20, 10}, {20, -10}}, textString = "If N = 1")}, coordinateSystem(initialScale = 0.1)), + Icon(graphics = {Rectangle(origin = {11, 9}, fillColor = {191, 191, 191}, fillPattern = FillPattern.Cross, lineThickness = 1, extent = {{-51, 91}, {29, -109}}), Line(origin = {-70, 70.1389}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-58, 70.1389}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-61, 88.1389}, points = {{7, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-61, 54.14}, points = {{7, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Text(origin = {-106, 93}, lineThickness = 1, extent = {{-14, 7}, {26, -13}}, textString = "Fluid"), Text(origin = {-93, -67}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "J_MRT"), Text(origin = {-73, -27}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "F_view_a"), Text(origin = {-73, -49}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "A_wall_a"), Line(origin = {-52.1559, -79.8606}, rotation = 180, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-52.5726, -99.7217}, rotation = 180, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Text(origin = {67, -47}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "A_wall_b"), Text(origin = {67, -27}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "F_view_b"), Line(origin = {52.8486, -80.2659}, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {52.4319, -100.127}, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {68.8387, 69.7336}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {59.8387, 53.7336}, rotation = 180, points = {{7, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {59.8387, 87.7336}, rotation = 180, points = {{7, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {56.8387, 69.7336}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Text(origin = {94, 93}, lineThickness = 1, extent = {{-14, 7}, {26, -13}}, textString = "Fluid"), Text(origin = {87, -67}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "J_MRT"), Ellipse(origin = {-46, 88}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}), Ellipse(origin = {-46, 70}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}), Ellipse(origin = {-46, 52}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}), Ellipse(origin = {46, 88}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}), Ellipse(origin = {46, 70}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}}), Ellipse(origin = {46, 52}, fillColor = {0, 85, 255}, fillPattern = FillPattern.Solid, extent = {{-4, 4}, {4, -4}})}, coordinateSystem(initialScale = 0.1)), Documentation(info = " <html> <head> @@ -169,36 +193,21 @@ A_wall_b = A; The suffix '..._a' refers to side where the ports 'port_a' are. </p> - <p> - This component is an assembly of the <b>PartialWall</b> module, <b>FreeConvection</b> modules, <b>Condensation</b> modules and <b>CarrollRadiation</b> modules. + <p> + This component is an assembly of the <b>PartialWall</b> module, the <b>FreeConvection</b> modules, the <b>CarrollRadiation</b> modules and the <b>Condensation</b> modules. The solid wall is dicretises in <b>N</b> along its depth to model the heat propagation. By defaut the value of <b>N</b> is computed from the depth and the thermal diffusivty of the wall. </br> + When the number of layers <b>N</b> is equal to one, the <b>PartialWall</b> is replaced by a <b>HeatCapacitor</b>. </p> <p> - To remain a generic as possible, heatports directly connected to the first discrete layer of the wall has been added. For specific applications, The ForcedConvection module or another module for modelling radiation can be latter connected to this empty heat port when implementing the HalfWall + Ports name <b>port_surface</b> are connected to boundary ports of the <b>PartialWall</b>. + It can be usefull for specific applications when another modules is required et can be latter connected to this empty heat port. </p> <p> - For the <b>CarrollRadiation</b> module, the Wall module proposes two approaches for passing information about the form factor. - - <h4> Explicit connection: <b>UseImplicitConnection = false</b> </h4> - - The HalfWall supplies as output the surface area of the wall, via its ports, to the FviewCalculator module and get from this last the Fview as input. - The connection is performed explicitely via the graphic connector. - The <b>RadiativeIndex</b> parameter is not evaluated. - The explicit method is longer and is source of mistakes when manually selecting the index of the connection. - - <h4> Implicit connection: <b>UseImplicitConnection = true</b> </h4> - - The implicit connection use the <b>inner</b> and <b>outer</b> key word to perform the passage of information. - The ports <b>A_wall</b> and <b>F_view</b> have to remains without connection. - The <b>fviewCalculator</b> is declared as outer within the Wall module. - The equations corresponding to the 'connect' with graphic connection are done explicitely in the equation section. - To connect severals walls to the fviewCalculator, a <b>RadiativeIndex</b> is added. - The value of raditave index corresponds to the index of the current wall in the FviewCalculator. - Therefore, each wall needs to have a different RadiativeIndex. - </p> + The Wall supplies as output the surface area of the wall, via its <b>A_wall</b> ports, to the FviewCalculator module and get from this last the form (or view) factor as input via the <b>F_view</b> ports. The connection is performed explicitely via the graphic connectors. + </p> </body> </html>"), experiment(StartTime = 0, StopTime = 3600, Tolerance = 1e-06, Interval = 36)); -end Wall; +end Wall; \ No newline at end of file diff --git a/HeatTransfer/Components/HalfWall.mo b/HeatTransfer/Components/HalfWall.mo index 8c0b665d4a8e835cb32c46f6cdd49e2c1be67c53..52e6b01a4f23ff51d13dfc3cdf1bf4754ccf1f9c 100644 --- a/HeatTransfer/Components/HalfWall.mo +++ b/HeatTransfer/Components/HalfWall.mo @@ -17,7 +17,7 @@ model HalfWall Dialog(group="Meshing properties")); parameter Modelica.SIunits.CoefficientOfHeatTransfer h = 10 "Decoupled value of the heat transfer (if biot segment chosen)" annotation( Dialog(group="Meshing properties")); - parameter Integer N(min=2) = integer(max(2, 5 * Th / 0.2 * 1e-6 * d * cp / k)) "Number of layers : 2 to 65535" annotation( + parameter Integer N(min=1) = integer(max(1, 5 * Th / 0.2 * 1e-6 * d * cp / k)) "Number of layers : 1 to 65535" annotation( Dialog(group="Meshing properties")); parameter Modelica.SIunits.Area A = 0 "Wall area " annotation( @@ -55,8 +55,8 @@ model HalfWall Modelica.SIunits.BiotNumber Bi ; // Components inside wall are defined - TAeZoSysPro.HeatTransfer.BasesClasses.PartialWall partialWall(A = A, N = N, T_start = T_start, Th = Th, cp = cp, d = d, energyDynamics = energyDynamics, h = h, k = k, mesh = mesh, q = q, symmetricalMesh = false) annotation( - Placement(visible = true, transformation(origin = {6.5, 0.5}, extent = {{-29.5, -29.5}, {29.5, 29.5}}, rotation = 0))); + TAeZoSysPro.HeatTransfer.BasesClasses.PartialWall partialWall(A = A, N = N, T_start = T_start, Th = Th, cp = cp, d = d, energyDynamics = energyDynamics, h = h, k = k, mesh = mesh, q = q, symmetricalMesh = false) if N>1 annotation( + Placement(visible = true, transformation(origin = {4.5, 22.5}, extent = {{-29.5, -29.5}, {29.5, 29.5}}, rotation = 0))); TAeZoSysPro.HeatTransfer.BasesClasses.FreeConvection convection(redeclare package Medium = Medium, A = A, Lc = Lc, add_on = add_on_conv, correlation = correlation, h_cv_const = h_cv_const) annotation ( Placement(visible = true, transformation(origin = {-47, 70}, extent = {{-18, -18}, {18, 18}}, rotation = 180))); @@ -74,28 +74,42 @@ model HalfWall Placement(visible = true, transformation(origin = {99, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {90, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); TAeZoSysPro.HeatTransfer.Interfaces.HeatPort_a port_surface annotation( Placement(visible = true, transformation(origin = {-100, 30}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {-40, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + TAeZoSysPro.HeatTransfer.BasesClasses.HeatCapacitor heatCapacitor(T_start = T_start,cp = cp, energyDynamics = energyDynamics, m = Th * A * d) if N==1 annotation( + Placement(visible = true, transformation(origin = {4, -50}, extent = {{-10, 10}, {10, -10}}, rotation = 0))); equation connect(port_surface, partialWall.port_a) annotation( - Line(points = {{-100, 30}, {-22, 30}, {-22, 0}, {-22, 0}}, color = {191, 0, 0})); + Line(points = {{-100, 30}, {-24, 30}, {-24, 22.5}}, color = {191, 0, 0})); connect(port_a_conv, convection.port_b) annotation( Line(points = {{-101, 70}, {-65, 70}}, color = {191, 0, 0})); connect(convection.port_a, partialWall.port_a) annotation( - Line(points = {{-29, 70}, {-22, 70}, {-22, 0}}, color = {191, 0, 0})); + Line(points = {{-29, 70}, {-24, 70}, {-24, 22.5}}, color = {191, 0, 0})); connect(F_view, carrollRadiation.Fview) annotation( Line(points = {{-90, -30}, {-38.5, -30}, {-38.5, -52.5}}, color = {0, 0, 127})); connect(port_a_rad, carrollRadiation.port_b) annotation( Line(points = {{-101, -70}, {-88, -70}, {-88, -70.5}, {-79, -70.5}}, color = {191, 0, 0})); connect(carrollRadiation.port_a, partialWall.port_a) annotation( - Line(points = {{-34, -70.5}, {-22, -70.5}, {-22, 0}}, color = {191, 0, 0})); + Line(points = {{-34, -70.5}, {-24, -70.5}, {-24, 22.5}}, color = {191, 0, 0})); connect(partialWall.port_b, port_b) annotation( - Line(points = {{36, 0}, {98, 0}, {98, 0}, {100, 0}}, color = {191, 0, 0})); + Line(points = {{33, 22.5}, {68, 22.5}, {68, 0}, {100, 0}}, color = {191, 0, 0})); - Bi = convection.h_cv*(partialWall.x[2]-partialWall.x[1]) / k ; + if N > 1 then + Bi = convection.h_cv*(partialWall.x[2]-partialWall.x[1]) / k ; + else + Bi = 0.0; + end if; -A_wall = A; //output y is set to Awall and it can be connected to FviewCalculator +A_wall = A; + connect(convection.port_a, heatCapacitor.port) annotation( + Line(points = {{-28, 70}, {-24, 70}, {-24, -40}, {4, -40}}, color = {191, 0, 0})); + connect(port_surface, heatCapacitor.port) annotation( + Line(points = {{-100, 30}, {-24, 30}, {-24, -40}, {4, -40}}, color = {191, 0, 0})); + connect(carrollRadiation.port_a, heatCapacitor.port) annotation( + Line(points = {{-34, -70}, {-24, -70}, {-24, -40}, {4, -40}}, color = {191, 0, 0})); + connect(port_b, heatCapacitor.port) annotation( + Line(points = {{100, 0}, {68, 0}, {68, -40}, {4, -40}}, color = {191, 0, 0})); //output y is set to Awall and it can be connected to FviewCalculator annotation( - Diagram(graphics = {Rectangle(origin = {3.5, -1}, fillColor = {218, 218, 218}, fillPattern = FillPattern.Solid, lineThickness = 1, extent = {{-42.5, 101}, {36.5, -99}})}, coordinateSystem(initialScale = 0.1)), + Diagram(graphics = {Rectangle(origin = {3.5, -1}, fillColor = {218, 218, 218}, fillPattern = FillPattern.Solid, lineThickness = 1, extent = {{-42.5, 101}, {36.5, -99}}), Text(origin = {4, 58}, extent = {{-20, 10}, {20, -10}}, textString = "If N > 1"), Text(origin = {4, -28}, extent = {{-20, 10}, {20, -10}}, textString = "If N = 1")}, coordinateSystem(initialScale = 0.1)), Icon(graphics = {Rectangle(origin = {11, 9}, fillColor = {191, 191, 191}, fillPattern = FillPattern.Cross, lineThickness = 1, extent = {{-51, 91}, {29, -109}}), Line(origin = {-70, 70.1389}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-52, 70.1389}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-61, 88.1389}, points = {{17, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-61, 54.1389}, points = {{17, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Text(origin = {-93, 93}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "Fluid"), Text(origin = {-93, -67}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "J_MRT"), Text(origin = {-73, -25}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "F_view"), Text(origin = {-73, -49}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "A_wall"), Line(origin = {-52.1559, -79.8606}, rotation = 180, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-52.5726, -99.7217}, rotation = 180, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled})}, coordinateSystem(initialScale = 0.1)), Documentation(info = " <html> @@ -122,35 +136,20 @@ A_wall = A; //output y is set to Awall and it can be connected to FviewCalcul </p> <p> - This component is an assembly of the <b>PartialWall</b> module, the <b>FreeConvection</b> module and a <b>CarrollRadiation</b> module. + This component is an assembly of the <b>PartialWall</b> module, the <b>FreeConvection</b> module and a <b>CarrollRadiation</b> module. The solid wall is dicretises in <b>N</b> along its depth to model the heat propagation. By defaut the value of <b>N</b> is computed from the depth and the thermal diffusivty of the wall. </br> + When the number of layers <b>N</b> is equal to one, the <b>PartialWall</b> is replaced by a <b>HeatCapacitor</b>. </p> <p> - To remain a generic as possible, a heatport directly connected to the first discrete layer of the wall has been added. For specific applications, The ForcedConvection module or another module for modelling radiation can be latter connected to this empty heat port when implementing the HalfWall + A port name <b>port_surface</b> is connected to the boundary port of the <b>PartialWall</b>. + It can be usefull for specific applications when another modules is required et can be latter connected to this empty heat port. </p> <p> - For the <b>CarrollRadiation</b> module, the HalfWall module proposes two approaches for passing information about the form factor. - - <h4> Explicit connection: <b>UseImplicitConnection = false</b> </h4> - - The HalfWall supplies as output the surface area of the wall, via its ports, to the FviewCalculator module and get from this last the Fview as input. - The connection is performed explicitely via the graphic connector. - The <b>RadiativeIndex</b> parameter is not evaluated. - The explicit method is longer and is source of mistakes when manually selecting the index of the connection. - - <h4> Implicit connection: <b>UseImplicitConnection = true</b> </h4> - - The implicit connection use the <b>inner</b> and <b>outer</b> key word to perform the passage of information. - The ports <b>Awall</b> and <b>Fview</b> have to remains without connection. - The <b>FviewCalculator</b> is declared as outer within the HalfWall module. - The equations corresponding to the 'connect' with graphic connection are done explicitely in the equation section. - To connect severals walls to the FviewCalculator, a <b>RadiativeIndex</b> is added. - The value of raditave index corresponds to the index of the current wall in the FviewCalculator. - Therefore, each wall needs to have a different RadiativeIndex. + The HalfWall supplies as output the surface area of the wall, via its <b>A_wall</b> port, to the FviewCalculator module and get from this last the form (or view) factor as input via the <b>F_view</b> port. The connection is performed explicitely via the graphic connectors. </p> </body> </html>"), experiment(StartTime = 0, StopTime = 3600, Tolerance = 1e-06, Interval = 36)); -end HalfWall; +end HalfWall; \ No newline at end of file diff --git a/HeatTransfer/Components/Wall.mo b/HeatTransfer/Components/Wall.mo index 53df5410a7fa4bb1774f9433f559d4ab959c625f..d93ba7bdfde6f21c1380e3667afc723e0e805b5b 100644 --- a/HeatTransfer/Components/Wall.mo +++ b/HeatTransfer/Components/Wall.mo @@ -17,7 +17,7 @@ model Wall Dialog(group="Meshing properties")); parameter Modelica.SIunits.CoefficientOfHeatTransfer h = 10 "Decoupled value of the heat transfer (if biot segment chosen)" annotation( Dialog(group="Meshing properties")); - parameter Integer N(min=2) = integer(max(2, 5 * Th / 0.2 * 1e-6 * d * cp / k)) "Number of layers : 2 to 65535" annotation( + parameter Integer N(min=1) = integer(max(1, 5 * Th / 0.2 * 1e-6 * d * cp / k)) "Number of layers : 1 to 65535" annotation( Dialog(group="Meshing properties")); parameter Modelica.SIunits.Area A = 0 "Wall area " annotation( @@ -62,8 +62,8 @@ model Wall Modelica.SIunits.BiotNumber Bi_a, Bi_b ; // Components inside wall are defined - TAeZoSysPro.HeatTransfer.BasesClasses.PartialWall partialWall(A = A, N = N, T_start = T_start, Th = Th, cp = cp, d = d, energyDynamics = energyDynamics, h = h, k = k, mesh = mesh, q = q, symmetricalMesh = true) annotation( - Placement(visible = true, transformation(origin = {0.5, 0.5}, extent = {{-29.5, -29.5}, {29.5, 29.5}}, rotation = 0))); + TAeZoSysPro.HeatTransfer.BasesClasses.PartialWall partialWall(A = A, N = N, T_start = T_start, Th = Th, cp = cp, d = d, energyDynamics = energyDynamics, h = h, k = k, mesh = mesh, q = q, symmetricalMesh = true) if N>1 annotation( + Placement(visible = true, transformation(origin = {0.5, 26.5}, extent = {{-29.5, -29.5}, {29.5, 29.5}}, rotation = 0))); TAeZoSysPro.HeatTransfer.BasesClasses.FreeConvection freeConvection_a(redeclare package Medium = Medium, A = A, Lc = Lc, add_on = add_on_conv, correlation = correlation_a, h_cv_const = h_cv_const_a) annotation( Placement(visible = true, transformation(origin = {-55, 70}, extent = {{-18, -18}, {18, 18}}, rotation = 180))); TAeZoSysPro.HeatTransfer.BasesClasses.CarrollRadiation carrollRadiation_a(A = A, add_on = add_on_rad, eps = eps_a) annotation( @@ -92,46 +92,64 @@ model Wall Placement(visible = true, transformation(origin = {92, -30}, extent = {{10, -10}, {-10, 10}}, rotation = 0), iconTransformation(origin = {93, -27}, extent = {{7, -7}, {-7, 7}}, rotation = 0))); Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b port_surface_b annotation( Placement(visible = true, transformation(origin = {99, 30}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {40, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); + TAeZoSysPro.HeatTransfer.BasesClasses.HeatCapacitor heatCapacitor(T_start = T_start,cp = cp, energyDynamics = energyDynamics, m = Th * A * d) if N==1 annotation( + Placement(visible = true, transformation(origin = {0, -46}, extent = {{-10, 10}, {10, -10}}, rotation = 0))); equation connect(port_a_conv, freeConvection_a.port_b) annotation( Line(points = {{-101, 70}, {-73, 70}}, color = {191, 0, 0})); connect(port_a_rad, carrollRadiation_a.port_b) annotation( Line(points = {{-101, -70}, {-88, -70}, {-88, -70.5}, {-81, -70.5}}, color = {191, 0, 0})); - Bi_a = freeConvection_a.h_cv * (partialWall.x[2] - partialWall.x[1]) / k; - Bi_b = freeConvection_b.h_cv * (partialWall.x[end] - partialWall.x[end-1]) / k; + if N > 1 then + Bi_a = freeConvection_a.h_cv * (partialWall.x[2] - partialWall.x[1]) / k; + Bi_b = freeConvection_b.h_cv * (partialWall.x[end] - partialWall.x[end-1]) / k; + else + Bi_a = 0.0; + Bi_b = 0.0; + end if; A_wall_a = A; A_wall_b = A; //output y is set to Awall and it can be connected to FviewCalculator connect(freeConvection_a.port_a, partialWall.port_a) annotation( - Line(points = {{-36, 70}, {-28, 70}, {-28, 0}, {-28, 0}}, color = {191, 0, 0})); + Line(points = {{-36, 70}, {-28, 70}, {-28, 26.5}}, color = {191, 0, 0})); connect(carrollRadiation_a.port_a, partialWall.port_a) annotation( - Line(points = {{-36, -70.5}, {-28, -70.5}, {-28, 0}}, color = {191, 0, 0})); + Line(points = {{-36, -70.5}, {-28, -70.5}, {-28, 26.5}}, color = {191, 0, 0})); connect(freeConvection_b.port_a, partialWall.port_b) annotation( - Line(points = {{39, 70}, {28, 70}, {28, 0}, {30, 0}}, color = {191, 0, 0})); + Line(points = {{39, 70}, {28, 70}, {28, 26.5}, {29, 26.5}}, color = {191, 0, 0})); connect(carrollRadiation_b.port_a, partialWall.port_b) annotation( - Line(points = {{38, -70}, {28, -70}, {28, 0}, {30, 0}}, color = {191, 0, 0})); + Line(points = {{38, -70}, {28, -70}, {28, 26.5}, {29, 26.5}}, color = {191, 0, 0})); connect(freeConvection_b.port_b, port_b_conv) annotation( Line(points = {{75, 70}, {102, 70}}, color = {191, 0, 0})); connect(carrollRadiation_b.port_b, port_b_rad) annotation( Line(points = {{82, -70}, {100, -70}, {100, -70}, {102, -70}}, color = {191, 0, 0})); connect(port_surface_a, partialWall.port_a) annotation( - Line(points = {{-100, 30}, {-28, 30}, {-28, 0}, {-28, 0}}, color = {191, 0, 0})); + Line(points = {{-100, 30}, {-28, 30}, {-28, 26.5}}, color = {191, 0, 0})); connect(port_surface_b, partialWall.port_b) annotation( - Line(points = {{100, 30}, {28, 30}, {28, 0}, {30, 0}}, color = {191, 0, 0})); + Line(points = {{100, 30}, {28, 30}, {28, 26.5}, {29, 26.5}}, color = {191, 0, 0})); connect(F_view_a, carrollRadiation_a.Fview) annotation( Line(points = {{-90, -30}, {-42, -30}, {-42, -52}, {-40, -52}}, color = {0, 0, 127})); connect(F_view_b, carrollRadiation_b.Fview) annotation( Line(points = {{92, -30}, {44, -30}, {44, -52}, {42, -52}}, color = {0, 0, 127})); - + connect(freeConvection_a.port_a, heatCapacitor.port) annotation( + Line(points = {{-36, 70}, {-28, 70}, {-28, -36}, {0, -36}}, color = {191, 0, 0})); + connect(port_surface_a, heatCapacitor.port) annotation( + Line(points = {{-100, 30}, {-28, 30}, {-28, -36}, {0, -36}}, color = {191, 0, 0})); + connect(carrollRadiation_a.port_a, heatCapacitor.port) annotation( + Line(points = {{-36, -70}, {-28, -70}, {-28, -36}, {0, -36}}, color = {191, 0, 0})); + connect(freeConvection_b.port_a, heatCapacitor.port) annotation( + Line(points = {{40, 70}, {28, 70}, {28, -36}, {0, -36}}, color = {191, 0, 0})); + connect(port_surface_b, heatCapacitor.port) annotation( + Line(points = {{100, 30}, {28, 30}, {28, -36}, {0, -36}}, color = {191, 0, 0})); + connect(carrollRadiation_b.port_a, heatCapacitor.port) annotation( + Line(points = {{38, -70}, {28, -70}, {28, -36}, {0, -36}}, color = {191, 0, 0})); annotation( - Diagram(graphics = {Rectangle(origin = {3.5, -1}, fillColor = {218, 218, 218}, fillPattern = FillPattern.Solid, lineThickness = 1, extent = {{-42.5, 101}, {36.5, -99}})}, coordinateSystem(initialScale = 0.1)), + Diagram(graphics = {Rectangle(origin = {3.5, -1}, fillColor = {218, 218, 218}, fillPattern = FillPattern.Solid, lineThickness = 1, extent = {{-42.5, 101}, {36.5, -99}}), Text(origin = {2, 60}, extent = {{-20, 10}, {20, -10}}, textString = "If N > 1"), Text(origin = {2, -26}, extent = {{-20, 10}, {20, -10}}, textString = "If N = 1")}, coordinateSystem(initialScale = 0.1)), Icon(graphics = {Rectangle(origin = {11, 9}, fillColor = {191, 191, 191}, fillPattern = FillPattern.Cross, lineThickness = 1, extent = {{-51, 91}, {29, -109}}), Line(origin = {-70, 70.1389}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-52, 70.1389}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-61, 88.1389}, points = {{17, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-61, 54.1389}, points = {{17, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Text(origin = {-93, 93}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "Fluid"), Text(origin = {-93, -67}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "J_MRT"), Text(origin = {-73, -27}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "F_view_a"), Text(origin = {-73, -49}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "A_wall_a"), Line(origin = {-52.1559, -79.8606}, rotation = 180, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {-52.5726, -99.7217}, rotation = 180, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Text(origin = {67, -47}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "A_wall_b"), Text(origin = {67, -27}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "F_view_b"), Line(origin = {52.8486, -80.2659}, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {52.4319, -100.127}, points = {{-9, 0}, {-7, 0}, {-7, 4}, {-3, -4}, {1, 4}, {5, -4}, {9, 4}, {13, -4}, {13, 0}, {21, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {68.8387, 69.7336}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {59.8387, 53.7336}, rotation = 180, points = {{17, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {59.8387, 87.7336}, rotation = 180, points = {{17, 0}, {-17, 0}}, color = {255, 0, 0}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Line(origin = {50.8387, 69.7336}, points = {{0, 30}, {0, -30}}, color = {0, 0, 255}, thickness = 1, arrow = {Arrow.None, Arrow.Filled}), Text(origin = {87, 93}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "Fluid"), Text(origin = {87, -67}, lineThickness = 1, extent = {{-7, 7}, {13, -13}}, textString = "J_MRT")}, coordinateSystem(initialScale = 0.1)), Documentation(info = " <html> <head> - <title>HalfWall</title> + <title>Wall</title> <style type=\"text/css\"> * { font-size: 10pt; font-family: Arial,sans-serif; } @@ -157,35 +175,20 @@ A_wall_b = A; </p> <p> - This component is an assembly of the <b>PartialWall</b> module, <b>FreeConvection</b> modules and <b>CarrollRadiation</b> modules. + This component is an assembly of the <b>PartialWall</b> module, the <b>FreeConvection</b> modules and a <b>CarrollRadiation</b> modules. The solid wall is dicretises in <b>N</b> along its depth to model the heat propagation. By defaut the value of <b>N</b> is computed from the depth and the thermal diffusivty of the wall. </br> + When the number of layers <b>N</b> is equal to one, the <b>PartialWall</b> is replaced by a <b>HeatCapacitor</b>. </p> <p> - To remain a generic as possible, heatports directly connected to the first discrete layer of the wall has been added. For specific applications, The ForcedConvection module or another module for modelling radiation can be latter connected to this empty heat port when implementing the HalfWall + Ports name <b>port_surface</b> are connected to boundary ports of the <b>PartialWall</b>. + It can be usefull for specific applications when another modules is required et can be latter connected to this empty heat port. </p> <p> - For the <b>CarrollRadiation</b> module, the Wall module proposes two approaches for passing information about the form factor. - - <h4> Explicit connection: <b>UseImplicitConnection = false</b> </h4> - - The HalfWall supplies as output the surface area of the wall, via its ports, to the FviewCalculator module and get from this last the Fview as input. - The connection is performed explicitely via the graphic connector. - The <b>RadiativeIndex</b> parameter is not evaluated. - The explicit method is longer and is source of mistakes when manually selecting the index of the connection. - - <h4> Implicit connection: <b>UseImplicitConnection = true</b> </h4> - - The implicit connection use the <b>inner</b> and <b>outer</b> key word to perform the passage of information. - The ports <b>A_wall</b> and <b>F_view</b> have to remains without connection. - The <b>fviewCalculator</b> is declared as outer within the Wall module. - The equations corresponding to the 'connect' with graphic connection are done explicitely in the equation section. - To connect severals walls to the fviewCalculator, a <b>RadiativeIndex</b> is added. - The value of raditave index corresponds to the index of the current wall in the FviewCalculator. - Therefore, each wall needs to have a different RadiativeIndex. + The Wall supplies as output the surface area of the wall, via its <b>A_wall</b> ports, to the FviewCalculator module and get from this last the form (or view) factor as input via the <b>F_view</b> ports. The connection is performed explicitely via the graphic connectors. </p> </body> </html>"), experiment(StartTime = 0, StopTime = 3600, Tolerance = 1e-06, Interval = 36)); -end Wall; +end Wall; \ No newline at end of file