Butterfly, Reload a case

Hello everybody,

Has anybody succeeded reloading a case in Butterfly? For some reason I don’t manage to get the “case From Folder” running.
Any tips please?

Hi Julia,

There are plenty of components that read and/or load things from a BF case. Depends on what you want to achieve really.

  1. The look up case folder which finds the relevant text files of your case for easy reference.
  2. The sample case which will export probe locations and values.
  3. The load mesh that will load the mesh of the case (care should be taken when loading large cases).

In order to access all that though you would first have to actually re-load the case itself (i.e. the actual BF case created during the original run. To do that you can connect the case output of your Butterfly_Create_case_from_Tunnel component to the Butterfly_solution component directly. Then, with setting true for write and false for run you can simply re-run your Butterfly_Create_case_from_Tunnel component and your results should reload. You can then use the outputs of the Butterfly_solution component for other post-processing components.

As a suggestion, I would consider using paraview (paraview.org/download/) for a more efficient post-processing.

Hope this helps!

Kind regards,
Theodore.

First of all, THANKS Theodoros!

But I still have a couple more questions.

In my understanding to do this I must load again the geometry. So, is there any way of recovering the data in case I have lost my geometry? (this is not my case right now, but it can easily happen)

Another thing.
I have been working with paraview, no problem about that.
My problem is when I try to include this data in the UTCI calculations.
What I did was to internalise the vectors of 4 different directions and interpolate the data as a paper of Chris Mostapha and co. suggested. BUT, I have been needing to rotate the geometry, as when I was just changing the wind vector the snappy hex mesh was not working because I had too many cells. So, I had a different number of points for each wind direction and they were not matching. I just resolved this by rotating the points & vectors of the proves so all of the lists match.
My question is…is there an easier way? can I somehow increase the acceptance of the hex mesh to take all of my rotations? (and I tried increasing the “maxGlobalCells” to 6 millions, but not working)

Hi Julia,

You will need 4 difference cases, each with the geometry rotated appropriately for the wind directions you are taking into account.

With this method, of rotating geometry, the cases will differ slightly but with some care you can mesh them very similarly.

In our paper, we assured the same number of data is used by working backwards from an energy model. We first created an energy model of the area, then used the viewFactor component to create the viewFactor mesh. Then you can use the points that the component creates and a closest point component from native GH to interpolate your CFD data to your points.

In this way, each time you will end up with the same number of points that exactly correspond to the view factor mesh that you will be using in the UTCI calculation.

Hope this makes sense!

Kind regards,
Theodore.

1 Like

Thanks, Theodore.

If I recall correctly in Fluent point results, such as velocity and pressure along with the xyz coordinates, can be exported from the centroid of each cell or the vertices/nodes of the cells.

May I ask if Butterfly can export these data in this way, too? Or it’s better to do this in ParaView?

Hi Grasshope,

There are function objects that sample from supplied surface. Their advantage would be that you could use them during run time. But I feel paraview is really really good at this and quite easy to accomplish.

All you have to do is create your slice, at the height and place where you want to sample, then click on it and select File>Save Data. This will allow you to save a csv with all points and values included in your slice.

After you’ve done that, you should File>Save State to create a post-processing file with which you can open similar cases (e.g. you can use the same file for cases with 180 degrees difference, like N/S, NE/SW, etc.).

Kind regards,
Theodore.

Hi Theodoros,

Really sorry for the so late response.
Thanks for your help, I am happy to say that that’s the way I was using to model it so, great! I also managed to replicate part of your paper (not using yet the urban heat island effect) with good results. And no need to rotate the geometry finally (at least for low res)

My question is, is there a way to store the data?
at the moment I am exporting the vectors and grid into an excel so I can reload it for the UTCI calcs. But if I want to reload the case I need the original geometry. For the solar radiation/UTCI calcs I export the data of the resultant mesh into an excel so I can recall it. But I don’t see how to do this in butterfly and I wouldn’t have the option to reload in case I loose the original geometry. I don’t know if I’m explaining myself properly

Hi Julia,

You should not rely on BF, or even OF for that matter, to retrieve this kind of data from your case. If you want to extract and save results, you can use the aforementioned workflow in Paraview to save all data, at the specific areas you are interested in, in the form of .csv or even array files. These, in combination with your Rhino geometry and the (viewFactor) mesh on which you run your study, will allow you to reload these results any time you want in GH. Also, if you notice the .csv files exported from PV, they include the coordinates of each point, along with values, allowing you to visualize them at the correct place in rhino through native GH components.

If you want to reload new results from a case you have already run, the only way to do it would be to keep your run case in storage. If you would lose the case folder and/or results, then yes you would need to re run it all over again.

I would not suggest a flow where you export this amount of data from BF/GH/Rhino, even though it could potentially be accomplished, since Paraview is so much more efficient at it.

Edit: If you are slowly developing a large number of cases and you find yourself without much storage space (even after compressing your cases, which does wonders for OF) then a kind of hacky way I use is to reconstruct my last run time, and then delete the polyMesh folder of my case (along with any processor folders). In this way, if I need it in the future, I would simply re-run the blockMesh/SHM.

Hope this helps.

Kind regards,
Theodore.

1 Like

Hi Theodoros,

I am using butterfly to generate the base folder for a given geometry and to get the mesh right. Further to that I proceed in bash to run a transient simulation.

I am trying to read back the results into GH to integrate it in comfort calculations.

If I generate the probes with butterfly based on a given test surface and calculate in bash the results at those points, can paraview export a csv with only the results of those probes?

or

Without using probes, if I extract a plan slice in ParaView at a given height, Paraview will provide me with the values at the center of each cell of the mesh close to that slice. How does butterfly internally projects those values onto a test surface? somehow an average of the surrounding values? Can I replicate that manually?

best,
Olivier

Just read your earlier post.

Paraview slice -> save data to csv

Read in GH with the closest points to the test surface points.

Big thanks Theodoros.

Olivier

1 Like

Hi Theodoros,

I am not sure if you still receive question as it seems already been more than 5 years since these exchanges, but I’ve got related question recently about butterfly. It would be really great if you can give me an advice.

Now, I see that you don’t recommend to keep solution files and use them for the purpose of updating the post-processings of the simulations which I already run in the past, but, as I did not know the way to keep records of the simulations using Paraview when running those simulations in the past, I only kept the past solution files and nothing else. And, because you indicated here that there could be a way to use those solution files to reload the past simulation results, it would be really fantastic if you can give me a hint to do so. I tried to put back the solution files in the “outdoor_airflow” folder where those files had been originally generated, but no success to reload the simulation results up to now.
Thank you very much in advance,
toshi

Hi @toshi You can try to use create case from folder to reload the butterfly case.My butterfly is broken, you can ignore it
image