Thank you So Let's see what I can talk about. Well, first of all a bit about myself. I don't know if you know me. I'm Mark Limburg I'm I've been doing Python for quite a long time. I started very early I have a company doing a Python project for customers. I'm a senior architect for Python and Do consulting training. I'm also a Python core developer. I am board member of the PSF and board member of the EPS and I'm based in the door from Germany so I Thought I'd put together a talk with some Python idioms that might be useful for you This talk is basically focused on on people that have just started programming Python and have all these nice things These nice tools out there and nice ways of doing things in Python, but sometimes don't really know which of the Possibilities there are they should use in their code and maybe want to get some guidance in in writing better code So unfortunately, this is the only photograph I have in the slides. Most of the other stuff is just text There's lots of text on the slides. I'm not going to read everything for you. You don't have to read everything I'm going to put the slides up Afterwards and then you can download it if you don't want to get more information from it So this is the agenda Quite a few bullets there. So let's start so I can finish on time. So first thing coding conventions, of course you want to know how to actually write the your code and Fortunately in in Python, we have a standard for this. It's the pep8 standard You can download it on the on the Python.org website It has evolved a lot over the very over the years. It's constantly being updated To address new questions that you might have It's written in a way that allows you to write readable code That's one of the I think one of the best features in Python that you have that you it's very easy to write readable code It's a guideline. It's not necessarily Fixed in any way. You can you can change things in there if you want to you can build your corporate coding guidelines based on it there's some help from a Package called pep8 that you can run to actually check your code against these pep8 Guidelines and then it'll point out various things that you've done wrong. You might want to change them So that's one thing that you should definitely have a look at one thing That's not mentioned in that pep8 is the typical layout of a Python module And I've seen really Well, not very well structured code in in Python modules being written by programmers So the the standard module layout that we usually use in the standard library, for example, or we use in our code that we write It's this one is very basic. You have a header you have a Tool section and then you have a body section and just going to go through this very quickly It always starts with a doc string So you put the documentation for your for your module what's it what the module does on a very high level into the Doc string and you start with the imports I usually put the Python imports first and then the third-party imports as Second list and then I have the application modules as third list So it's very easy to see where various things come from in your code Then the next section is constants I always put them into one section at the top so I can immediately see them and then I have globals Sometimes at least that I need in the module and put them behind the constant so that you can immediately find them if you need them next section then Is the tool section? This is basically used for things that you Mostly only need in your module like there's one exception here, which is the exceptions section Because sometimes these exceptions of course they wander outside your your module And then you want to be able to to see where they're coming from So first you define all the the exceptions that you have in your module and then you define the helper functions Defining exceptions by the way, it's very easy You can just subclass the the ones that you have in in Python and then you can have specific exceptions for your module Which is helpful Especially when debugging because you immediately know where where your which module your exception is coming from then in the body Section, which is basically the meat of the module You first define the functions and then you find define the classes and at the very end You always have this typical if name equals main and execute some main function for example The module execution part. This is run when you import the module and It's only run because you you have this condition here It's only run when you import the module at The the main scope so when you run when you write Python and then module dot part dot py then this part is run You should normally try to avoid having executable code at module scope level so that you don't have any side effects when importing it Sometimes that's not possible, but you should try to do that. So this is the overview The red parts here are basically defining your module API and That's how you can structure your modules if you want to have really clear kind of Approach it then of course, it's like everything in Python. You should always use descriptive names for your modules It should be more or less immediately obvious what the module does There's a typical way of doing that in Python You usually take the most important class for example that you define in the module and you name the the module after that class I already told you about the executable code and one recommendation. I have for you You should always use absolute imports if you have packages then you you can also use relative imports But if you have larger projects then absolute imports make your life a lot easier. So you should just avoid the relative imports So now I'm going to start a tour from high level to low level Python idioms. It's basically this is just a collection of things I Put together. I don't have enough time to go into all the various details I could probably talk for a few hours mentioning everything So I'm just gonna skim a few things. I'm gonna give you pointers for other things that you can look at The first thing I want to start with is common patterns that you have in Python How many of you know coding patterns like the Gamma book for example? Not that many people so software patterns are basically things that that people have become aware of common things that you You do again and again when programming things So there was the the gang of four. I don't know how many years ago many years ago anyway They wrote a book called the The Gamma book and that Basically lists a lot of current patterns that you find in software design And and these are just these are some patterns that you have in Python some of them are not not mentioned in that Gamma book The most famous pattern in Python, of course, is the duck typing pattern. So in Python everything happens using Using duck typing you're always interested in your API. You're not so much interested in which base class This some object is derived from so The the principle behind duck typing is if it if it looks like a duck if it's Quarks like a duck then it's probably a duck and that's good enough for Python So it's not like in Java or statically typed languages We actually have to make sure that a certain base class is being used and there are lots of like examples of that in the Python standard library The next one is the facade or the adapter pattern. This is Used in conjunction with the duck typing pattern You try to make an object that you have look like in a other object So basically you make some for example some bird make Make a bird look like a duck so that you can use it in your code that uses the duck interface This is the facade or the adapter code And again, there are many examples of that in Python then we have singletons. You probably know false and true None is also a single thing ellipsis is a single thing. We have a special single encode not implemented You probably don't know that the small integers in CPython are singletons. So there only exist ones in your process The next one is factories. So in Python You only have a single in it thunder in it method to create objects from classes and sometimes you want different ways of creating your objects and Before we had static Sorry before we had class methods in in Python. The only way to do that was Defining a function and just a regular function which then returned a an instance of that class and Nowadays, this is not recommended anymore nowadays. You should use class methods for this So this is just a way of having multiple in it methods basically multiple ways of Defining your or initializing your objects The next pattern is wrappers or proxies. This is again similar to the facade or adapter in these cases you try to hide certain things from other objects or you try to Add certain information to objects. It's very commonly used in for example in decorators When doing this in decorators, you should watch out that you don't create too many wrappers because then your tracebacks look very ugly You can see that for example if you're using Django and you have a bug in your in your Django code You sometimes get tracebacks that span multiple pages, which is not very nice And most of those the the listings that you have in there are because of these wrappers and they don't really interest you So you should not really Will wrap stuff if you don't really have to And finally we have callbacks callback pattern is a very standard pattern that you use an asynchronous processing for example You can also use it in synchronous processing for example when writing parses so in general whenever some event occurs you register a Handler for that event and that handler is called a callback and And this callback is then called whenever this event happens So for example if a parser hits a certain element type then a certain method is called and you can do something and What's very popular in Python because it's all dynamic you can dynamically also introspect your classes for these handlers so you can dynamically create Handlers that interact with your with your parsing This is very difficult to do in other languages Then finally there is something I want to Put some emphasis on this is not really a coding pattern. It's a code evolution pattern It's the way that you start writing Python code So what you typically do is you have a just a simple script just a few statements that you put into a dot py file and you execute them Then you find that you need to make it more more a bit more complex. Maybe maybe add more features Make it look a little nicer Then you take the sections that you have in there you turn them into functions So the functions is the next kind of evolution if an additional step that you have in your script Then you group the functions and then you can make use of the feature that of the object Oriented features that we have in Python that you can put everything into classes and you reflect to your functions that you've just Created and put them as methods into classes and then you can instantiate your classes You can run your application like that. You can make it Even more feature rich you can add more customizations And once you do that you can start doing subclassing to for example, adapt certain features have Multiple features be more or less the same except for maybe one or two certain details You don't have to repeat yourself all the time and then you can put everything together in loosely coupled components which are basically sets of classes and Tie your whole application together like that and grow really big applications like that I have a complete separate talk about this I'm not going to go in going to go into details here But I just want to recommend when you start writing code don't necessarily start with writing code Just with with classes for example start easy and then get more complex and have your code evolve like that It's much it's a much better way to to evolve your code because then you learn about what you actually need in the code and It's not so much about just Putting everything into into classes and making everything complicated right from the start So next thing performance idioms Again, I have a complete separate talk for this one So I'm just going to mention a few things that are interesting One thing is looping over sequences. You always have to do that in Python code There are various methods of doing that one is the for loop then you have the map function You have list comprehensions and you have generators and I sat down and timed everything and I found that The simple answer is useless comprehensions all the time. It's the fastest way of doing this So if you remember anything from this talk, this is this is a good one to remember Then the next one is joining strings The obvious way of joining strings is just using the plus so the con cat con con cat operator on strings This is good when just having a few strings and it's good for readability because it's it's nice to read The other way of doing this is using the join method on strings So you pass in as parameter a list or any iterable basically the argument the Object that you're iterating you're calling the join method on is the separator that you want to put into your list and Then it'll do the joining for you And this is great for if you have multiple if you have many many strings and all the other methods of doing this That are floating around a mailing list and use groups are not really better than any of these two They're usually slower. They look ugly and you should try to avoid them Something else exceptions if you write code that uses exceptions a lot You should be careful that you write the code and structure the code in a way that you Put the code that runs more often or is more likely to run often into your try it between the try and accept so The if you put code that runs very often or more often than the common case into the exception Part of that try accept then you will find that you'll have a huge slowdown in your in your code This is because it's very expensive to raise Python exceptions. It's not expensive to do that at sea level but if you do it and in Python it's it's Expensive and so you should only use the exceptions for exceptional cases If you do this get this wrong you can have a slowdown of 10 times sometimes because of this So that's why I'm mentioning this and then if you have want to have more of these kinds of performance hints Then please have a look at the swirky page or you can download another talk I gave when performance matters which has a lot more of these details So let's have a look at some coding idioms Something that I sometimes See and in other code in third-party code and I that I look at or code from from other Program as I work with is that they start to nest if statements very deeply and You get this kind of Syndrome what I call a staircase syndrome So your if statements they move tend to move to the to the right all the time And that's a very very simple way of avoiding this this of course this this doesn't look good It's hard to read because you cannot really follow the indention anymore indentation anymore Unfortunately, you have to continue statement in Python which makes it very easy to avoid this whole thing So you just restructure your code a bit and then you just continue to Just switch to the next loop in your for statement And so you don't need the indentation anymore You can just avoid it and everything becomes much more readable The same is also possible with functions except in functions You would use the return statement and not the continue statement Right the next thing to watch out for is mutability or immutability Because in Python everything is or pretty much everything is mutable You can use mutable things in places where it's not a good idea to actually Do so for example if you put mutable things into the module scope for example a database connection then This may look very natural to you This may look nice from from a writing perspective, but it's not thread safe So if you have multiple threads running accessing that same connection It's not it will definitely give you problems sooner later in your application And especially if you use larger applications or you write larger projects, then you should not do this Instead what you can do is you can have context objects and you create these objects They have all the contacts as needed for for example for a web request or an RPC request You put the information in there and you pass around that object and that object would then for example in the database case Would then also have the database connection and you pass it around as first parameter of your functions Or you if you use some classes you put it into a class instance Attribute and do it like that and then you don't you avoid these issues and everything Keeps working the same thing can happen when you define default parameters in functions So for example down here you have func and then a equals none What you what you'd really want for that default parameter is you want a to be an empty list when it's not being passed in as parameter Now if you if you'd use an empty list instead of the none here And then your function starts doing something with with the a parameter here it would The the changes that you make to that list would persist and so all the future function calls to to f To the function funk Would then see those changes that you've made and of course you don't want that So the best way to avoid this is if you have to put something mutable as default parameter Replace it with none and then in your function Use the the mutable parameter that you need as default and put it into your variable inside the function A similar case is for class default attributes So if you have a define a class you have attributes you want to say for example might maybe files It should be supposed to be a list of something Then you'd normally write files equals an empty list you have the same problem again Some method in your in your class may change this list For example in some method and then the change would be on the class object And so all your instances would see those changes and you don't want that so what you do is you you place the Assignment for that instance attribute into your init method to avoid this so Some gotchas How many of you know the in operator in python? All hands that go up really Yeah, so I mean the in operator is used for membership testing So if you want to check whether something is in a list you should definitely use the in operator You should not use the index method that you have on the list This may be a bit unusual for you if you come from coming from other languages Which always use methods for for doing these things It's better to do it that way the for dictionaries is not necessarily obvious What x in some dick would mean in python it means that x the key is in your dictionary So if you test for this because it's the same as the dot has key method and Has keys is deprecated anyway, so you should only use this one for sets Sets were added very late in the language So sets don't even have a method to do this in operation. So you always have to use this which is good So you cannot make any mistakes and Some more gatchas if you do bullying testing in pyson then you have of course you have true and false to Singles I mentioned there are various ways of testing for for boolean for truth of false One way I often see is people writing if x equals true It's not not a good way to do this because it may fail true actually is an integer and it has the value 1 So if you if x for example is is 2 and it's still true, but this won't work so Your print same as print statement wouldn't execute and even more so if you write x If x is true because is actually checks the address of the object and of course Unless x is actually your true single thing this will never be true and never print x is true and Likewise for the not case. So this is something to remember and similarly If you do empty container Testing so you want to check whether a list for example is empty or tupless empty You should always use if and then container because empty containers in Python are always false and Containers that have something are always true So this is much more efficient to do it that way. You don't need the length Function for this you don't need to check with the length is positive because length can only be zero or positive So that's a really not necessary and finally Something I well it's a mistake I often make it's it's the calmer in in Python If you look you have one tuples in Python So you can have a tuple with one element in it and the way to write it is you use the Use the parentheses around the one and you have to have this comma at the end now This is very it's obvious to see that this is a tuple But the next line is also one tuple and this is not obvious to see and the mistake I sometimes make is I add Accidentally add the comma to the end of the line Or maybe I do a copy paste from somewhere and then it the the comma just gets added and as you can see in the example here I Originally wanted to have s equals ABC the string ABC But what happens is it actually creates a one tuple so the length of s is one It's not three as I would have expected and similarly if I index into s I don't get the the C if I ask for s2 I Get an index error because it's a one tuple and it doesn't have a A third element in that index so this is something to watch out for But commas are also nice in Python because you can Python the Python parser is very Very nicely because it allows having commas in places where you normally don't need them and where other languages for example give you an an error message So if you have listings With say a dictionary with items you can have the comma at the end of each Item including the last one that you have in your definition and this is very nice because if you want to add new Elements to that listing you can very easily do so and you just append and a comma and and you're done You don't have to worry about any syntax errors that you might get if the comma is missing And this even works for functions So if you have functions that take a lot of lot lots and lots of parameters you can do it that way as well so I'm just going to show a few more tools That you can use Nice thing in Python is that Whenever someone has a problem they write a tool for it and I put it on pi pi and everyone can use it So we don't have to repeat ourselves all the time There's a very good tool called pylint. This is for style and typo checking had has good documentation It creates quite a few false positives, but you can can you can configure it to not do So you should definitely have a look at that pep 8 already mentioned py flakes is another one It does logical checking Unfortunately, it doesn't have much documentation. So you should probably have a look at flake 8, which is kind of the the combination of tap 8 and flakes and Also as an extra complexity checker it has good documentation So you should probably look at this one and then there is pie checker, which is a very old tool It predates all the other tools. It's not maintained anymore, but it can still give you some good results So now is question time That was it hi Hi What what idiom would you recommend to check if it is not none like I just Need to do some actions if the object is none, but I should not like true Look for true false I Did not really understand your question. We your object is done Ah, none. Yeah, because none is a single and you should always use if x is none as check It's the fastest way of doing it because in C. It's just a pointer comparison And it also immediately becomes clear that you're looking for exactly that particular value So you should not write if x equals none Especially not in Python 3 because that's always gonna fail in except if x is none More questions, no


Belinda Benchage vs. Marqueta Vondrasova is the gold medal match for the Olympics for 2021. And both players have had different roads to get to this gold medal matchup. Vondrasova started the tournament off as unceded and would take on the number 16 seed Burtons. And after losing the second set, Vondrasova would prevail in three, putting Burtons into retirement 6-4, 3-6, 6-4. Her second round matchup was against Bozzanescu, and this was a much easier performance for Vondrasova, only dropping three games in a straight sets win 6-1, 6-2. Her third round matchup would be against the face of the Olympics and the number two seed, Naomi Osaka. And after Vondrasova came out super aggressive, taking the first set, she finished the job in straight sets, demolishing the second best player in the world, 6-1, 6-4. Her quarterfinal matchup was against another unceded player, Paula Bedossa, who also had a great week beatings Fiontek along the way. And after winning the first set, 6-3, Vondrasova was handed a retirement win after Bedossa struggled in the extreme conditions of Tokyo, 6-3, retirement. In her semi-final, Vondrasova would take on the number four seed, Alina Svetolina. And just like the Osaka match, Vondrasova came out aggressive, and it worked. She prevailed in straight sets, 6-3, 6-1, to advance to the gold medal matchup. Belinda Benchich started the tournament off as the number nine seed, and would take on Pagola in the first round, who has been a very good player in 2021. But this didn't phase Benchich, who got through in straight sets, 6-3, 6-3. Her second round opponent would be against the Japanese player Doi, and again, easy result coming up for Benchich, winning in straight sets, 6-2, 6-4. Her third round opponent would be the number eight seed, and French Open champion, Barbara Krajkova. And after going down bad in the first set, Benchich rebounded to win in three sets, 1-6, 6-2, 6-3. Her quarterfinal matchup would be the French Open finalist, and number 13 seed Pavlechenkova. And after bagling in the first set, she was forced to fight in three, eventually prevailing 6-love, 3-6, 6-3. Her semifinal opponent was against the number 15 seed, Rabakina, who had had a really good tournament to make it to this stage, and after Benchich saved multiple set points in the first set, she was forced to play three sets, eventually prevailing 7-6, 4-6, 6-3, to advance to the gold medal match. These two have only played the one time before, and that was actually a couple of months ago in Miami on the hard courts, and Vondrasova got the three-set win, so she'll be feeling confident going in against Benchich, having that win on her belt. If Vondrasova's going to win, she needs to be aggressive from the get-go, just like she was against Osaka and Svetolina, because we're finding that if she does become aggressive at the start, she can start putting pressure on her opponents, and against a player like Benchich, who would be the favourite going into this matchup, it's a gold medal matchup, a lot of pressure for both players. Vondrasova needs to come out aggressive. If Benchich is going to win, she needs to buy her time, and just be patient, because we know what Vondrasova's going to bring, she's going to bring the aggression, but if Benchich can just be patient like she was against Rabakina, maybe she'll get her chances, and she's going to have to take those chances, like she did against Rabakina in that semi-final. Big matchup here in the gold medal, both players playing for their countries, it's going to be a lot of pressure for both. There's a lot on the line for these young players, because remember, they're only in their early 20s, Benchich 24, Vondrasova is 22, so very interested to see how they're going to deal with the moment because they're playing for their country, and it looked like Benchich after winning her match, got a little emotional, so there's going to be a lot of pressure on the shoulders of not only the Swiss, but also the Czech. I'm going to go with Vondrasova to win this one. I think the upset is going to happen. I feel like Vondrasova having that win over Benchich in Miami earlier this year on the hard courts, and the pressure of the moment, I feel like it might get to Benchich, and I think Vondrasova is going to cause the upset and continue that form that she has been all tournament. But let me know down in the comments below, who do you think is going to win the gold medal?


The president's same car with Thatcher. Yeah. Dave's in there talking to him now. Reagan and Thatcher together. I've been here for the photo. Go ahead, guys. Go ahead. He's a confidant. He's a con of your gender. He doesn't like the photo. He doesn't like the photo. How did he do that? Where did you buy this? Look at your leg. It's beautiful. You put a lot of pressure on it. I used to take shoes off. We got to get going here. Let's get to it. He may have lived with you. He doesn't have all of his labors here in the restaurant anyway.


And I'm going to talk about the problem, really, that is about as old and about as open. And I'll tell you where the difficulty is, what pregis has been made, some of the history. But it's an issue. Now, what I want to talk about is about can you write equations of motion, microscopic equations of motion, like Navistokes for classical fluids, for quantum fluids. When I say quantum fluids, I think about helium-4, helium-3, below the phase transition, the lambda point, when you have already at least some proportion of superfluid in the thing. And what is the major difference between superfluids and classical fluids is that in superfluids, vorticity is quantized. And you have real objects, Vodex lines. So these Vodex lines are really objects that are there, cannot be destroyed. They go either in a loop or from one side of the box to the other. And they can reconnect. They can collide, reconnect, and have all kinds of things. First question is, do the quantized vortices matter in tablets? Do you need to know that you have these quantized vortices? Do they have a different or important effect on the statistics of the table flow, et cetera? And things here had a history. For example, experimentally and numerically, the answer is, in fact, no. Oops. When you talk about mechanically excited flows, so there is a very famous experiment that was already 1998 by a good friend, Patrick Tabeling and his group, in which they had a mechanically excited turbulence, what you call the French washing machine, helium, below the lambda point. And they have concluded that the energy spectrum of the super flow is compatible with chromogoron scaling. That is to say, they couldn't see in the statistics of the flow, in the statistical characteristics, much different from the classical fluid. And the two-fluid model, the classical two-fluid model of Landau and Tissa, in which you have a super fluid and a normal fluid. The normal fluid just has the Davies-Toch equation. The super fluid has the Euler equation. And with coupling through a mutual friction, works and seems to give you chromogoron spectrum. However, when you do other flows, for example, counterflow, counterflow is the turbulence you get if you have a channel of say, liquid helium 4 with temperature T1 here, temperature T2 there. And then you have a counterflow in the sense that the normal fluid goes one way and the super fluid goes the other way. Suddenly, it has been discovered that already intermediate scales, intermediate scales meaning between the macro scale of the size of the system and the scale, which is the important scale, which is the intervortix distance, the dynamics of vortex lines is crucial and strongly coupled to velocities of the normal and the super flow. So the two-fluid model is not sufficient. You need at least one more order parameter. Now, which one is this order parameter that you need to add? Well, we go back 60 years, as I promised. Before that, let me show you some visualization of these flows. These are from the laboratory of Den Lathrop in Maryland. I think it's very beautiful because what he does, he sees the vortex lines with hydrogen. And you see now the motion of these vortex lines. They collide. They reconnect. And you also see that they have Kelvin waves when they, after their interaction. So these are all of interesting dynamics. These are very beautiful experiments, rare that you can see the events and the actual action of the vortex lines. And the question is, as I said, how this affects the observed statistics and observed macro dynamics of the system. So in helium-4, it depends on which helium. Helium-4, the vortex core, is one angstrom. Helium-3, which is not boson, is fermion. You need cooper pairing. And the vortex core is 800 angstrom. But besides that, the dynamics you see is not entirely different on temperatures that are not too low. Temperature becomes too low. Helium-3, very complex status, has been discovered already by Volovic and others. There's a lot of interesting stuff. I'm not going to talk about Helium-3. Joe Vynen, already in the 1950s, is this competing with you? Not entirely, right? But it's almost there. Has already offered the concept that you need at least one more order parameter, which is the density of the vortex lines. And Vynen wrote an equation. L is going to be the density of the vortex lines. So it's one over area because it's length over volume. So it has a dimension of area 2 minus 1. Has, of course, a dL dt, has a production term, and a decay term. Everybody can write this equation. It's still empty. But then he has predicted on dimensional, analyzed on dimensional considerations a form of the production line. He felt in his stomach that the production should be proportional to the difference between the normal and the super velocity. So this VNS is V normal minus V super. And this is the only combination you can make with linearity in VNS that has the right dimensions. And the form of the decay, he predict, is going to be proportional to L squared. Of course, it cannot depend on VNS because you have a decay also where there is no difference in VN and VS. Now, as I say, L is a vortex line density. VNS is VN minus VS. Alpha is the so-called parameter known as a mutual friction parameter. C1 and C2 are fitting parameters. And kappa, which appears here, is the quantum of circulation that for helium 4, we know this number rather accurately. Is this true? Well, in fact, if you do dimensional considerations carefully, you realize that both the production and the decay can be written in terms of the circulation and the density as kappa L squared, and then any function of a dimensionless parameter. So the units are already taken here by the kappa L squared. And our question is, what is x? And x, if we follow Vinan, is going to be VNS squared over kappa squared L. This is dimensionless. Now, question is, how f of x and g of x depend on x? The possibilities are myriad. If you say that they go like square root x, you get the choice of Joe Vinan. That is proportional to VNS. And if you say square root x and L appears like L to the half, and therefore the L squared becomes L to the 3 halves. If you do a London-kind approach saying things are analytic, you'd say f of x starts like x. And then you're going to get this proportional to L VNS squared, because VNS squared is here. You'll have L. You get the L squared becomes an L. But why not x to the 3 halves? If this f of x is going to be like x to the 3 halves, then you get something that is proportional to VNS cubed. How can you determine? How can you say what is correct? Well, people have tried for a long time. People have tried with experiments on homogeneous flows to make the distinction. They didn't think about this crazy idea of x to the 3 halves. But these two forms were already clear in the 90s. And Nemirovsky, for example, in 1993, tried to fit experiments. So these data here are experiments. And he tried to compare the prediction of the equation with the first form and the second form. And you see these are the two predictions. And you cannot tell which one is right, because the error bars are sufficiently large that both forms agree. So we had the idea, let's not do it in a homogeneous case. Let's do it in a channel. So about three years ago, we started to propose, let's consider, inhomogeneous channel flows. Maybe there, the difference is going to be more clear. And indeed, it's much clearer. And when you do it in a channel that looks like this, so you have a channel. You make here these numerical simulations. You choose a profile for the difference between the normal and the super velocity. And then you solve for the vortex lines. You do vortex methods. I'm not going to go through the numerics much. It's careful numerics. It's done well. And you can now ask questions. It turns out that tentative result that we published really two or three years ago is that, in fact, it's the third form that fits the data best. That is to say, in a channel, you could write an equation like this. Now, of course, if the system is inhomogeneous, there's also a flux of the density of vortex lines that we look like this. Alpha of a kappa, VNS, DVS, DY. This is a result of the closure calculation we did. And we said, look, p3, not p1 or vinyl, not p2, but p3 is the right thing. Let me show you. Why? I mean, this comes really from a microscopic theory. And the microscopic theory, in order to get what you see, you have to start with the equation for the vortex line segment. This is really following the work of Schwartz already from the 70s and 80s. And you write an equation of motion for xi. Is an element of a vortex line, the excited T. S is going to be the vector position along this vortex line. Prime and double prime is the derivative and double derivative. We don't need to go to details. This equation contains two unknown parameters. Now they're actually measured alpha and alpha prime. They're known as the mutual friction parameter. And the point is that when you have this equation, you need to integrate this equation over the volume, the whole volume. And then you have an equation for the vortex line density, because xi is just the element. So the way that this increases or decreases average of the whole volume is the vortex line density. And then when you do this, you get all kinds of terms. And you need to estimate them as a function of the velocities and line density. You need to do closure. I'm not going to get to the technical details too much. I'm going to show you what is the difficulties. So when you're very happy, you ask, can we express these integrals in terms of velocities and vortex line density only? And you do this. But you have to remember that, in principle, closure can be sensitive to details. It may require further characteristics of the vortex tangles, not just density. If you are inhomogeneous, it can be an anisotropy parameter, curvature of the tangles, et cetera. But we'll come back to this. So there are additional candidates or the parameters such as the tangled curvature and the tangled anisotropy. But three years ago, we were still very ambitious and optimistic. So we looked at this production term. We did the analysis. And this is how it looks. So it has V and S. It has the S derivative, an S double derivative. You argue that the velocities are changing on a large scale. Whereas these vortex characteristics are changing quickly on a small scale. So you can take out the V and S. And then you get a prediction that the production term is going to be the normal super contrast velocity times S prime as double prime, where this means an average over the whole volume. Now, see, this is an object that is neither the velocities nor the vortex line density. So you need to close it. And by the way, just as a comment for people, I'm not sure anybody has looked at this problem before. But there was in the literature an attempt to estimate this with absolute magnitude. Here is a channel calculation of S prime, S double prime on the average. And the absolute magnitude is very different. So you're not allowed to do this. You have to do this. And we did analysis. And we came up with an understanding that the only dimension variables that you may want to consider, at least for a first go, as I said, is the one that was related to the vinyl dimensionless objects. Zeta, you can make others. Zeta 2, for example, is also dimensionless. And there are characteristics of the vortex tangle. And we call the one IL. And it's related to total this S prime, S double prime, and the other one is non-dimensionalized by L to the half, the other one by S double prime, et cetera. So these are dimensionless objects that you need to consider. And then when you consider this, we have to ask how the non-dimensional integrants depend on the dimensionless variables. And we came up with the following prediction that said, let's jump on this, that indeed we can compare in a numerical simulation what happens when you have a parabolic profile to the VNS, so the difference between the normal and the super. And you see there are three lines here. One is the prediction P1 of vinyl. The other one is the prediction of P2. This is the experimental or the numerical calculation of P3. This is the prediction of P3. So you see that neither P1 nor P2 agree. In fact, the non-intuitive result that those dimensionless functions have to go like the dimensionless variable to the three halves fit the data better. The decay term agrees very well with vinyl's approximation. And we have here the new term that nobody looked at, which is the flux of the vortex lines. And it fits the data very well. So we have a good closure and this will fit. But maybe we're just lucky. And why we're just lucky? Because we looked at parabolic profiles of these VNS. And indeed, when you look at various parabolic profiles and you look at this object that they call the anisotropy parameter as a function of the dimensionless variable zeta of vinyl, you see it's always almost a parabola. And this is what gives the result that I just showed you. This parabolic dependence is not a great function. It's not a single function, but it's not so bad. So this works pretty well. However, now, is this the end of the story? Absolutely not. Let's now do different profiles of VNS. OK, so now I'm looking at different forcing by the normal and super velocity. And I want to know what is the effect on the vortex characteristics. So you do the parabolic, but you do also sine wave, you do all kinds of things, and disaster. You see this doesn't fall on the function at all. It's not only a function of zeta. If this were only a function of zeta, as you would require in order to get the nice closure that I just showed you, then this will be a function. OK, it'll be just one line. There's no data collapse. It's not true. If you do now, this fellow is a function of two of these guys, the zeta and the zeta two that I showed you before. There are two dimensionless variables. Wow, suddenly the thing falls on the surface. So again, it's a function. So you see, if you have two closing variables, it looks much better. But now you see, this needs more. So we need to get back to the microscopic theory and improve the theory, because you now have more than just the density of the vortex lines. You have to continue. So you have to write now a new equation for the density dL dt. You do the microscopics. You now get that this is proportional to the n-isotropy term that before we've closed only in terms of the single zeta. There is the object kappa squared, which is the curvature of the vortex lines. Again, I don't want to get into much details. And when everything is said and done, the sky is the s double prime. And you have this, as I said, the dimensionless object that is made from s prime, s double prime. Now they appear explicitly. And you have a closure problem. You need to know how to close in terms of the dimensionless object that you have. So to the equations of the density of vortex lines, we need to couple an equation of the n-isotropy parameter at least. And you can do this. You can write an equation for the n-isotropy parameter. Again, you go to the microscopics. You do the theory. You do the integrals. You do the approximations. You get a form. You get a form. And are you confused? Well, you won't be after the next episode where you're going to put the time dependence. What I showed you is that the problem is not closed. Let's say you can have other objects that appear when you put in more physics. This is not as nice as classical turbulence, in which you have one important closure assumption. You have the velocity field. You have the flux of momentum. You assume that the flux of momentum is proportional to gradient of the velocity. You get the Navier-Stokes term, and it works. Here, things are much more dodgy. So you do have important physics of the vortex lines. The vortex lines are there. They are important. And now when you try to couple the velocity fields with the vortex lines, life is not so simple. The problem is it has many snakes under the grass. You have to be very careful. And the answer can depend on the conditions. Are you homogeneous? Inhomogeneous? Are you in a channel? Are you in a co-flow like the French washing machine? It's an interesting subject, and I just wanted to show you a little bit of the difficulties and the fact that the story is not yet finished. And I thank you very much for your attention.