We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Flutoo: Automatic generation of a 2-D-TIN for river hydraulics from 1-D cross section data

00:00

Formal Metadata

Title
Flutoo: Automatic generation of a 2-D-TIN for river hydraulics from 1-D cross section data
Title of Series
Number of Parts
208
Author
License
CC Attribution 4.0 International:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
24
197
Sheaf (mathematics)SoftwareSimulationStreaming mediaVisualization (computer graphics)Greatest elementPoint (geometry)Function (mathematics)Query languageWordInformation technology consultingMultiplication signPoint (geometry)Office suiteStatement (computer science)Level (video gaming)Flow separationTriangleSoftware testingPolygon meshProcess (computing)PlanningDistanceFunctional (mathematics)BitSoftwareProfil (magazine)GeometryDifferent (Kate Ryan album)SurfaceCodeLine (geometry)Projective planeDenial-of-service attackBuildingCross section (physics)ResultantComputer simulationNeuroinformatikFinite element methodAlgorithmRight angleWeight functionWeightBoundary value problemStreaming mediaParameter (computer programming)Fitness functionStreamlines, streaklines, and pathlinesComputer animation
Line (geometry)CASE <Informatik>Similarity (geometry)Streaming mediaVisualization (computer graphics)Right angleAngleTriangleCurveCharacteristic polynomialDean numberDisintegrationFunction (mathematics)ASCIIWavefrontSource codeCodeDemo (music)NP-hardComputerDemonLine (geometry)Information technology consultingProfil (magazine)Point (geometry)Right angleAngleTriangle2 (number)ResultantPlug-in (computing)Flow separationSimulationCodeCurveVisualization (computer graphics)Boundary value problemFunctional (mathematics)SoftwareGeometryInterpolationBitCalculationMultiplication signSheaf (mathematics)Statement (computer science)Projective planeStreamlines, streaklines, and pathlinesGreen's functionWordFinite element methodMereologyGraph coloringDatabaseComputer animation
DistanceProfil (magazine)Polygon meshPoint (geometry)Process (computing)Line (geometry)CalculationPosition operatorAngleSimulationInterpolationProjective planeFinite element methodInformation technology consultingAsynchronous Transfer ModeCurveGame controllerSoftwareOrder (biology)Office suiteWeight functionDirection (geometry)GeometryAreaMeasurementWater vaporTriangleSet (mathematics)MathematicsWeightAlgorithmSocial classFunctional (mathematics)Element (mathematics)Computer animation
Transcript: English(auto-generated)
The project that I want to present you now is a project that I finished two years ago. There was a consultant office that needed a very special tool and they said to me, well you can use whatever tool you want and I decided to realize the tool with Python and
with the PostgreSQL database, with PostGIS, because I think that the functionality, the spatial functionality in PostGIS is very excellent. Although I think some people might
have got the idea to realize something like this, I will show you, with ordinary Python codes or geometrical functions and all that, but I found that also this can be realized more efficient by using only the spatial functions in PostGIS. You will see that there is a lot of
geometry in the functionality here but I haven't written nearly a little bit, very few coding I had to do in Python, you will see. The project is called Fluto which consists of two German words
Flus tool, you can understand directly, Flus River. The office that gave me this job is closed now and unfortunately I hope that was not the reason. They use the software very often
I know that because I got a lot of test data of different rivers in Germany. On my computer there are seven or eight streams, several kilometers, so they use this tool really often
only for one year and then the work was finished. Fluto is a tool for data preparation in 2D flood simulations in rivers, only in rivers. The European Union has made all the countries in Europe calculate the flood level in the rivers and the consultant office, Hakka Fahl,
which gave me the money for this project, they grabbed some of these jobs and made the calculations of the flood level for every hundred years and several other
time levels and these plans are all published. All the people in Germany can see these plans and where the surface level every hundred years may eventually be and may possibly be and the consequence of these plans that are published is that the city planning
is influenced very hard by that because you are not allowed to build any buildings in these areas. So the work was very important. The Fluto tool is a data preparation tool, a very
streamline, stream center lines and cross-sections. You see here the points of the cross-section
measured throughout all of Germany but for two dimensional simulations you need a finite element mesh. Well you could create the finite element as you mesh, as you always do. You create a boundary and then use any software to fill these with triangles but it's not a very
efficient method in rivers because you need the edges, the ground edge, you need the border edge and the edge have to follow the streamline. So it was very important that the triangles
represent the edges. So the first thing was to create lines along the edges and the triangles had to be built along these lines. It's not very easy because these profiles, one after another,
don't fit very well together. In one profile you have 20 points and the other one only has 10. Sometimes the bank edge is very near to the end of the profile, sometimes not. The distance between the points is very different and all that.
So that makes creating the mesh a little bit more complicated. I will show you some of the points. One is that very often in the profile data the edges have not been fixed. So in one example project I had nearly 300 profiles
and only 20 of them defined which of the points in the profile was the left bank and the right bank and the left ground and the right ground edge. In the other 280 they would have had to fix these points by hand. Nobody does want to do that
except he is forced to. And then I tried to create a tool that finds these points automatically. I had two tries. The first one was not very efficient, I must admit.
The first one had an efficiency lower than 90% so there would have been left about 50 profiles that wouldn't work sufficiently and also you would have to check a lot. When I saw the results I said no this is not a good tool, I cannot go to my customer and
tell him that because this wasn't sufficient. And then I had another idea and this algorithm uses a SQL statement. The first attempt was to follow the points throughout the profile
and find out when there is a strong slope between two points and then the slope between the next two points changes. But this was not very sufficient. What was very efficient was using a weighting function. A weighting function that represents an ideal profile like this and then weights every
point how near it is to this profile. It's a function, a very easy function with two parameters included in the SQL statement. So that was the interesting thing. I didn't write Python code, I wrote a function which I included in the SQL statement and then run an SQL statement over
the data and it gave me all the points in the profiles. And it has an efficiency of 98% so it was three, four, five profiles that didn't work and all the other points were perfect. I was impressed on my own. Finding the edges in the profile that was one
of the functions included in this software. Next problem was I told you when the profiles one after another are very different you have to connect the points in a sufficient
manner. For example the right bank and the left bank here as in this example have to be connected to each other. It's a little bit difficult calculation how to connect all the other points that the lines between that don't cross and all that. This is a code that has been written
in Python, not in an SQL statement. But it was a little bit tricky until it really worked. Then I had to interpolate a lot of things because when you directly draw lines for the
triangles between one profile to the next one it wouldn't follow the streamline. So I had to insert a lot of intermediate profiles and had to interpolate all the points on that. The problem is that the profiles are not always rectangular. Here you see it is a little bit
drawn turned to the right and this one is in a different angle. So the profiles in between they have to change always a little bit until they come near to the next profile and all that. Also the center line is not always the center line. Sometimes the center line is the left
center line or the right center line and also this one has to change smoothly from one to the other profile. The boundary here has to be interpolated parallel to the streamline more or less parallel. So it's a lot of interpolation work. All these functions could be integrated in SQL statements. That was very impressive. I didn't do any geometry in
Python code once again. It took me some minutes to create all these SQL statements. The interpolation of the curve of the curve line is a code that has been written in Python.
This is the result. You see here it's very smooth and you can also see here the ground in green and the back here in blue. Perhaps it should be the other way around the colors. This has been very sufficient. You see also that the river is smaller in some parts and here
becomes wider and all that. So it's very important that this movement also follows the curves and all that. The most interesting thing is that the code was really really fast
in the example that I mentioned before which has about nine miles section of a river. It had nearly 300 profiles that had to be connected and at the end there were 70,000 triangles and the code I think 10 seconds or something like that. It was very very fast.
So the engineers using this tool started the tool and then 10 seconds later it was finished and then they had to export the triangles into their simulation software and all that.
So it was really really fast. As I mentioned they use this tool in several projects. I think they have got the money back in all these projects many times. Only two drawbacks I have to mention about this tool that is that sometimes there are lazy triangles of the
right word. Very long, very small triangles. Well maybe I can point that out. Yeah not really. There were two points at the profile very near to each other
so that produced long and very small triangles. That is the one drawback because the finite element software doesn't like it so much. The other one is if the streamline has very
small curves, very strong curves, then the interpolated profiles hit each other. I don't have any solution for that until now. The consultant worked with the software and didn't ask for an improvement for that point. They changed it by hand but working on about
50-30 triangles instead of 70,000 it still is very efficient so it wasn't really a problem.
How did the software work? It was integrating QGIS but not really. I didn't write a plugin at that time. I didn't know how to do that so I used the toolbox which is very efficient. It was very simple to use the toolbox and integrate the software there but in reality it's like that. You have QGIS as the GUI but you start the plugin and the
plugin runs on its own and uses the PostGIS database on its own. It doesn't have anything to do with QGIS except that you see the results in QGIS. But it's very efficient to work
this way. Finally, I thought about a method how to visualize the data. The consultant had two methods to visualize the results. One was in Argis. They imported the data into Argis and
they made some visualization but I also gave them Blender and set them well. You can export the data directly to Blender and then fly through the river and check if everything is okay. I was at a workshop on Monday in Blender. Now I know
how I could have made it better but it works and I will show you at the end a small animation flight over a river. This is the river which is nine miles long so it will take five minutes.
I think that's the end of my presentation. Thank you very much and while the river is flowing there in the background I am free for your questions. Thank you very much. Video? Yeah, bold. I like it, I like it. Awesome questions. Yes, go ahead. We had the profiles.
So I didn't have the water level. The consultant only needed the geometry of the river and after that they did the hydraulic calculation. I didn't have to do anything with the hydraulic
calculations. That was the point. They needed these triangles for the finite element calculation,
the two-dimensional finite element calculation. The job of this tool was to create this triangular mesh along the edges. That was what the tool had to do. So the interpolation of the profiles mustn't be too far from each other because then the triangles
would become too long and all these things. That was the important point. The creation of these triangles. This is a possibility that you don't see the triangles directly but if I would switch the graphic modes to line mode so that I see only the edges of the triangles
then you would see the triangular mesh directly and we use this functionality in Blender because you could really very good watch the triangles and control if they are too long or things like that. This is only visualization. It's very easy in Blender to use it to fly through the area and I liked it.
It's difficult if not actually end up with snaking lines across a river because the boat
drifts and does continuous measurements. Do you think it would be possible from going straight profile lines to get like one continuous snaking line across the river? So you don't have straight profile lines but one continuous snaking line of height measurements
and turn that into a grid. You have a streamline like that?
The river and the boat is going up and down but because the boat is moving with the water in the river we never get straight lines but they always bend. I got some profiles which were like this and so it did integrate these also.
If the points lie fairly in one direction it's enough. They don't have to go exactly on one line because the algorithm works with the line but the profile points can have a certain distance of that and so the position of the profile points is projected on the line.
It would only get problems if the projection order would change. So if the points are like this that would prove problems I think. But they will change because the boat is going up and down but it always moves in the same
direction. So one line is bent this way the other line is bent the other way and again. So they always bend. That doesn't matter. I showed you in the picture that the profiles were not rectangular. They were turned like this and the other one like that.
The profiles in between they are interpolated so they turn like this. So they need not turn their V out or turn it off. They can bend any angle and especially they can also go like this. So this works. I tried it and it works. Sometimes if the bending is too hard then
you have problems. The same problem if the curve is too narrow. But it's not a problem if the points are like this for example. The only problem was when I had a data set of one river where the profile points are very near to each other and then they go like this and the next one is like this
and they cross each other. That's very difficult. So it makes sense if you have to interpolate but you cannot interpolate points which are so near to another. You cannot interpolate anything between these. Yeah, one more question.
Can you think more about the weighting function? How are you doing the weighting? The weighting function I only used for finding the edges.
For finding where is the change and where is the end of the ground. Because the hydraulic simulation software needs these points. That was interesting. Hair class doesn't only need I think the bank edges but in Germany we have a simulation software which also needs the edges of the ground.
And additionally the consultant office wanted to be able to define additional edges to make sure that the lines from one profile to the next one are not crossed by triangles.
I don't know why exactly. They wanted to define extra free defined points that are connected between the profiles. So the software allows to define as many as you want.