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
244 stars 69 forks source link

Validating results against measurement or other available tools #15

Open mostaphaRoudsari opened 8 years ago

mostaphaRoudsari commented 8 years ago

@chriswmackey, @TheodoreGalanos,

Just read your comments here about all the progress: https://github.com/mostaphaRoudsari/Butterfly/issues/14#issuecomment-225077895. Impressive!

Is it possible to compare the results against any available measured data or other available tools (e.g. envimet)?

TheodoreGalanos commented 8 years ago

@mostaphaRoudsari

Generally, there are a number of experimental data that are frequently used to validate CFD solvers. Unfortunately, those usuall relate to wind tunnel measurements or indoor thermal data. I do not know of outdoor simulations being validated against some measured data. The best we can hope is to compare and contrast with tools like envi-met and components for outdoor thermal comfort assessment in LB and HB.

On that front, recently I came in contact with Francesco who posted a related issue in the LB forums. (Discussion here: http://www.grasshopper3d.com/group/ladybug/forum/topics/outdoor-microclimate-map-issue) He is willing to compare Envi-Met results he has for his case study with our method. I just received the information from him and I will try to squeeze in the simulations this week.

From what I see in his screenshots, he used Envi-Met to directly calculate thermal comfort (PMV values). I really don't know a lot about it to understand how the software incorporates, or even indeed it does, the assessment of wind flow fields.

I will look into it this week and update on that once I have news.

Kind regards, Theodore.

chriswmackey commented 8 years ago

@mostaphaRoudsari and @TheodoreGalanos ,

A comparison with ENVI-MET would be great and I think that is our best shot for the time being. I can confirm the observation that there is no real-world experimental data for outdoor CFD validation. The last time that I went to an expert's presentation on the topic, they were just starting to collect such data and I was told that "within 10 years" we should have it.

I also just wanted to add that I am going to do a comparison of Theodore's CFD studies against a GH-based Lattice Boltzmann tool that an MIT colleague of mine put together. I see this comparison more as a validation of the Lattice Boltzmann tool than the other way around but, if the results match, things will look good for both tools.

-Chris

kastnerp commented 8 years ago

@chriswmackey I'm following this thread for quite some time now. Interesting approach from you guys - as usual. I was wondering, why don't you compare your studies against some experimental data available in terms of pressure distributions. This publication aggregated quite some data: http://www.sciencedirect.com/science/article/pii/S0360132309000444

With the pressure distribution and therefore the velocities being accurate, one should be able to argue that the temperature distribution can't be so far off either. What's your opinion on this?

TheodoreGalanos commented 8 years ago

@kostnermo Thanks for sharing the article Patrick! I'll try and take a look at it, only need to find me a student (damn I miss the academic pass). I've only seen pressure coefficients used during WDR studies, haven't done it yeet myself. The main reason is it's a hassle with OpenFOAM, most people have to write their own code for it. Ofc commercial programs have it set and I'm guessing if I take some time to look into the physics we could create a function object for it. It does seem to be a way around though for experimental data that might not be out there.

In terms of verification, I think we don't really need to do it with the wind simulation results, more so with the thermal comfort results. The CFD studies, barring ofc mistakes on my side (which is always possible), are already validated in a sense since all the solvers used to calculate them have been heavily studied over the years.

I guess even the thermal comfort results don't need to be validated per se, in the sense of aligning them to other software out there. If we did it right, I expect (maybe I have high expectations) that the results of this workflow will be different than the other software out there, since a lot of the things this workflow does and especially the scale in which it does it, is quite new.

I think the interesting part is comparing with other software and trying to assess the implications of differences in the results. Actually validating the results I would guess needs some kind experimental data of outdoor thermal comfort, similar to how indoor studies are validated against the Fanger type chamber studies. Not sure there is such a thing though, Chris should know more.

One thing I could do is use my HOBOs for an outdoor thermal comfort study. That would be really cool actually, only I'd need help setting it up. @chriswmackey ? :)

Zarisu commented 7 years ago

Hey guys, I hope it's okay that I post a question into this thread since it has to do with validation of Bufferfly (outdoor simulations). I have made two nearly identical models in Ansys fluent and Bufferfly, and it seems that Butterfly varies up to 25%, shown on the figure below.

difference_for_github

The intended use for me is pressure on building facades, where the difference is insignificant when looking at the wind ward facade, however there is a huge difference when looking at the sheltered side.

pressure_for_github

My question is, what could course this difference? My initial thought is that it has to due with the differences in the solver?

Best Regards /Zarisu

mostaphaRoudsari commented 7 years ago

Hi @Zarisu, Thank you for doing the test and sharing it back with us with the nice visualization. What is the solver that you're using in Ansys Fluent, and Butterfly? RNGkEpsilon? The results at point D looks very similar.

Did you introduce the gravity in Ansys model? Butterfly by default writes the gravity file for both indoor and outdoor cases.

TheodoreGalanos commented 7 years ago

Hi @Zarisu

Thank you so much for these comparison studies, it is really valuable to us.

This is a complicated issue but if I was to narrow it down to one or two words that would be 'nearly identical'.

It is very important to compare identical models since minor differences can mean the world. Also, there are a few small differences on how Ansys accounts for some things and how it meshes. I'm not a Fluent user so I don't know much here.

Is it possible for you to share the set up of both your simulations? The most important options would be:

25% difference is huge and I do think it will be due to one of the above options, or perhaps one I forgot to mention. Do you perhaps have actual data that we can use to validate results? Studies like these can help us change our 'default' values which atm are really best practices that seem to work. But we are looking to update them before the final version, especially the surface roughness for the ground boundary.

Thanks again for testing BF and for your study!

Kind regards, Theodore.

Zarisu commented 7 years ago

You're welcome and thanks for the detailed answers and quick response.

I have use 'RNGkEpsilon solver' in Ansys butdo not use gravity in the Ansys model, because of this quote: "As there is no significant pressure different across the domain, air flow around buildings can be considered as incompressible, therefore the default operating pressure is correct. As the air flow can be considered isothermal, there is no need to specify the gravitational force and to enable energy equation."

For the boundary conditions i have simplified the model and have therefore removed the roughnesses that Ansys uses by default (walls).

For the meshing options I have used to different types of meshes for the two simultions, since I have gone for the best practice in Ansys to make the most valid result and then tried to modifity the mesh in Butterfly to match this simulation. I know this is not the best suited approach for comparison and therefore I'll test the programs with identical meshes soon.

I use an velocity inlet file for the Ansys simulation. The value uf is calcaulted based on the roughness-length and velocity inlet. Uf = k/ln(10+y0/y0). The windspeed v is 3.3 m/s for the simulation of the wind speeds (the first picture i posted) and the roughnesslength is 0.25. The code can be found here:

https://www.dropbox.com/s/y5mn833i9rg6fy8/ANSYS_Inlet-wind_South_3dot3ms.txt?dl=0

Is it possible for me to turn off gravitational force in BF?

Best Regards /Zarisu

TheodoreGalanos commented 7 years ago

Hi @Zarisu

The gravitational force will not be taken into account in this type of simulation. It would only come in to effect in the case you were using buoyancy solvers.

The friction velocity code you included is exactly the same with the OF one (see https://github.com/OpenFOAM/OpenFOAM-3.0.x/blob/master/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/atmBoundaryLayer/atmBoundaryLayer.H).

I think the difference will be in the mesh properties, especially type and quality. Try to develop a meshing strategy independent of software (e.g. areas of refinement, cell size, etc.) and then apply that to both software. I am not sure what the best practice mesh is in Ansys (I imagine it is the one developed by Blocken et al.) but you can try generating a hexa mesh to compare to SHM.

You can also start with the simple case of a velocity inlet.

Also please check that you are comparing static to static or dynamic to dynamic pressure (the comment about OF dividing pressure with density in the reported values).

Kind regards, Theodore.

Zarisu commented 7 years ago

Hi @TheodoreGalanos, At the risk of sounding stupid, I believe i'm comparing static to static pressure. I exported my Ansys as static pressure and when i show BF results in OF is it then the static or dynamic pressure i'm showing?

And btw - would you like me to keep you updated with my studies?

Best Regards /Zarisu

TheodoreGalanos commented 7 years ago

Hi @Zarisu

I am sorry it's my mistake I don't think the distinction applies. I only meant that OF (as far as I know) reports the pressure values already divided by the density of the air (smth like 1.225). Just make sure Ansys follows the same or just align the results if it doesn't.

Yes please keep us posted in github, it can help the whole community!

P.S.: There are a lot of studies comparing OF and Ansys around. Perhaps you can find a best practice on how to conduct the comparison. I haven't done it so I'm not aware of one.

Kind regards, Theodore.

mostaphaRoudsari commented 7 years ago

Hi @Zarisu and @TheodoreGalanos! Yes. Please keep us posted, and we will see if we have to change anything on our side. I wonder if we can use these cases for verification?

kastnerp commented 7 years ago

Hi @Zarisu,

you can import meshes created by Ansys and use them in OF. With this approach you should be independent from different mesh qualities.

I only meant that OF (as far as I know) reports the pressure values already divided by the density of the air (smth like 1.225)

That is true, simpleFoam uses pressure normalized by density.

Afaik, evaluating cp is pretty straight-forward in Ansys, is that correct? With OF you can do the same thing. This way you would compare normalized values on both side, which is the approach that is done quite often.

Best regards,

Patrick

Zarisu commented 7 years ago

Hi @kostnermo,

The cp calculation is Ansys should be straight-forward, although I haven't done it before. Btw thank you so much for the advise and the references (links), I believe that they'll be really helpful for my future work.

@mostaphaRoudsari, I'm currently trying to gather some wind tunnel simulation data, which I inted to utilise for validation of BF. If this is not possible to get a hold off, then I'm planing on making some wind tunnel tests myself :)

Best Regards /Zarisu