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 dicitionary that will override default parameters
        """
        super().__init__(simulation_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 ~= 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 * simulation_time.delta_t / 365
                            ] * simulation_time.n_timesteps  # $/year
        self.location_cost = self.labor * self.location_time  # $/leak

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

        #  The finding np.costs must be calculated as leaks are found. The vector is
        #  initialized here.
        self.find_cost = [0] * simulation_time.n_timesteps
Ejemplo n.º 2
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.º 3
0
    def __init__(self, simulation_time, gas_field, **kwargs):
        """
        AD is the model of how an airborne detector detects leaks.
        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
        """
        super().__init__(simulation_time, gas_field)
        # -------------- LeakSurveyor default properties ---------------------
        # Detection
        self.name = "AD"
        # Some generic detection probabilities, to be replaced with actual model
        # used only in the "legacy" mode.
        self.detection_sizes = np.array([0, 1, 2, 3, 4, 1000]) * mcfpd_to_gps
        self.detection_prob = np.array([0, 0.5, 0.75, 0.9, 0.99, 1])
        self.detection_sizes = np.sort(self.detection_sizes)
        self.detection_prob = np.sort(self.detection_prob)
        # Survey
        self.survey_interval = 30  # days
        # Money
        self.lifetime = 10 * 365

        # Detection probability models
        self.detection_models = {
            "exponential": self.get_exp_probabilities,
            "legacy": self.get_legacy_probabilities,
            "exp_erf": self.get_exp_erf_probabilities
        }
        if "detection_model_name" not in kwargs:
            kwargs.update({"detection_model_name": "legacy"})
        if "inst_params" not in kwargs:
            kwargs.update({"inst_params": {}})

        self.inst_params_index = None
        self.survey_interval_index = None
        # -------------- Override default parameters with kwargs --------------
        set_kwargs_attrs(self, kwargs, only_existing=False)

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

        #  The finding np.costs must be calculated as leaks are found. The vector is
        #  initialized here.
        self.find_cost = [0] * simulation_time.n_timesteps
Ejemplo n.º 4
0
    def __init__(self, simulation_time, gas_field, **kwargs):
        """
        HY is a hybrid model including an airborne detector and an ogi, used together on
        different revisit frequencies.
        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
        """
        super().__init__(simulation_time, gas_field)
        # -------------- LeakSurveyor default properties ---------------------
        # Detection
        self.name = "HY"
        # Survey
        self.ad_survey_interval = 90  # days
        self.ogi_survey_interval = 730  # days
        self.ogi_distance = 10  # m
        # Money
        self.lifetime = 10 * 365

        # Detection probability models
        if "detection_model_name" not in kwargs:
            kwargs.update({"detection_model_name": "legacy"})
        if "inst_params" not in kwargs:
            kwargs.update({"inst_params": {}})

        self.inst_params_index = None
        self.survey_interval_index = None
        # -------------- Override default parameters with kwargs --------------
        set_kwargs_attrs(self, kwargs, only_existing=False)

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

        #  The finding np.costs must be calculated as leaks are found. The vector is
        #  initialized here.
        self.find_cost = [0] * simulation_time.n_timesteps