Giter Site home page Giter Site logo

Comments (11)

TheodoreGalanos avatar TheodoreGalanos commented on July 26, 2024

blockMesh or WindTunnel component

The main purpose of this component is to create the background mesh that will be used in the study. Bare in mind that this is mainly used for outdoor studies but I will also provide some information on how it can be designed to aid in interior studies as well.

Inputs:

1.Type of study

The first input that will define the whole chain of components and options after it. There are two options for this input: Internal and External

2.Geometry

A collection of geometrical objects. At this point it's not important if the input is one or a list of breps, although in further steps of setting up a case this can be important. Generally, a list of breps, each representing a different region of the geometry is suggested. In this way, on further steps, the user can apply different refinement levels according to the detail required for each of the regions.

Finally, from this input the BoundingBox (BB) of the geometry is created, which will be used later to construct the wind tunnel.

  1. File names

List of names that represent the list of breps that were input as geometry.

4.WindTunnel Directions (kind of a bad name)

External Case:

This input has to do with the configuration of the geometry with regards to the wind flows. It should have two inputs: one vector for Windward direction and one for sides (either side). With these inputs we can know the 5 necessary vectors for the next input: 2 for sides, 1 for windward, 1 for leeward, 1 for height (always Z I guess).

Finally this information should be used in order to automatically name the blockMesh surfaces: inlet, outlet, sideA, sideB, top, and ground

Internal Case:
This output isn't really required for internal cases.

5.Extension lengths (m)

External Case:

This is one of the main inputs of the component. It's a list of 4 values: one for both sides, one for windward, one for leeward, one for height.

The extension values are usually a multiplication of the maximum height of our geometry (which we can get that from the Z value of the BB of the geometry input) by a factor. Default values for these input come from international guidelines for Urban CFD studies:

Windward extension = 3 x Hmax
Leeward extension = 15x Hmax
Height extensions = 3x Hmax (although in the tropics it rarely is above 1.5 x)

Of course the user should be able to provide his own extension. I am guessing that it would be logical to allow the input of extension in meters as well, I'll leave that to you on how it can be done :)

Internal Case:

The extension of the blockMesh should be 1m for all directions of the bounding box, barely encompassing the geomtry. This will save time and memory while meshing. So this input can be automatic.

6.Background mesh refinement

This input related to the refinment level of the background mesh. The inputs can either be a list of 3 numbers (for x, y, z) or in case equal refinement is sought for each direction one nuber for all 3 (smth like 5@3?). This number is what OpenFOAM uses to divide the total length of each direction and produce an equal number of cells (e.g. 10 m in x, putting 10 here defines a 1m cell in x direction).

There is an option here for a more compicated background mesh refinement. I am currently working on how to get an automated way to produce this. But it's not smth to be contained in a simple input, perhaps it can be an additional component, so I will leave it for later.

Outputs

1.Wind Tunnel geometry

Simple an output of the volume that we just defined above, in case the user wants to stop here and simple export a wind tunnel. Of course, it is also cool if we can display this in real time in Rhino, while the user is configuring the inputs described above.

2.Case Setup (probably bad name)

I am not sure how to describe this output. Not even sure it is possible. Imagine it like a recipe from the comfort metric components or the daylight components. It's a file that includes all the necessary information about everything that was done before. This is not as important here, but it can be really important in other pre- and post-processing components we can make (see next post).

This output, at this point, can contain the blockMeshDict that the user practically created by manipulating the inputs, the input geometry, the blockMesh geometry, the naming of each surface of the wind tunnel, the directions, etc.

Each input above relates to a specific line / entry in the blockMeshDict file which has been explained in other posts.

I think that's all for the blockMesh. The whole point is to allow the user to quickly, easily, and in an interactive way to create a wind tunnel for any input geometry, that also conforms to standard methods of CFD studies (quite nice for begginers if I can remember how I started). I'm sure it can be improved a lot but it's a good start.

Please let me know of your thoughts

Kind regards,
Theodore.

from butterfly.

TheodoreGalanos avatar TheodoreGalanos commented on July 26, 2024

Outdoor Wind Comfort component

The reason behind this component is to allow the, once again, quick and easy way to produce a wind comfort study. This comes from our experience with Chris the past few months and hopefully automates a lot of the things that make it a painful and time-consuming process. This applies to external cases.

Inputs:

1.Geometry or Case Setup (see blockMesh component).

This is simple the output of the blockMesh component. The case setup output starts to make sense here, as it allows the distinction between the geometry (which will be manipulated in this component) and the wind tunnel. Of course, it is entirely possible to allow the input of simply geometry that hasn't gone through the blockMesh component.

2.Intervals or Rotation angles

This input defines the number of intervals the imaginary 360 degree wind rose is divided into. It can either be a list of angles (each defining a specific interval) or a number of intervals (e.g. 12@360).

3.Center of rotation (point)

This can either be provided by the user or supplied by default from the component. The default value of the centroid of the boundingbox of the input geometry would allow a rotation without moving the geometry whic his important when you wish to remain within your wind tunnel.

4.Vector of rotation (vector)

A vector supplied by the user or set by default (Y+).

Outputs:

1.Rotation details

The rotation details (vectors, angles, center point) for each interval set by the user. This output can be extremely important in later stages of post-processing (see the files Chris shared, especially the one where CFD point values are mapped into Rhino).

2.Create case folders (boolean)

This allows the user to choose if he/she wants to create the case folders already (in the case of no further pre-processing) or leave it for a later stage (e.g. after function objects have been set).

When set to true, one folder for each interval/orientation should be created, with the respective, properly rotated STL file added to constant/triSurface.

Note on STL file creation: each file should be edited and the word "OBJECT" changed to the respective file name. It's always the same case, i.e. always object to filename so it should be easy to set up. After that, all files should be concatenated into a single file, now containing all regions properly named.

3.Create STL files (boolean)

Allow the user to just create STL files if he so wishes. Again, following the way described above, and one STL file for each direction. This input should be greyed out when the above is true.

4.Adjust wind tunnel (boolean)

This input allows the user to automatically adjust his/hers wind tunnel geometry to the new bounding box of the geometry. Imagine a case where an elongated building along the Y direction is rotated 90 degrees. Suddenly, since we followed the process in blockMesh component, it is much closer or even outside the side boundaries! We can rectify this by allowing this component to automaticall re-adjust the blockMesh boundaries. It can do this by the new bounding box information from the rotated geometry of this component and the information stored in "Case setup" from the blockMesh component.

Note: I believe it's quite possible this should be a default functionality of the component and NOT an input. I leave it up for discussion.

5.Case set up

The new case set up output (see previous post), now including information on how many cases (i.e. intervals) are to be created, new wind tunnel, file names, etc.

That is all I think. This component looks simple but it's really doing A LOT and is really saving A LOT of time. I hope the way I described it makes sense and is practical to create. If I'm missing something please let me know, also of any ways to improve.

Kind regards,
Theodore.

from butterfly.

mostaphaRoudsari avatar mostaphaRoudsari commented on July 26, 2024

@TheodoreGalanos thank you for getting this started! The first one is quite doable. I finally have a workflow that creates case folder and writes blockMeshDict and the stl file. I have a couple of questions about blockMeshDict, and it's relation to snappyHexMeshDict which I will ask you tonight.

image

Also this presentation is the best introduction to OpenFoam presentation that I have seen about OpenFOAM. Helped me so much to better understand the structure of cases.

from butterfly.

mostaphaRoudsari avatar mostaphaRoudsari commented on July 26, 2024

I found the answer to a number of my questions here from @stefan-buildSCI. I think I can move forward with what I have here.

Basically to use snappyHexMesh, you must first generate a simple blockMesh. This mesh must be as big or bigger than the dimensions of the STL file you're using. It would be good to calculate the min, max dimensions of the STL file in xyz direction, and use this to fill out the vertex points of the blockMesh. The other parts of blockMesh should not be modified, basically we are making a big cube that will completely enclose the STL file.

from butterfly.

stgeorges avatar stgeorges commented on July 26, 2024

Not sure if I am disturbing the topic in any way, but I would like to share a small Ladybug component: "Pedestrian wind comfort".
Based on the wind factors it will perform an analysis of the wind comfort and safety of pedestrians at the location:

pedestrianwindcomfort_component

https://www.dropbox.com/s/qze418bv0ae5j74/pedestrianWindComfort.zip?dl=0

Independently from the Butterfly components it can import wind factors from any other cfd application (Ansys, Tecplot 360, SolidWorks...), but it is convenient as well to release it into the public as Butterfly components are closing to its release.
I must mention my gratitude towards Dr. Liam Harrington for the help and advises in developing it.

from butterfly.

mostaphaRoudsari avatar mostaphaRoudsari commented on July 26, 2024

@stgeorges this look very nice. thanks for sharing! How does this differs from the one that @chriswmackey and @TheodoreGalanos are developing. I suggest to open a separate issue for each component so we don't end up with very long discussions.

from butterfly.

stgeorges avatar stgeorges commented on July 26, 2024

Hi @mostaphaRoudsari ,
I opened a new topic on "Pedestrian wind comfort" component in here:
ladybug-tools/ladybug-legacy#266

from butterfly.

mostaphaRoudsari avatar mostaphaRoudsari commented on July 26, 2024

Thanks @stgeorges!

@TheodoreGalanos please break this down into separate issues and close this one. Once we have some progress on #21 I can start putting them together pretty quick. Thanks.

from butterfly.

chensi0700 avatar chensi0700 commented on July 26, 2024

hi @TheodoreGalanos and @mostaphaRoudsari i test a outdoor wind analysis and it works well with butterfly. I think it will be perfect if some new component will add to butterfly.

  1. definition for region refinement. in most of my case, the simulation domain is large and I want to have more density mesh around my target building. Refinement region will be a suitable way to meet my demand.
  2. add layers. now in snappyhexmeshdict component true or false will be selected for addlayers so i think that means the addlayers iteration will be done for all the surfaces in case. did I understand right? and some times I should only add layers for some dedicate surface like ground. I am wondering if there is some ways to meet my demand.
    the attached file is my rest case for outdoor wind simulation.
    image

from butterfly.

mostaphaRoudsari avatar mostaphaRoudsari commented on July 26, 2024

Thanks @chensi0700 for sharing the results. Looks great!

  1. Check #59.
  2. Can you open a new issue for layers. @TheodoreGalanos and I have discussed this before but thought it can be done later. Let us know the case and we can figure out the best way to integrate it into butterfly.

from butterfly.

mostaphaRoudsari avatar mostaphaRoudsari commented on July 26, 2024

@chensi0700 refinement region is added to butterfly.

@TheodoreGalanos @chensi0700 I'm going to close this issue as it has several issues inside itself. Please open a new issue for each of them separately.

from butterfly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.