Boat Design Forums  |  Boat Design Directory  |  Boat Design Gallery  |  Boat Design Book Store  |  Thanks to Our Site Sponsors

Go Back   Boat Design Forums > Design > Software
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-03-2011, 10:48 AM
Leo Lazauskas's Avatar
Leo Lazauskas Leo Lazauskas is offline
Senior Member
 
Join Date: Jan 2002
Rep: 1816 Posts: 1,422
Location: Adelaide, South Australia
ZGREEN - Wave Patterns made by Havelock Sources

Several people have asked me for a program to produce simple wave patterns.
Some want to use the patterns as backgrounds for their ship design drawings;
some want a method to illustrate wave cancellation and reinforcement,
and others just want to create "Greeting Cards" like the one I posted in
http://www.boatdesign.net/forums/ope...ear-35940.html

The attached file "zg10.zip" contains programs to calculate and display
the wave elevations made by arrangements of Havelock sources and sinks.

For a quick demonstration of the program:
1. Uncompress the zip file.
2. Run the batch file rzgreen.bat
3. To view results, run the batch file rzplot.bat
4. Documentation is in the "doc" sub-directory.
5. The "in" sub-directory contains several example input files.

If you like the programs, please tell us the execution times for the examples
on your PC. If you have a creation you are particularly proud of, please show us.

Have fun!
Leo.
Attached Files
File Type: zip zg10.zip (482.2 KB, 113 views)
Reply With Quote
  #2  
Old 01-03-2011, 10:51 AM
Leo Lazauskas's Avatar
Leo Lazauskas Leo Lazauskas is offline
Senior Member
 
Join Date: Jan 2002
Rep: 1816 Posts: 1,422
Location: Adelaide, South Australia
There are some applications that are not strictly related to ship hydrodynamics
that some may find interesting...

The attached pictures show photos of cloud patterns made by small islands, and
wave patterns produced by the program.
Amsterdam Island is in the Indian Ocean; Bouvet Island is in the South Atlantic.
There is little doubt that early navigators (such as the Lapita people) could use these
cloud patterns (along with many other clues) to locate distant islands.

Leo.
Attached Thumbnails
ZGREEN - Wave Patterns made by Havelock Sources-amsclouds.jpg  ZGREEN - Wave Patterns made by Havelock Sources-amswake.jpg  ZGREEN - Wave Patterns made by Havelock Sources-bouvetclouds.jpg  

ZGREEN - Wave Patterns made by Havelock Sources-bouvetwake.jpg  
Reply With Quote
  #3  
Old 01-03-2011, 12:42 PM
DCockey DCockey is offline
Engineer
 
Join Date: Oct 2009
Rep: 1162 Posts: 1,656
Location: SE Michigan
Thanks!

Example 2b took 240 seconds on an HP dv7-4173US, AMD Phenom II N950 Processor, 2.10 GHz; 4 GB memory, Windows 7 64-bit. I watched the performance on the Windows 7 Performance monitor. Overall CPU usage was 26% to 30%, with CPU's 1 and 3 usage running around 50%. The other two CPU's were much lower.
Reply With Quote
  #4  
Old 01-04-2011, 01:08 AM
Leo Lazauskas's Avatar
Leo Lazauskas Leo Lazauskas is offline
Senior Member
 
Join Date: Jan 2002
Rep: 1816 Posts: 1,422
Location: Adelaide, South Australia
Quote:
Originally Posted by DCockey View Post
Example 2b took 240 seconds on an HP dv7-4173US, AMD Phenom II N950 Processor, 2.10 GHz; 4 GB memory, Windows 7 64-bit. I watched the performance on the Windows 7 Performance monitor. Overall CPU usage was 26% to 30%, with CPU's 1 and 3 usage running around 50%. The other two CPU's were much lower.
Thanks for the timing.
I very much doubt that the program is using more than one processor.

I am still trying to work out how to co-ordinate multiple processors for the more difficult "inverse problem " where we must find the object from a given wave pattern. It's pretty easy for humans (e.g. see photos above) but computers are pretty dumb. In some circumstances humans have trouble seeing what is going on (e.g. example 16).

Leo.
Reply With Quote
  #5  
Old 01-04-2011, 09:52 AM
DCockey DCockey is offline
Engineer
 
Join Date: Oct 2009
Rep: 1162 Posts: 1,656
Location: SE Michigan
Quote:
Originally Posted by Leo Lazauskas View Post
Thanks for the timing.
I very much doubt that the program is using more than one processor.

I am still trying to work out how to co-ordinate multiple processors for the more difficult "inverse problem " where we must find the object from a given wave pattern. It's pretty easy for humans (e.g. see photos above) but computers are pretty dumb. In some circumstances humans have trouble seeing what is going on (e.g. example 16).

Leo.
I ran zgreen.exe via rzgreen multiple times this morning using example 2B. Processor use was monitored using Resource Monitor which displays graphs of each total and individual processor usage, as well as a table of processes and their use. With the computer "quiet" total CPU usage is generally 2% with occasional brief increases. I didn't do anything to shut down other processes running in the background. When running it CPU usage was generally 27%, occasionally higher, with zgreen.exe using 25%. While it was running the usage on two CPU's increases significantly, one somewhat more than the other.

Times were very consistent, 179 sec to 182 sec. The variation is probably mostly a function of the accuracy of my timing.

Last edited by DCockey : 01-04-2011 at 09:58 AM. Reason: clarification
Reply With Quote
  #6  
Old 01-04-2011, 11:11 AM
DCockey DCockey is offline
Engineer
 
Join Date: Oct 2009
Rep: 1162 Posts: 1,656
Location: SE Michigan
Some interesting and repeatable, but unexpected results. I tried running multiple instances simultaneously, starting them in succession as quickly as possible, and the execution times were shorter with multiple intances running. Run times (rounded to nearest 5 seconds) were:
1 instance: 180 seconds
2 instances: 150 seconds
3 instances: 140 to 150 seconds
4 instances: 150 seconds
Each instance/process showed 25% CPU usage except when 4 instances when one or two would have CPU usage periodically reduced to 24%, presumably due to other processes needing attention.

These results are repeatable. No idea what is going on though.

Back to multiple processors showing activity when only one instance is running. Presumably the "operating system", either software or hardware, divides tasks among the processors. It is interesting though that the CPU usage per thread tops out at 25% with four processors.
Reply With Quote
  #7  
Old 01-04-2011, 10:16 PM
Leo Lazauskas's Avatar
Leo Lazauskas Leo Lazauskas is offline
Senior Member
 
Join Date: Jan 2002
Rep: 1816 Posts: 1,422
Location: Adelaide, South Australia
Quote:
Originally Posted by DCockey View Post
These results are repeatable. No idea what is going on though.
Good work there!
I think you have just shown us (and yourself) why most people quote "wall clock time" rather than trying to estimate CPU time or some other measure. It's just too messy when operating systems can distribute themselves among multiple processors and when there are unknown processes lurking in the background.

All the best,
Leo.
Reply With Quote
  #8  
Old 01-04-2011, 11:24 PM
DCockey DCockey is offline
Engineer
 
Join Date: Oct 2009
Rep: 1162 Posts: 1,656
Location: SE Michigan
Yes, wall clock time from input to output is what matters in the end. That's what I was measuring. I was curious about CPU processor usage because I continue to wonder how much benefit multiple core processors actually provide. Several decades ago I worked with a fellow who was a recognized international expert in supercomputer performance. He had quite involved proceedures for determining the relative speed of the computers. But users like me were more interested in how long did we have to wait for our jobs, and how many could be done per day.

The calculations of wave pattern generation from sources/sinks of specified strengths would lend themselves to a simple parallel approach since the calculations don't involve any interactions between different locations in the domain. Divide the domain into parts and launch a separate process to calculate the wave heights in each domain parts and save the results in separate files. On the other hand given how quickly the calculations are done a reduction in calculation time of even 75% probably isn't worth the complications.

What language are you using and what compiler? It's been several decades since I did serious programing for number crunching, and then I mostly used Fortran on a Cray or large IBM mainframe. Assuming I can find the time I'd like to some tinkering on a PC and am looking for language and compiler recommendations. It continues to amaze me that my $600 laptop is an order of magnitude or more faster than the Cray supercomputer was, let alone GB's of memory being the norm.
Reply With Quote
  #9  
Old 01-05-2011, 07:12 PM
DCockey DCockey is offline
Engineer
 
Join Date: Oct 2009
Rep: 1162 Posts: 1,656
Location: SE Michigan
I've tested ZGreen using Example 2b on four computers, three laptops and a desktop.

Laptop, AMD Phenom II N950 Processor, 2.10 GHz; 4 GB memory, Windows 7 64-bit: 180 sec (previously reported)

Desktop, AMD Athlon 64 X2 Dual Core Processor 4000+, 2.10 GHz, 3 GB memory, Windows 7 32-bit: 140 sec

Laptop, AMD Turion 64 X2 Mobile Technology TL-60, 2.00 GHz, 3 GB, Vista 32-bit: 135 sec

Laptop, AMD Turion II Neo K635 Dual Core Processor, 1.50 GHz, 3 GB memory, Windows 7 64 bit: 230 sec

Not sure what to make of this. The oldest machine was the fastest.
Reply With Quote
  #10  
Old 01-05-2011, 07:38 PM
DCockey DCockey is offline
Engineer
 
Join Date: Oct 2009
Rep: 1162 Posts: 1,656
Location: SE Michigan
Another thought on the differences in times. The machines running Windows 7 64-bit were the slowest. The last one listed wasn't a surprise since it has a slow processor. But the first one was. I wonder if ZGreen was compiled as a 32-bit program and is slowed down when running on a 64-bit operating system in 32-bit emulation mode.
Reply With Quote
  #11  
Old 01-05-2011, 09:22 PM
Leo Lazauskas's Avatar
Leo Lazauskas Leo Lazauskas is offline
Senior Member
 
Join Date: Jan 2002
Rep: 1816 Posts: 1,422
Location: Adelaide, South Australia
Quote:
Originally Posted by DCockey View Post
The calculations of wave pattern generation from sources/sinks of specified strengths would lend themselves to a simple parallel approach since the calculations don't involve any interactions between different locations in the domain. Divide the domain into parts and launch a separate process to calculate the wave heights in each domain parts and save the results in separate files.
Yes, that is a good strategy for some applications.
For others it's better to run the program separately for different speeds.
That's what I did to produce the animations of a "diamond tetrahull"
http://www.cyberiad.net/waketet.htm
I ran the code for that problem on different computers and then basically glued the results together in a cartoon.

Quote:
Originally Posted by DCockey View Post
What language are you using and what compiler? It's been several decades since I did serious programing for number crunching, and then I mostly used Fortran on a Cray or large IBM mainframe. Assuming I can find the time I'd like to some tinkering on a PC and am looking for language and compiler recommendations. It continues to amaze me that my $600 laptop is an order of magnitude or more faster than the Cray supercomputer was, let alone GB's of memory being the norm.
I used Fortran for the numerical work in zgreen, and C/C++ for the simple graphics program zplot.

I dislike using super-computers and networks of workstations: all my work over the last 15 years has been on laptops and PC's. That means I can work cheaply and the result is useful to a larger pool of people.

All the best,
Leo.
Reply With Quote
  #12  
Old 01-05-2011, 09:26 PM
Leo Lazauskas's Avatar
Leo Lazauskas Leo Lazauskas is offline
Senior Member
 
Join Date: Jan 2002
Rep: 1816 Posts: 1,422
Location: Adelaide, South Australia
Quote:
Originally Posted by DCockey View Post
Another thought on the differences in times. The machines running Windows 7 64-bit were the slowest. The last one listed wasn't a surprise since it has a slow processor. But the first one was. I wonder if ZGreen was compiled as a 32-bit program and is slowed down when running on a 64-bit operating system in 32-bit emulation mode.
I'm not sure either.
I get almost identical results on an i7 running 64bit Windows 7, and an i7 with 32bit XP.

I'm as amazed as you when it comes to currently available computing power. I bought two i7's for under $2500. That's pretty cheap for something I use 16 hours a day, 365 days a year!

Leo.
Reply With Quote
  #13  
Old 03-21-2011, 03:38 AM
BYDE BYDE is offline
Junior Member
 
Join Date: Mar 2011
Rep: 66 Posts: 54
Location: Italy-China
Hello Leo,

I also develop hydrodynamic codes based on potential flow, though with different techniques.
I also have read some of your publications (and those by O. Tuck or D.C. Scullen). I'd like to ask you: zgreen is based on thin-ship theory right? would you be able to say a slenderness ratio limit to keep a reasonable accuracy?
is zgreen similar (or the same) as the code SWPE?

Thanks!
Reply With Quote
  #14  
Old 03-21-2011, 05:03 AM
Leo Lazauskas's Avatar
Leo Lazauskas Leo Lazauskas is offline
Senior Member
 
Join Date: Jan 2002
Rep: 1816 Posts: 1,422
Location: Adelaide, South Australia
Quote:
Originally Posted by BYDE View Post
I'd like to ask you: zgreen is based on thin-ship theory right?
No. zgreen deals with isolated singularities. However, it does use a linearised free-surface boundary condition with viscous effects at the surface.

Quote:
Originally Posted by BYDE View Post
is zgreen similar (or the same) as the code SWPE?
SWPE uses continuous distributions of sources whose strengths are determined from Michell's thin-ship theory. Other similar codes (such as Flotilla and Flotsm etc) use higher order continuous distributions of Havelock sources/sinks and Havelock vortices, and they also include viscous effects in the free-surface boundary condition.

All the best,
Leo.

Last edited by Leo Lazauskas : 03-21-2011 at 05:03 AM. Reason: sp.
Reply With Quote
  #15  
Old 03-21-2011, 06:21 AM
BYDE BYDE is offline
Junior Member
 
Join Date: Mar 2011
Rep: 66 Posts: 54
Location: Italy-China
Thanks Leo, very kind.

What do you mean with 'isolated singularities'?
I'm not very familiar with the Havelock source as I use only the Rankine source (and I'm not a mathematician). However from the computational times reported above I guess there's a linear system being solved, to relate the influence of each source on the others.

What kind of viscous effects does it model?
Reply With Quote
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone needing fibreglass/carbon fibre work done!moulds made/products made etc? roadracer85 Marketplace 1 12-24-2009 08:38 PM
Which software can I use for wave patterns? sizzurp Software 22 10-04-2009 07:36 PM
Fluctuating LWL and wave patterns. Omeron Boat Design 7 03-06-2008 12:11 PM
Steel-made hull with fiberglass-made radius chine ? xarax Metal Boat Building 48 07-23-2007 11:35 AM
Steel-made hull with fiberglass-made radius chine ? xarax Boat Design 0 07-05-2007 01:43 PM


All times are GMT -5. The time now is 07:40 AM.


Powered by: vBulletin Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Web Site Design and Content Copyright ©1999 - 2012 Boat Design Net