lukeshope / hipims-ocl

The high-performance integrated modelling system, for hydraulic and hydrological simulations
GNU General Public License v3.0
21 stars 10 forks source link

[WIP] Simple pipes for use in green infrastructure #12

Open lukeshope opened 6 years ago

lukeshope commented 6 years ago

Simple pipe flow modelling, either under pressure or partially full, for use in green infrastructure design.

lukeshope commented 6 years ago

Debug output for 1.2m upstream depth, 0.1m downstream depth, as per initial spreadsheet calculations.

-- SIMPLE PIPE BOUNDARY --
 Configuration:
   Start cell:        0, 1
   Start invert:      10.000000 m
   End cell:          2, 3
   End invert:        9.950000 m
   Roughness:         0.001500 mm
   Length:            3.600000 m
   Loss coefficients: 1.450000
   Diameter:          0.350000 m
 Initial states:
   Start of pipe:
     Water level:     11.200000 m
     Depth:           1.200000 m
     UW discharge X:  0.000000 m^2/s (0.000000 m/s)
     UW discharge Y:  -0.000000 m^2/s (-0.000000 m/s)
   End of pipe:
     Water level:     10.050000 m
     Depth:           0.100000 m
     UW discharge X:  0.000000 m^2/s (0.000000 m/s)
     UW discharge Y:  -0.000000 m^2/s (-0.000000 m/s)
 Partial pipe flow factors:
   Prop depth angle:  6.283185
   Shape factor:      1.000000
 Results of iteration:
   Friction loss: 0.600000
   Velocity:      10.823999
   Other head:    8.658536
   Error:         -8.658536
 Results of iteration:
   Friction loss: 0.167073
   Velocity:      5.429972
   Other head:    2.179034
   Error:         -1.746108
 Results of iteration:
   Friction loss: 0.079768
   Velocity:      3.634623
   Other head:    0.976310
   Error:         -0.456078
 Results of iteration:
   Friction loss: 0.056964
   Velocity:      3.025615
   Other head:    0.676544
   Error:         -0.133508
 Results of iteration:
   Friction loss: 0.050288
   Velocity:      2.826779
   Other head:    0.590544
   Error:         -0.040833
 Results of iteration:
   Friction loss: 0.048247
   Velocity:      2.763571
   Other head:    0.564430
   Error:         -0.012677
 Results of iteration:
   Friction loss: 0.047613
   Velocity:      2.743698
   Other head:    0.556342
   Error:         -0.003955
 Results of iteration:
   Friction loss: 0.047415
   Velocity:      2.737474
   Other head:    0.553820
   Error:         -0.001236
 Results of iteration:
   Friction loss: 0.047353
   Velocity:      2.735527
   Other head:    0.553033
   Error:         -0.000386
 Results of iteration:
   Friction loss: 0.047334
   Velocity:      2.734918
   Other head:    0.552787
   Error:         -0.000121
 Results of iteration:
   Friction loss: 0.047328
   Velocity:      2.734727
   Other head:    0.552710
   Error:         -0.000038
 Results of iteration:
   Friction loss: 0.047326
   Velocity:      2.734668
   Other head:    0.552686
   Error:         -0.000012
 Results of iteration:
   Friction loss: 0.047326
   Velocity:      2.734649
   Other head:    0.552678
   Error:         -0.000004
 13 iterations, with error -0.000004.
 Pipe flow:
   Velocity:          2.734649
   Discharge:         0.263104
 Final states:
   Volume changes:
     Timestep:        0.100000 s
     Volume:          0.026310 m3
     Level change:    0.000263 m
   Start of pipe:
     Water level:     11.199737 m
     Depth:           1.199737 m
     UW discharge X:  0.000000 m^2/s (0.000000 m/s)
     UW discharge Y:  -0.000000 m^2/s (-0.000000 m/s)
   End of pipe:
     Water level:     10.050263 m
     Depth:           0.100263 m
     UW discharge X:  0.000000 m^2/s (0.000000 m/s)
     UW discharge Y:  -0.000000 m^2/s (-0.000000 m/s)
lukeshope commented 6 years ago

Boundary condition changes also add new configuration file options. See below example for effective runoff, and pipe and orifice-type structures.

<?xml version="1.0"?>
<!DOCTYPE configuration PUBLIC "HiPIMS Configuration Schema 1.1" "http://www.lukesmith.org.uk/research/namespace/hipims/1.1/"[]>
<configuration>
    <metadata>
        <name>NGIF Extreme Event Swale: 1% AEP 1-hour summer event</name>
        <description>National Green Infrastructure Facility: Hydrodynamic model to support swale design</description>
    </metadata>
    <execution>
        <executor name="OpenCL">
            <parameter name="deviceFilter" value="GPU,CPU" />
        </executor>
    </execution>
    <simulation>
        <parameter name="duration" value="7200" />
        <parameter name="outputFrequency" value="300" />
        <parameter name="floatingPointPrecision" value="double" />
        <domainSet>
            <domain type="cartesian" deviceNumber="3">
                <data sourceDir="topography/"
                      targetDir="output/">
                    <dataSource type="raster" value="structure,dem" source="MODEL_TOPOGRAPHY.tif" />
                    <dataSource type="raster" value="depth" source="MODEL_INITIAL_DEPTH.img" />
                    <dataSource type="constant" value="velocityX" source="0.0" />
                    <dataSource type="constant" value="velocityY" source="0.0" />
                    <dataSource type="constant" value="manningCoefficient" source="0.025" />
                    <dataTarget type="raster" value="depth" format="HFA" target="depth_%t.img" />
                    <dataTarget type="raster" value="velocityX" format="HFA" target="velX_%t.img" />
                    <dataTarget type="raster" value="velocityY" format="HFA" target="velY_%t.img" />
                    <dataTarget type="raster" value="fsl" format="HFA" target="fsl_%t.img" />
                    <dataTarget type="raster" value="maxdepth" format="HFA" target="maxdepth_%t.img" />
                </data>
                <scheme name="godunov">
                    <parameter name="courantNumber" value="0.50" />
                    <parameter name="groupSize" value="32x8" />
                </scheme>
                <boundaryConditions sourceDir="boundaries/"
                                    mapFile="cell-map.csv"
                                    mapType="coordinates">
                    <timeseries type="atmospheric"
                                name="DesignStorm"
                                value="rain-intensity"
                                effectiveRunoffPercentage="90.0"
                                source="storm-1pcAEP-1hr.csv" />
                    <timeseries type="cell"
                                name="ChamberOutflow"
                                depthValue="ignore"
                                dischargeValue="volume"
                                source="chamber.csv" />
                    <timeseries type="cell"
                                name="StreetDrain"
                                depthValue="ignore"
                                dischargeValue="volume"
                                source="drain.csv" />
                    <timeseries type="cell"
                                name="FilterDrain"
                                depthValue="ignore"
                                dischargeValue="volume"
                                source="drain.csv" />
                    <structure type="simple-pipe"
                               name="Dam #4 outlet"
                               startX="424034.99"
                               startY="564464.59"
                               endX="424034.46"
                               endY="564459.35"
                               length="3.60"
                               orientation="185"
                               diameter="0.350"
                               roughness="0.0015"
                               lossCoefficients="1.45"
                               invertStart="67.848"
                               invertEnd="67.803" />
                    <structure type="simple-pipe"
                               name="Dam #3 orifice"
                               startX="424031.81"
                               startY="564438.70"
                               endX="424031.87"
                               endY="564434.60"
                               length="0.1"
                               orientation="180"
                               diameter="0.225"
                               roughness="0.0015"
                               lossCoefficients="2.70"
                               invertStart="67.491"
                               invertEnd="67.491" />
                    <structure type="simple-pipe"
                               name="Dam #2 orifice"
                               startX="424029.99"
                               startY="564414.29"
                               endX="424029.98"
                               endY="564411.00"
                               length="0.1"
                               orientation="180"
                               diameter="0.225"
                               roughness="0.0015"
                               lossCoefficients="2.70"
                               invertStart="67.250"
                               invertEnd="67.250" />
                    <structure type="simple-pipe"
                               name="Dam #1 outlet"
                               startX="424028.67"
                               startY="564388.16"
                               endX="424028.78"
                               endY="564383.39"
                               length="3.60"
                               orientation="185"
                               diameter="0.110"
                               roughness="0.0015"
                               lossCoefficients="1.45"
                               invertStart="67.200"
                               invertEnd="67.150" />
                    <structure type="simple-pipe"
                               name="Wetland low outlet"
                               startX="424027.34"
                               startY="564380.66"
                               endX="424034.11"
                               endY="564381.03"
                               length="6.80"
                               orientation="90"
                               diameter="0.110"
                               roughness="0.0015"
                               lossCoefficients="1.45"
                               invertStart="66.750"
                               invertEnd="66.650" />
                </boundaryConditions>
            </domain>
        </domainSet>
    </simulation>
</configuration>