Skip to content

Commit

Permalink
Merge pull request #21 from NREL/develop
Browse files Browse the repository at this point in the history
Develop -> Main (for prototype electrical models)

Merging for 0.3.0 release for DOE deliverable
  • Loading branch information
stephen-frank committed Sep 30, 2022
2 parents b7c5c9a + 6eeb20f commit fe2de21
Show file tree
Hide file tree
Showing 176 changed files with 15,516 additions and 3,992 deletions.
2 changes: 2 additions & 0 deletions FMU/benchtop_demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This directory contains the BEEAM (HPF library) and EnergyPlus model files and r

This co-simulation demonstration model combines an electrical model of a simple distribution system (two laptop power supplies with resistive loads) with a thermal model of a simple thermal chamber (a partitioned refrigerator). This REAMDE documents the directory contents, how to execute the simulation, and some aspects of the electrical model. Full details will be documented in a forthcoming publication.

**The *Modelica* model used for this validation study was developed and executed using BEEAM Version 0.2.x (beta). It has not been tested and may not execute properly with later BEEAM versions.**

Files
-----

Expand Down
6 changes: 3 additions & 3 deletions FMU/benchtop_demo/benchtop_demo.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ model benchtop_demo
Placement(visible = true, transformation(origin={-182,86.5714}, extent = {{-16, -16}, {16, 11.4286}}, rotation = 0)));
HPF.SinglePhase.Sources.VoltageSource Vin(start_v_re = {120, 0, 0, 0, 0}, vArg = {0, 0, 0, 0, 0}, vMag = {120, 0, 0, 0, 0}) annotation (
Placement(visible = true, transformation(origin={-188,-20}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl PowerSupply1(P1(start = 12), Q1(start = 0), V_Rect = 19.92, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Laptop_Charger_LBNL_1.mat", nomP = 90, nomV = 120) "HP P/N 608428-002" annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl PowerSupply1(P1(start = 12), Q1(start = 0), V_Rect = 19.92, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/HP-608428-002.mat", nomP = 90, nomV = 120) "HP P/N 608428-002" annotation (
Placement(visible = true, transformation(origin={-128,40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl PowerSupply2(P1(start = 12), Q1(start = 0), V_Rect = 19.51, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Laptop_Charger_LBNL_2.mat", nomP = 90, nomV = 120) "HP P/N 677777-002" annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl PowerSupply2(P1(start = 12), Q1(start = 0), V_Rect = 19.51, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/HP-677777-002.mat", nomP = 90, nomV = 120) "HP P/N 677777-002" annotation (
Placement(visible = true, transformation(origin={-108,0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
HPF.SinglePhase.Components.Ground GndAC annotation (
Placement(visible = true, transformation(origin={-188,-86}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
Expand All @@ -23,7 +23,7 @@ model benchtop_demo
Placement(visible = true, transformation(origin={108,30}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Modelica.Blocks.Math.Add3 UnconditionedZoneTotalLoss annotation (
Placement(visible = true, transformation(origin={-28,80}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl FanPowerSupply(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 5, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/LED_Driver_1.mat", nomP = 25, nomV = 120) "P/N ??" annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl FanPowerSupply(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 5, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Mean-Well-APV-25-24-1of3.mat", nomP = 25.2, nomV = 120) "P/N ??" annotation (
Placement(visible = true, transformation(origin={-88,-40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
HPF.DC.DC_Load Fan1(pwr = 0.5) annotation (
Placement(visible = true, transformation(origin={22,-62}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Expand Down
28 changes: 14 additions & 14 deletions FMU/flexlab_demo/4_modelica/flexlab_ac.mo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within ;
model flexlab_ac_Cable
model FLEXLAB_AC
inner HPF.SystemDef systemDef(fFund = 60, fs = 5000, hrms = {1, 3, 5, 7, 9}, numPh = 1) annotation (
Placement(visible = true, transformation(origin={-260,142.07}, extent={{
-20.0002,-19.5014},{20.0002,13.9299}}, rotation = 0)));
Expand Down Expand Up @@ -34,29 +34,29 @@ model flexlab_ac_Cable
Placement(visible = true, transformation(origin={95,-51}, extent = {{-11, -11}, {11, 11}}, rotation = 0)));
HPF.DC.Variable_DC_Load Prog_DC_Ld_6 annotation (
Placement(visible = true, transformation(origin={102,-84}, extent = {{-12, -12}, {12, 12}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Desk_PS1(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 12, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Seasonic_SSR-550PX__300W.mat", nomP = 350, nomV = 120) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Desk_PS1(P1(start = 1), P_DCmin = 0.2, P_stby = 5.79, Q1(start = 0), S1(start = 1), V_Rect = 12, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Seasonic-SSR-550PX-12V.mat", nomP = 350, nomV = 120) annotation (
Placement(visible = true, transformation(origin={60,78}, extent = {{-8, -6}, {8, 6}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Desk_PS3(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 12, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Seasonic_SSR-550PX__300W.mat", nomP = 350, nomV = 120) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Desk_PS3(P1(start = 1), P_DCmin = 0.2, P_stby = 5.79, Q1(start = 0), S1(start = 1), V_Rect = 12, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Seasonic-SSR-550PX-12V.mat", nomP = 350, nomV = 120) annotation (
Placement(visible = true, transformation(origin={55,17}, extent = {{-9, -7}, {9, 7}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Desk_PS2(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 12, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Seasonic_SSR-550PX__300W.mat", nomP = 350, nomV = 120) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Desk_PS2(P1(start = 1), P_DCmin = 0.2, P_stby = 5.79, Q1(start = 0), S1(start = 1), V_Rect = 12, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Seasonic-SSR-550PX-12V.mat", nomP = 350, nomV = 120) annotation (
Placement(visible = true, transformation(origin = {56, 51}, extent = {{-8, -7}, {8, 7}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Desk_PS5(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 12, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Seasonic_SSR-550PX__300W.mat", nomP = 350, nomV = 120) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Desk_PS5(P1(start = 1), P_DCmin = 0.2, P_stby = 5.79, Q1(start = 0), S1(start = 1), V_Rect = 12, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Seasonic-SSR-550PX-12V.mat", nomP = 350, nomV = 120) annotation (
Placement(visible = true, transformation(origin={60,-54}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Desk_PS6(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 12, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Seasonic_SSR-550PX__300W.mat", nomP = 350, nomV = 120) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Desk_PS6(P1(start = 1), P_DCmin = 0.2, P_stby = 5.79, Q1(start = 0), S1(start = 1), V_Rect = 12, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Seasonic-SSR-550PX-12V.mat", nomP = 350, nomV = 120) annotation (
Placement(visible = true, transformation(origin={58,-89}, extent = {{-8, -7}, {8, 7}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Desk_PS4(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 12, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Seasonic_SSR-550PX__300W.mat", nomP = 350, nomV = 120) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Desk_PS4(P1(start = 1), P_DCmin = 0.2, P_stby = 5.79, Q1(start = 0), S1(start = 1), V_Rect = 12, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Seasonic-SSR-550PX-12V.mat", nomP = 350, nomV = 120) annotation (
Placement(visible = true, transformation(origin = {56, -16}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Driver_1(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Osram_OTi48_LED_Driver.mat", nomP = 60, nomV = 120) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Driver_1(P1(start = 1), P_DCmin = 0.2, P_stby = 1.52, Q1(start = 0), S1(start = 1), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Osram-Oti-48-120-277-2A0.mat", nomP = 60, nomV = 120) annotation (
Placement(visible = true, transformation(origin={-88,77}, extent = {{8, -7}, {-8, 7}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Driver_2(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Osram_OTi48_LED_Driver.mat", nomP = 60, nomV = 120) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Driver_2(P1(start = 1), P_DCmin = 0.2, P_stby = 1.52, Q1(start = 0), S1(start = 1), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Osram-Oti-48-120-277-2A0.mat", nomP = 60, nomV = 120) annotation (
Placement(visible = true, transformation(origin={-92,45}, extent = {{8, -7}, {-8, 7}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Driver_3(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Osram_OTi48_LED_Driver.mat", nomP = 60, nomV = 120) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Driver_3(P1(start = 1), P_DCmin = 0.2, P_stby = 1.52, Q1(start = 0), S1(start = 1), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Osram-Oti-48-120-277-2A0.mat", nomP = 60, nomV = 120) annotation (
Placement(visible = true, transformation(origin={-92,18}, extent = {{8, -8}, {-8, 8}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Driver_4(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Osram_OTi48_LED_Driver.mat", nomP = 60, nomV = 120) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Driver_4(P1(start = 1), P_DCmin = 0.2, P_stby = 1.52, Q1(start = 0), S1(start = 1), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Osram-Oti-48-120-277-2A0.mat", nomP = 60, nomV = 120) annotation (
Placement(visible = true, transformation(origin={-89,-21}, extent = {{9, -7}, {-9, 7}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Driver_5(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Osram_OTi48_LED_Driver.mat", nomP = 60, nomV = 120) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Driver_5(P1(start = 1), P_DCmin = 0.2, P_stby = 1.52, Q1(start = 0), S1(start = 1), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Osram-Oti-48-120-277-2A0.mat", nomP = 60, nomV = 120) annotation (
Placement(visible = true, transformation(origin={-88,-57}, extent = {{8, -7}, {-8, 7}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Driver_6(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Osram_OTi48_LED_Driver.mat", nomP = 60, nomV = 120) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Driver_6(P1(start = 1), P_DCmin = 0.2, P_stby = 1.52, Q1(start = 0), S1(start = 1), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Osram-Oti-48-120-277-2A0.mat", nomP = 60, nomV = 120) annotation (
Placement(visible = true, transformation(origin={-90,-93}, extent = {{8, -7}, {-8, 7}}, rotation = 0)));
Modelica.Blocks.Math.Add Light_Driver_Loss annotation (Placement(visible=true,
transformation(
Expand Down Expand Up @@ -520,4 +520,4 @@ Input Value - Dashed Line
Output Value - Dotted Line")}),
Icon(coordinateSystem(extent={{-200,-100},{200,100}})),
version="");
end flexlab_ac_Cable;
end FLEXLAB_AC;
8 changes: 4 additions & 4 deletions FMU/flexlab_demo/4_modelica/flexlab_dc.mo
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
within HPF;
model flexlab_dc_1
within ;
model FLEXLAB_DC
inner HPF.SystemDef systemDef(fFund = 60, fs = 5000, hrms = {1, 3, 5, 7, 9}, numPh = 1) annotation (
Placement(visible = true, transformation(origin={-182,86.5714}, extent = {{-16, -16}, {16, 11.4286}}, rotation = 0)));
HPF.SinglePhase.Sources.VoltageSource Vin(start_v_re = {120, 0, 0, 0, 0}, vArg = {0, 0, 0, 0, 0}, vMag = {120, 0, 0, 0, 0}) annotation (
Placement(visible = true, transformation(origin={-58,88}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
HPF.SinglePhase.Components.Ground GndAC annotation (
Placement(visible = true, transformation(origin={-102,76}, extent = {{-8, -8}, {8, 8}}, rotation = 0)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Nextek_Hub(P1(start = 1), P_DCmin = 0.2, Q1(start = 0), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Nextek_208V_1600W.mat", nomP = 1600, nomV = 120) "P/N ??" annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl Nextek_Hub(P1(start = 1), P_DCmin = 0.2, P_stby = 14.77, Q1(start = 0), S1(start = 1), V_Rect = 24, modelFileName = "HPF/Data/ConverterModels/SinglePhase/ACDC/Nextek-PHD16-ACDC-DIM-P-24-6-208V.mat", nomP = 1600, nomV = 120) "P/N ??" annotation (
Placement(visible = true, transformation(origin={-44,50}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
HPF.DC.Variable_DC_Load Light_1 annotation (
Placement(visible = true, transformation(origin = {-86, 14}, extent = {{-10, -10}, {10, 10}}, rotation = 180)));
Expand Down Expand Up @@ -420,4 +420,4 @@ Output Value - Dotted Line"),
pattern=LinePattern.DashDot,
fontSize=0)}),
Icon(coordinateSystem(extent={{-200,-100},{200,100}})));
end flexlab_dc_1;
end FLEXLAB_DC;
2 changes: 2 additions & 0 deletions FMU/flexlab_demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Frank, Stephen M., Jordan Shackelford, Omkar Ghatpande, Matthew Steen, Brian Bal

The co-simulation models in this directory combine a thermal model of FLEXLAB with two electrical models: one each for an AC and a DC distribution system. The models mirror physical configurations implemented in a series of FLEXLAB experiements intended to validate the accuracy of the co-simulation architecture. Experiment details are documented in the associated publication (citation above); this REAMDE documents the directory organization, directory contents, and how to execute the co-simulation.

**The *Modelica* models used for this validation study were developed and executed using BEEAM Version 0.2.x (beta). They have not been tested and may not execute properly with later BEEAM versions.**

## Files

### This Directory
Expand Down
11 changes: 11 additions & 0 deletions HPF/DC/DC_Port.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
within HPF.DC;

model DC_Port
extends Modelica.Electrical.Analog.Interfaces.OnePort;
Modelica.SIunits.Power pwr "Component power";
equation
pwr = v*i;
annotation(
Icon(coordinateSystem(initialScale = 0.1), graphics = {Rectangle(origin = {7, 10}, extent = {{-67, 20}, {53, -40}}), Line(origin = {-76, 0}, points = {{-16, 0}, {16, 0}}), Line(origin = {75, 0}, points = {{-15, 0}, {15, 0}}), Text(origin = {-4, -20}, extent = {{-150, 60}, {150, 100}}, textString = "%name")}),
Diagram(coordinateSystem(extent = {{-200, -200}, {200, 200}}, grid = {0, 0})));
end DC_Port;
1 change: 1 addition & 0 deletions HPF/DC/package.order
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Interface
DC_Load
Variable_DC_Load
Ground
DC_Port
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified HPF/Data/ConverterModels/SinglePhase/ACDC/demoModel.mat
Binary file not shown.
6 changes: 3 additions & 3 deletions HPF/Examples/Basics/AC2DC_Converter.mo
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ model AC2DC_Converter
Placement(visible = true, transformation(origin = {-34, -38}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
HPF.SinglePhase.Sources.VoltageSource V0(vArg = {0 for i in 1:systemDef.numHrm}, vMag = cat(1, {120}, {0 for i in 2:systemDef.numHrm})) annotation (
Placement(visible = true, transformation(origin = {-34, 24}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl ACDC_Converter(V_Rect = 24, nomP = 50) annotation (
HPF.PowerConverters.SinglePhase.ACDC_EmpMdl ACDC_Converter(P_DCmin = 2.5, P_stby = 1,V_Rect = 24, nomP = 90, nomV = 120) annotation (
Placement(visible = true, transformation(origin = {30, 12}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
HPF.DC.DC_Load dC_Load(pwr = 100) annotation (
HPF.DC.DC_Load dC_Load(pwr = 75) annotation (
Placement(visible = true, transformation(origin = {62, 10}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
Modelica.Electrical.Analog.Basic.Ground ground1 annotation (
Placement(visible = true, transformation(origin = {62, -16}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Expand Down Expand Up @@ -46,4 +46,4 @@ equation
experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-06, Interval = 1),
__OpenModelica_commandLineOptions = "--matchingAlgorithm=PFPlusExt --indexReductionMethod=dynamicStateSelection -d=initialization,NLSanalyticJacobian,newInst -d=initialization ",
__OpenModelica_simulationFlags(lv = "LOG_RES_INIT,LOG_SOTI,LOG_STATS", outputFormat = "mat", s = "dassl", ls = "totalpivot", nls = "newton"));
end AC2DC_Converter;
end AC2DC_Converter;
Loading

0 comments on commit fe2de21

Please sign in to comment.