Пример #1
0
static double ecl_subsidence_survey_eval( const ecl_subsidence_survey_type * base_survey ,
                                          const ecl_subsidence_survey_type * monitor_survey,
                                          ecl_region_type * region ,
                                          double utm_x , double utm_y , double depth,
                                          double compressibility, double poisson_ratio) {

  const ecl_grid_cache_type * grid_cache = base_survey->grid_cache;
  const int size  = ecl_grid_cache_get_size( grid_cache );
  double * weight = util_calloc( size , sizeof * weight );
  double deltaz;
  int index;

  if (monitor_survey != NULL) {
    for (index = 0; index < size; index++)
      weight[index] = base_survey->porv[index] * (base_survey->pressure[index] - monitor_survey->pressure[index]);
  } else {
    for (index = 0; index < size; index++)
      weight[index] = base_survey->porv[index] * base_survey->pressure[index];
  }

  deltaz = compressibility * 31.83099*(1-poisson_ratio) *
    ecl_grav_common_eval_biot_savart( grid_cache , region , base_survey->aquifer_cell , weight , utm_x , utm_y , depth );

  free( weight );
  return deltaz;
}
Пример #2
0
static double ecl_grav_phase_eval( ecl_grav_phase_type * base_phase , 
                                   const ecl_grav_phase_type * monitor_phase,
                                   ecl_region_type * region , 
                                   double utm_x , double utm_y , double depth) {

  ecl_grav_phase_ensure_work( base_phase );
  if ((monitor_phase == NULL) || (base_phase->phase == monitor_phase->phase)) {
    const ecl_grid_cache_type * grid_cache = base_phase->grid_cache;
    const bool   * aquifer   = base_phase->aquifer_cell;
    double * mass_diff       = base_phase->work;
    double deltag;
    /* 
       Initialize a work array to contain the difference in mass for
       every cell.
    */
    {
      int index;
      if (monitor_phase == NULL) {
        for (index = 0; index < ecl_grid_cache_get_size( grid_cache ); index++)
          mass_diff[index] = - base_phase->fluid_mass[index];
      } else {
        for (index = 0; index < ecl_grid_cache_get_size( grid_cache ); index++)
          mass_diff[index] = monitor_phase->fluid_mass[index] - base_phase->fluid_mass[index];
      }
    }
      
    /**
       The Gravitational constant is 6.67E-11 N (m/kg)^2, we
       return the result in microGal, i.e. we scale with 10^2 * 
       10^6 => 6.67E-3.
    */
    deltag = 6.67428E-3 * ecl_grav_common_eval_biot_savart( grid_cache , region , aquifer , mass_diff , utm_x , utm_y , depth);
    
    return deltag;
  } else {
    util_abort("%s comparing different phases ... \n",__func__);
    return -1;
  }
}