TNO Intern

Commit 5cb899de authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Showing how this can work for a single doublet simulation

parent cac4fe3a
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -85,19 +85,21 @@ class PyThermoGIS(TestCase):
        ThermoGISProperties.instantiateRunProperties()
        ThermoGISProperties.instantiateRunProperties()
        self.setupDefaultProperties(ThermoGISProperties)
        self.setupDefaultProperties(ThermoGISProperties)


        # Create instances of loggerMock, progressTrackerMock, taskExecutor and utc
        # Create an instance of a ThermoGISDoublet
        doublet = ThermoGISDoublet(Mockito.mock(Logger), RNG(123))
        doublet = ThermoGISDoublet(Mockito.mock(Logger), RNG(123))


        # Set parameters to be simulated: will change with a grid
        # Input values which usually come from grids
        thickness = 199.0
        thickness = 199.0
        ntg = 0.95
        ntg = 0.95
        tres = 74.774506
        tres = 74.774506
        porosity = 0.27
        porosity = 0.27
        depth = 1990.0
        depth = 1990.0

        # Generated in runtime
        khPvalue = 700.0
        khPvalue = 700.0
        kHQuantile = 139742.39
        kHQuantile = 139742.39


        # Model Parameters
        # Model Parameters from a config
        hp_minimum_injection_temperature = 15
        hp_minimum_injection_temperature = 15
        return_temperature = 30
        return_temperature = 30
        surface_temperature = 10
        surface_temperature = 10
@@ -113,7 +115,6 @@ class PyThermoGIS(TestCase):
        # Assert
        # Assert
        self.assertTrue(np.isclose(doublet.doubletCalc1DData.getFlowrate(), 499.975007564939, 1e-5))
        self.assertTrue(np.isclose(doublet.doubletCalc1DData.getFlowrate(), 499.975007564939, 1e-5))



    def checkOutputGridValues(self):
    def checkOutputGridValues(self):
        flowRateGrid = read_grid(self.model_path / "Results" / "simplified" / "BaseCase" / "simplified__flowr_P50.zmap")
        flowRateGrid = read_grid(self.model_path / "Results" / "simplified" / "BaseCase" / "simplified__flowr_P50.zmap")
        copGrid = read_grid(self.model_path / "Results" / "simplified" / "BaseCase" / "simplified__cop_P50.zmap")
        copGrid = read_grid(self.model_path / "Results" / "simplified" / "BaseCase" / "simplified__cop_P50.zmap")