Skip to content

Commit

Permalink
Fix PCV (#151)
Browse files Browse the repository at this point in the history
* Add missing substance equation

* Update docu by adding more explanations

* Update connector description

* Update ThermofluidStream/FlowControl/PCV.mo

Co-authored-by: tobolar <[email protected]>

---------

Co-authored-by: tobolar <[email protected]>
  • Loading branch information
nieweber and tobolar authored Sep 29, 2023
1 parent fde5d85 commit a318d44
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ThermofluidStream/FlowControl/PCV.mo
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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));
Expand Down Expand Up @@ -43,6 +43,7 @@ equation
end if;

h_out = h_in;
Xi_out = Xi_in;

annotation (
Icon(coordinateSystem(preserveAspectRatio=false), graphics={
Expand Down Expand Up @@ -81,9 +82,9 @@ equation
color={28,108,200},
thickness=0.5)}), Diagram(coordinateSystem(preserveAspectRatio=false)),
Documentation(info="<html>
<p>This component can be used to emulate a pressure-drop or output-pressure regulated control valve, depending on its mode.</p>
<p>dp or p_out can be set directly, depending on the valve mode. Mass-flow will be determined by its usual dynamic.</p>
<p>Setting dp instead of p_out has advantages, when p_out is determined by a volume at the outlet (for instance an accumulator).</p>
<p>dp is normalized, such that it cannot create pressure and it is zero for zero or negative massflow. </p>
<p>This component can be used to emulate a pressure-drop or output-pressure regulated control valve, depending on the chosen valve mode.</p>
<p>Depending on the parameter <code>mode</code>, either the pressure at the outlet <code>p_out</code> or the pressure difference <code>dp</code> between inlet and outlet can be stipulated. This is done either by parameter <code>pressure_set_par</code> or via input connector <code>pressure_set_var</code> when setting <code>pressureFromInput = true</code>. The resulting mass flow will be determined by its usual dynamics.</p>
<p>Setting <code>dp</code> instead of <code>p_out</code> has advantages, when <code>p_out</code> is determined by a volume at the outlet (for instance an accumulator).</p>
<p>The pressure difference <code>dp</code> is normalized, such that it cannot create pressure and it is zero for zero or negative mass flow. </p>
</html>"));
end PCV;

0 comments on commit a318d44

Please sign in to comment.