def CalculateRegionalGasExpenses(self, problemManager, distanceToGas):
        """ Calculate gas pipeline transmission costs to hydrogen plant."""

        # distanceToGas is assumed given in km

        theUnitManager = UnitManager()
        gasCosts = np.zeros(distanceToGas.shape)

        #AUD2010 = MiningEquipmentPriceIndex.IndexedPrice(1.0,2010,2018) * theUnitManager.ConvertToBaseUnits("AUD")  #in 2018 dollars
        AUD2016 = MiningEquipmentPriceIndex.IndexedPrice(
            1.0, 2016, 2018) * theUnitManager.ConvertToBaseUnits("AUD")
        AUD2014 = MiningEquipmentPriceIndex.IndexedPrice(
            1.0, 2014, 2018) * theUnitManager.ConvertToBaseUnits("AUD")

        piplelineCostPerKM = 0.315e6 * AUD2014  # from core gas production and transmission costs 8 inch class 600 5.6mm wall.

        gasCosts = piplelineCostPerKM * distanceToGas

        # The following are excluded as we are using gas lines for transmission - not power (gas costs are included in plant opex).

        #AUD2018 = MiningEquipmentPriceIndex.IndexedPrice(1.0,2018,2018) * theUnitManager.ConvertToBaseUnits("AUD")
        #gasLCOE = 120*AUD2016   # LCOE per Mwh
        #retailCOE = 100*AUD2018 # LCOE per Mwh

        #gasPowerCosts = problemManager.theMineDataManager.theProcessingSystem.processingPower*( gasLCOE - retailCOE)
        #gasNPC = problemManager.theMineDataManager.theEconomicDataManager.CalculateNPV(gasPowerCosts)
        #gasCosts+= gasNPC

        return gasCosts
    def ParseXMLNode(self, miningSystemNode):
        """
      Generate mining system data from xml tree node.
       - Note this may not be needed in many cases as the mining system is derived from the orebody shape  
      """

        theUnitManager = UnitManager()

        if (HasAttribute(miningSystemNode, "alpha")):
            self.alpha = GetAttributeValue(miningSystemNode, "alpha")

        if (HasAttribute(miningSystemNode, "orebody")):
            self.orebodyName = GetAttributeString(miningSystemNode, "orebody")

        # for K2SO4 (brine mining) only - bit ugly - might be able to use orebody instead
        if (HasAttribute(miningSystemNode, "method")):
            self.miningMethod = GetAttributeString(miningSystemNode, "method")

        # for proving well costs
        if (HasAttribute(miningSystemNode, "boreholeSpacing")):
            spacing = theUnitManager.ConvertToBaseUnits(
                GetAttributeString(miningSystemNode, "boreholeSpacing"))
            self.boreholeDensity = 1.0 / (spacing**2)

        if (HasAttribute(miningSystemNode, "drillingCost")):
            self.drillingCostPerMeter = theUnitManager.ConvertToBaseUnits(
                GetAttributeString(miningSystemNode, "drillingCost"))

        if (HasAttribute(miningSystemNode, "includeProvingCosts")):
            self.doProvingCostCalculation = GetAttributeValue(
                miningSystemNode, "includeProvingCosts")

        return miningSystemNode
Example #3
0
 def CalculateRegionalGasExpenses(self,problemManager, distanceToGas):
   # distanceToGas is assumed given in km
         
   theUnitManager = UnitManager()
   gasCosts = np.zeros(distanceToGas.shape)
   
   AUD2016 = MiningEquipmentPriceIndex.IndexedPrice(1.0,2016,2018) * theUnitManager.ConvertToBaseUnits("AUD") 
   AUD2014 = MiningEquipmentPriceIndex.IndexedPrice(1.0,2014,2018) * theUnitManager.ConvertToBaseUnits("AUD") 
   
   
   piplelineCostPerKM = 0.315e6*AUD2014  # from core gas production and transmission costs 8 inch class 600 5.6mm wall.
   
   gasCosts = piplelineCostPerKM*distanceToGas
   
   AUD2018 = MiningEquipmentPriceIndex.IndexedPrice(1.0,2018,2018) * theUnitManager.ConvertToBaseUnits("AUD") 
   gasLCOE = 120*AUD2016   # LCOE per Mwh
   retailCOE = 100*AUD2018 # LCOE per Mwh
   
   gasPowerCosts = problemManager.theMineDataManager.theProcessingSystem.processingPower*( gasLCOE - retailCOE)
   gasNPC = problemManager.theMineDataManager.theEconomicDataManager.CalculateNPV(gasPowerCosts)
   gasCosts+= gasNPC
     
   
   return gasCosts
  
             
Example #4
0
    def DetermineDistanceToInfrastructure(self, problemManager,
                                          mineDataManager):
        """
      Use available data to determine the distance to infrastructure (single site calculation only).
      """
        theUnitManager = UnitManager()
        theFunctionManager = FunctionManager()

        oneKm = theUnitManager.ConvertToBaseUnits(
            "km")  # assumed that distances are given in km
        self.distanceToRoad = theFunctionManager.GetFunction(
            "DistanceToRoad").f(mineDataManager.mineLatLong[::-1]) * oneKm
        self.distanceToRail = theFunctionManager.GetFunction(
            "DistanceToRail").f(mineDataManager.mineLatLong[::-1]) * oneKm
        self.distanceToWater = theFunctionManager.GetFunction(
            "DistanceToWater").f(mineDataManager.mineLatLong[::-1]) * oneKm
        self.distanceToPower = theFunctionManager.GetFunction(
            "DistanceToPower").f(mineDataManager.mineLatLong[::-1]) * oneKm

        self.roadTransportationDistance = theFunctionManager.GetFunction(
            "RoadTransportationDistance").f(
                mineDataManager.mineLatLong[::-1]) * oneKm
        self.railTransportationDistance = theFunctionManager.GetFunction(
            "RailTransportationDistance").f(
                mineDataManager.mineLatLong[::-1]) * oneKm

        if (self.calculateGas):
            self.distanceToGas = theFunctionManager.GetFunction(
                "DistanceToGas").f(mineDataManager.mineLatLong[::-1]) * oneKm
    def CalculateOpex(self, hydrogenManager):
        """Calculate the ongoing costs for the power plant"""

        #  no distinction between opex and sustaining capital (adjust tax calculation)

        theFunctionManager = FunctionManager()
        theUnitManager = UnitManager()

        opexFunc = theFunctionManager.GetFunction("EnergyOpex_" + self.type)

        opexPerAnnumPerMW = opexFunc.f(
            [self.plantCapacity * theUnitManager.ConvertTo("MW")])

        #print "Power plant type: ", self.type
        #print "Power plant capacity (MW)", self.plantCapacity  *  theUnitManager.ConvertTo("MW")
        #print "Capacity factor", self.capacityFactor
        #print "Power plant Opex Per Annum", opexPerAnnum

        self.opex = np.zeros(self.projectLife)
        self.opex[
            self.
            startupTime:] = opexPerAnnumPerMW * self.capacityFactor * self.plantCapacity * theUnitManager.ConvertTo(
                "MW")

        #print "self.plantCapacity",self.plantCapacity
        #print "power opex", self.opex

        rv = np.array(self.opex)

        if (self.secondaryPowerSource):
            rv += self.secondaryPowerSource.CalculateOpex(hydrogenManager)

        return rv
Example #6
0
 def CalculatePowerExpenses(self, problemManager, mineDataManager):
   numYears = mineDataManager.theMiningSystem.mineLife
   
   requiredVoltage = 220
   theUnitManager = UnitManager()
   oneKm = theUnitManager.ConvertToBaseUnits("km")
   if(self.distanceToPower < 190*oneKm):  
     requiredVoltage = 132      
     if(self.distanceToPower < 150*oneKm):   # this could also be 100 km
       requiredVoltage = 33      
       if(self.distanceToPower <= oneKm): 
         requiredVoltage = 11 
 
   
   # power capex
   self.powerCapex = np.zeros(numYears)  
   distanceScale = theUnitManager.ConvertToBaseUnits("AUD/km")
   
   AUD2010 = MiningEquipmentPriceIndex.IndexedPrice(1.0,2010,2018)
   AUD2014 = MiningEquipmentPriceIndex.IndexedPrice(1.0,2014,2018)
   
   if( requiredVoltage == 220):
     distanceScale *= 925000*AUD2014
   elif(requiredVoltage == 132):
     distanceScale *= 650000*AUD2014
   elif(requiredVoltage == 33):
     distanceScale *= 300000*AUD2010
   else:
     distanceScale *= 75000*AUD2010
   
   
   self.powerCapex[0] =  distanceScale*self.distanceToPower
   
   
   self.powerOpex = np.zeros(numYears)
    def CalculatePowerExpenses(self, problemManager, hydrogenManager):
        """Calculate power infrastructure expenses (local calculation)."""
        numYears = hydrogenManager.GetProjectDuration()
        self.powerCapex = np.zeros(numYears)

        if (self.includePowerInfrastructureCosts):
            requiredVoltage = 220
            theUnitManager = UnitManager()
            oneKm = theUnitManager.ConvertToBaseUnits("km")
            if (self.distanceToPower < 190 * oneKm):
                requiredVoltage = 132
                if (self.distanceToPower <
                        150 * oneKm):  # this could also be 100 km
                    requiredVoltage = 33
                    if (self.distanceToPower <= oneKm):
                        requiredVoltage = 11

            # power capex
            distanceScale = theUnitManager.ConvertToBaseUnits("AUD/km")

            AUD2010 = MiningEquipmentPriceIndex.IndexedPrice(1.0, 2010, 2018)
            AUD2014 = MiningEquipmentPriceIndex.IndexedPrice(1.0, 2014, 2018)

            if (requiredVoltage == 220):
                distanceScale *= 925000 * AUD2014
            elif (requiredVoltage == 132):
                distanceScale *= 650000 * AUD2014
            elif (requiredVoltage == 33):
                distanceScale *= 300000 * AUD2010
            else:
                distanceScale *= 75000 * AUD2010

            self.powerCapex[0] = distanceScale * self.distanceToPower

        self.powerOpex = np.zeros(numYears)
    def CalculateMineCapacity(self, problemManager, mineManager):
        """
      Determine the maximum annual extraction for the mine using Taylor's rule
      """
        theUnitManager = UnitManager()

        orebodyMass = mineManager.theOreBody.CalculateDepositMass(
        ) * theUnitManager.ConvertTo("tonne")

        theFunctionManager = FunctionManager()

        if (self.miningMethod == "OCUG"):
            taylorsRuleFunc = theFunctionManager.GetFunction(
                "TaylorsRule_" + self.miningMethod[:2])
        else:
            taylorsRuleFunc = theFunctionManager.GetFunction("TaylorsRule_" +
                                                             self.miningMethod)
        daysPerYear = 350
        # operating days per year - assuming 350 days
        self.mineCapacity = daysPerYear * taylorsRuleFunc.f(
            [orebodyMass]) * theUnitManager.ConvertToBaseUnits("tonne")
        self.mineOreProductionCapacity = self.mineCapacity

        print("Mine ore capacity from Taylor's rule in Mt/year",
              self.mineCapacity * theUnitManager.ConvertTo("1e6 tonne"))

        return self.mineCapacity
Example #9
0
 def CalculateTransportationExpenses(self, problemManager, mineDataManager):
   
   numYears = mineDataManager.theMiningSystem.mineLife
   
   CovertToTodaysPrice = MiningEquipmentPriceIndex.IndexedPrice(1.0,2010,2018)
   
   # System
   #  Road       Rail
   #  Capital costs 1000AUD/km
   #  500-3000 2000-7000
   #  Fleet Costs 1000AUD /(km.Mt/a)
   # 40 100
   # Operating Costs cents/t/km
   #  5-12 1-1.25
   # Table 5: Transportation costs in 2010 AUD [1]
   
   theUnitManager = UnitManager()
   thousandAUDPerkm = 1000. * theUnitManager.ConvertToBaseUnits("AUD/km") # length prices are $1000 per km
   thousandAUDPerMtkmPerYear = 1000. * 1e-6 * theUnitManager.ConvertToBaseUnits("AUD/km/tonne")
   # fleet costs are per 1000 AuD per Mt km/ year
   
   
   fleetCapacity = np.max(mineDataManager.theProcessingSystem.concentrateProduced) 
   
   
   self.roadCapex = self.distanceToRoad * 1750. * CovertToTodaysPrice * thousandAUDPerkm \
                    + 40 * CovertToTodaysPrice * fleetCapacity * self.roadTransportationDistance * thousandAUDPerMtkmPerYear
   
   self.railCapex = self.distanceToRail * 4500. * CovertToTodaysPrice * thousandAUDPerkm \
                    + 100 * CovertToTodaysPrice * fleetCapacity * self.railTransportationDistance * thousandAUDPerMtkmPerYear
   
   self.roadOpex = np.zeros(numYears)  
   self.railOpex = np.zeros(numYears)
   
   centsPerTonnePerKm =  0.01*theUnitManager.ConvertToBaseUnits("AUD/tonne/km")
   self.roadOpex = self.roadTransportationDistance*  \
                       mineDataManager.theProcessingSystem.concentrateProduced * \
                       8.5* CovertToTodaysPrice* centsPerTonnePerKm# 5-12 cents/t/km
   
   self.railOpex = self.railTransportationDistance*  \
                       mineDataManager.theProcessingSystem.concentrateProduced * \
                       1.75* CovertToTodaysPrice*centsPerTonnePerKm # 1-2.5 cents/t/km
   
   # choose between road and rail based on which has lowest NPV (costs are +ve)
   roadNPV = mineDataManager.theEconomicDataManager.CalculateNPV(self.roadOpex) \
             + mineDataManager.theEconomicDataManager.CalculateNPV([self.roadCapex] )
   railNPV = mineDataManager.theEconomicDataManager.CalculateNPV(self.railOpex) \
             + mineDataManager.theEconomicDataManager.CalculateNPV([self.railCapex] )
   
   
   self.transportationCapex = np.zeros(numYears)  
   self.transportationOpex = np.zeros(numYears)
   
   useRoads = roadNPV < railNPV
   if(useRoads):
     self.transportationCapex[0] = self.roadCapex
     self.transportationOpex = self.roadOpex
   else:
     self.transportationCapex[0] = self.railCapex
     self.transportationOpex = self.railOpex
    def CalculateProcessingOpex(self, problemManager, mineDataManager):

        self.processingOpex = np.zeros(
            mineDataManager.theMiningSystem.mineLife)

        theFunctionManager = FunctionManager()
        theUnitManager = UnitManager()

        self.processingOpex = self.oreProcessed * theUnitManager.ConvertTo(
            "tonne")  # tonnes processed per year

        processingOpexFunc = theFunctionManager.GetFunction(
            "ProcessingOpex_" + self.processingMethod)
        opexPerTonne = processingOpexFunc.f(
            [self.processingCapacity * theUnitManager.ConvertTo("1e6 tonne")])

        print("Processing method: ", self.processingMethod)
        #print "Processing capacity (kg ore)", self.processingCapacity
        print("Processing capacity (Mt ore)",
              self.processingCapacity * theUnitManager.ConvertTo("1e6 tonne"))
        print("Processing Opex Per Tonne ", opexPerTonne)

        self.processingOpex *= opexPerTonne

        if (self.secondaryProcessingSystem):
            secondaryOpex = self.secondaryProcessingSystem.CalculateProcessingOpex(
                problemManager, mineDataManager)
            self.processingOpex += secondaryOpex

        return self.processingOpex
Example #11
0
    def CalculateRehabilitationExpenses(self, problemManager, mineDataManager):
        """
      Calculate rehabilitation costs.
      """

        self.rehabilitationCosts = np.zeros(
            mineDataManager.theMiningSystem.mineLife)

        theFunctionManager = FunctionManager()
        theUnitManager = UnitManager()

        processingCapacity = mineDataManager.theProcessingSystem.processingCapacity * theUnitManager.ConvertTo(
            "1e6 tonne")
        rehabSecurityFunc = theFunctionManager.GetFunction(
            "RehabilitationSecurity_" +
            mineDataManager.theProcessingSystem.processingMethod)

        self.rehabSecurityCost = rehabSecurityFunc.f([processingCapacity])

        # NT model: 1% of rehabSecurity paid each year of operation
        self.rehabilitationCosts = np.ones(
            mineDataManager.theMiningSystem.mineLife
        ) * self.rehabSecurityCost * 0.01

        self.rehabilitationCosts[0] = self.rehabSecurityCost

        self.rehabilitationNPC = self.CalculateRehabilitationBondNPC(
            problemManager, mineDataManager)

        return self.rehabilitationCosts
    def __init__(self, orebodyName=""):
        """
      Create an empty mining system data manager and default variables. 
      """

        self.orebodyName = orebodyName
        self.mineLife = 0
        self.mineCapacity = 0.0
        self.mineOreProductionCapacity = 0.0
        self.orebodyMass = 0.0
        self.oreMined = np.array([0.0])
        self.dilution = 0.05
        self.wasteMined = np.array([0.0])
        self.miningCapex = np.array([0.0])
        self.miningOpex = np.array([0.0])
        self.depths = np.array([0.0])
        self.rampGrade = 0.1
        self.alpha = 40 * np.pi / 180  # pit slope angle
        self.mineStartupTime = 0  # in years
        self.actualMineStartupTime = 0.0
        self.miningMethod = "OC"

        theUnitManager = UnitManager()

        self.ugHaulCostPerDepth = theUnitManager.ConvertToBaseUnits(
            "0.0073 AUD/tonne/m")

        # proving costs
        self.doProvingCostCalculation = False
        self.boreholeDensity = 1.0 / theUnitManager.ConvertToBaseUnits(
            "50 m")**2  # 50m x 50m grid
        self.drillingCostPerMeter = theUnitManager.ConvertToBaseUnits(
            "100 AUD/m")
Example #13
0
 def CalculateRegionalPowerExpenses(self, problemManager, distanceToPower):
   # distanceToPower is assumed given in km
         
   theUnitManager = UnitManager()
   powerCosts = np.zeros(distanceToPower.shape)
   
   AUD2010 = MiningEquipmentPriceIndex.IndexedPrice(1.0,2010,2018) * theUnitManager.ConvertToBaseUnits("AUD")  #in today's dollars
   AUD2014 = MiningEquipmentPriceIndex.IndexedPrice(1.0,2014,2018) * theUnitManager.ConvertToBaseUnits("AUD") 
   AUD2016 = MiningEquipmentPriceIndex.IndexedPrice(1.0,2016,2018) * theUnitManager.ConvertToBaseUnits("AUD") 
  
   
   
   powerCosts[distanceToPower > 190] =  925000*AUD2014
   
   powerCosts[ np.logical_and(distanceToPower <= 190,distanceToPower > 150)  ] = 300000*AUD2014
   
   powerCosts[ np.logical_and(distanceToPower <= 150,distanceToPower > 1)  ] = 300000*AUD2010
   
   powerCosts[distanceToPower <= 1] =  75000*AUD2010
   
   powerCosts *= distanceToPower
   
         
   if(self.calculateDiesel):
     AUD2018 = MiningEquipmentPriceIndex.IndexedPrice(1.0,2018,2018) * theUnitManager.ConvertToBaseUnits("AUD") 
     dieselLCOE = 350*AUD2016   # Renewable energy in Australian mining sector estimate
     retailCOE = 100*AUD2018
     dieselCosts = problemManager.theMineDataManager.theProcessingSystem.processingPower*( dieselLCOE - retailCOE)
     dieselNPC = problemManager.theMineDataManager.theEconomicDataManager.CalculateNPV(dieselCosts)
     powerCosts[ powerCosts > dieselNPC ] = dieselNPC
 
     
   
   return powerCosts
    def CalculateMineCapacityFromMass(self, orebodyMass):
        """
      Determine the maximum annual extraction for the mine using Taylor's rule from orebodyMass given in tonnes. 
      """
        theUnitManager = UnitManager()

        #orebodyMass =  mineManager.theOreBody.CalculateDepositMass()*theUnitManager.ConvertTo("tonne")

        theFunctionManager = FunctionManager()

        if (self.miningMethod == "OCUG"):
            taylorsRuleFunc = theFunctionManager.GetFunction(
                "TaylorsRule_" + self.miningMethod[:2])
        else:
            taylorsRuleFunc = theFunctionManager.GetFunction("TaylorsRule_" +
                                                             self.miningMethod)
        daysPerYear = 350
        #Todo("Check operating days per year - assuming 350 days")
        mineProductionCapacity = daysPerYear * taylorsRuleFunc.f(
            [orebodyMass]) * theUnitManager.ConvertToBaseUnits("tonne")

        #self.mineOreProductionCapacity = self.mineCapacity
        #print "Mine ore capacity from Taylor's rule in Mt/year", self.mineCapacity* theUnitManager.ConvertTo("1e6 tonne")
        #print "Mine ore capacity from Taylor's rule in Mt/day", self.mineCapacity* theUnitManager.ConvertTo("1e6 tonne")/350.

        return mineProductionCapacity
Example #15
0
    def CalculateWaterExpenses(self, problemManager, mineDataManager):
      """ 
      Calculate water startup infrastructure costs - ongoing costs are assumed included in the mine and processing cost models
      """
      numYears = mineDataManager.theMiningSystem.mineLife
      
      theUnitManager = UnitManager()
      processingCapacity = mineDataManager.theProcessingSystem.processingCapacity*  theUnitManager.ConvertTo("tonne")  # tonnes per year
      
      v = 2.0   # 2 m/s flow rate 
      q = 2.35* processingCapacity # in kL/year assumes 2.35 kL water per tonne 
      sPerYear = 365*24*3600
      diam = np.sqrt( 4* q/ ( np.pi * sPerYear * v) )
      
      distanceScale=  2.6229e6*diam - 125528   # empirical fit to cost of pipeline data per km in 2018 AUD
      
      oneKm = theUnitManager.ConvertToBaseUnits("km")
      
      self.waterCapex = np.zeros(numYears)  

      
      self.waterCapex[0] =  distanceScale*self.distanceToWater/oneKm
      
      #Water Opex not explicitly accounted for as included in mine and processing opex
      self.waterOpex = np.zeros(numYears)
    def CalculateRegionalPowerExpenses(self, problemManager, distanceToPower):
        """ Calculate power transmission infrastructure costs."""

        # distanceToPower is assumed given in km

        theUnitManager = UnitManager()
        powerCosts = np.zeros(distanceToPower.shape)

        if (self.includePowerInfrastructureCosts):
            AUD2010 = MiningEquipmentPriceIndex.IndexedPrice(
                1.0, 2010, 2018) * theUnitManager.ConvertToBaseUnits(
                    "AUD")  #in today's dollars
            AUD2014 = MiningEquipmentPriceIndex.IndexedPrice(
                1.0, 2014, 2018) * theUnitManager.ConvertToBaseUnits("AUD")
            AUD2016 = MiningEquipmentPriceIndex.IndexedPrice(
                1.0, 2016, 2018) * theUnitManager.ConvertToBaseUnits("AUD")

            powerCosts[distanceToPower > 190] = 925000 * AUD2014

            powerCosts[np.logical_and(
                distanceToPower <= 190,
                distanceToPower > 150)] = 650000 * AUD2014

            powerCosts[np.logical_and(distanceToPower <= 150,
                                      distanceToPower > 1)] = 300000 * AUD2010

            powerCosts[distanceToPower <= 1] = 75000 * AUD2010

            powerCosts *= distanceToPower

        return powerCosts
    def CalculateMineLife(self, mineManager):
        """
      Determine the life of the mine
      """
        # NB - Taylor's rule may need to be tweaked for open cut
        #    - original tracks amount of ore produced (based on processing cost)
        #    - therefore assume that mine material moved is sufficient to meet this on average

        # Current calculation - calculate break even SR based on Open cut capacity
        #                     - determine depth where break even SR is reached
        #                     - mine to depth at open cut capacity based on average SR to reach that depth
        #                     - continue ug mining at processing capacity

        self.orebodyMass = mineManager.theOreBody.CalculateDepositMass()

        self.mineLife = self.orebodyMass / (
            self.mineOreProductionCapacity + 1e-64
        )  # rampup/rampdown are not accounted for
        self.mineLife = int(np.ceil(self.mineLife))  # round up to years

        theUnitManager = UnitManager()

        orebodyMass = mineManager.theOreBody.CalculateDepositMass(
        ) * theUnitManager.ConvertTo("tonne")
        print("orebodyMass in 1e6 tonne", orebodyMass / 1e6)

        # undergound
        rampLength = mineManager.theOreBody.cover * (
            1. + 1. / self.rampGrade**2)**0.5
        rampVolume = 25 * theUnitManager.ConvertToBaseUnits("m^2") * rampLength

        # opencut
        if (self.miningMethod[:2] == "OC"):
            w = mineManager.theOreBody.width
            l = mineManager.theOreBody.length
            d = mineManager.theOreBody.cover
            rampVolume = self.OpenPitExcavatedVolume(w, l, 0, d, self.alpha)

        overburdenDensity = mineManager.theOreBody.specificDensity * 1000 * theUnitManager.ConvertToBaseUnits(
            "kg/m^3")
        self.actualMineStartupTime = (overburdenDensity *
                                      rampVolume) / (self.mineCapacity + 1e-64)

        if (self.miningMethod == "K2SO4"):
            self.actualMineStartupTime = 1  # assume 1 year startup for brine

        self.mineStartupTime = np.max(
            [int(np.ceil(self.actualMineStartupTime)), 1])  # round up to years

        self.mineLife += self.mineStartupTime

        self.miningCapex = np.zeros(self.mineLife)
        self.miningOpex = np.zeros(self.mineLife)
        self.depths = np.zeros(self.mineLife)

        #print "mineLife", self.mineLife
        #print "mineStartupTime", self.mineStartupTime

        return self.mineLife
Example #18
0
 def CalculateDepositVolume(self):
     """
   Calculate volume of ore given the mass
   """
     theUnitManager = UnitManager()
     waterDensity = theUnitManager.ConvertToBaseUnits(
         "1000 kg/m^3")  # water density in base units
     self.orebodyVolume = self.orebodyMass / (self.specificDensity *
                                              waterDensity)
Example #19
0
    def RoadConstructionCapex(self, distance):
        # nb fleet costs are also required
        CovertTo2018Price = MiningEquipmentPriceIndex.IndexedPrice(
            1.0, 2010, 2018)

        theUnitManager = UnitManager()
        thousandAUDPerkm = 1000. * theUnitManager.ConvertToBaseUnits("AUD/km")
        cost = distance * 1750. * CovertTo2018Price * thousandAUDPerkm
        return cost
Example #20
0
    def CalculateWaterUsePerYear(self, problemManager):
        """Calculate average water use."""
        theUnitManager = UnitManager()
        processingCapacityInTonne = problemManager.theMineDataManager.theProcessingSystem.processingCapacity * theUnitManager.ConvertTo(
            "tonne")  # tonnes per year

        q = 2.35 * processingCapacityInTonne  # in kL/year assumes 2.35 kL water per tonne
        q *= theUnitManager.ConvertToBaseUnits(
            "kL")  # should be 1:1 in most cases
        return q
Example #21
0
    def CalculateDepositMass(self):
        """
      Calculate mass of ore 
      """
        theUnitManager = UnitManager()
        waterDensity = theUnitManager.ConvertToBaseUnits(
            "1000 kg/m^3")  # water density in base units
        self.orebodyVolume = self.shapeFactor * self.length * self.width * self.height
        self.orebodyMass = self.orebodyVolume * self.specificDensity * waterDensity

        # print "orebody mass in kg", self.orebodyMass # in kg
        return self.orebodyMass
    def DetermineMiningSystem(self, problemManager, mineManager):
        """
      Use available data to determine the most likely mining method/capacity/opex etc.
      """

        flatPlunge = 20 * np.pi / 180.
        steepPlunge = 55 * np.pi / 180.

        theUnitManager = UnitManager()
        narrowWidth = theUnitManager.ConvertToBaseUnits("10m")
        thickWidth = theUnitManager.ConvertToBaseUnits("30m")

        # Thick > 30 m
        # Intermediate 10-30m
        # Narrow < 10 m

        # Plunge
        # Flat < 20 degrees
        # Intermediate  20-55 degrees
        # Steep > 55 degrees

        doUnderground = self.miningMethod == "UG"
        print("doUnderground", doUnderground)

        print("mineManager.theOreBody.dip", mineManager.theOreBody.dip)
        if (doUnderground):
            if (mineManager.theOreBody.dip < flatPlunge
                ):  # see selection process for hard rock mining by Carter
                self.miningMethod = "UG_RP"
                # Room and pilar
                # "Typically flat and tabular"
            elif (mineManager.theOreBody.width < narrowWidth):
                # Cut and fill
                self.miningMethod = "UG_CF"

            elif (mineManager.theOreBody.dip > steepPlunge
                  and mineManager.theOreBody.width > thickWidth
                  and mineManager.theOreBody.height >
                  mineManager.theOreBody.width):
                # Block cave
                self.miningMethod = "UG_BC"
            else:
                # Stoping
                self.miningMethod = "UG_ST"

        self.CalculateMineCapacity(problemManager, mineManager)
        self.CalculateMineLife(mineManager)
        self.CalculateOreMined(mineManager)

        self.CalculateMiningCapex(mineManager)
        self.CalculateMiningOpex(mineManager)

        return self
Example #23
0
    def RoadTransportOpex(self, distance, mass):
        CovertTo2018Price = MiningEquipmentPriceIndex.IndexedPrice(
            1.0, 2010, 2018)

        theUnitManager = UnitManager()

        # 8.5 cents per km
        centsPerTonnePerKm = 0.01 * theUnitManager.ConvertToBaseUnits(
            "AUD/tonne/km")
        cost = distance* mass * \
                            8.5* CovertTo2018Price* centsPerTonnePerKm
        return cost
 def FindOPMarginalOreCostAtDepth(self, oreProductionRate, w, l, d, newD,
                                  alpha, materialCostFunc):
     """
   Find marginal cost at depth per unit ore from a material cost function based on the mine capacity in terms of total material mined
   """
     totalCapacity = self.RequiredTotalCapacity(oreProductionRate, w, l, d,
                                                newD, alpha)
     theUnitManager = UnitManager()
     costAtDepthPerUnitMaterial = materialCostFunc.f(
         [totalCapacity * theUnitManager.ConvertTo("1e6 tonne")])
     marginalcostAtDepth = self.MarginalCostAtDepthPerUnitOre(
         costAtDepthPerUnitMaterial, w, l, newD, alpha)
     return marginalcostAtDepth
Example #25
0
def GetAttributeVector(node,attribute):
  """ Returns vector valued attribute (containing comma separated values)."""
  
  theString = GetAttributeString(node,attribute)
  theUnitManager = UnitManager()
  rv = []
  for x in theString.split(","): # Allow paths to be passed to sensitivity calculations
    if ('.npy' in x) or ('.txt' in x):
      rv.append(x)
    else:
      rv.append(theUnitManager.ConvertToBaseUnits(x))
  # rv = [theUnitManager.ConvertToBaseUnits(x) for x in theString.split(",")]
  return rv
Example #26
0
 def CalculateOpex(self, hydrogenManager):
   """Calculate opex costs for energy storage facility."""
   
   theFunctionManager =  FunctionManager()
   theUnitManager = UnitManager()
   
   opexFunc = theFunctionManager.GetFunction("StorageOpex_" + self.type)
   
   # opex Per MWh stored as a function of output capacity in MW
   opexPerMWh =  opexFunc.f( [self.storageOutputCapacity *theUnitManager.ConvertTo("MW")] )
   self.opex = opexPerMWh*self.energyStored*theUnitManager.ConvertTo("MWh")
   
   return self.opex
    def CalculateMineLife(self, mineManager):
        """
      Determine the life of the mine
      """

        self.orebodyMass = mineManager.theOreBody.CalculateDepositMass()

        self.mineLife = self.orebodyMass / (
            self.mineOreProductionCapacity + 1e-64
        )  # rampup/rampdown are not accounted for
        self.mineLife = int(np.ceil(self.mineLife))  # round up to years

        theUnitManager = UnitManager()

        orebodyMass = mineManager.theOreBody.CalculateDepositMass(
        ) * theUnitManager.ConvertTo("tonne")
        print("orebodyMass in 1e6 tonne", orebodyMass / 1e6)

        # undergound
        rampLength = mineManager.theOreBody.cover * (
            1. + 1. / self.rampGrade**2)**0.5
        rampVolume = 25 * theUnitManager.ConvertToBaseUnits("m^2") * rampLength

        # opencut
        if (self.miningMethod[:2] == "OC"):
            w = mineManager.theOreBody.width
            l = mineManager.theOreBody.length
            d = mineManager.theOreBody.cover
            rampVolume = self.OpenPitExcavatedVolume(w, l, 0, d, self.alpha)

        overburdenDensity = mineManager.theOreBody.specificDensity * 1000 * theUnitManager.ConvertToBaseUnits(
            "kg/m^3")
        self.actualMineStartupTime = (overburdenDensity *
                                      rampVolume) / (self.mineCapacity + 1e-64)

        self.mineStartupTime = np.max(
            [int(np.ceil(self.actualMineStartupTime)), 1])  # round up to years

        self.mineLife += self.mineStartupTime

        self.miningCapex = np.zeros(self.mineLife)
        self.miningOpex = np.zeros(self.mineLife)
        self.depths = np.zeros(self.mineLife)

        print("mineLife", self.mineLife)
        print("mineStartupTime", self.mineStartupTime)

        return self.mineLife
Example #28
0
    def CalculateCapex(self, hydrogenManager):
        """ Calculate hydrogen plant startup costs. NB all costs are assumed capitalized."""

        self.capex = np.zeros(self.projectLife)

        theFunctionManager = FunctionManager()
        theUnitManager = UnitManager()

        capexFunc = theFunctionManager.GetFunction("HydrogenCapex_" +
                                                   self.type)

        self.capex[0] = capexFunc.f([
            self.hydrogenPlantCapacity * theUnitManager.ConvertTo("1e6 tonne")
        ])

        return self.capex
Example #29
0
    def CalculateHydrogenProduced(self, hydrogenManager):
        """ Calculate hydrogen production over plant lifetime and estimate associated water and energy requirements."""

        self.hydrogenProduced = np.zeros(self.projectLife)

        theUnitManager = UnitManager()
        liters = theUnitManager.ConvertToBaseUnits(
            "L")  # will convert water to kL (m^3)

        self.hydrogenProduced[
            int(self.startupTime
                ):] = self.hydrogenProductionCapacity  #constant in all years
        self.energyUse = self.hydrogenProduced * self.energyPerKgH2
        self.waterUse = self.hydrogenProduced * liters * self.waterPerKgH2

        return self.hydrogenProduced
Example #30
0
    def CalculateProcessingCapex(self, problemManager, mineDataManager):

        self.processingCapex = np.zeros(
            mineDataManager.theMiningSystem.mineLife)

        theFunctionManager = FunctionManager()

        processingCapexFunc = theFunctionManager.GetFunction(
            "ProcessingCapex_" + self.processingMethod)

        theUnitManager = UnitManager()
        self.processingCapex[0] = processingCapexFunc.f(
            [self.processingCapacity * theUnitManager.ConvertTo("1e6 tonne")])
        print "Processing Capex ", self.processingCapex[0]

        return self.processingCapex