| 1 | package App::SeismicUnixGui::sunix::well::subackus; | ||
| 2 | |||
| 3 | =head2 SYNOPSIS | ||
| 4 | |||
| 5 | PERL PROGRAM NAME: | ||
| 6 | |||
| 7 | AUTHOR: Juan Lorenzo (Perl module only) | ||
| 8 | |||
| 9 | DATE: | ||
| 10 | |||
| 11 | DESCRIPTION: | ||
| 12 | |||
| 13 | Version: | ||
| 14 | |||
| 15 | =head2 USE | ||
| 16 | |||
| 17 | =head3 NOTES | ||
| 18 | |||
| 19 | =head4 Examples | ||
| 20 | |||
| 21 | =head2 SYNOPSIS | ||
| 22 | |||
| 23 | =head3 SEISMIC UNIX NOTES | ||
| 24 | SUBACKUS - calculate Thomsen anisotropy parameters from | ||
| 25 | |||
| 26 | well log (vp,vs,rho) data via BACKUS averaging | ||
| 27 | |||
| 28 | |||
| 29 | |||
| 30 | subackus < vp_vs_rho.su >stdout [options] | ||
| 31 | |||
| 32 | |||
| 33 | |||
| 34 | Required parameters: | ||
| 35 | |||
| 36 | none | ||
| 37 | |||
| 38 | |||
| 39 | |||
| 40 | Optional parameter: | ||
| 41 | |||
| 42 | navg=201 number of depth samples in Backus avg window | ||
| 43 | |||
| 44 | all=0 =1 to output extra parameters | ||
| 45 | |||
| 46 | (<vp0>,<vs0>,<rho>,eta,vang,a,f,c,l,A,B,<lam>,<mu>) | ||
| 47 | |||
| 48 | ang=30 angle (deg) for use in vang | ||
| 49 | |||
| 50 | |||
| 51 | |||
| 52 | Notes: | ||
| 53 | |||
| 54 | 1. Input are (vp,vs,rho) traces in metric units | ||
| 55 | |||
| 56 | 2. Output are (epsilon,delta,gamma) dimensionless traces | ||
| 57 | |||
| 58 | tracl=(1,2,3)=(epsilon,delta,gamma) | ||
| 59 | |||
| 60 | (all=1 output optional traces listed below) | ||
| 61 | |||
| 62 | tracl=(4,5,6,7,8)=(vp0,vs0,<rho>,eta,vang) | ||
| 63 | |||
| 64 | tracl=(9,10,11,12)=(a,f,c,l)=(c11,c13,c33,c44) backus avg'd | ||
| 65 | |||
| 66 | tracl=(13,14)=(<lam/lamp2mu>^2,4<mu*lampmu/lamp2mu>)=(A,B) | ||
| 67 | |||
| 68 | used to analyze eps=(a-c)/2c; a=c11=A*x+B; c=c33=x | ||
| 69 | |||
| 70 | tracl=(15,16)=(<lambda>,<mu>) | ||
| 71 | |||
| 72 | for fluid analysis (lambda affected by fluid, mu not) | ||
| 73 | |||
| 74 | tracl=(17,18,19)=(vp,vs,rho) orig log values | ||
| 75 | |||
| 76 | tracl=(20)=(m)=(c66) Backus avg'd | ||
| 77 | |||
| 78 | tracl=(21,22,23,24,25)=(a,f,c,l,m)=(c11,c13,c33,c44,c66) orig | ||
| 79 | |||
| 80 | 3. (epsilon,delta,etc.) can be isolated by tracl header field | ||
| 81 | |||
| 82 | 4. (vp0,vs0) are backus averaged vertical wavespeeds | ||
| 83 | |||
| 84 | 5. <rho> is backus averaged density, etc. | ||
| 85 | |||
| 86 | 6. eta = (eps - delta) / (1 + 2 delta) | ||
| 87 | |||
| 88 | 7. vang=vp(ang_deg)/vp0 phase velocity ratio | ||
| 89 | |||
| 90 | The idea being that if vang~vp0 there are small time effects | ||
| 91 | |||
| 92 | (30 deg comes from ~ max ray angle preserved in processing) | ||
| 93 | |||
| 94 | |||
| 95 | |||
| 96 | Example: | ||
| 97 | |||
| 98 | las2su < logs.las nskip=34 nlog=4 > logs.su | ||
| 99 | |||
| 100 | suwind < logs.su key=tracl min=2 max=3 | suop op=s2vm > v.su | ||
| 101 | |||
| 102 | suwind < logs.su key=tracl min=4 max=4 | suop op=d2m > d.su | ||
| 103 | |||
| 104 | fcat v.su d.su > vp_vs_rho.su | ||
| 105 | |||
| 106 | subackus < vp_vs_rho.su > eps_delta_gamma.su | ||
| 107 | |||
| 108 | In this example we start with a well las file containing | ||
| 109 | |||
| 110 | 34 header lines and 4 log tracks (depth,p_son,s_son,den). | ||
| 111 | |||
| 112 | This is converted to su format by las2su. Then we pull off | ||
| 113 | |||
| 114 | the sonic logs and convert them to velocity in metric units. | ||
| 115 | |||
| 116 | Then the density log is pulled off and converted to metric. | ||
| 117 | |||
| 118 | All three metric curves are bundled into one su file which | ||
| 119 | |||
| 120 | is the input to subackus. ", | ||
| 121 | |||
| 122 | |||
| 123 | |||
| 124 | Related codes: sulprime subackush | ||
| 125 | |||
| 126 | |||
| 127 | |||
| 128 | Credits: | ||
| 129 | |||
| 130 | |||
| 131 | |||
| 132 | UHouston: Chris Liner | ||
| 133 | |||
| 134 | I gratefully acknowledge Saudi Aramco for permission | ||
| 135 | |||
| 136 | to release this code developed while I worked for the | ||
| 137 | |||
| 138 | EXPEC-ARC research division. | ||
| 139 | |||
| 140 | References: | ||
| 141 | |||
| 142 | Anisotropy parameters: Thomsen, 2002, DISC Notes (SEG) | ||
| 143 | |||
| 144 | Backus Method: Berryman, Grechka, and Berge, 1997, SEP94 | ||
| 145 | |||
| 146 | |||
| 147 | |||
| 148 | |||
| 149 | |||
| 150 | =head2 User's notes (Juan Lorenzo) | ||
| 151 | untested | ||
| 152 | |||
| 153 | =cut | ||
| 154 | |||
| 155 | |||
| 156 | =head2 CHANGES and their DATES | ||
| 157 | |||
| 158 | =cut | ||
| 159 | |||
| 160 | use Moose; | ||
| 161 | our $VERSION = '0.0.1'; | ||
| 162 | |||
| 163 | |||
| 164 | =head2 Import packages | ||
| 165 | |||
| 166 | =cut | ||
| 167 | |||
| 168 | use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants'; | ||
| 169 | |||
| 170 | use App::SeismicUnixGui::misc::SeismicUnix qw($in $out $on $go $to $suffix_ascii $off $suffix_su $suffix_bin); | ||
| 171 | use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config'; | ||
| 172 | |||
| 173 | |||
| 174 | =head2 instantiation of packages | ||
| 175 | |||
| 176 | =cut | ||
| 177 | |||
| 178 | my $get = L_SU_global_constants->new(); | ||
| 179 | my $Project = Project_config->new(); | ||
| 180 | my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU(); | ||
| 181 | my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN(); | ||
| 182 | my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT(); | ||
| 183 | |||
| 184 | my $var = $get->var(); | ||
| 185 | my $on = $var->{_on}; | ||
| 186 | my $off = $var->{_off}; | ||
| 187 | my $true = $var->{_true}; | ||
| 188 | my $false = $var->{_false}; | ||
| 189 | my $empty_string = $var->{_empty_string}; | ||
| 190 | |||
| 191 | =head2 Encapsulated | ||
| 192 | hash of private variables | ||
| 193 | |||
| 194 | =cut | ||
| 195 | |||
| 196 | my $subackus = { | ||
| 197 | _all => '', | ||
| 198 | _ang => '', | ||
| 199 | _eps => '', | ||
| 200 | _eta => '', | ||
| 201 | _key => '', | ||
| 202 | _navg => '', | ||
| 203 | _nskip => '', | ||
| 204 | _tracl => '', | ||
| 205 | _vang => '', | ||
| 206 | _Step => '', | ||
| 207 | _note => '', | ||
| 208 | |||
| 209 | }; | ||
| 210 | |||
| 211 | =head2 sub Step | ||
| 212 | |||
| 213 | collects switches and assembles bash instructions | ||
| 214 | by adding the program name | ||
| 215 | |||
| 216 | =cut | ||
| 217 | |||
| 218 | sub Step { | ||
| 219 | |||
| 220 | $subackus->{_Step} = 'subackus'.$subackus->{_Step}; | ||
| 221 | return ( $subackus->{_Step} ); | ||
| 222 | |||
| 223 | } | ||
| 224 | |||
| 225 | |||
| 226 | =head2 sub note | ||
| 227 | |||
| 228 | collects switches and assembles bash instructions | ||
| 229 | by adding the program name | ||
| 230 | |||
| 231 | =cut | ||
| 232 | |||
| 233 | sub note { | ||
| 234 | |||
| 235 | $subackus->{_note} = 'subackus'.$subackus->{_note}; | ||
| 236 | return ( $subackus->{_note} ); | ||
| 237 | |||
| 238 | } | ||
| 239 | |||
| 240 | |||
| 241 | |||
| 242 | =head2 sub clear | ||
| 243 | |||
| 244 | =cut | ||
| 245 | |||
| 246 | sub clear { | ||
| 247 | |||
| 248 | $subackus->{_all} = ''; | ||
| 249 | $subackus->{_ang} = ''; | ||
| 250 | $subackus->{_eps} = ''; | ||
| 251 | $subackus->{_eta} = ''; | ||
| 252 | $subackus->{_key} = ''; | ||
| 253 | $subackus->{_navg} = ''; | ||
| 254 | $subackus->{_nskip} = ''; | ||
| 255 | $subackus->{_tracl} = ''; | ||
| 256 | $subackus->{_vang} = ''; | ||
| 257 | $subackus->{_Step} = ''; | ||
| 258 | $subackus->{_note} = ''; | ||
| 259 | } | ||
| 260 | |||
| 261 | |||
| 262 | =head2 sub all | ||
| 263 | |||
| 264 | |||
| 265 | =cut | ||
| 266 | |||
| 267 | sub all { | ||
| 268 | |||
| 269 | my ( $self,$all ) = @_; | ||
| 270 | if ( $all ne $empty_string ) { | ||
| 271 | |||
| 272 | $subackus->{_all} = $all; | ||
| 273 | $subackus->{_note} = $subackus->{_note}.' all='.$subackus->{_all}; | ||
| 274 | $subackus->{_Step} = $subackus->{_Step}.' all='.$subackus->{_all}; | ||
| 275 | |||
| 276 | } else { | ||
| 277 | print("subackus, all, missing all,\n"); | ||
| 278 | } | ||
| 279 | } | ||
| 280 | |||
| 281 | |||
| 282 | =head2 sub ang | ||
| 283 | |||
| 284 | |||
| 285 | =cut | ||
| 286 | |||
| 287 | sub ang { | ||
| 288 | |||
| 289 | my ( $self,$ang ) = @_; | ||
| 290 | if ( $ang ne $empty_string ) { | ||
| 291 | |||
| 292 | $subackus->{_ang} = $ang; | ||
| 293 | $subackus->{_note} = $subackus->{_note}.' ang='.$subackus->{_ang}; | ||
| 294 | $subackus->{_Step} = $subackus->{_Step}.' ang='.$subackus->{_ang}; | ||
| 295 | |||
| 296 | } else { | ||
| 297 | print("subackus, ang, missing ang,\n"); | ||
| 298 | } | ||
| 299 | } | ||
| 300 | |||
| 301 | |||
| 302 | =head2 sub eps | ||
| 303 | |||
| 304 | |||
| 305 | =cut | ||
| 306 | |||
| 307 | sub eps { | ||
| 308 | |||
| 309 | my ( $self,$eps ) = @_; | ||
| 310 | if ( $eps ne $empty_string ) { | ||
| 311 | |||
| 312 | $subackus->{_eps} = $eps; | ||
| 313 | $subackus->{_note} = $subackus->{_note}.' eps='.$subackus->{_eps}; | ||
| 314 | $subackus->{_Step} = $subackus->{_Step}.' eps='.$subackus->{_eps}; | ||
| 315 | |||
| 316 | } else { | ||
| 317 | print("subackus, eps, missing eps,\n"); | ||
| 318 | } | ||
| 319 | } | ||
| 320 | |||
| 321 | |||
| 322 | =head2 sub eta | ||
| 323 | |||
| 324 | |||
| 325 | =cut | ||
| 326 | |||
| 327 | sub eta { | ||
| 328 | |||
| 329 | my ( $self,$eta ) = @_; | ||
| 330 | if ( $eta ne $empty_string ) { | ||
| 331 | |||
| 332 | $subackus->{_eta} = $eta; | ||
| 333 | $subackus->{_note} = $subackus->{_note}.' eta='.$subackus->{_eta}; | ||
| 334 | $subackus->{_Step} = $subackus->{_Step}.' eta='.$subackus->{_eta}; | ||
| 335 | |||
| 336 | } else { | ||
| 337 | print("subackus, eta, missing eta,\n"); | ||
| 338 | } | ||
| 339 | } | ||
| 340 | |||
| 341 | |||
| 342 | =head2 sub key | ||
| 343 | |||
| 344 | |||
| 345 | =cut | ||
| 346 | |||
| 347 | sub key { | ||
| 348 | |||
| 349 | my ( $self,$key ) = @_; | ||
| 350 | if ( $key ne $empty_string ) { | ||
| 351 | |||
| 352 | $subackus->{_key} = $key; | ||
| 353 | $subackus->{_note} = $subackus->{_note}.' key='.$subackus->{_key}; | ||
| 354 | $subackus->{_Step} = $subackus->{_Step}.' key='.$subackus->{_key}; | ||
| 355 | |||
| 356 | } else { | ||
| 357 | print("subackus, key, missing key,\n"); | ||
| 358 | } | ||
| 359 | } | ||
| 360 | |||
| 361 | |||
| 362 | =head2 sub navg | ||
| 363 | |||
| 364 | |||
| 365 | =cut | ||
| 366 | |||
| 367 | sub navg { | ||
| 368 | |||
| 369 | my ( $self,$navg ) = @_; | ||
| 370 | if ( $navg ne $empty_string ) { | ||
| 371 | |||
| 372 | $subackus->{_navg} = $navg; | ||
| 373 | $subackus->{_note} = $subackus->{_note}.' navg='.$subackus->{_navg}; | ||
| 374 | $subackus->{_Step} = $subackus->{_Step}.' navg='.$subackus->{_navg}; | ||
| 375 | |||
| 376 | } else { | ||
| 377 | print("subackus, navg, missing navg,\n"); | ||
| 378 | } | ||
| 379 | } | ||
| 380 | |||
| 381 | |||
| 382 | =head2 sub nskip | ||
| 383 | |||
| 384 | |||
| 385 | =cut | ||
| 386 | |||
| 387 | sub nskip { | ||
| 388 | |||
| 389 | my ( $self,$nskip ) = @_; | ||
| 390 | if ( $nskip ne $empty_string ) { | ||
| 391 | |||
| 392 | $subackus->{_nskip} = $nskip; | ||
| 393 | $subackus->{_note} = $subackus->{_note}.' nskip='.$subackus->{_nskip}; | ||
| 394 | $subackus->{_Step} = $subackus->{_Step}.' nskip='.$subackus->{_nskip}; | ||
| 395 | |||
| 396 | } else { | ||
| 397 | print("subackus, nskip, missing nskip,\n"); | ||
| 398 | } | ||
| 399 | } | ||
| 400 | |||
| 401 | |||
| 402 | =head2 sub tracl | ||
| 403 | |||
| 404 | |||
| 405 | =cut | ||
| 406 | |||
| 407 | sub tracl { | ||
| 408 | |||
| 409 | my ( $self,$tracl ) = @_; | ||
| 410 | if ( $tracl ne $empty_string ) { | ||
| 411 | |||
| 412 | $subackus->{_tracl} = $tracl; | ||
| 413 | $subackus->{_note} = $subackus->{_note}.' tracl='.$subackus->{_tracl}; | ||
| 414 | $subackus->{_Step} = $subackus->{_Step}.' tracl='.$subackus->{_tracl}; | ||
| 415 | |||
| 416 | } else { | ||
| 417 | print("subackus, tracl, missing tracl,\n"); | ||
| 418 | } | ||
| 419 | } | ||
| 420 | |||
| 421 | |||
| 422 | =head2 sub vang | ||
| 423 | |||
| 424 | |||
| 425 | =cut | ||
| 426 | |||
| 427 | sub vang { | ||
| 428 | |||
| 429 | my ( $self,$vang ) = @_; | ||
| 430 | if ( $vang ne $empty_string ) { | ||
| 431 | |||
| 432 | $subackus->{_vang} = $vang; | ||
| 433 | $subackus->{_note} = $subackus->{_note}.' vang='.$subackus->{_vang}; | ||
| 434 | $subackus->{_Step} = $subackus->{_Step}.' vang='.$subackus->{_vang}; | ||
| 435 | |||
| 436 | } else { | ||
| 437 | print("subackus, vang, missing vang,\n"); | ||
| 438 | } | ||
| 439 | } | ||
| 440 | |||
| 441 | |||
| 442 | =head2 sub get_max_index | ||
| 443 | |||
| 444 | max index = number of input variables -1 | ||
| 445 | |||
| 446 | =cut | ||
| 447 | |||
| 448 | sub get_max_index { | ||
| 449 | my ($self) = @_; | ||
| 450 | my $max_index = 8; | ||
| 451 | |||
| 452 | return($max_index); | ||
| 453 | } | ||
| 454 | |||
| 455 | |||
| 456 | 1; |