Skip to content

Commit

Permalink
Corrected format
Browse files Browse the repository at this point in the history
  • Loading branch information
mwetter committed Jan 15, 2024
1 parent 88773e1 commit eab10d6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
within IBPSA.Fluid.Chillers.ModularReversible.BaseClasses;
model RefrigerantCycle "Refrigerant cycle model of a chiller"
extends
IBPSA.Fluid.HeatPumps.ModularReversible.BaseClasses.PartialModularRefrigerantCycle;
extends IBPSA.Fluid.HeatPumps.ModularReversible.BaseClasses.PartialModularRefrigerantCycle;
replaceable model RefrigerantCycleChillerCooling =
IBPSA.Fluid.Chillers.ModularReversible.RefrigerantCycle.BaseClasses.NoCooling
( useInChi=true)
IBPSA.Fluid.Chillers.ModularReversible.RefrigerantCycle.BaseClasses.NoCooling(
useInChi=true)
constrainedby
IBPSA.Fluid.Chillers.ModularReversible.RefrigerantCycle.BaseClasses.PartialChillerCycle
IBPSA.Fluid.Chillers.ModularReversible.RefrigerantCycle.BaseClasses.PartialChillerCycle
"Replaceable model for refrigerant cycle of a chiller in main operation mode"
annotation (choicesAllMatching=true);

replaceable model RefrigerantCycleChillerHeating =
IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.NoHeating
( useInHeaPum=true)
IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.NoHeating(
useInHeaPum=true)
constrainedby
IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.PartialHeatPumpCycle
IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.PartialHeatPumpCycle
"Replaceable model for refrigerant cycle of a chiller in reversed operation mode"
annotation (Dialog(enable=use_rev),choicesAllMatching=true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,17 +347,15 @@ partial model PartialReversibleRefrigerantMachine
rotation=0,
origin={-98,12})));
Modelica.Blocks.Interfaces.RealOutput QCon_flow(final quantity="HeatFlowRate",
final unit="W")
"Actual heating heat flow rate added to fluid 1"
final unit="W") "Actual heating heat flow rate added to fluid 1"
annotation (Placement(transformation(extent={{140,120},{160,140}}),
iconTransformation(extent={{100,80},{120,100}})));
Modelica.Blocks.Interfaces.RealOutput P(final quantity="Power", final unit="W")
"Electric power consumed by compressor"
annotation (Placement(transformation(extent={{140,-10},{160,10}}),
iconTransformation(extent={{100,-10},{120,10}})));
Modelica.Blocks.Interfaces.RealOutput QEva_flow(final quantity="HeatFlowRate",
final unit="W")
"Actual cooling heat flow rate removed from fluid 2"
final unit="W") "Actual cooling heat flow rate removed from fluid 2"
annotation (Placement(transformation(extent={{140,-140},{160,-120}}),
iconTransformation(extent={{100,-100},{120,-80}})));
Modelica.Blocks.Interfaces.RealOutput EER(unit="1") if use_EER
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
within IBPSA.Fluid.HeatPumps.ModularReversible.BaseClasses;
model RefrigerantCycle
"Refrigerant cycle model of a heat pump"
extends
IBPSA.Fluid.HeatPumps.ModularReversible.BaseClasses.PartialModularRefrigerantCycle;
extends IBPSA.Fluid.HeatPumps.ModularReversible.BaseClasses.PartialModularRefrigerantCycle;
replaceable model RefrigerantCycleHeatPumpHeating =
IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.NoHeating
( useInHeaPum=true)
constrainedby
IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.PartialHeatPumpCycle
IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.NoHeating(
useInHeaPum=true)
constrainedby
IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses.PartialHeatPumpCycle
"Replaceable model for refrigerant cycle of a heat pump in main operation mode"
annotation (choicesAllMatching=true);

replaceable model RefrigerantCycleHeatPumpCooling =
IBPSA.Fluid.Chillers.ModularReversible.RefrigerantCycle.BaseClasses.NoCooling
( useInChi=true)
IBPSA.Fluid.Chillers.ModularReversible.RefrigerantCycle.BaseClasses.NoCooling(
useInChi=true)
constrainedby
IBPSA.Fluid.Chillers.ModularReversible.RefrigerantCycle.BaseClasses.PartialChillerCycle
IBPSA.Fluid.Chillers.ModularReversible.RefrigerantCycle.BaseClasses.PartialChillerCycle
"Replaceable model for refrigerant cycle of a heat pump in reversed operation mode"
annotation (Dialog(enable=use_rev),choicesAllMatching=true);

Expand All @@ -25,19 +24,22 @@ model RefrigerantCycle
RefrigerantCycleHeatPumpCooling refCycHeaPumCoo if use_rev
"Refrigerant cycle instance for cooling"
annotation (Placement(transformation(extent={{-60,40},{-19,80}}, rotation=0)));

protected
IBPSA.Utilities.IO.Strings.StringPassThrough strPasThr
"String pass through to enable conditional string data";
IBPSA.Utilities.IO.Strings.Constant conStrSou(
final k=refCycHeaPumHea.datSou)
"Constant String data source";

initial algorithm
assert(
strPasThr.y == refCycHeaPumHea.datSou,
"In " + getInstanceName() + ": Data sources for reversible operation are not equal.
Heating data source is " + refCycHeaPumHea.datSou + ", cooling data source is "
+ strPasThr.y + ". Only continue if this is intended.",
AssertionLevel.warning);

equation
if use_rev then
connect(refCycHeaPumCoo.datSouOut, strPasThr.u);
Expand Down

0 comments on commit eab10d6

Please sign in to comment.