ladybug-tools / butterfly

:butterfly: A light python API for creating and running OpenFoam cases for CFD simulation.
http://ladybug-tools.github.io/butterfly.html
GNU General Public License v3.0
249 stars 72 forks source link

Wind tunnel bottom ground X as well #303

Open vorobus opened 7 years ago

vorobus commented 7 years ago

Hi Mostapha,

excelent stuff for OpenFoam! This is what I realy wanted to do myself! After playing with tutorials, I tryed to make my own case. What I need is a some sort of flexibility to create a wind tunnel not only with ground but also without any ground, for example for an airplane. Usually I stack with a snappy hex error, something like - the point is on the face or it's not in the domain. Please could you add this flexibility or tell me how can I make it myself? Thanks!

TheodoreGalanos commented 7 years ago

Hi @vorobus

You can do that with the updateBlockMeshDict component.

You can first generate a blockMesh normally to get the ranges of your X and Y dimensions. Then use the component to update the Z dimension range.

See a small discussion here: http://discourse.ladybug.tools/t/custom-the-wind-tunnel-dimension-in-butterfly/2289/3

Kind regards, Theodore.

mostaphaRoudsari commented 7 years ago

What I need is a some sort of flexibility to create a wind tunnel not only with ground but also without any ground, for example for an airplane

Hi @vorobus, Does it mean that you need a blockMesh with a different boundary condition for the bottom face of the blockMesh?

vorobus commented 6 years ago

Hi @TheodoreGalanos and @mostaphaRoudsari , thank you for your reply!

As I tried to play with butterfly I was trying to understand whether it suits not only for architecture cases but could fit to other problems, such as airfoils, yach design, propellers, sails, or multyphase numerical tank (with waves) for ship hydrodynamics (things which I want to foam). Hence, I not only need to modify the block mesh vertices, which seems possible to do with what @TheodoreGalanos suggested, but also the boundary conditions class To create arbitrary BC, that would be awesome! similar to what was suggested with the recipes on one issue. I mean, for ex. if I create and name my own BC class, and just tune it differently in a way I need.

Also, If I started to ask questions. There are plenty of Utils in OF, such as buffles, which simplifies the meshing procedure for thin objects. But I can't find a wrap in butterfly to use it. It would be cool to have it. Now I'm thinking on either creating add-on for butterfly for this thing or just utilizing python console widget and make some RAW working case.

Another issue for me, how to make sweeps in geometrical parameters or optimisation? I would realy appreciate a good tutorial on this. Previously I wrote the whole workflow for each case on python. Your package seams to make all this for me, but since I'm new both for grasshoper and for butterfly, some time is needed to dive in.

mostaphaRoudsari commented 6 years ago

Hi @vorobus, in your case it seems it is easier to set up a quick call. If you send me an email we can set up a call to understand your needs and background and we can go from there. If you want to implement new boundary conditions and wrapper for solvers (e.g. recipes) we should help you to develop it as part of Butterfly. The development should be straight forward.

Also the latest development is under pep8 branch which I will merge into master after updating the example files.

You can find the email address from my GitHub profile.

TheodoreGalanos commented 6 years ago

Hi @vorobus I understand a bit more now what you are looking for.

As you know OF has myriads of utilities, function objects, boundary conditions, solvers, all developed through the many years of its life. The plan is to incorporate things into BF as the software matures. It was always intended that a big part of this happens through the community, either by identifying a need or contributing to the development. For this reason, I have to say I'm glad to see your post!

The power of BF, as you mention, is its connection to virtual algorithmic environments, and the capacities they offer. That one is something that will come through experience and use of the software. I have been a bit complacent lately with sharing my BF definitions on hydrashare, I will make sure to upload some of them this week and showcase a bit of the optimisation or automation capabilities of BF. We could also have a quick chat in the future on this, I can show you the ways I've been doing it so far and perhaps discuss new ones.

Kind regards, Theodore.

vorobus commented 6 years ago

Hi @mostaphaRoudsari , thank you for your reply! Sure, let's set up a call, I will write you an email. I would be happy to make any contribution.

vorobus commented 6 years ago

Hi @TheodoreGalanos, thank you for your reply!

I would apreciate If you do so! A simple tutorial with "sensitivity" of OpenFoam results to parameter (s), or simple optimisation would be great!