 All right, let's get started on lesson three. I suppose everyone has read through the online material. So at this point, you are ready to start the example. Hopefully, you have appreciated the importance of surface complexation and how common they occur and what are the applications as well as what governs the surface complexation on clays and different type of material. So in this video, we are going to go through this example 3.1, which essentially is about setting up a batch reactor for chromium, sorption or elite. And we know chromium is a very common contaminant it can occur in terms of the both natural occurrence, the processes in natural system that actually will generate chromium. It's also widely used in industry for different type of applications. So chromium can be a tremendous risk to both human and ecosystem health. So clay in natural system usually have the capacity to absorb chromium. So what we are going through here in this example, I'm giving you table 4, which is the initial conditions for the system. And essentially, we are really kind of looking at a batch reactor at 25 degrees C. And let's say you have a beaker, 250 milliliters, that's the volume. And essentially, we're adding, OK, so you have this amount of water. This beaker is filled with 250 milliliter water. And then you imagine in that beaker you have some amount of elite grains. And I put here elite volume fraction is 0.003, which is 0.3% of the total volume. You can actually calculate what it is because we have a 250 milliliter as a total volume. And you are also given this elite-specific surface area, which is 15.36 meters squared per gram. Now, elite is a very common clay material. Some other common clay material like smectite, chloride, there are various types of clay minerals. Clay tend to be very complex in terms of both chemical compositions and all kinds of different types of clay minerals. So we pick elite as a representative one, essentially. Now, so imagine you have all these. And then in the water, you are putting in a pH 8.0. And this chromium, what I'm putting here is this concentration is before the speciation. So it's really a total concentration chromium 6. And then you have sodium, chloride, potassium in the background. OK, so these are what's in the solution. And then in the second half of the table, I'm telling you that the surface, essentially, is a surface site, SiOH. And this surface site can go through four different surface reactions. One is complexity with each plus to become this SiOH2 plus. And then it's log K. It's apparent equilibrium constant that is listed in the right-hand side. Anyway, you have these four different reactions for the surface reaction part. But imagine you would also have all kinds of aqueous complexation reaction happening at the same time. You are not going to just have these surface reactions. So keep that in mind. So what I'm asking, we went through this table four. And what I'm asking here is that, first of all, at the pH of 8.0, I'm asking you to calculate the concentration of all the different surface complexes on the surface sites. And what is the pH value after the system, which is equilibrium? And these are all equilibrium reactions. So you will get the direct number after this running the simulation. And if you have pH, initial pH is 4.0, you do the same thing. And how much different do you see? So essentially, it's really trying to look at, by comparing question 1 and question 2, you're looking at how much different does pH make in terms of how much chromium absorb on the surface. OK, so let's go through this. There's two things that you actually will need to set up. I talked briefly in the online material text. One is the database. In order to set up the reactions, you will need the surface reaction. You will need to go through the database. And in the database, let's see we start from the beginning. And you know before that from previous lessons, you have all the different blocks. We have touched through primary specie block, secondary specie block, and then mineral reaction kinetics in the previous lessons. Here, let's go through the surface complexation. So is there just a block after listening all the minerals? There's a surface complexation block. So let's do control F to search for surface complexation. And it directly come to me with the beginning surface complexation session. So I already, what I do different is this lecture. Let me be different from previous one. I tend to start from beginning. And we go kind of one by one step here. I'm already putting in these reactions. Because that will save us a little bit of time. I don't want the video to be too long, because at some point it gets boring. OK, so in this. So what do you need to do in the beginning surface complexation part? You will be putting all the different reactions listed in table. See, you have four reactions. So you would need, OK, anyway, so you would need four different surface reactions included here. Now, the way I loaded is using the products, the zop species. So if you observe, for example, the first one here, it's SiOH2 plus. It's actually this one, SiOH2 plus. Whether you use this three line equal or you use this larger sign, it doesn't really matter. Because the code will read in essentially the text file. And as long as you have consistent representation in the input file and in the database, it can recognize it. It doesn't matter if you use this larger than, or if you use this triple equal sign. But the problem will come if you are not consistent between the input file and the database. So anyway, here in the input file, I write this way. So essentially you can see it's this species, similar to the equal to convexation. So you have this species and equals to 1.0 H plus plus 1.0 this SiOH species. Now, it's opposite way of writing as in this table. And this K apparent K is written in terms of the direction of this form. So when we do this form, it needs to be negative now. So it's minus 0.95. Again, we are looking at 25 degrees C. This as a whole format is very similar. It essentially is the same as what you see before for the equest convexation. So you can think about surface convexing is really almost like equest convexation, except that you are having a reaction with species on the surface. And so all these different reactions are written similarly. So this first item is for the first reaction. And then the second one, you have SiO minus on the surface. And this is equal to essentially minus 1 from this SiOH. So this is another reaction. Now again, in the table, you have minus 6.59. And it's because the rocking is in the opposite direction. So this need to be 6.59. And all these are the 500 0, as I mentioned. These are for equilibrium constant at different temperatures. And you can really ignore them. But you do need to have eight items to represent the eight temperature points. And similarly, you have SiO, sodium, and SiOH and each chromium, these species. So as long as you pay attention to the design of the log k values, be consistent with how these terms, interaction, and written is in the opposite way of that is listed in the table. You should be fine. All right, so this for the surface convexation block in the database. And then the second item in the database for surface convexation is giving the charge for each of these surface complexes. What is the charge of each of these species? So for example, SiOH is 0. SiOH 2 plus is 1.0 minus 1.0. And you have the other species. So your list is there. So essentially, two items in the database block. OK, and then in the input file block, let's look at this. Again, I already put everything in, but we'll walk through and you kind of need to know. So all these ones we talked about before these are kind of a competition, a long time, whatever it needs. And then the discretization is for essentially total volume. So we have 250 milliliter and putting centimeters as units. This is essentially, OK, we only input 250 for x zone as one cell. But essentially, the default is so y zones and z zones is 1. So it's like one grid block in each direction. So giving you a well-mixed one grid block essentially. If you want to specifically put in y zones, 1, 1, and then z zones, 1, 1, that's fine too. You can look up the discretization in the crunch menu. And then you do need to put in a light. The reason is that because in contrary, all the surface sites, you need to specify which mineral it is on. So here, this SiOH side is on elite. So you have to have elite there. So in the mineral, you would need to put elite as a mineral. For systems that you have, for example, you have mineral dissolution precipitation. And you also have surface convexity. You might have multiple minerals there. But and you might have multiple minerals that have surface convexity sites. And you can put more than these when you have more complex systems. So this is for surface convexation. And then we go to the condition. Now in the condition, OK, we set up the initial rise. This unit should be really more per liter. I think in the table, I put more per liter. Anyway, OK, so this is more per liter. Temperature 25. And then you have pH 8.0, chromium, sodium, chloride, potassium. They're all listed in the table 4 in the online material. Now I do have a few more species than a few more primary species than what I have in the table. And the reason, why do I need to do that? The reason is that we have elite. And let's go so as long as you have it. Let's go through what is the elite interminer dissolution reaction. We don't really put mineral dissolution reaction. But as long as you put elite, then you need all the building block in the aqueous phase, essentially. So let's search in the database, how does elite, what is the composition of elite in terms of different chemical species? So I do F for elite. All right, so you have elite. OK, look at here. So this elite, you would be managing, you would be writing elite as a solid phase dissolving out. OK, actually plus H plus 8 H plus. And then dissolving out to become 0.25 magnesium, 0.6 potassium, 2.3 aluminum, 3.5 silica, and water. And then the rest of these are the eight equilibrium constants in different temperature. And then you have the molecular weight or whatever. And in any case, you can see that in the elite block, elite is composed of these different cations. So although in the table, I only give you, let's see, chromium, sodium, chloride, and other species. Because elite, the mineral contains magnesium, silica, aluminum as additional species. So we do need to put in the input file for this species as part of the primary species. So that's what you actually would do. So these species are already given, essentially, in the table. And these species are additional because of the inclusion of elite as a mineral. And you need all the building blocks for elite. Otherwise, the code is not going to recognize it. So all these species are, for example, pH, chromium, sodium, chloride, according to the concentrations that are given to you in the table, and then SiO2, aluminum, magnesium. Let's assume that, for example, elite distribution will be very slow. Let's say you are doing this option experiment. Usually, you want to look at how much this chromium is up on the solid phase. Usually, you do it in a very short period of time. And elite distribution is relatively slow. So it wouldn't dissolve out much in the solution. So let's imagine your solution doesn't have much of this species. I could put zero, but usually I prefer to put this small number instead of zero. A lot of time, computers have some problem with zero. So let's not try to avoid zero, if you can. OK, so these are the primary species. And then you have the site name. This is the name of site that you put in the database. Now, as I mentioned, if you use this three line equal sign in here, then when you put in database, you also need to put three line equal sign. OK, so here, this is the site density, which is in units of more per meter square. It's 1.0 times 10 to minus 6, which is given in the table. And then you have this elite 0.003 with a specific surface area of 15.36 meter square per gram. So that's the condition block. So you're not only should put in all the species that are given to you in the table, but also the species that are part of the building block of the elite, the mineral that the surface site is on. And then, actually, this probably should be earlier. But anyway, the order doesn't really matter in the input file. But just look at the secondary species. I put these secondary species, but some of them may not be important. We can run it and go through it in the output file. So once you have this, let's look at this folder that we are going to run the simulation for this example 3.1. So I click on this, run, I get cr example 3.1.in. All right, so it went through, it just built all the output file. But the key ones that you will be looking at would be the cr example output file. Let's see what is it. OK, this one. Maybe this one. OK. So let's look through this example. Again, so at the early part of this, it will be walking through your input file and database. Look for everything, for example, number of components, number of secondary species, number of kinetic minerals, and go through all the k-value matrix, essentially. So these are all right. And if you want, sometime when you debug, for example, if something went wrong and you don't know what's wrong with it, it's worthwhile to look through the early part of this. For example, you might be not putting the right log k-values and leads to a problem when you do the calculation. OK, so again, this is all the condition input, condition initial. We could, OK, we didn't really put a charge balance here. But this is, right now, is a total charge of negative. So probably we should, if we want charge balance, it should be really the sodium species would need to be put charge balanced. OK, now here, let's look through. So this, essentially, is a table that is giving you all the concentration of different species, right? Log, morality, log activity, and everything. Let's look at log morality is the concentration you get. So the first several lines are for all the surface species, right? And then you have H plus, sodium, all the equate species here. So let's look at chromium. We are looking at chromium's options. So it would be interesting to see what are the dominant species. OK. So we were given, in the table, let me just check back. In the table, you are given a total concentration of chromium 9.6 times 10 to the power of 5 more per liter. All right. So here, when you look at this, it's H chromium O4 minus H2 chromium O4, and then chromium O4. These are in the order, OK, 10 to the minus 4, 10 to the minus 5, 10 to the minus 15. And then on the surface, we are supposed to have the surface species of this, right? But it's very, very small. It's 10 to the minus 10, essentially, very small numbers. So that means, what does that mean? You have this 10 to the minus 10, and then you also have chromium CRO4. 2 minus is 10 to the minus 4 in order of 10 to the minus 4. And then these are 10 to the minus 5, 10 to the minus 15. So what does that mean? Do you think chromium's are on the solid phase or not? Now it'd be, if you think about it, comparing the different species on the solid phase, that you are supposed to have this surface species, you have very low concentration of 10 minus 10. And chromium is chromium O4, your 2 minus. So then, if you compare it, you know this is essentially, actually, most of chromium is still in the aqueous phase. It's not absorbing much at all at this pH. This pH is 8.0. So it's not really reacting much, because this option reaction doesn't at this high pH values. All right, so you can pull out these numbers and answer the question. Get a table. Answer the question, OK, what's our concentrations of difference of a complexase on this and the pH value. And the second question is, our pH is 4.0. So let's change the condition here. If I change this condition to 4.0, let me just change the pH to 4. What happens? All right, so I change it to 4.0. And let's rerun it. So what happens, OK, I might have mentioned this before. When you run this, you can delete all the odd profiles if you want, but you can also just leave it there. Or you can build another folder if you want to keep all the odd profiles. But if you run it in the same folder, the new simulation would overwrite the old file. So you will get the new file with pH at 4. So let's just try this. I need to save this so it will actually reflect. All right, so let's run it again. OK, because I changed the concentration. OK, this is a solution that is relatively, I guess it doesn't take. If it still needs to take more per kilogram, it doesn't really matter when you have a relatively dilute solution like we have here. So we have more per kilogram. Let's rerun it. It doesn't recognize more per liter. Let's do it again. It's done. Hopefully it's giving me. I'm just trying to update it, like go to our folder and then reopen. Make sure all these files are the new updated file. You can look at the time, too, with the estimation. It needs to be the latest time. Anyway, so the output file should be OK, this one. Looks like it's still organizing. It's still not green yet. OK, it's actually ready. OK, so it's forward. Everything else is the same. You can just go down and look at the last block that lists all the conditions. So now it's pH 4.0. So we can look at the same, for example, different species for chromium. Chromium, OK, so HClO4 is too pretty high, minus 4. And then this is H2. It's minus 9. Now chromium ClO4 is 10 to minus. So now the equispecial dominant one is HClO4 now, because you have much more hydrogen now. It's a much acidic condition. Now here you also observe that SiOH, this surface species, before it was in order of 10 to the minus 10. Now it's 10 to minus 4.8, essentially. So increased by about 5 orders of magnitude, which means you observe much more chromium on solid than what you had before. So pH have a huge impact on how much you can absorb on solid phase. Essentially, let's see if I try pH equal to 3.0. What happens? Let's try it again. Let's close this. And it changes to 3.0. It's updating. Going back, let's look at the output file. OK, it's here. Now here with pH 3, you increased more on the solid phase. So essentially, you would have absorbed species this much. So it's in order of 10 to minus 4.5. So between pH 4 and 3, they all already have a lot of different hydrogen in the system. So it doesn't change much when you change from pH 8 to 4. Now the reason here is why. Chromium 6 with pH 8.0, the dominant species, it's a negative charge species. So it tends to absorb when the system, when the surface side, have a lot of positive sides. Now at high pH condition, the aqueous solution is really have a lot of OH minus inside H plus. So the illi surface tend to be negative. And because it's negative, it wouldn't attract much of the negative chromium on the solid surface. Now when you increase acidity or decrease pH to 3 or to 4, you have a lot of H plus in the system. And these H plus will go through these reactions with the surface side to form SiOH2 plus. So you would have a lot of positive charges on the surface. Now in that case, chromium will be attracted to the positive charges surface. So that's why under low pH condition, you can absorb much more chromium than in the situation of high pH. So not imagine, OK, this is for chromium and it's a negative charge species. What if you have, for example, cadmium or zinc or other species that these cations that are positively charged, they tend to go, they tend to be attracted by negative charges surfaces. So think about what condition, under what condition you tend to have more surface complexation for these cations. The answer would be opposite to what you have here. So it's, for example, these heavy metal cations, you tend to see more absorption under high pH conditions. All right, I think we can end now. I believe I talk every talk about everything I need to discuss. And just as a reminder, if you are not clear about what you are going to do and you want a bit more detailed information from the manual or everything, I listed in the online materials that for surface complexation, just examples on the menu, crunch flow menu, page 63, 64, and 69, they are going through different blocks in crunch. And we uploaded a set of exercises with input file and documents that explain what each exercise do. So these are good resources, again, good example files for you if you need something to look up. So in that exercise folder, let me just put it up so you can see it. I added, where is it? OK, in crunch flow related, I added a crunch flow example exercise. So in that folder, we have folders for different exercises. And in that for the exercise four is for a surface complexation example, if you would like to look up. All right, let's stop here. And I hope you have fun working on this and the rest of the homework. Let's skip this. For question one homework, which is an extension of example 3.1, you have total chromium, this is essentially the same. But essentially, I added one more surface species, which is aluminum. And with that, you will need to set up in your database with this species, the site density will be in the input file, and also all the reactions that are associated with database. You need these reactions also need to put in the beginning surface complexation block to define it. And then you can run the submission. Otherwise, so remember, you need to update database. You need to update the input file in order to run the whole suite of thing. All right, I will stop here and have fun.