-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1018 from ibpsa/issue422b_borefield_reverse_and_sha
Issue422b borefield reverse and sha
- Loading branch information
Showing
8 changed files
with
188 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
IBPSA/Fluid/Geothermal/Borefields/Examples/RectangularBorefield.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
within IBPSA.Fluid.Geothermal.Borefields.Examples; | ||
model RectangularBorefield "Example model of a rectangular borefield" | ||
extends Modelica.Icons.Example; | ||
|
||
package Medium = IBPSA.Media.Water "Medium model"; | ||
|
||
parameter Modelica.SIunits.Time tLoaAgg=300 | ||
"Time resolution of load aggregation"; | ||
|
||
parameter Modelica.SIunits.Temperature TGro = 283.15 | ||
"Ground temperature"; | ||
parameter Modelica.SIunits.Velocity v_nominal = 1 "Nominal velocity"; | ||
parameter Modelica.SIunits.MassFlowRate m_flow_nominal = nBorHol*v_nominal*rTub^2*3.14*1000 | ||
"Nominal mass flow rate"; | ||
parameter Modelica.SIunits.Pressure dpBorFie_nominal = (hBor+(xBorFie+yBorFie)/2)*2 | ||
"Pressure losses for the entire borefield"; | ||
parameter Modelica.SIunits.Pressure dpHex_nominal = 10000 "Pressure drop heat exchanger"; | ||
parameter Modelica.SIunits.Pressure dp_nominal = dpBorFie_nominal + dpHex_nominal | ||
"Total pressure drop"; | ||
|
||
parameter Modelica.SIunits.Height hBor = 100 "Total height of the borehole"; | ||
parameter Modelica.SIunits.Radius rTub = 0.02 "Outer radius of the tubes"; | ||
parameter Modelica.SIunits.Length xBorFie = 10 "Borefield length"; | ||
parameter Modelica.SIunits.Length yBorFie = 30 "Borefield width"; | ||
parameter Modelica.SIunits.Length dBorHol = 5 "Distance between two boreholes"; | ||
|
||
final parameter Integer nXBorHol = integer((xBorFie+dBorHol)/dBorHol) "Number of boreholes in x-direction"; | ||
final parameter Integer nYBorHol = integer((yBorFie+dBorHol)/dBorHol) "Number of boreholes in y-direction"; | ||
final parameter Integer nBorHol = nXBorHol*nYBorHol "Number of boreholes"; | ||
|
||
final parameter IBPSA.Fluid.Geothermal.Borefields.Data.Filling.Bentonite filDat | ||
annotation (Placement(transformation(extent={{20,40},{40,60}}))); | ||
final parameter IBPSA.Fluid.Geothermal.Borefields.Data.Soil.SandStone soiDat | ||
"Soil data" annotation (Placement(transformation(extent={{50,40},{70,60}}))); | ||
final parameter IBPSA.Fluid.Geothermal.Borefields.Data.Configuration.Template conDat( | ||
final borCon=IBPSA.Fluid.Geothermal.Borefields.Types.BoreholeConfiguration.SingleUTube, | ||
final use_Rb=false, | ||
final mBor_flow_nominal=m_flow_nominal/(nXBorHol*nYBorHol), | ||
final mBorFie_flow_nominal=m_flow_nominal, | ||
final hBor=hBor, | ||
final dBor=1, | ||
final rBor=0.2, | ||
final rTub=rTub, | ||
final kTub=0.5, | ||
final eTub=0.002, | ||
final xC=0.05, | ||
final dp_nominal=dpBorFie_nominal, | ||
final cooBor = {{dBorHol*mod((i-1),nXBorHol), dBorHol*floor((i-1)/nXBorHol)} for i in 1:nBorHol}) | ||
"Borefield configuration" | ||
annotation (Placement(transformation(extent={{80,40},{100,60}}))); | ||
|
||
final parameter IBPSA.Fluid.Geothermal.Borefields.Data.Borefield.Template | ||
borFieDat( | ||
final filDat=filDat, | ||
final soiDat=soiDat, | ||
final conDat=conDat) "Borefield parameters" | ||
annotation (Placement(transformation(extent={{60,74},{80,94}}))); | ||
|
||
IBPSA.Fluid.Geothermal.Borefields.OneUTube borFie( | ||
redeclare package Medium = Medium, | ||
borFieDat=borFieDat, | ||
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, | ||
TExt0_start=280.65, | ||
allowFlowReversal=false) | ||
"Geothermal borefield" | ||
annotation (Placement(transformation(extent={{40,-10},{60,10}}))); | ||
|
||
IBPSA.Fluid.Sources.Boundary_pT bou( | ||
redeclare package Medium = Medium, nPorts=1) | ||
"Pressure boundary condition" | ||
annotation (Placement(transformation(extent={{-60,-70},{-40,-50}}))); | ||
|
||
Movers.FlowControlled_m_flow pum( | ||
redeclare package Medium = Medium, | ||
addPowerToMedium=false, | ||
use_inputFilter=false, | ||
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, | ||
massDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, | ||
inputType=IBPSA.Fluid.Types.InputType.Constant, | ||
m_flow_nominal=borFieDat.conDat.mBorFie_flow_nominal, | ||
allowFlowReversal=false) | ||
annotation (Placement(transformation(extent={{0,-10},{20,10}}))); | ||
HeatExchangers.Heater_T hea( | ||
redeclare package Medium = Medium, | ||
show_T=true, | ||
m_flow_nominal=borFieDat.conDat.mBorFie_flow_nominal, | ||
m_flow(start=borFieDat.conDat.mBorFie_flow_nominal), | ||
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial, | ||
dp_nominal=dpHex_nominal, | ||
allowFlowReversal=false) "Heater" | ||
annotation (Placement(transformation(extent={{-40,-10},{-20,10}}))); | ||
Modelica.Blocks.Sources.Constant TSou(k=293.15) | ||
"Temperature of water that goes into the borefield" | ||
annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); | ||
equation | ||
|
||
connect(hea.port_b, pum.port_a) | ||
annotation (Line(points={{-20,0},{0,0}}, color={0,127,255})); | ||
connect(TSou.y, hea.TSet) annotation (Line(points={{-59,30},{-52,30},{-52,8},{ | ||
-42,8}}, color={0,0,127})); | ||
connect(pum.port_b, borFie.port_a) | ||
annotation (Line(points={{20,0},{40,0}}, color={0,127,255})); | ||
connect(borFie.port_b, hea.port_a) annotation (Line(points={{60,0},{70,0},{70, | ||
-20},{-52,-20},{-52,0},{-40,0}}, color={0,127,255})); | ||
connect(pum.port_a, bou.ports[1]) | ||
annotation (Line(points={{0,0},{0,-60},{-40,-60}}, color={0,127,255})); | ||
annotation (Documentation(info="<html> | ||
<p> | ||
This example model illustrates how to configure the layout | ||
of the boreholes for a rectangular borefield. | ||
The configuration is | ||
</p> | ||
<pre> | ||
cooBor = {{dBorHol*mod((i-1),nXBorHol), dBorHol*floor((i-1)/nXBorHol)} for i in 1:nBorHol} | ||
</pre> | ||
<p> | ||
where <code>dBorHol</code> is the distance between the boreholes, | ||
<code>nXBorHol</code> is the number of boreholes in the x-direction, and | ||
<code>nBorHol</code> is the total number of boreholes. | ||
</p> | ||
</html>", revisions="<html> | ||
<ul> | ||
<li> | ||
September 10, 2018, by Michael Wetter:<br/> | ||
First implementation. | ||
</li> | ||
</ul> | ||
</html>"), | ||
__Dymola_Commands(file="Resources/Scripts/Dymola/Fluid/Geothermal/Borefields/Examples/RectangularBorefield.mos" | ||
"Simulate and plot"), | ||
experiment( | ||
StopTime=2678400,Tolerance=1e-6)); | ||
end RectangularBorefield; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
Borefields | ||
RectangularBorefield |
11 changes: 11 additions & 0 deletions
11
...ferenceResults/Dymola/IBPSA_Fluid_Geothermal_Borefields_Examples_RectangularBorefield.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
last-generated=2018-09-11 | ||
statistics-simulation= | ||
{ | ||
"linear": "0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0", | ||
"nonlinear": " ", | ||
"number of continuous time states": "43", | ||
"numerical Jacobians": "0" | ||
} | ||
hea.sta_a.T=[2.806499938964844e+02, 2.922489624023438e+02, 2.923782958984375e+02, 2.924201965332031e+02, 2.924427795410156e+02, 2.924582824707031e+02, 2.924699401855469e+02, 2.924793090820312e+02, 2.924869384765625e+02, 2.924936828613281e+02, 2.9249951171875e+02, 2.925046691894531e+02, 2.925093994140625e+02, 2.92513671875e+02, 2.925176391601562e+02, 2.925213012695312e+02, 2.925247192382812e+02, 2.925281066894531e+02, 2.925312805175781e+02, 2.925343017578125e+02, 2.925372924804688e+02, 2.925401306152344e+02, 2.925428771972656e+02, 2.925456237792969e+02, 2.925482482910156e+02, 2.925508117675781e+02, 2.925533752441406e+02, 2.925558471679688e+02, 2.925582885742188e+02, 2.925607299804688e+02, 2.925630493164062e+02, 2.925653686523438e+02, 2.925676574707031e+02, 2.925699768066406e+02, 2.92572265625e+02, 2.925744934082031e+02, 2.925766906738281e+02, 2.92578857421875e+02, 2.925810241699219e+02, 2.925831909179688e+02, 2.925853271484375e+02, 2.925874328613281e+02, 2.925894775390625e+02, 2.925915222167969e+02, 2.925935668945312e+02, 2.925955810546875e+02, 2.925976257324219e+02, 2.925995788574219e+02, 2.926015319824219e+02, 2.926034851074219e+02, 2.926054077148438e+02, 2.926073303222656e+02, 2.926092529296875e+02, 2.926111145019531e+02, 2.926129760742188e+02, 2.926148376464844e+02, 2.926166687011719e+02, 2.926185302734375e+02, 2.926203308105469e+02, 2.926220703125e+02, 2.926238098144531e+02, 2.926255187988281e+02, 2.926272583007812e+02, 2.926289978027344e+02, 2.926307067871094e+02, 2.926324157714844e+02, 2.926341247558594e+02, 2.926358337402344e+02, 2.926375427246094e+02, 2.926392211914062e+02, 2.926408386230469e+02, 2.926424255371094e+02, 2.926440124511719e+02, 2.926455993652344e+02, 2.926471862792969e+02, 2.926487731933594e+02, 2.926503295898438e+02, 2.926519165039062e+02, 2.926534729003906e+02, 2.92655029296875e+02, 2.926565856933594e+02, 2.926580810546875e+02, 2.926595458984375e+02, 2.926610107421875e+02, 2.926624450683594e+02, 2.926638793945312e+02, 2.926653442382812e+02, 2.926667785644531e+02, 2.92668212890625e+02, 2.926696472167969e+02, 2.926710815429688e+02, 2.926724853515625e+02, 2.926739196777344e+02, 2.926752624511719e+02, 2.926766052246094e+02, 2.926779479980469e+02, 2.926792602539062e+02, 2.926806030273438e+02, 2.926819458007812e+02, 2.926832580566406e+02, 2.926845703125e+02] | ||
time=[0e+00, 2.6784e+06] | ||
borFie.groTemRes.delTBor=[0e+00, 2.106655597686768e+00, 2.882045269012451e+00, 3.253863573074341e+00, 3.486679553985596e+00, 3.656929492950439e+00, 3.787418127059937e+00, 3.89473295211792e+00, 3.982996463775635e+00, 4.061352252960205e+00, 4.131009101867676e+00, 4.191467761993408e+00, 4.24700927734375e+00, 4.298527240753174e+00, 4.346031188964844e+00, 4.389286518096924e+00, 4.430964469909668e+00, 4.47255277633667e+00, 4.51012134552002e+00, 4.547041893005371e+00, 4.583920001983643e+00, 4.617668628692627e+00, 4.651390075683594e+00, 4.684808254241943e+00, 4.71635913848877e+00, 4.747883796691895e+00, 4.779049396514893e+00, 4.809280872344971e+00, 4.839463710784912e+00, 4.868901252746582e+00, 4.89725399017334e+00, 4.925564289093018e+00, 4.953824996948242e+00, 4.9820237159729e+00, 5.01015043258667e+00, 5.03732967376709e+00, 5.064004898071289e+00, 5.09062385559082e+00, 5.117181777954102e+00, 5.143670558929443e+00, 5.170083999633789e+00, 5.195383071899414e+00, 5.220542907714844e+00, 5.245645999908447e+00, 5.270686626434326e+00, 5.29565954208374e+00, 5.320385932922363e+00, 5.344318866729736e+00, 5.368195056915283e+00, 5.392014980316162e+00, 5.415772438049316e+00, 5.43946361541748e+00, 5.462751865386963e+00, 5.485588073730469e+00, 5.508368492126465e+00, 5.53109073638916e+00, 5.553752422332764e+00, 5.57634973526001e+00, 5.598067283630371e+00, 5.61942720413208e+00, 5.640746116638184e+00, 5.662021160125732e+00, 5.683245182037354e+00, 5.704416275024414e+00, 5.72553014755249e+00, 5.746585845947266e+00, 5.767580986022949e+00, 5.788514614105225e+00, 5.809386730194092e+00, 5.829885959625244e+00, 5.849430561065674e+00, 5.868940830230713e+00, 5.88841724395752e+00, 5.907854557037354e+00, 5.927248477935791e+00, 5.946595668792725e+00, 5.965893745422363e+00, 5.985140800476074e+00, 6.004335403442383e+00, 6.023477554321289e+00, 6.04256534576416e+00, 6.060677051544189e+00, 6.078505516052246e+00, 6.09630823135376e+00, 6.114082336425781e+00, 6.13182258605957e+00, 6.149526119232178e+00, 6.167187690734863e+00, 6.184808254241943e+00, 6.202384948730469e+00, 6.219917297363281e+00, 6.237403392791748e+00, 6.25454568862915e+00, 6.271007537841797e+00, 6.287444114685059e+00, 6.303857326507568e+00, 6.320241928100586e+00, 6.336595058441162e+00, 6.352912425994873e+00, 6.369194030761719e+00, 6.385437965393066e+00] |
4 changes: 4 additions & 0 deletions
4
IBPSA/Resources/Scripts/Dymola/Fluid/Geothermal/Borefields/Examples/RectangularBorefield.mos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
simulateModel("IBPSA.Fluid.Geothermal.Borefields.Examples.RectangularBorefield", stopTime=2678400, method="Cvode", tolerance=1e-06, resultFile="RectangularBorefield"); | ||
createPlot(id=1, position={15, 10, 592, 689}, y={"hea.sta_a.T"}, range={0.0, 3000000.0, 5.0, 20.0}, grid=true, colors={{28,108,200}}, displayUnits={"degC"}); | ||
createPlot(id=1, position={15, 10, 592, 342}, y={"borFie.groTemRes.delTBor"}, range={0.0, 3000000.0, -5.0, 10.0}, grid=true, subPlot=2, colors={{28,108,200}}); | ||
|