Skip to content

Commit

Permalink
Formatted model
Browse files Browse the repository at this point in the history
  • Loading branch information
mwetter committed Oct 18, 2023
1 parent 76b561c commit e525a26
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 14 deletions.
8 changes: 5 additions & 3 deletions IBPSA/Fluid/Geothermal/Aquifer/Examples/CoolingOffice.mo
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
within IBPSA.Fluid.Geothermal.Aquifer.Examples;
model CoolingOffice
extends Modelica.Icons.Example;
package Medium = IBPSA.Media.Water "Medium model";

parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal=30000
"Cooling power";
parameter Modelica.Units.SI.TemperatureDifference deltaT=4 "Temperature difference at heat exchanger";
Expand All @@ -9,7 +11,7 @@ model CoolingOffice
QCoo_flow_nominal/(deltaT*cpWat) "Nominal water mass flow rate";

HeatExchangers.HeaterCooler_u hea(
redeclare package Medium = IBPSA.Media.Water,
redeclare package Medium = Medium,
m_flow_nominal=mWat_flow_nominal,
dp_nominal=100,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
Expand All @@ -20,7 +22,7 @@ model CoolingOffice
Modelica.Blocks.Sources.Constant uHea(k=1) "Heat load control signal"
annotation (Placement(transformation(extent={{-60,60},{-40,80}})));
MultiWell aquWel(
redeclare package Medium = IBPSA.Media.Water,
redeclare package Medium = Medium,
nVol=80,
h=20,
d=1000,
Expand All @@ -33,7 +35,7 @@ model CoolingOffice
"Acquifer well"
annotation (Placement(transformation(extent={{-10,-20},{10,0}})));
Sources.Boundary_pT bou(
redeclare package Medium = IBPSA.Media.Water,
redeclare package Medium = Medium,
nPorts=1) "Pressure boundary condition" annotation (Placement(transformation(extent={{-80,20},{-60,40}})));
equation
connect(uHea.y, hea.u)
Expand Down
6 changes: 3 additions & 3 deletions IBPSA/Fluid/Geothermal/Aquifer/MultiWell.mo
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ protected
Modelica.Blocks.Math.Gain gaiPum(final k=nPai) "Gain used to scale the pump electrical power"
annotation (Placement(transformation(extent={{80,30},{100,50}})));
initial equation
assert(rWB < rMax, "Error: Model requires rWB < rMax");
assert(0 < rWB, "Error: Model requires 0 < rWB");
assert(rMax <= d/2, "Error: Model requires rMax <= d/2");
assert(rWB < rMax, "In " + getInstanceName() + ": Require rWB < rMax");
assert(0 < rWB, "In " + getInstanceName() + ": Require 0 < rWB");
assert(rMax <= d/2, "In " + getInstanceName() + ": Require rMax <= d/2");

cAqu=aquDat.dSoi*aquDat.cSoi*(1-aquDat.phi);
kVol=kWat*aquDat.phi+aquDat.kSoi*(1-aquDat.phi);
Expand Down
20 changes: 14 additions & 6 deletions IBPSA/Fluid/Geothermal/Aquifer/Validation/NumberWells.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ model NumberWells
"Test model for aquifer thermal energy storage with multiple wells"
extends Modelica.Icons.Example;

package Medium = IBPSA.Media.Water "Medium model";

model MyWell = MultiWell (
redeclare package Medium = IBPSA.Media.Water,
nVol=50,
Expand All @@ -20,20 +22,26 @@ model NumberWells
"ATES with one pair of wells"
annotation (Placement(transformation(extent={{-20,20},{0,40}})));
MyWell aquWel2(
d=4800, nPai=2, m_flow_nominal=0.2)
"ATES with two pairs of wells"
d=4800,
nPai=2,
m_flow_nominal=0.2)
"ATES with two pairs of wells"
annotation (Placement(transformation(extent={{-20,-60},{0,-40}})));
Modelica.Blocks.Sources.Constant uPum(k=1) "Pump control signal"
annotation (Placement(transformation(extent={{-80,-10},{-60,10}})));
Sources.Boundary_pT bou(redeclare package Medium = IBPSA.Media.Water, nPorts=2) "Sink"
Sources.Boundary_pT bou(
redeclare package Medium = Medium,
nPorts=2) "Sink"
annotation (Placement(transformation(extent={{60,-10},{40,10}})));
Modelica.Blocks.Sources.RealExpression temWel1(y=aquWel1.TAquHot[10])
Modelica.Blocks.Sources.RealExpression temWel1(
y=aquWel1.TAquHot[10])
"Temperature output from aquifer model with one pair of wells"
annotation (Placement(transformation(extent={{20,72},{40,92}})));
Modelica.Blocks.Sources.RealExpression temWel2(y=aquWel2.TAquHot[10])
Modelica.Blocks.Sources.RealExpression temWel2(
y=aquWel2.TAquHot[10])
"Temperature output from aquifer model with two pairs of wells"
annotation (Placement(transformation(extent={{20,40},{40,60}})));
Utilities.Diagnostics.CheckEquality cheEqu
Utilities.Diagnostics.CheckEquality cheEqu
"Assertion that checks for equality of results"
annotation (Placement(transformation(extent={{60,60},{80,80}})));
equation
Expand Down
7 changes: 5 additions & 2 deletions IBPSA/Fluid/Geothermal/Aquifer/Validation/SimulationTest.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ within IBPSA.Fluid.Geothermal.Aquifer.Validation;
model SimulationTest
"Test model for aquifer thermal energy storage in comparison with other geothermal simulators"
extends Modelica.Icons.Example;

package Medium = IBPSA.Media.Water "Medium model";

MultiWell aquWel(
redeclare package Medium = IBPSA.Media.Water,
redeclare package Medium = Medium,
nVol=232,
h=200,
d=4800,
Expand All @@ -18,7 +21,7 @@ model SimulationTest
dpExt_nominal=0) "Aquifer wells"
annotation (Placement(transformation(extent={{-20,20},{0,40}})));
Sources.Boundary_pT bou(
redeclare package Medium = IBPSA.Media.Water,
redeclare package Medium = Medium,
nPorts=1) "Boundary condition for pressure"
annotation (Placement(transformation(extent={{60,50},{40,70}})));
Modelica.Blocks.Sources.CombiTimeTable uPum(table=[0.0,-1; 86400*120,-1; 86400
Expand Down

0 comments on commit e525a26

Please sign in to comment.