Flotilla Demo 2.07

Discussion in 'Software' started by Leo Lazauskas, Apr 11, 2010.

  1. Leo Lazauskas
    Joined: Jan 2002
    Posts: 2,696
    Likes: 155, Points: 63, Legacy Rep: 2229
    Location: Adelaide, South Australia

    Leo Lazauskas Senior Member

    Flotilla Demo for boatdesign.net boffins.

    Unzip the attached file.
    Batch files to run the examples are contained in the "demo207" subdirectory.

    Some reports and graphics will be in the next post in this thread.

    SMALL HUMAN-POWERED MONOHULL

    EXAMPLE 1a: Drag of Rick Willoughby's V14 hull.
    Run the "rick_v14_drag.bat" file in the demo207 subdirectory.
    Drag and other data is saved as report1.csv in the "out" sub-directory.

    EXAMPLE 1b: Wave pattern of Rick Willoughby's V14.
    Run the "rick_v14_waves.bat" file.
    This should take about 60 seconds on a Quad core.
    When the program finishes, press a key and the wave pattern will be displayed.
    Press 2 to see the pattern rendered with a different palette.
    Press 1 to use the blue paelette.
    Press any other key to exit.
    The wave pattern will be saved as wp12.pcx in the "out" sub-directory.

    260 tonne CATAMARAN

    EXAMPLE 2a: Catamaran drag.
    Run the "giam_drag.bat" file.
    This example uses variable Overall Propulsive Coeffcients (OPC) and variable specific fuel consumption (sfc) in an attempt to estimate the range of the vessel.

    EXAMPLE 2b: Catamaran wave pattern.
    Run the "giam_waves.bat" file.
    This will take about 90 seconds on a Quad core.

    You can increase the number of stations to 41 and the number of waterlines to 53 in the offsets.flo file in the inp/giam subdirectory. Other values for the number of stations and waterlines are crippled in this demo version.

    NPL MONOHULLS AND CATAMARANS

    EXAMPLE 3a: NPL monohulls.
    Run the "rnplmonobulk.bat" file.
    The program calculates the resistance of 10 NPL monohulls.
    Measured values of squat are used in predictions.
    Output is copied to the npl_out/mono sub-directory.

    Experimental values of the squat, wave resistance and total resistance are appended to the end of the report to enable comparisons with predictions.

    Results are summarised in the report named npl_mono.pdf.

    EXAMPLE 3b: NPL catamarans with w/L=0.2.
    Run the "rnplcat02bulk.bat" file.
    The program estimates the resistance of 10 NPL catamarans with demihull width-to-length spacing = 0.2. Measured values of squat are used in predictions.
    Output is copied to the npl_out/cat sub-directory.
    Catamaran results are summarised in the report named npl_cat.pdf.

    EXAMPLE 3c: NPL catamarans with w/L=0.3.
    Run the "rnplcat03bulk.bat" file.
    The program estimates the resistance of 10 NPL catamarans with demihull width-to-length spacing = 0.3. Measured values of squat are used in predictions.

    EXAMPLE 3d: NPL catamarans with w/L=0.4.
    Run the "rnplcat04bulk.bat" file.
    The program estimates the resistance of 10 NPL catamarans with demihull width-to-length spacing = 0.4. Measured values of squat are used in predictions.

    EXAMPLE 3e: NPL catamarans with w/L=0.5.
    Run the "rnplcat05bulk.bat" file.
    The program estimates the resistance of 10 NPL catamarans with demihull width-to-length spacing = 0.5. Measured values of squat are used in predictions.

    The NPL examples used 21 stations and 27 waterlines.
    You can increase the number of stations to 41 and the number of waterlines to 53 in the offsets.flo file in the inp/npl subdirectory.

    Have fun!
    Leo.
     
    Last edited by a moderator: Feb 12, 2014
  2. Leo Lazauskas
    Joined: Jan 2002
    Posts: 2,696
    Likes: 155, Points: 63, Legacy Rep: 2229
    Location: Adelaide, South Australia

    Leo Lazauskas Senior Member

    I've attached a couple of reports and graphics that were produced using the demo version of Flotilla 2.07.

    You should be able to reproduce these results by running the appropriate batch files and plotting the results with, for example, Excel or gnuplot.

    Feedback from users on execution times for the various runs would be much appreciated.

    Leo.

    P.S. The npl_cat.pdf file contains 10 hulls with 4 spacings, not 5 as stated. I left out the infinitely wide case because it is boring.
     

    Attached Files:

    Last edited: Apr 11, 2010
  3. Guest625101138

    Guest625101138 Previous Member

    Leo
    I tried the V14 hull files on my Dell Laptop.

    The drag calculation took about 20 seconds.

    The attached image took 1 minute 44 seconds.

    Rick
     

    Attached Files:

  4. Leo Lazauskas
    Joined: Jan 2002
    Posts: 2,696
    Likes: 155, Points: 63, Legacy Rep: 2229
    Location: Adelaide, South Australia

    Leo Lazauskas Senior Member

    Thanks, Rick.
    If you have time, you can try the following...

    In the squat.flo input file, change the squat iterations from 0 to 1.
    Then run the drag batch file as before.
    Dynamic forces on the hull will be calculated, the hull will be placed into the squatted position, and then the drag calculated. This is a reasonable method at lowish speeds.

    Now change the squat iterations to 10 and run again. The program iterates the squat until equilibrium is reached (or for a maximum of 10 iterations). The drag is then calculated with the hull in the final position. At low speeds you should get similar results to the 1-shot method.

    You will see that the program takes a couple of minutes to finish. That's why I'm working on a multiple processor optimisation version. I might be able to do some useful calculations in the GPU too.

    Whether Flotilla can produce reasonable approximations of planing effects is still an open question. I seriously doubt that you will get anything close to planing with your hull at your design speeds, but it might work with some other shapes. I also suspect that it will require more waterlines than I allow in the demo version. I am working on a flat-ship version of the program (Tortilla?) but that's still some way off.

    All the best,
    Leo.
     
  5. Martijn_vE
    Joined: Apr 2005
    Posts: 254
    Likes: 24, Points: 0, Legacy Rep: 401
    Location: Netherlands

    Martijn_vE Marine software developer

    Leo,

    I'm running Windows 7 on a 64 bit Core I7 laptop.

    The drag calculation took about 11 sec, 62 sec. for the waves.
     
  6. Leo Lazauskas
    Joined: Jan 2002
    Posts: 2,696
    Likes: 155, Points: 63, Legacy Rep: 2229
    Location: Adelaide, South Australia

    Leo Lazauskas Senior Member

    Thanks, Martijn.
    In the drag calculations it's the estimation of the sinkage force and trimming moment that takes the most time. I calculate these even for the hull in the static position. (I guess one could say that it's the force required to keep the boat in that static attitude.)

    Incidentally, if we can get Michlet to click better with Delftship offset format, then Flotilla can also be made to work with the same format.

    Any ideas on programs that might display the wave pattern better? I wrote "waveplot" to produce the wave patterns, but the text is ugly. The only advantage with writing my own code is that I can produce animations by gluing together wave patterns calculated for a range of speeds. That requires keeping track of the minimum and maximum wave elevations over the whole range of speeds which is not easy to do with some commercial software.

    Cheers,
    Leo.
     
  7. Martijn_vE
    Joined: Apr 2005
    Posts: 254
    Likes: 24, Points: 0, Legacy Rep: 401
    Location: Netherlands

    Martijn_vE Marine software developer

    I guess it requires iterating to an equilibrium, and this generally takes time. I've learned over the years that by using a good iteration scheme you can gain as much time as by using another CPU core. Obviously there are limits:cool:


    What does waveplot actually do?
    Do you keep track of the min/max elevations and use the same scale to plot various graphs in some sort of post processing step?

    It shouldn't be to hard to develop a small program for this?
    Are you really planning on using the GPU for your calculations?
    I know some programming languages allow you to do that. Would be cool.
     
  8. marshmat
    Joined: Apr 2005
    Posts: 4,127
    Likes: 149, Points: 63, Legacy Rep: 2043
    Location: Ontario

    marshmat Senior Member

    Leo,

    Way to upload this thing right at the start of exam season ;)

    You and Martijn continue to impress me.... I spent most of this morning battling Matlab into submission over an experimental CT image reconstruction, only to have it spit out 300 MB of garbage. I have a lot of respect for anyone who can write the sort of effective, efficient software you guys do.

    Learning OpenCL is on the to-do list for me too, at some point, as I would love to get some of my imaging calculations off of the CPU....
     
  9. Leo Lazauskas
    Joined: Jan 2002
    Posts: 2,696
    Likes: 155, Points: 63, Legacy Rep: 2229
    Location: Adelaide, South Australia

    Leo Lazauskas Senior Member

    Yes, I can still squeeze out some performance gains by paying attention to the iteration scheme. It's on a long list of things to do.

    Exactly. For example to create an animation like this...
    http://www.cyberiad.net/waketet.htm
    I create 128 wave elevation data files. On the first pass, waveplot reads those files and keeps a track of the highest and lowest elevations (plus some other data such as the wave resistance etc). On the second pass it scales all elevations and creates 128 .pcx files. I then use Paintshop Pro 4.10 to convert the pcx files to gifs. Finally, I use gifmake to glue the separate gifs into a cartoon. It's a messy business, but maybe I need to use some software that isn't quite so old? :confused:

    Yes, I am thinking of using the GPU for certain calculations I need during optimisation runs. Unfortunately I've hit my limit of 20+ cups of coffee per day, so it might take a while to learn the techniques and languages.

    Leo.
     
  10. marshmat
    Joined: Apr 2005
    Posts: 4,127
    Likes: 149, Points: 63, Legacy Rep: 2043
    Location: Ontario

    marshmat Senior Member

    LOL. I think I need to learn some languages other than MATLAB.... this sort of image/video processing and plotting takes only a couple of minutes to code in MATLAB, but I haven't the faintest idea how to create the kind of code (C/C++?) that you guys use....
    Easy on the caffeine there, Leo. The liquid kind of java can be just as dangerous as the digital kind.
    I'm on the lookout for a good OpenCL tutorial, as I too have a bunch of stuff I'd love to offload to a GPU.... and the new workstation has a screaming ATI 5770.
     
  11. Guest625101138

    Guest625101138 Previous Member

    Leo
    Doing the drag calculation was not particularly tedious. It took about a minute. I do not think it did all 10 iterations because it was not much longer than the two. I reduced the number of speeds to 2 - the ones I am most interested in.

    I tried the V11J hull as well. I gather you have limited offsets to 31 X 31.

    For me I would use Flotilla to finesse a design until it has ability to search out the lowest drag shape. Right now I would use it to check what happens around my speed of interest so I would not be doing a wide range of speed.

    Perchance do you have drag value for a rowing scull with 90 to 100kg displacement at about 5m/s to 2 significant figures.

    The term "submergence" confused me. I interpret it as freeboard - how far it can sink before flooding.

    Rick
     
  12. Leo Lazauskas
    Joined: Jan 2002
    Posts: 2,696
    Likes: 155, Points: 63, Legacy Rep: 2229
    Location: Adelaide, South Australia

    Leo Lazauskas Senior Member

    Yes, negative values can be interpreted as freeboard. Positive values are useful for submarines. (In Michlet the only way to simulate submergence was with many waterlines containing all zeroes).

    The provision of adequate freeboard is arguably THE fundamental problem in ship hydrodynamics, so there's no easy answer to your question. You have to provide enough so that there's no flooding after the hull is in its squatted attitude. That will probably require a turn or two around the design spiral.

    Leo.
     
  13. jtremolo
    Joined: May 2008
    Posts: 18
    Likes: 2, Points: 0, Legacy Rep: 34
    Location: Davenport, Iowa

    jtremolo Junior Member

    I might be a little late but, if you want help doing gpgpu computing my grad research is in CFD using gpgpu computing. Right now we are using CUDA and have a full Navier-Stokes 3D structured solver running (it is blazing fast). So if you have questions or want help just let me know :)
     
  14. Leo Lazauskas
    Joined: Jan 2002
    Posts: 2,696
    Likes: 155, Points: 63, Legacy Rep: 2229
    Location: Adelaide, South Australia

    Leo Lazauskas Senior Member

    Thanks for the very kind offer.

    What do you mean by fast? And is it accurate?

    In an earlier post I attached two pdfs that give results for 10 NPL monohulls at 17 Froude numbers. Also shown are 40 catamarans (10 hulls X 4 demihull spacings).

    How fast can you do the entire set? That is, wave drag, viscous drag and squat for the same range of Froude numbers. And how do your CFD results compare to the experiments?

    Another "simple" test for your code.
    Can you calculate the skin-friction on a flat plate for Reynolds numbers between, say, 10^6 and 10^10?

    If you can do those tests accurately and quickly then you've got one helluva code. If not, or if it "would take too long" (an excuse I hear all too often),
    then it's just another CFD code and another CFD afficianado making unsubstantiated claims.

    So, are you up to the challenge?

    Over to you :)

    All the best,
    Leo.
     

  15. jtremolo
    Joined: May 2008
    Posts: 18
    Likes: 2, Points: 0, Legacy Rep: 34
    Location: Davenport, Iowa

    jtremolo Junior Member

    Currently we are using it for rotorcraft wake simulations. We have run hundreds of test cases and all matched up with experimental data and current commercially available CFD solutions. As far as fast goes, when we ran a turbulent rotor simulation on the CPU it took approximately 8 hours on a 128x128x128 grid. When we ran the same problem using CUDA it took 11 minutes.

    As far as running your examples, I can definitely get the skin friction drag on a flat plate. The wave forms will take a little bit of playing, I'm used to aircraft not boats. However, I am definitely up for trying it and seeing what happens.

    If you are interested, I can send you the thesis my research partner wrote when he graduated. It talks about the whole process we did and has some pretty pictures :)
     
Loading...
Forum posts represent the experience, opinion, and view of individual users. Boat Design Net does not necessarily endorse nor share the view of each individual post.
When making potentially dangerous or financial decisions, always employ and consult appropriate professionals. Your circumstances or experience may be different.