Welcome to Koi Forum. Is this your first visit? Register
Results 1 to 12 of 12
  1. #1
    Extreme Koi Member Rank = Adult Champion NickK-UK's Avatar
    Join Date
    May 2015
    Posts
    1,539
    Thanks / Likes
    1746

    Nick's attempt at OpenFOAM CFD modelling his new pond design..

    So this is going to be my attempt to model the water flow around the new pond before building it to see dead spots and work out the best positioning of inlets etc.

    The output can be viewed in may ways but to give you an idea it would look something like this (image cheekily stolen from the Internetz) - in this case modelling the flow of a pump inlet, where you can see the arrows showing the speed and direction of flow.
    cfd10.png

    I'm going to use a technique called Computational Fluid Dynamics (CFD) using an open source tool called OpenFOAM, build a simple pond, with a airated bottom drain and and a mid-return. After that I'll extend the model with a water fall and skimmer.

    The idea is relatively straight forward - you have a "mesh" which is the design of the pond, a set of "boundaries" which can be the open surface of the water, the exit point of the bottom drain and the mid-water returns. You specify it's full of water and then set the simulation running. The software does the hard work and maybe a few minutes or a few hours it finishes the simulation.

    You can see the flow change over a number of steps in time, so after a while it should have a model of the flows after which you can slice the model top down, through any part of the depth etc.

    So this thread will be my 'exploration' into this, and if there's any like minded people - I'll put the files etc on here too and you can alter the mesh (the pond model), points on the pond for inlets etc for your own purposes.



  2. Thanks MustBeSomethingInTheWater Thanked / Liked this Post
  3. #2
    Extreme Koi Member Rank = Adult Champion NickK-UK's Avatar
    Join Date
    May 2015
    Posts
    1,539
    Thanks / Likes
    1746
    To start and make things simple - I'll start with one of the demos and adjust it to my needs.

    I'm running Ubuntu in a virtalbox. From bitter experience I always run all linux/opensource in a virtual machine because it keeps my little Mac mini's OSX install clean and tidy.

    For speed this YouTube video shows the steps leading up to this bit..


    So that's simple enough to replicate:
    Screenshot 2020-04-25 at 12.51.56.jpg

    The next step is to alter the source project files to resemble my pond but I'll leave the inlet and outlet as walls for the first step. Then worry about changing the inlet and outlet.

  4. #3
    Extreme Koi Member Rank = Adult Champion NickK-UK's Avatar
    Join Date
    May 2015
    Posts
    1,539
    Thanks / Likes
    1746
    So... The easier way of creating your own file for OpenFOAM.

    Download gmsh. The have a look at this https://www.youtube.com/watch?v=E8nGNZk71fw

    The text file is the my pond. you can see the back wall and the front wall. Note my pond is kinked to make it double trouble.

    You then use gmsh, open up your file and any time you can check the file by clicking "reload script".. it will also tell you of any errors which is really good. From the gmsh you can then generate the OpenFOAM mesh
    Screenshot 2020-04-26 at 17.11.21.jpg

    I worked out the points in space using trigonometry.. so the points are put in as 3D coordinates.

    IMG_7346 2.jpg

  5. #4
    Extreme Koi Member Rank = Adult Champion NickK-UK's Avatar
    Join Date
    May 2015
    Posts
    1,539
    Thanks / Likes
    1746
    So here is my pond.. in mesh form - I've tried pushing the mesh to be rectangles on the walls.. so the next thing is see if I can make this into an OpenFOAM mesh
    Screenshot 2020-04-26 at 18.00.37.jpg
    Next ... making the openfoam mesh



    Need to generate format 2.. not format 4.
    Code:
    gmsh pond.geo -3 -format msh2 -o test.msh
    Then gmshToFoam will work.

    So current state is.. I am just trying to create the foam 'case' ie the project files.. currently this is complaining there's no 3D cells.. so I need to work out how to generate cells inside the volume..


    Getting there... this is a 3D mesh with cells.

    Screenshot 2020-04-26 at 22.24.30.jpg


    So the simpleFoam (a 'solver' in openFoam) runs - except currently it doesn't know what todo with the pond, this is a good thing - it means I now have to make the bottom drain, mid water return as outlet and inlet and some identified boundaries etc.

  6. #5
    Extreme Koi Member Rank = Adult Champion NickK-UK's Avatar
    Join Date
    May 2015
    Posts
    1,539
    Thanks / Likes
    1746
    So I have resolved the issues stopping the first run. I've setup what is a very basic flow - front to back of the pond

    The walls of the pond:

    Screenshot 2020-04-28 at 07.40.51.jpg

    This is the computation as a slice of the flow through the pond of one of the parameters - it still has a lot of work to be done but it shows promise so far.
    Screenshot 2020-04-28 at 07.49.32.jpg

    Tasks remaining:
    * make the pond a bucket of water rather than a tube with an water level and air interface at the top
    * fully decide on the bits and bobs for solvers (ie the variables etc) so you can see the water flow, pressure etc. There's a convergence issue (the calculations at the moment simply blow up after a short period of time)
    * make a simple pond outlet bottom drain - a circular hole
    * make a simple pond inlet midwater return - again initially a circular hole, but the nice thing is that OpenFoam can model the inlet direction of water already.
    * make a simple pond wall skimmer return - a rectangular hole.

    Harder tasks
    * make an air plate - a simple side suction (at a standard rate) and force upwards - the air continues to force upwards as it moves so it doesn't have a single point of force
    * make a spindrifer bottom drain model with the internal design and 4" pipe
    * make a skimmer

    OpenFoam allows you to make a more dense computation field in defined places, so I can have a normal computational cell size in the pond but have a smaller cell around the inlets and outlets so the entire system doesn't slow down computation.

  7. Thanks freddyboy Thanked / Liked this Post
  8. #6
    Interesting thread mate, way over my head but interesting nonetheless


    Sent from my iPhone using Tapatalk

  9. #7
    Extreme Koi Member Rank = Adult Champion NickK-UK's Avatar
    Join Date
    May 2015
    Posts
    1,539
    Thanks / Likes
    1746
    Quote Originally Posted by bigcarpchaser View Post
    Interesting thread mate, way over my head but interesting nonetheless
    Thank you - I know this is a bit "over analytical" of the problem

    I've also found that openfoam can model the wall pressures at the same time - so you can see how much force is being applied to the walls of the pond. It also allows modelling of filter components including drums etc!

    I think I'm now getting enough understanding of the tool - the documentation is a bit crap until you twig the basics and idiosyncrasies of the tool itself.

    If use "interFoam" rather than "simpleFoam" solver I can do air-water so I can model water levels and falling water from a waterfall too. There's also an easier way to make a pond assuming you have straight sides (make 2D picture then 'etrude' to the depth of the pond).

    So the next step to make the switch to interFoam, then I'm going to shake down the model sightly and away we go

  10. #8
    I could have done with the wall pressure feature 18 months ago lol


    Sent from my iPhone using Tapatalk

  11. #9
    Extreme Koi Member Rank = Adult Champion NickK-UK's Avatar
    Join Date
    May 2015
    Posts
    1,539
    Thanks / Likes
    1746
    Ok, so switched to the air-water capable solver..

    Not finished yet but initial results (by no means correct) look funk - this is showing the change in direction of the flow of water around a line of.water (a stream):

    Screenshot 2020-04-30 at 16.51.29.jpg

  12. #10
    Extreme Koi Member Rank = Adult Champion NickK-UK's Avatar
    Join Date
    May 2015
    Posts
    1,539
    Thanks / Likes
    1746
    Version 3 of the pond - this time with air, a waterfall, mid water return and a bottom drain.

    Not entirely working ... sort of what happens if you emptied a very large bucket into the pond

  13. #11
    Senior Member Rank = Grand Champion RoyLittle0's Avatar
    Join Date
    Jun 2016
    Location
    Derby
    Posts
    2,551
    Thanks / Likes
    4705
    Quote Originally Posted by NickK-UK View Post
    Version 3 of the pond - this time with air, a waterfall, mid water return and a bottom drain.

    Not entirely working ... sort of what happens if you emptied a very large bucket into the pond

    Looks like a Koi pond on a Bowing 737 on take off
    4600 Gallon Concrete Block and Fiberglass
    2100 mm x 710 mm Infinity Window 32mm thick glass
    2 x Aerated Bottom Drains and Skimmer
    Filtreau HiFlow 30 Drum Filter
    Bio Chamber - 140 litres K1
    Bakki Shower - 30 KG Sakura Far Infrared Media
    2 x 18,000 lh pumps
    Heated from house boiler through a heat exchanger
    Idealseal MS290

    My Pond Build

  14. Thanks NickK-UK Thanked / Liked this Post
  15. #12
    Extreme Koi Member Rank = Adult Champion NickK-UK's Avatar
    Join Date
    May 2015
    Posts
    1,539
    Thanks / Likes
    1746
    Playing with the inlet - this seems better. It gives the kind of idea I want to be able to see. This is showing U the speed 0.2m3/sec .. The key is you can see the current movement.

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 09:24 AM. Online Koi Mag Forum
Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.

vBulletin Improved By vBFoster® (Lite Version), © UltimateScheme, Ltd.