HOWTO? OpenFoam hull resistance from STL

Discussion in 'Software' started by Daniel Mazurkiewicz, Jun 5, 2022.

  1. Daniel Mazurkiewicz
    Joined: Jan 2022
    Posts: 34
    Likes: 3, Points: 8
    Location: Poland

    Daniel Mazurkiewicz Junior Member

    Hey!

    Due to war in Ukraine had to postpone my boat building plans :( , but that gives me more time and decided to use it to design myself a boat. Now trying to wrap my head around OpenFoam, want to calculate a hull resistance with it, can someone share or point me to some repo where at one end I supply STL model, mass locations and at the other end I get just a number that says what is the hull resistance? (don't need visualizations or so).

    Thanks in advance!
    Daniel
     
  2. CocoonCruisers
    Joined: Dec 2015
    Posts: 95
    Likes: 39, Points: 18, Legacy Rep: 10
    Location: Marseille & BuenosAires

    CocoonCruisers Junior Member

    Hi Daniel !

    *here's a starting point:
    OpenFOAM-9/tutorials/multiphase/interFoam/RAS/DTCHullMoving at master · OpenFOAM/OpenFOAM-9 https://github.com/OpenFOAM/OpenFOAM-9/tree/master/tutorials/multiphase/interFoam/RAS/DTCHullMoving
    it relies on the (towing tank model size) DTC .stl in OpenFOAM-9/tutorials/resources/geometry at master · OpenFOAM/OpenFOAM-9 https://github.com/OpenFOAM/OpenFOAM-9/tree/master/tutorials/resources/geometry .

    But depending on the hydrodynamics you want to investigate, equipment at hand and your background, i fear things aren't going to work out quite as smooth as you describe :-/
    The principal catches we run into:
    - Accurate boundary layers are needed, but doing them with SnappyHexMesh is weeks of effort for poor results.
    - It's way easier with commercial meshers (like cfMesh, Centaur, Pointwise...), but they start at a few thousand €/year, and the more established ones reach 10k/year.
    - At least for planing boats, you need quite some detail, ~3 million cells up, which needs a serious workstation to solve. If you want to investigate foils or other apendages let alone propellers in detail, you're quickly beyond workstation level and have to get into HPC clusters.
    - 'Visualizations' can't be avoided because you need to check the accuracy and coherence in some detail: yPlus in the critical zones etc. CFD will always produce a result but it's most often meaningless...
    - It's never a smooth journey, you'll face a lot of instabilities. Count on 10 tries and weeks of solving time for the first geometry, and still quite some hit and miss for your variations afterwards

    So you might want to have a look at simpler methods like Savitsky (planing) , Holtrop (displacement speeds) , Mitchel (look up Godzilla here on the group for narrow hulls) or this one for cats : Catamaran resistance calculation http://msi.as/Calculations/CatResistance.aspx

    Best luck to you !
     
    Last edited: Jun 10, 2022
    Daniel Mazurkiewicz likes this.
  3. vkstratis
    Joined: Feb 2015
    Posts: 75
    Likes: 9, Points: 8, Legacy Rep: 14
    Location: Athens, Greece

    vkstratis Naval Architect

    I am afraid it will not be as straight forward process as you describe. Even if you master the technical details of using OpenFoam or any other CFD software, know the theory enough to evaluate the results and post-process the output, you will need computing power to perform the analysis. With a typical laptop you will probably need a week just for a speed. Needless to say that it is very probable you will make several mistakes on the process, so several weeks to have a non validated result. For the usual hull forms it make sense to use semi-empirical and statistical methods. Take a look at this powerHull resistance https://www.boatdesign.net/threads/powerhull-resistance.66875/ or perform your own calculations using the original papers.
     
  4. Daniel Mazurkiewicz
    Joined: Jan 2022
    Posts: 34
    Likes: 3, Points: 8
    Location: Poland

    Daniel Mazurkiewicz Junior Member

    Are you an author of this one? Linux user here and it opens, but doesn't calculate results under wine. (not that expecting you to do something, but letting you know) Also if you'll want and need a help porting it to linux let me know.
     
  5. Daniel Mazurkiewicz
    Joined: Jan 2022
    Posts: 34
    Likes: 3, Points: 8
    Location: Poland

    Daniel Mazurkiewicz Junior Member

    Am I understanding that process correctly as predicting where and what kind of flows will occur?


    Have software development background and my goal was to tweak hull design automatically (with genetic algorithms) to get lowest possible resistance for given conditions. And for that resistance measurement doesn't even have to be accurate with real number, but has to be comparable as real numbers would be and give same order if I was to sort results from both. But I think I see your point, even that won't be that easy.


    Do you have any other ideas how could I achieve above?
     
  6. vkstratis
    Joined: Feb 2015
    Posts: 75
    Likes: 9, Points: 8, Legacy Rep: 14
    Location: Athens, Greece

    vkstratis Naval Architect

    Yes I am the author. I have not tested it under wine in Linux but if you can view the UI and not able to perform calculations I think the problem lies on the numerical analysis library I have used. It could be recompiled under .net core but then I would need to re-write the user interface. Are you a coder or a naval architect? I am too interested in parametric design combined with optimization using GAs. I have a prototype for planing hull forms. Maybe we can collaborate.
     

  7. Daniel Mazurkiewicz
    Joined: Jan 2022
    Posts: 34
    Likes: 3, Points: 8
    Location: Poland

    Daniel Mazurkiewicz Junior Member

    Yes, I can see UI.

    I'm a software dev. I'm busy today till the evening, but if you're free tomorrow morning we can have a bit of chit-chat. Let me know your availability on PRV.
     
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.