# Running Sensitivities

Applies to these phases: grid, grid, pdp2

Configure the sensitivity_features section to make well predicitions at varying feature values. sensitivity_features has two sections: sampled_features and linked_features.

# Sampled Features

Sampled Features define the column(s) that you want to vary. Input values for feature (column name), low value, high value, and step size. The feature name must exactly match a column name in the INV_well_features table, either from the core schema or added using well_feature_transformations described above.

Example proppant sensitivity with values 1500, 2000, and 2500 lb/ft:

"sampled_features": [
    {
        "feature": "totalProppantByPerfLength",
        "low": 1500,
        "high": 3000,
        "step": 500
    }
]

# Linked Features

Some features need to be computed dynamically from existing columns using expressions in the linked_features block. linked_features will over-write values generated in the well_features_transformations section.

Example: Linking fluid to proppant.

"linked_features": [
    {
        "feature": "totalFluidByPerfLength",
        "value_expr": "row['totalProppantByPerfLength']"
    }
]

Example: Calculating proppant concentration.

"linked_features": [
    {
        "feature": "prop_conc_lb_gal",
        "value_expr": "row['totalProppantByPerfLength']/row['totalFluidByPerfLength']"
    }
]

# Completion Sensitivities - 1:1 Proppant/Fluid Ratio

Applies to these phases: grid, grid, pdp2

To simulate sensitivities where proppant and fluid are varied together at a 1:1 ratio:

"well_features_transformations": [
    {
    "type": "add_uniform_value_column",
    "column_name": "totalProppantByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    },
    {
    "type": "add_uniform_value_column",
    "column_name": "totalFluidByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    }
],
"sensitivity_features": {
  "sampled_features": [
    {
      "feature": "totalProppantByPerfLength",
      "low": 2500,
      "high": 3000,
      "step": 500
    }
  ],
  "linked_features": [
    {
      "feature": "totalFluidByPerfLength",
      "value_expr": "row['totalProppantByPerfLength']"
    }
  ]
}

# Completion Sensitivities - Fixed Ratio

Applies to these phases: grid, grid, pdp2

To simulate sensitivities with fixed proppant/fluid ratios:

"well_features_transformations": [
    {
    "type": "add_uniform_value_column",
    "column_name": "totalProppantByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    },
    {
    "type": "add_uniform_value_column",
    "column_name": "totalFluidByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    }
],
"sensitivity_features": {
    "sampled_features": [
    {
        "feature": "totalProppantByPerfLength",
        "low": 2000,
        "high": 4000,
        "step": 500
    }
    ],
    "linked_features": [
    {
        "feature": "totalFluidByPerfLength",
        "value_expr": "row['totalProppantByPerfLength'] * 1.2"
    }
    ]
}

# Completion Sensitivities - Varying Ratios

Applies to these phases: grid, grid, pdp2

To simulate sensitivities with varying proppant and proppant/fluid ratios, create variants for both proppant (or fluid), and proppant (or fluid) concentration:

"well_features_transformations": [
    {
    "type": "add_uniform_value_column",
    "column_name": "totalProppantByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    },
    {
    "type": "add_uniform_value_column",
    "column_name": "totalFluidByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    },
    {
    "type": "add_uniform_value_column",
    "column_name": "prop_conc_lb_gal",
    "column_dtype": "float",
    "column_value": 1.0,
    "overwrite": true
    }
],
"sensitivity_features": {
    "sampled_features": [
    {
        "feature": "totalProppantByPerfLength",
        "low": 2000,
        "high": 3000,
        "step": 500
    },
    {
        "feature": "prop_conc_lb_gal",
        "low": 0.8,
        "high": 1.2,
        "step": 0.1
    }
    ],
    "linked_features": [
    {
        "feature": "totalFluidByPerfLength",
        "value_expr": "row['totalProppantByPerfLength'] / row['prop_conc_lb_gal']"
    }
    ]
}

# Completion Sensitivities - Proppant Concentration Feature

Models will often use a proppant concentration feature. If so, this column can be added as a fixed value as shown above, or computed in the linked_features section. Be sure to use the exact name expected by the model.

Example configuration:

"well_features_transformations": [
    {
    "type": "add_uniform_value_column",
    "column_name": "prop_conc_lb_gal",
    "column_dtype": "float",
    "column_value": 1.0,
    "overwrite": true
    },
    {
    "type": "add_uniform_value_column",
    "column_name": "totalProppantByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    },
    {
    "type": "add_uniform_value_column",
    "column_name": "totalFluidByPerfLength",
    "column_dtype": "float",
    "column_value": 2500,
    "overwrite": true
    }
],
"sensitivity_features": {
    "sampled_features": [
    {
        "feature": "totalProppantByPerfLength",
        "low": 2000,
        "high": 3000,
        "step": 500
    },
    {
        "feature": "totalFluidByPerfLength",
        "low": 2000,
        "high": 3000,
        "step": 500
    }
    ],
    "linked_features": [
    {
        "feature": "prop_conc_lb_gal",
        "value_expr": "row['totalProppantByPerfLength']/row['totalFluidByPerfLength']"
    }
    ]
}