Skip to content

Commit

Permalink
Merge actuator revisions from IBPSA (#4010)
Browse files Browse the repository at this point in the history
* Corrected dimension of actPos

For #4004

* Removed 'each'

* Corrected assignment of time constant for SlewRateLimiter

* Updated reference results for new parameterization of SlewRateLimiter

* Merged documentation and formatting changes from IBPSA
  • Loading branch information
mwetter authored Sep 21, 2024
1 parent 2f5a4a9 commit 6fd3c19
Show file tree
Hide file tree
Showing 62 changed files with 572 additions and 568 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ protected
Modelica.Blocks.Nonlinear.SlewRateLimiter[numAct] actPos(
each Rising=1/strokeTime,
each Falling=-1/strokeTime,
each Td=10/strokeTime,
each Td=0.001*strokeTime,
each initType=initValve,
y_start=yValve_start,
each strict=true)
Expand Down
7 changes: 4 additions & 3 deletions Buildings/Fluid/Actuators/BaseClasses/ActuatorSignal.mo
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ model ActuatorSignal
annotation(Dialog(tab="Dynamics", group="Actuator position"));

parameter Modelica.Units.SI.Time strokeTime=120
"Time needed to open or close valve"
"Time needed to fully open or close actuator"
annotation (Dialog(
tab="Dynamics",
group="Actuator position",
Expand Down Expand Up @@ -49,7 +49,7 @@ protected
Modelica.Blocks.Nonlinear.SlewRateLimiter actPos(
Rising=1/strokeTime,
Falling=-1/strokeTime,
Td=10/strokeTime,
Td=0.001*strokeTime,
initType=init,
y_start=y_start,
strict=true) if use_strokeTime "Actuator position"
Expand Down Expand Up @@ -122,7 +122,8 @@ for a description of the filter.
<li>
August 26, 2024, by Michael Wetter:<br/>
Implemented linear actuator travel dynamics.<br/>
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3965\">Buildings, #3965</a>.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3965\">Buildings, #3965</a> and
for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1926\">IBPSA, #1926</a>.
</li>
<li>
June 10, 2021, by Michael Wetter:<br/>
Expand Down
48 changes: 24 additions & 24 deletions Buildings/Fluid/Actuators/BaseClasses/PartialThreeWayValve.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ partial model PartialThreeWayValve "Partial three way valve"
extends Buildings.Fluid.BaseClasses.PartialThreeWayResistance(
m_flow_small=m_flow_nominal*1e-4,
final mDyn_flow_nominal=m_flow_nominal,
redeclare replaceable Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValve
res1 constrainedby Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValve(
deltaM=deltaM,
from_dp=from_dp,
final linearized=linearized[1],
final homotopyInitialization=homotopyInitialization,
final CvData=Buildings.Fluid.Types.CvTypes.OpPoint,
final m_flow_nominal=m_flow_nominal,
final dpValve_nominal=dpValve_nominal,
final dpFixed_nominal=dpFixed_nominal[1],
final use_strokeTime=false,
final strokeTime=strokeTime),
redeclare replaceable Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValve res1
constrainedby Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValve(
deltaM=deltaM,
from_dp=from_dp,
final linearized=linearized[1],
final homotopyInitialization=homotopyInitialization,
final CvData=Buildings.Fluid.Types.CvTypes.OpPoint,
final m_flow_nominal=m_flow_nominal,
final dpValve_nominal=dpValve_nominal,
final dpFixed_nominal=dpFixed_nominal[1],
final use_strokeTime=false,
final strokeTime=strokeTime),
redeclare FixedResistances.LosslessPipe res2(m_flow_nominal=m_flow_nominal),
redeclare replaceable Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValve
res3 constrainedby Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValve(
deltaM=deltaM,
from_dp=from_dp,
final linearized=linearized[2],
final homotopyInitialization=homotopyInitialization,
final CvData=Buildings.Fluid.Types.CvTypes.OpPoint,
final m_flow_nominal=m_flow_nominal,
final dpValve_nominal=dpValve_nominal/fraK^2,
final dpFixed_nominal=dpFixed_nominal[2],
final use_strokeTime=false,
final strokeTime=strokeTime));
redeclare replaceable Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValve res3
constrainedby Buildings.Fluid.Actuators.BaseClasses.PartialTwoWayValve(
deltaM=deltaM,
from_dp=from_dp,
final linearized=linearized[2],
final homotopyInitialization=homotopyInitialization,
final CvData=Buildings.Fluid.Types.CvTypes.OpPoint,
final m_flow_nominal=m_flow_nominal,
final dpValve_nominal=dpValve_nominal/fraK^2,
final dpFixed_nominal=dpFixed_nominal[2],
final use_strokeTime=false,
final strokeTime=strokeTime));
extends Buildings.Fluid.Actuators.BaseClasses.ActuatorSignal;
extends Buildings.Fluid.Actuators.BaseClasses.ValveParameters(
rhoStd=Medium.density_pTX(101325, 273.15+4, Medium.X_default));
Expand Down
2 changes: 1 addition & 1 deletion Buildings/Fluid/Actuators/Dampers/MixingBoxMinimumFlow.mo
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected
Modelica.Blocks.Nonlinear.SlewRateLimiter actPosOutMin(
Rising=1/strokeTime,
Falling=-1/strokeTime,
Td=10/strokeTime,
Td=0.001*strokeTime,
initType=init,
y_start=y_start,
strict=true) if use_strokeTime
Expand Down
8 changes: 4 additions & 4 deletions Buildings/Fluid/Examples/FlowSystem/Simplified4.mo
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ model Simplified4 "Removed valve dynamics"
valSouth(use_strokeTime =false),
pmpNorth(
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
use_riseTime =false),
use_riseTime=false),
pmpSouth(
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
use_riseTime =false),
use_riseTime=false),
valSouth1(each use_strokeTime=false),
valSouth2(each use_strokeTime=false),
valNorth1(each use_strokeTime=false),
valNorth2(each use_strokeTime=false),
pumpHea(use_riseTime =false),
pumpCoo(use_riseTime =false),
pumpHea(use_riseTime=false),
pumpCoo(use_riseTime=false),
valCoo(use_strokeTime=false),
valHea(use_strokeTime=false));
annotation (Documentation(info="<html>
Expand Down
3 changes: 1 addition & 2 deletions Buildings/Fluid/FMI/ExportContainers/Examples/FMUs/Fan.mo
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ block Fan "Declaration of an FMU that exports a fan"
nominalValuesDefineDefaultPressureCurve=true,
final m_flow_nominal=m_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
final use_riseTime =
false));
final use_riseTime=false));

parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=0.01
"Nominal mass flow rate";
Expand Down
5 changes: 3 additions & 2 deletions Buildings/Fluid/Movers/BaseClasses/PartialFlowMachine.mo
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ protected
Modelica.Blocks.Nonlinear.SlewRateLimiter motSpe(
Rising=1/riseTime,
Falling=-1/riseTime,
Td=10/riseTime,
Td=0.001*riseTime,
initType=init,
strict=true)
if use_riseTime
Expand Down Expand Up @@ -643,7 +643,8 @@ revisions="<html>
<li>
August 26, 2024, by Michael Wetter:<br/>
Implemented linear dynamics for change in motor speed.<br/>
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3965\">Buildings, #3965</a>.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3965\">Buildings, #3965</a> and
for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1926\">IBPSA, #1926</a>.
</li>
<li>
Expand Down
3 changes: 2 additions & 1 deletion Buildings/Fluid/Movers/FlowControlled_dp.mo
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ Buildings.Fluid.Movers.Validation.FlowControlled_dpSystem</a>.
<li>
August 26, 2024, by Michael Wetter:<br/>
Implemented linear dynamics for change in motor speed.<br/>
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3965\">Buildings, #3965</a>.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3965\">Buildings, #3965</a> and
for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1926\">IBPSA, #1926</a>.
</li>
<li>
March 1, 2023, by Hongxiang Fu:<br/>
Expand Down
3 changes: 2 additions & 1 deletion Buildings/Fluid/Movers/FlowControlled_m_flow.mo
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ User's Guide</a> for more information.
<li>
August 26, 2024, by Michael Wetter:<br/>
Implemented linear dynamics for change in motor speed.<br/>
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3965\">Buildings, #3965</a>.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3965\">Buildings, #3965</a> and
for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1926\">IBPSA, #1926</a>.
</li>
<li>
Expand Down
3 changes: 2 additions & 1 deletion Buildings/Fluid/Movers/SpeedControlled_y.mo
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ User's Guide</a> for more information.
<li>
August 26, 2024, by Michael Wetter:<br/>
Implemented linear dynamics for change in motor speed.<br/>
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3965\">Buildings, #3965</a>.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3965\">Buildings, #3965</a> and
for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1926\">IBPSA, #1926</a>.
</li>
<li>
Expand Down
6 changes: 3 additions & 3 deletions Buildings/Fluid/Movers/Validation/ComparePowerHydraulic.mo
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ model ComparePowerHydraulic
per=per,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
use_riseTime =false),
use_riseTime=false),
redeclare Buildings.Fluid.Movers.SpeedControlled_y mov2(
redeclare final package Medium = Medium,
per(
Expand All @@ -23,7 +23,7 @@ model ComparePowerHydraulic
etaMotMet=per.etaMotMet),
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
use_riseTime =false),
use_riseTime=false),
redeclare Buildings.Fluid.Movers.SpeedControlled_y mov3(
redeclare final package Medium = Medium,
per(
Expand All @@ -34,7 +34,7 @@ model ComparePowerHydraulic
etaMotMet=per.etaMotMet),
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
use_riseTime =false));
use_riseTime=false));

final parameter Buildings.Fluid.Movers.BaseClasses.Euler.peak peak =
Buildings.Fluid.Movers.BaseClasses.Euler.getPeak(
Expand Down
6 changes: 3 additions & 3 deletions Buildings/Fluid/Movers/Validation/ComparePowerInput.mo
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ model ComparePowerInput
per=per,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
addPowerToMedium=false,
use_riseTime =false),
use_riseTime=false),
redeclare Buildings.Fluid.Movers.FlowControlled_dp mov2(
redeclare final package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
per=per,
addPowerToMedium=false,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal,
use_riseTime =false),
use_riseTime=false),
redeclare Buildings.Fluid.Movers.FlowControlled_m_flow mov3(
redeclare final package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
per=per,
addPowerToMedium=false,
m_flow_nominal=m_flow_nominal,
dp_nominal=dp_nominal,
use_riseTime =false),
use_riseTime=false),
ramDam(height=-0.5));
Modelica.Blocks.Sources.RealExpression exp_dp(y=mov1.dpMachine)
"Expression to impose the same pressure rise"
Expand Down
2 changes: 1 addition & 1 deletion Buildings/Fluid/Movers/Validation/ControlledFlowMachine.mo
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ model ControlledFlowMachine "Fans with different control signals as input"
fan3(
addPowerToMedium=false,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
use_riseTime =false));
use_riseTime=false));

annotation (
experiment(Tolerance=1e-6, StopTime=600),
Expand Down
4 changes: 2 additions & 2 deletions Buildings/Fluid/Movers/Validation/FlowControlled_dp.mo
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ model FlowControlled_dp "Fan with zero mass flow rate and head as input"
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
use_riseTime =false),
use_riseTime=false),
redeclare Buildings.Fluid.Movers.FlowControlled_dp floMacDyn(
nominalValuesDefineDefaultPressureCurve=true,
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
use_riseTime =false));
use_riseTime=false));

equation
connect(gain.y, floMacSta.dp_in) annotation (Line(
Expand Down
4 changes: 2 additions & 2 deletions Buildings/Fluid/Movers/Validation/FlowControlled_m_flow.mo
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ model FlowControlled_m_flow
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
use_riseTime =false),
use_riseTime=false),
redeclare Buildings.Fluid.Movers.FlowControlled_m_flow floMacDyn(
nominalValuesDefineDefaultPressureCurve=true,
redeclare package Medium = Medium,
m_flow_nominal=m_flow_nominal,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
use_riseTime =false));
use_riseTime=false));

equation
connect(gain.y, floMacSta.m_flow_in) annotation (Line(
Expand Down
4 changes: 2 additions & 2 deletions Buildings/Fluid/Movers/Validation/Pump_stratos.mo
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ model Pump_stratos "Stratos pumps with speed as input"
redeclare Buildings.Fluid.Movers.SpeedControlled_y floMacSta(
redeclare package Medium = Medium,
per=per,
use_riseTime =false),
use_riseTime=false),
redeclare Buildings.Fluid.Movers.SpeedControlled_y floMacDyn(
redeclare package Medium = Medium,
per=per,
use_riseTime =false));
use_riseTime=false));
parameter Data.Pumps.Wilo.Stratos25slash1to6 per
annotation (Placement(transformation(extent={{100,100},{120,120}})));
equation
Expand Down
4 changes: 2 additions & 2 deletions Buildings/Fluid/Movers/Validation/SpeedControlled_y.mo
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ model SpeedControlled_y
per(pressure(V_flow={0,m_flow_nominal,2*m_flow_nominal}/1.2,
dp={2*dp_nominal,dp_nominal,0})),
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
use_riseTime =false),
use_riseTime=false),
redeclare Buildings.Fluid.Movers.SpeedControlled_y floMacDyn(
redeclare package Medium = Medium,
per(pressure(V_flow={0,m_flow_nominal,2*m_flow_nominal}/1.2,
dp={2*dp_nominal,dp_nominal,0})),
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
use_riseTime =false));
use_riseTime=false));

equation
connect(gain.y, floMacDyn.y) annotation (Line(
Expand Down
Loading

0 comments on commit 6fd3c19

Please sign in to comment.