From 37eb519db744bf11ebb8145df75070166421800d Mon Sep 17 00:00:00 2001 From: MARSOLLIER Felix <felix-externe.marsollier@edvance.fr> Date: Mon, 7 Dec 2020 13:04:23 +0100 Subject: [PATCH] Update of the test following a modification of the module --- .../HeatExchangers/test_DiscreteExchanger.mo | 4 ++-- .../Components/Pipes/test_DynamicPipe.mo | 15 ++++++++++----- PDE/test_UpwindFirstOrder.mo | 10 ++++------ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/FluidDynamics/Components/HeatExchangers/test_DiscreteExchanger.mo b/FluidDynamics/Components/HeatExchangers/test_DiscreteExchanger.mo index a1f354e..f97e5b8 100644 --- a/FluidDynamics/Components/HeatExchangers/test_DiscreteExchanger.mo +++ b/FluidDynamics/Components/HeatExchangers/test_DiscreteExchanger.mo @@ -1,9 +1,9 @@ within TAeZoSysPro_testsuite.FluidDynamics.Components.HeatExchangers; model test_DiscreteExchanger - TAeZoSysPro.FluidDynamics.Components.HeatExchangers.DiscreteExchanger discreteExchanger(redeclare package MediumA = Modelica.Media.Air.ReferenceAir.Air_pT, redeclare package MediumB = Modelica.Media.Air.ReferenceAir.Air_pT, A = 100, CrossSectionA = 1, CrossSectionB = 1, N = 10, flowConfiguration = TAeZoSysPro.FluidDynamics.Components.HeatExchangers.DiscreteExchanger.FlowConfiguration.CounterCurrent) annotation( + TAeZoSysPro.FluidDynamics.Components.HeatExchangers.DiscreteExchanger discreteExchanger( A = 100, CrossSectionA = 1, CrossSectionB = 1,redeclare package MediumA = Modelica.Media.Air.ReferenceAir.Air_pT, redeclare package MediumB = Modelica.Media.Air.ReferenceAir.Air_pT, N = 10, flowConfiguration = TAeZoSysPro.FluidDynamics.Components.HeatExchangers.DiscreteExchanger.FlowConfiguration.CounterCurrent) annotation( Placement(visible = true, transformation(origin = {0, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); - Modelica.Fluid.Sources.MassFlowSource_T massFlowSource_A(redeclare package Medium = Modelica.Media.Air.ReferenceAir.Air_pT, T = 30 + 273.15, m_flow = 2, nPorts = 1) annotation( + Modelica.Fluid.Sources.MassFlowSource_T massFlowSource_A(redeclare package Medium = Modelica.Media.Air.ReferenceAir.Air_pT, T = 30 + 273.15, m_flow = 1, nPorts = 1) annotation( Placement(visible = true, transformation(origin = {-50, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); Modelica.Fluid.Sources.MassFlowSource_T massFlowSource_B(redeclare package Medium = Modelica.Media.Air.ReferenceAir.Air_pT, T = 10 + 273.15, m_flow = 1, nPorts = 1) annotation( Placement(visible = true, transformation(origin = {-10, -50}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); diff --git a/FluidDynamics/Components/Pipes/test_DynamicPipe.mo b/FluidDynamics/Components/Pipes/test_DynamicPipe.mo index 9005d8f..3f47cd3 100644 --- a/FluidDynamics/Components/Pipes/test_DynamicPipe.mo +++ b/FluidDynamics/Components/Pipes/test_DynamicPipe.mo @@ -1,17 +1,22 @@ within TAeZoSysPro_testsuite.FluidDynamics.Components.Pipes; model test_DynamicPipe - - TAeZoSysPro.FluidDynamics.Sources.Atmosphere atmosphere(p = 114250) annotation( + Modelica.SIunits.SpecificEnthalpy h; + TAeZoSysPro.FluidDynamics.Sources.Atmosphere atmosphere(redeclare package Medium = TAeZoSysPro.Media.Air.MoistAir, nPorts = 1, p = 101425) annotation( Placement(visible = true, transformation(origin = {-80, 3.55271e-15}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); - TAeZoSysPro.FluidDynamics.Sources.Atmosphere atmosphere1(nPorts = 1) annotation( + TAeZoSysPro.FluidDynamics.Sources.Atmosphere atmosphere1(redeclare package Medium = TAeZoSysPro.Media.Air.MoistAir, nPorts = 1) annotation( Placement(visible = true, transformation(origin = {80, 0}, extent = {{20, -20}, {-20, 20}}, rotation = 0))); - TAeZoSysPro.FluidDynamics.Components.Pipes.DynamicPipe pipe(A = 1, L = 1, ksi = 10) annotation( + TAeZoSysPro.FluidDynamics.Components.Pipes.DynamicPipe pipe( A = 1, L = 1,redeclare package Medium = TAeZoSysPro.Media.Air.MoistAir, T_start (displayUnit = "degC") = 298.15, energyDynamics = TAeZoSysPro.HeatTransfer.Types.Dynamics.FixedInitial, ksi = 10, massDynamics = TAeZoSysPro.HeatTransfer.Types.Dynamics.FixedInitial) annotation( Placement(visible = true, transformation(origin = {-3.55271e-15, 3.55271e-15}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); equation +h=TAeZoSysPro.Media.Air.MoistAir.specificEnthalpy_pTX( + p = pipe.port_a.p, + T = atmosphere.T, + X = {0.00767631} ); connect(atmosphere.Fluidport[1], pipe.port_a) annotation( Line(points = {{-80, 8}, {-60, 8}, {-60, 0}, {-20, 0}, {-20, 0}}, color = {0, 127, 255})); connect(pipe.port_b, atmosphere1.Fluidport[1]) annotation( Line(points = {{20, 0}, {60, 0}, {60, 8}, {80, 8}, {80, 8}}, color = {0, 127, 255})); - + annotation( + experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-06, Interval = 0.002)); end test_DynamicPipe; diff --git a/PDE/test_UpwindFirstOrder.mo b/PDE/test_UpwindFirstOrder.mo index 66962a1..1e6b1c0 100644 --- a/PDE/test_UpwindFirstOrder.mo +++ b/PDE/test_UpwindFirstOrder.mo @@ -16,15 +16,13 @@ model test_UpwindFirstOrder initial equation - transport.u[2:N, 1] = fill(0.0, N-1); - transport.u[2:N, 2] = fill(0.0, N-1); + transport.u[:, 1] = fill(0.0, N); + transport.u[:, 2] = fill(0.0, N); equation // Boundary conditions - transport.u[1,1] = 1; - transport.u[1,2] = 1; - transport.u[N+1,1] = transport.u[N,1]; - transport.u[N+1,2] = transport.u[N,2]; + transport.u_ghost_left[:] = fill(1.0, 2); + transport.u_ghost_right[:] = fill(1.0, 2); end test_UpwindFirstOrder; -- GitLab