From a318d4457c73757422fd74922ed1f8f2d1bacec6 Mon Sep 17 00:00:00 2001 From: Niels Weber <83768600+nieweber@users.noreply.github.com> Date: Fri, 29 Sep 2023 09:05:31 +0200 Subject: [PATCH] Fix PCV (#151) * Add missing substance equation * Update docu by adding more explanations * Update connector description * Update ThermofluidStream/FlowControl/PCV.mo Co-authored-by: tobolar --------- Co-authored-by: tobolar --- ThermofluidStream/FlowControl/PCV.mo | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ThermofluidStream/FlowControl/PCV.mo b/ThermofluidStream/FlowControl/PCV.mo index 27b2b85e..9c320ac4 100644 --- a/ThermofluidStream/FlowControl/PCV.mo +++ b/ThermofluidStream/FlowControl/PCV.mo @@ -4,7 +4,7 @@ model PCV "Pressure and pressure-drop control valve" import Mode = ThermofluidStream.FlowControl.Internal.Types.PressureControlValveMode; - Modelica.Blocks.Interfaces.RealInput pressure_set_var(unit="Pa") if pressureFromInput "Output pressure [Pa]" + Modelica.Blocks.Interfaces.RealInput pressure_set_var(unit="Pa") if pressureFromInput "Pressure(-drop) set value [Pa]" annotation (Placement( transformation(extent={{-20,-20},{20,20}}, rotation=270, @@ -13,7 +13,7 @@ model PCV "Pressure and pressure-drop control valve" rotation=270, origin={0,80}))); - parameter Mode mode=Mode.drop "Valve mode"; + parameter Mode mode = Mode.drop "Valve mode"; parameter Boolean pressureFromInput = false "Enable pressure difference input"; parameter SI.AbsolutePressure pressure_set_par = 0 "Setpoint for pressure difference" annotation(Dialog(enable=not pressureFromInput)); @@ -43,6 +43,7 @@ equation end if; h_out = h_in; + Xi_out = Xi_in; annotation ( Icon(coordinateSystem(preserveAspectRatio=false), graphics={ @@ -81,9 +82,9 @@ equation color={28,108,200}, thickness=0.5)}), Diagram(coordinateSystem(preserveAspectRatio=false)), Documentation(info=" -

This component can be used to emulate a pressure-drop or output-pressure regulated control valve, depending on its mode.

-

dp or p_out can be set directly, depending on the valve mode. Mass-flow will be determined by its usual dynamic.

-

Setting dp instead of p_out has advantages, when p_out is determined by a volume at the outlet (for instance an accumulator).

-

dp is normalized, such that it cannot create pressure and it is zero for zero or negative massflow.

+

This component can be used to emulate a pressure-drop or output-pressure regulated control valve, depending on the chosen valve mode.

+

Depending on the parameter mode, either the pressure at the outlet p_out or the pressure difference dp between inlet and outlet can be stipulated. This is done either by parameter pressure_set_par or via input connector pressure_set_var when setting pressureFromInput = true. The resulting mass flow will be determined by its usual dynamics.

+

Setting dp instead of p_out has advantages, when p_out is determined by a volume at the outlet (for instance an accumulator).

+

The pressure difference dp is normalized, such that it cannot create pressure and it is zero for zero or negative mass flow.

")); end PCV;