From d3b1f5eda35a2ea1ae56695157b97b2cc6c4ae91 Mon Sep 17 00:00:00 2001 From: Felix MARSOLLIER <fm4b8dfn@dsp1027505> Date: Wed, 17 Aug 2022 09:32:22 +0200 Subject: [PATCH] removal of mass fraction alias variables X, X_moist and X_final --- FluidDynamics/Sources/Atmosphere.mo | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/FluidDynamics/Sources/Atmosphere.mo b/FluidDynamics/Sources/Atmosphere.mo index 192f561..13af456 100644 --- a/FluidDynamics/Sources/Atmosphere.mo +++ b/FluidDynamics/Sources/Atmosphere.mo @@ -17,13 +17,11 @@ model Atmosphere parameter Modelica.SIunits.Temperature T = 293.15 "Atmosphere temperature" ; parameter Modelica.SIunits.Pressure p = 101325 "Atmosphere Pressure" ; parameter Real RH = 0.6 "Atmosphere relative humidity - Only accounted if medium == Moist air" ; - parameter Modelica.SIunits.MassFraction X[Medium.nX] = Medium.X_default "usefull except for Moist Air"; parameter Integer nPorts = 0 "Number of fluidport" annotation(Dialog(connectorSizing=true)); // Internal variables Medium.ThermodynamicState state ; - // Imported module Modelica.Fluid.Interfaces.FluidPort_a[nPorts] Fluidport(redeclare package Medium = Medium) annotation( Placement(visible = true, transformation(origin = {-30, 26}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {0, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); @@ -38,16 +36,7 @@ model Atmosphere Modelica.Blocks.Interfaces.RealInput RH_in annotation( Placement(visible = true, transformation(origin = {-70, -30}, extent = {{-20, -20}, {20, 20}}, rotation = 0), iconTransformation(origin = {-95, -61}, extent = {{-15, -15}, {15, 15}}, rotation = 0))); -protected - /*Using TAeZoSysPro medium function ensure no fail with new OM frontend (function exist whatever medium used*/ - parameter Medium_MoistAirTAezo.MassFraction X_moist[Medium_MoistAirTAezo.nX]= cat(1, {Medium_MoistAirTAezo.massFraction_pTphi(p = p, T = T, phi = RH)}, {1-Medium_MoistAirTAezo.massFraction_pTphi(p = p, T = T, phi = RH)}); - - /*depending on chosen medium, parameter X vector to be adjusted*/ - parameter Modelica.SIunits.MassFraction X_final[Medium.nX] = if Medium.mediumName=="Moist air" then - X_moist - else - X; - +protected Modelica.Blocks.Interfaces.RealInput T_internal "Temperature at ports. Needed to connect to conditional connector"; Modelica.Blocks.Interfaces.RealInput p_internal -- GitLab