Ejemplo n.º 1
0
    def __init__(self, simulation_time, gas_field, **kwargs):
        """
        Inputs:
              gas_field    a gas_field object (Defined in feast_classes)
              time         a time object (Defined in feast_classes)
              kwargs       optional input dictionary that will override default parameters
        """
        DetectionMethod.__init__(self, simulation_time, gas_field)
        # The null repair rate defaults to the same setting as the gas field, but can be set to a
        # different value.
        self.name = "Null"
        self.repair_rate = gas_field.null_repair_rate

        # -------------- Process details: None --------------
        self.survey_interval = 1
        # -------------- Financial Properties --------------
        # Capital costs are zero in this module.
        self.capital = [0] * simulation_time.n_timesteps  # dollars

        # maintenance costs are zero in the null module
        self.maintenance = [0] * simulation_time.n_timesteps  # $

        # Find cost is zero in the null module
        self.find_cost = [0] * simulation_time.n_timesteps  # $

        # Set attributes defined by kwargs. Only set attributes that already exist.
        set_kwargs_attrs(self, kwargs, only_existing=True)
Ejemplo n.º 2
0
    def __init__(self, time, gas_field, **kwargs):
        """ Inputs:
       gas_field    a gas_field object (Defined in feast_classes)
       time         a time object (Defined in feast_classes)
       kwargs       optional input dicitionary that will override default parameters
        """
        DetectionMethod.__init__(self, time, gas_field)
        # -------------- Hardware properties --------------
        # Sensitivity is the trigger sensitivity for the sniffer
        self.sensitivity = .01  # g/m^3 (multiply by 1500 to get ppm)
        # x, y, and z define the positions of the sensors
        # x is distance East from the center of the well pad
        # y is distance North from the center of the well pad
        self.x = [-3.5, 0, 3.5, 0]
        self.y = [-10, -10, -10, 10]
        self.z = [2, 3, 4, 4]
        self.lifetime = 5 * 365  # days

        # -------------- Process variables --------------
        self.repair_interval = 50  # days
        self.survey_speed = 500  # component/person-hour
        self.drive_speed = 15  # m/s
        self.setup_time = 0.5  # hours
        self.work_time = 5  # hours/day on average...5 hours per day on average corresponds to 35 hours per week.

        # -------------- Financial --------------
        self.sniffer_cost = 500  # $ per sniffer
        self.camera_capital = 90000  # $
        self.truck_capital = 30000  # $
        self.labor = 100  # $/hour
        self.maintenance_factor = 0.1

        # -------------- Override default parameters with kwargs --------------
        set_kwargs_attrs(self, kwargs)

        # Calculated parameters
        self.n_sniff = len(self.x)  # sniffers per well
        self.sniffer_capital = self.sniffer_cost * self.n_sniff  # $ per well
        self.location_time = (
            gas_field.components_per_site / self.survey_speed / self.n_sniff +
            gas_field.site_spacing / self.drive_speed / 3600 +
            self.setup_time) / self.n_sniff  # hours to locate one leak
        self.time_factor = self.location_time * gas_field.site_count / (
            self.repair_interval * self.work_time)
        self.capital_0 = self.sniffer_capital * gas_field.site_count + self.time_factor * (
            self.camera_capital + self.truck_capital)  # $
        self.maintenance0 = self.capital_0 * self.maintenance_factor
        self.maintenance = [self.maintenance0 * time.delta_t / 365
                            ] * time.n_timesteps  # $/year
        self.location_cost = self.labor * self.location_time  # $/leak

        #  Calculate capital costs vector
        self.capital = np.zeros(time.n_timesteps)  # dollars
        helper_functions.replacement_cap(time, self)

        #  The finding np.costs must be calculated as leaks are found. The vector is
        #  initialized here.
        self.find_cost = [0] * time.n_timesteps
Ejemplo n.º 3
0
 def detection(self, time, gas_field, atm):
     """
     The null detection method is simply the null detection method defined in the super class DetectionMethod
     Inputs:
         time        an object of type Time (defined in feast_classes)
         gas_field   an object of type GasField (defined in feast_classes)
         atm         an object of type Atmosphere (defined in feast_classes)
                     Note: atm is not currently used by this method, but it is accepted as an argument for
                     consistency with other detection methods
     """
     DetectionMethod.null_detection(self, time, gas_field)
Ejemplo n.º 4
0
    def __init__(self, time, gas_field, **kwargs):
        """
        Inputs:
              time         a time object (Defined in feast_classes)
              gas_field    a gas_field object (Defined in feast_classes)
              kwargs       optional input dictionary that will override default parameters

        """
        DetectionMethod.__init__(self, time, gas_field)
        # -------------- Hardware variables --------------
        self.lifetime = 10 * 365  # days

        # -------------- Process Variables --------------
        self.survey_interval = 100  # days
        self.survey_speed = 150  # components/person-hour
        self.drive_speed = 15  # m/s
        self.setup_time = 0.1  # hours
        self.work_time = 5  # hours/day on average...5 hours per day on average corresponds to 35 hours per week.
        self.labor = 100  # dollars/hour

        set_kwargs_attrs(self, kwargs)
        # -------------- Set calculated parameters --------------
        self.survey_time = (gas_field.components_per_site / self.survey_speed +
                            gas_field.site_spacing / self.drive_speed / 3600 +
                            self.setup_time)  # hours
        # time_factor accounts for the finite simulation size. The effective capital cost is
        # reduced in the simulation based on the ratio of the wells in the
        # simulation to the number of wells that a single FID could survey.
        self.time_factor = self.survey_time * gas_field.site_count / (
            self.survey_interval * self.work_time)

        # -------------- Financial Properties --------------
        self.capital_0 = 35000 * self.time_factor  # dollars (covers 5k for FID and 30k for truck)
        self.maintenance_0 = self.capital_0 * 0.1  # dollars/year

        self.capital = np.zeros(time.n_timesteps)
        helper_functions.replacement_cap(time, self)

        # maintenance costs are estimated as 10% of capital per year
        self.maintenance = [
            self.maintenance_0 * time.delta_t / 365,
        ] * time.n_timesteps  # $

        # survey_cost is the cost to survey all wells in the natural gas field
        self.survey_cost = self.labor * gas_field.site_count * self.survey_time

        # find_cost is the cost of searching for leaks
        for ind in range(0, time.n_timesteps):
            curr_time = ind * time.delta_t
            if curr_time % self.survey_interval < time.delta_t:
                self.find_cost[ind] = self.survey_cost
Ejemplo n.º 5
0
    def detection(self, simulation_time, gas_field, atm):
        """
        The null detection method is simply the null detection method defined in the super class
        DetectionMethod
        Inputs:
            simulation_time        an object of type Time (defined in feast_classes) containing
                        the relevant current time and stepping information for the overall sim

            gas_field   an object of type GasField (defined in feast_classes)
            atm         an object of type Atmosphere (defined in feast_classes)
                        Note: atm is not currently used by this method, but it is accepted as an
                        argument for consistency with other detection methods
        """
        if simulation_time.current_time % self.survey_interval < simulation_time.delta_t:
            DetectionMethod.null_detection(self, simulation_time, gas_field)