Peter has posted 1 posts at DZone. View Full User Profile

Petroleum Engineering on the NetBeans Platform

06.08.2010
| 6939 views |
  • submit to reddit
My name is Peter Kirkham and I've been working in the upstream exploration and production business for over 10 years. Primarily I have an engineering background from the University of Cambridge, but I was lucky enough to start out as 'assistant to CEO' of what used to be one of Australia's larger listed oil and gas companies. This meant I wasn't really doing pure engineering, but was instead involved in most aspects of managing oil and gas assets, from understanding the technical aspects of the reservoir, through to financial modelling. My current job involves statistical analysis of oil and gas capital projects.

Let's now look at the application I've been working on, called Pyrus. Pyrus began as a collection of Java classes I started writing over 10 years ago when I was learning to program some seismic algorithms. For what it's worth, the first IDE I used was JBuilder, but I quickly moved onto Forte (yes I've been using it that long!).

Background

Java was my language of choice as I've always been more in favour of strict syntax languages and, since I was working in both Unix and Windows at the time, it made a lot of sense to have a cross-platform language. Over the next 8 years I picked up and put down the code as I got more involved in petroleum engineering and economic modeling. Most of the stuff I did wasn't graphical in nature, and whilst I toyed around with Swing, I always found it immensely frustrating. I'm an engineer, not a programmer, and I want to be writing real code, not plumbing. However, there came a point a couple of years ago where Excel just wasn't quite making the grade anymore for some Monte Carlo stuff I was doing, so that was really the trigger for me taking a look at the NetBeans Platform to actually build a proper GUI application to act as a front end that could tie together a lot of loose code I had.

So why would I want to use the NetBeans Platform? Programming is currently not part of my job, nor was it ever - it's one of my hobbies. As an engineer, but not being intimately involved in the nitty-gritty of engineering on a day to day basis, I've found that the discipline of writing code to solve a particular task really helps to reinforce the first principles involved. The NetBeans Platform offered the promise of allowing me to focus on the writing something useful but without having to worry too much about the nuts and bolts of putting an application together.

Surprisingly the NetBeans Platform learning curve wasn't anywhere near as bad as I thought it might be, and once I discovered the Matisse GUI Builder I was set. Then at the end of last year I got talking with my dad about how he kept getting asked if there was a 'PC version' of the software he helped devise that at the time only ran on Solaris. I say 'devise' because he isn't really a programmer either - but he crafted logic behind the algorithms that were used. However, one thing he did have was the source code and I figured that all I needed to do was port the algorithms to Java, ditch the rest and re-write the GUI/display parts from scratch. This is what I've nearly finished doing and is the main aspect of the screenshots below.

Screenshots

First screenshot shows a greyscale scan of a seismic section that was printed out on the left and then on the right you have the digital recreation of the original data shown using a colour density display. In essence this is 'OCR for seismic data' and underlying it are older Fortran and C routines that I ported to Java and have then used the NetBeans Platform to put a much nicer front end onto than the original which was very clunky to say the least. We call this module 'Resurrect'. :-)

Second screenshot shows a few of the other modules I've been working on. Left is another seismic section, top right is a well log (this is very early stage of work, but for the purpose of a screenshot I think it's pretty enough and shows you can use custom Swing components easily within the NetBeans Platform) and the bottom right is the output to a Monte Carlo simulation that estimates oil and gas reserves.

The third screenshot shows some of the image preparation stages that are needed as part of the Resurrect workflow. On the left is where you can digitize points onto the image, which are then used in an image warp algorithm to get everything orthogonal. On the right, the original image has now been converted to monochrome and there are guidelines overlaid on the image to check that it really is now straight. 

 

Conclusion

A critique might be that these are just Java Swing screenshots. To some extent, that is true, but that would be grossly unfair to the NetBeans Platform. I might not be using much "visual" stuff at the moment, i.e., properties/navigation, etc., but I am definitely using the obvious stuff: the window system, the menus, the toolbars (with parts that depend on what is selected in the Lookup), plus some of the parts that can't be seen such as the autoupdate feature, the using of Matisse to lay out the forms, etc.

Also, from my perspective, the benefit that the NetBeans Platform brings is that all that basic stuff just works. That means I can focus my effort on the two things that matter: algorithms and custom GUI components.

Published at DZone with permission of its author, Peter Kirkham.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Spentmoretime M... replied on Wed, 2010/06/09 - 9:58pm

Is this a project hosted somewhere? I'd like to take a look!

Peter Kirkham replied on Wed, 2010/06/30 - 9:13am

Project isn't hosted anywhere public. It's entirely personal/proprietary work. Having said that I've been taking the effort to take advantage of the modular nature of NetBeans to separate out the basic I/O and visualisation stuff into a base module. The proprietary modules are then just plugins that are not needed to run the application. When the codebase reaches a certain level of maturity and there if there is sufficient interest I may make the basic parts available so that others could build their own plugins on top of it. Don't hold your breath though!

Matt Coleman replied on Fri, 2012/11/30 - 2:38am in response to: Peter Kirkham

too bad..i would have loved to get my hands w/ a interesting project as this 

buffalo search engine optimization 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.