 to be here for the second time actually and Well, I'm giving today as everyone can see here on this huge screen A talk about computer aided engineering with Blender and in order well to do computer aided engineering with Blender Well, first of all everybody of us has to know what computer aided engineering is actually and so well actually it's Well industrial engineering with computers and I guess as it's the last talk of the conference We have seen lots of examples of industrial engineering in the conference But well, I still give this talk in order to promote it so what is it so there are of course Computated design applications which are part of engineering. So this is more or less the first step that you do if you want to Create something or create an object in the real world Then there are something that we will talk here is about fluid dynamics applications So if I if I have my my mobile How can I how can I do this kind of calculations and they're also for example finite element calculations and in general? So finite element applications are for example if I want to know well Does an object support the impact onto it does an object will an object survive will building stay in its place? calculations like this and Of course, well, it's in the end. It's all kind of numerical simulations or solving partial differential equations That predict the mechanical properties of objects to be engineered Yeah, and not only to be engineered because well, this is also an engineering problem And in this problem This is an image that I actually rendered for a poster at the scientific presentation So here the question was like What is the weight that you can put on this? women's back until until her vertebrae it will break yeah and Then you find out well actually it depends not only on the vertebrae it and stuff like this But what is the most important stuff is actually the the center of Mars? So where is the center of Mars of all the Mars that is above this vertebrae? Yeah, and this is a typical engineering problem And you can use blender to visualize it And if you put this this visualization onto your poster at the scientific presentations Well, then actually people come to watch this poster So continue what is the state of of computer aided engineering right now? Yeah, and this is the big problem and this is also why I come here is that well There are lots of tools available, but all these tools. They are very expensive They are all closed stores and They are hard to get to get working on So these tools well, they all of course they have names maybe some guys of notice tools and Well, what can we do about it in order to to make this kind of work that they Typically is done with those programs open source and to use an open source pipeline in order to do it So there are open source engines available But there is no not really a modeling program or a cart program available that you can do it and Then some of these open source engines are rather weird So for example, there is a code such one and code after Which is used well by a French government institutions more or less or well almost French government institutions In order to make their calculations for the nuclear power plants and they are open source But the problem is well they use French command syntax So you get an English manual, but then you type in French commands and it's kind of yeah It drives you a bit crazy in your brain, but That's the way it is. Yeah, and then we have some well some visualization tools Which are quite nice, but well you can't really pass trace with them your results So maybe Blender can help us in here. Yeah So Now right now that we know what CAE is and which programs are used in the in the general field What is the typical pipeline? So how do you do it? Yeah, if I want to do a fluid simulation Or if I want to do a finite element simulation, what am I going to do? So first of all, I need a geometric model of my Of what I want to simulate. Yeah, and the geometric model in most of the cases Well, it's just a surface. So it's an STL file that I can create with blender. Yeah Then you have to create a mesh So actually this mesh is not the blender mesh. Yeah, so for forget for a moment blender mesh So it's actually how do I partition the object? Yeah, that I investigate in order to solve my equations on it And so in the normal way, so you use something like hexahedrons or tetrahedrons and you have them small little boxes inside your object and Well, then you have to define it seems something like boundary conditions. So where is my object held in place? What is the wind speed stuff like this and then you simulate? Yeah, and then at the end when you have the simulation then you have lots of data and then you don't know. Well, what does my simulation actually tell me and Well, the stuff how to do this then is well, you want to visualize it and you want to render it and Then you interpret your results and hopefully you have the right interpretation of the simulation that we have And so right now the question is where comes blender in to all this kind of stuff well Blender can be used to create a geometric model and Blender can of course be used in order to extract visualize and render all these kinds of stuff Well, there is also some physical stuff inside blender, but in this case we just well We want to use blender in order to use these open source engines So we do the geometric modeling and the visualization in this talk But maybe in the future well some guys are like programming Python interfaces to this kind of stuff And then you do all in Blender. So this this is like the optimal wall And why are we want do we want to do this? Well, there is of course a need for an intuitive open source Computated engineering platform, which at the moment doesn't exist And they really stress this because the problem is Well, I was hired from a last job in order to write the finite element code for for a lab And it was cheaper for them than buying the closed source software in order to hire me and to write the code for them for the Small brick that they wanted to have. Yeah so the experiment What do we want to do? So we want to have an open source pipeline. So we tried to do it there. So can we make and? Computated engineering using only open source tools does it work? So we use blender to build the geometric model then we use open source matching tools Then we use an open source software, which is called open form in order to run the simulation And then we use some kind of Python code in order to get everything back into Blender And then we do some rendering and then we will watch our results So Building the geometric model in general if you wanted to computer aided engineering Well, you do the same thing as in for 3d printing you want to have whole models which are physically correct So you can't just put a surface somewhere and hope that this will work So you have to have a volume which is closed and which is manifold And then when once you have this volume well you export in this case Your object to STL you verify your model baby by by a re-importing it and one thing Which is also important if you do of course engineering is that you get your units, right? And so you should be making sure that in all these files So we're into whatever you export it and into whatever you import it that you use the same Unit because it's not obvious because most of these files don't store the units actually in them So you don't really know If the STL file is right now in millimeters or in centimeters or yeah, so yeah So we started out so this year is in Blender So we create this model here and we try to make a simulation with this model So we once we have this model where we have to build a mesh And so well, yeah the type of mesh that you need well will depend on the problem So in this case, it's fluid dynamic simulation. So we will use some kind of hexahedral mesh it's very very simple problem actually and In this case we showed that we can use these open source tools So that we can use open-form block mesh and snappy hex mesh in order to do this and what does this look like? So This year is actually the STL surface that we have created in Blender Yeah, so this house that we have just seen before and this here is the mesh There are little boxes that are around this object Yeah, and right now you know why actually the same principles as in 3d printing apply because otherwise your boxes will be in There and then your single not work anymore. Yeah So this is what I talked before the initial conditions so the initial conditions well We have a quite windy night. It's blowing with 80 kilometers per hour And I want to see what happens with this house. Yeah, and Well on the end so actually The way this is set up this is actually a tunnel Yeah, so the roof so the top of the tunnel is very high above the roof notice shown in here in this representation so that actually the The impact of the roof doesn't doesn't fall into the simulation and on the end of the tunnel Well, you say you have a constant pressure and what this does is actually that when the wind comes from this side that it sucks out The air on the other side. Yeah Yeah, this is basically recaptured what I just told you so we have Conson yeah constant velocity and input and stuff like this and then of course you also have to define what kind of simulation model I use so Simple k epsilon model, I don't want to go into details here So actually it's the differential equations that I want to solve on this grid. Yeah, so To stay with this. Yeah, and once we have this simulation Well, then we obtain a VTK file Which is basically so we have all these little boxes and we have a value in this box So in this box so we know what is the wind speed in this box for example And the question is then how do we get this back into blender? So in this case well, I wrote some fightin glue code in order to create streamlines and Well, I was very proud of this because actually the stuff what happened is I get I got this right so that I generate Automatically the key frames there in order so that the that the stream line actually moves with the correct speed in In this box so so that you not only see the line how the air moves But that you also see it with the correct speed how it moves and Well, this is this is what the result looks like Yeah, so this is actually so these are this is the building that we had and these are the streamlines around around the building So this is one one of the things that you can do with this Then you can for example if you want to have volumetric properties So you can use your mesh you can create image slices and you can show Well results volumetric results. Yeah, for example What is the I don't know the the air temperature? At the at an object and this for example this year was a simulation where you have got the tube And there is air with a very high velocity flowing through this tube And you have an obstacle in this tube and so you see here where how where the air actually is getting hot So this is done using using cycles volume rendering. Yeah, okay, then you have like Well surface properties well, it's the same stuff. So where you actually you get you take an image So you create an image from your mesh and then you UV map the image onto your blender mesh Yeah, and here it gets a bit complicated. So just to tell you Well, if you want to do this in python, maybe maybe it has it has improved a bit But if you take for example the the cylinder primitive in blender, yeah Well, your face is zero to 29 which go into one direction Yeah, and on all of a sudden you have faces 31 and 32. Yeah, which are not really in order because between them You have the top face. Yeah, which go into the other direction. Yeah And if you want to UV map onto that and your UV map you say, okay My python code is correct and what happens so you don't know why why on these two surfaces I don't get what I actually expect from my simulation and actually You find out that it's all mixed up. So I don't know who created these primitives But if it would be if the developers here if if it could be arranged in a logic way, it would be would be very nice Okay, so this is for example a rendering that comes from this so this was a test rendering that that I sent to a client one day and Here actually so there were some pipes there and the question was actually well Will these pipes break or won't they break and So actually they gave me the fluid dynamic simulations And I gave them this rendering and they wanted to make some commercial movie out of this and Here you see that well actually in this section where these pipes are cool That you have some thermal stress so that the thermal gradient is Rather high because you have different different colors on them. Yeah So this is done this way and then we come to the to the results of of so to some movies Yeah, I will go back to my computer to start the movies because using Google Yeah, I will just close it actually Or just put it back here So this is a result of this so here you see these streamlines flowing around the object Okay, this doesn't work here, but I guess it will come up with the next one automatically. Yeah So this is from the front and we got it from the side another time And then we cut the force movie where we have these projections of UV maps and where we also have a sample of this volumetric rendering So here you got it from the side and this here might be the most interesting So here you have some kind of flames that are some hot air Which is injected into this into this chamber if you want to and you have these rods which are cooled at the end And so you see at the end here Well, they're still I guess this uv bug that we had before when I look at this final Try it, but you see actually the gradient on the on the temperature gradient on the on the pipes Back to the presentation Okay, so This basically was the talk here, but I just want to point out. Well, you can do all these things Yeah, this is completely done in open-source software. Yeah, it's not really rocket science either So if you if you want to do it there are manuals for this and it's not I guess it should be accessible to most of the people that are here Well, you can get all the glue code in order to render these these streamlines and in order to export these These images from the VTK files that you can UV map onto your buddies and stuff like this on on Github You can get the slides and all this stuff on my Google Drive and Well, this is the open-source software that was used for for this talk While for what we have presented here actually well paraview is completely obsolete. Yeah, so paraview was just used as a site Visualization tool if it actually works if you get the real results if the streamlines are correct and stuff like this Then I say thanks to to kind of computing because well Some of the stuff was when I was employed there. I wrote some of this stuff here And to the to the George Sharp back Institute of biomechanics where Well, where I made the rendering that you have seen before for the for the person which was standing there Okay