Active corrosion protection of metals by primer(paint/coating) works by having a slightly soluble corrosion inhibitor embedded within the coating, such that if the coating system is damaged and the metal is exposed to a corrosive environment, then the inhibitor will leach from the primer and inhibit any further corrosion of the metal surface. It was always assumed that the corrosin inhibitor leached through the polymeric binder, but recent work has found that the primary source of corrosion inhibitor is via transport through the pores left behind by previously dissolved corrosion inhbitor particles.
ActCoatSim is a 2D simulation of the leaching of corrosion inhibitor from an active corrosion protection coating system which is immersed in a corrosive environment. The primer is simiplified in that is consists of just the continuous polymeric binder and corrosion inhibitor particles. The coating system can consist of the primer in contact with the metal to be protected, a top coat (which is considered to be inert) and a scribe (an area of damaged through whichthe metal is exposed to the environment).
The coating is able to be pure primer, primer with a scribe or primer and topcoat with scribe, all of these with / without topcoat. A primer and topcoat without a scribe will not do anything, as the topcoat is impermeable. Coating is considered to have leached whn it leaves the simulation box, so water layer thicknesses of 1 will be equivalent to leaching directly at primer surface.
The simulation provides a very effective insight into how small differeneces in particle connectivity will give rise to large differences in leaching performance.
The current simulation works by first using either a particle packing or cellular automaton method to generate the primer with the corrosion inhibitor within it, then uses cellular automata to rapidly count the number of inhibitor cells to calculate the particle volume concentration (PVC) and then the leaching is carried out using cellular automata to mimick the dissolution of the inhibitor and the trasnport of leached inhibitor.
You can run ActCoatSim at https://steps39.github.io/ActCoatSim/
On pressing the Full Reset button the simulation will start (using the default parameters) showing the dissolution of the inhibitor particles, transport into solution and the graph displays the fraction of the coating which has been leached (default - diffused to top of the box) where the legend below the plot shows the inhibitor PVC, the fraction of the inhibitor PVC which could be leached (i.e. not surrounded by polymer so with no water access). So the maximum cumulative fraction of the coating which will leach is the PVC multiplied by the accessible fraction.
The system to be used in the simulation is generated based on the value on the Microstructure Parameters tabs - System Width and System Height - define the size of the container the coating and solution are in. Check diffusion - a simple test to show that the cellular automaton mimics diffusion behaviour by genearting a circle - if ticked ignore all other parameters The coating system is controlled by whether there is: water above the coating system and its depth - Top Water / Depth of Water a top coat above the primer coating and its depth - Topcoated / Depth of Topcoat a scribe at the left edge of the coatings and its with - Scribed / Width of Scribe
The primer is generated by: Either using a cellular automaton: CA Microstructure - produces a coatings based on a simple cellular automaton rule which produces a cave like structure - the only structural parameters which affects this generation are: No Refinement Steps - is the number of iterations the CA rule is run for. CA Rule Probability - controls the PVC of inhibitor in the coating.
It is possible to simulate a primer coating made up of 2 layers of different PVCs, containing different sizes and shapes of particles - set No of layers to 2 and choose the layer heights.
These parameters are used by the particle packing approach which does not allow overlapping particles. If you are simulating 2 layers, then you need set Radius 2, No of particle cuts 2, .. for the second layer.
The particles are generated as a particular shape (currently circles or squares when Square Particles is checked) of a size defined by Radius which undergo a No of Particle Cuts to produce more realistic random particle shapes, if circles or quares are wanted then just set No of Particle Cuts to 0, upto No of Particles are produced. Particles are packed until the particle volume concentration (PVC) is within the ranage Minimum PVC to Maximum PVC. You may need to adjust the No of Particles to be able to achieve the desired PVC range. Not yet implemented is the ability restrict the range of the particles' sizes based on a Minimum Particle Size and a Maximum Particle Size.
A number of parameters of the simulation can be varied. The Inhibitor Density and the Inhibitor Solubility (both in arbitary integer units), will control the speed of leaching as for a cell of inhibitor with an inhibitor density of 9 and an inhibitor solubility of 1, it will take 9 dissolution events for it to disolve, where if the inhibitor density was 1 then it would only require 1 dissolution event. The Diffusion Probability and Solubility Probability, determine how likely diffusion or dissolution is to occur in a single step, 1 means every time, another way to slow down the various steps.
If simulating a scribed coating then set Loose from Top and Loose from Left at least, Loose from Bottom could be considered as the protective interaction with the metal surface.
These are specific parameters which control how the simulation is run.
The Terminal Fraction determines how far the simulation will run, this the fraction of the accessible inhibitor which will be leached before the simulation is stopped, i.e. Inhibitor PVC 0.5 Accessible 0.5 Terminal Fraction 0.8 would mean the simulation would stop once 0.2 cumlative fracton of the coaitng had leached.
The plot can either auto-scale based on the current point being plot being maximum X and Y or if Global Plot ticked then will scale such as to display all data currently generated and the x-axis can be set to square root for a more normal diffusion relationship - X Square Root.
The data generated during the coating generation and simulation can be saved - coating microstructures - Save Generated Coatings, leaching graphs - Save Graphs, movies of the cellular automaton - Capture Animaton to Webm and an image of the leaching graphs with separate legend - Capture Plot to PNG.
The realtime display is controlled by interval between each displayed frame - Number of Frames and how often the graph is replotted - Number of Plots x Number of Frames. All updates of animation and graph can be stopped - No Visual Updates.
It is also possible to incorporate multiple inhibitor types with different properties, if you want to use mulitple particle then for example Radius just enter the values separated by a comma i.e 5,10. You don't have to set multiple values for all revelant parameters, as if you just enter 2 radii in Radius and only 1 value for Inhibitor Density then the program uses the single value for both particles.
N.B. If you enter 2 values for say Radius and 3 for say No of Particles, the system will replicate the first value for all parameters with less than 3 parameters, so the 2nd Radii value will be ignored and the 1st will be replicated for all 3 inhibitors.
All the obvious inhibitor parameters will take multiple parameters: Radius, No of Particle Cuts, No of Particles, Minimum PVC, Inhibitor Density, Inhibitor Solubility, Diffusion Probability and Solubility Probability.
When you have set the parameters for your simulation, then pressed Full Reset the page loads a cross-section of a primer, grey coating with inhibitor within it, in order to start leaching the "Top Water" check box is checked introducing water, which will leach the inhibitor from the coating.
Full reset - will discard all previous results, generate a new coating system and start a new simulation using the currently displayed parameter value, creating a new graph.
Regenerate - will use a previously generated set of coating systems to rerun the simulation based on the currently displayed Simulation Parameters and Simulations Controls values.
No implemented - Save Everything - saves microstructures, saves videos of animation, saves leaching data, save images of leaching graph and legend - if you don't want to save anything individual items can be selected in the Simulation Control tab.
End All Runs - stop the current set of simulations, completing all saves if requested.
End Current Run - stop the currernt simulation, saving the animation is requested.
Reload Grids - will reload a previously generated set of coating structures which have been saved in a grid file - i.e. 2106021535PPW10R10N4.json - the filename tells you what is in the json file - so file name is date (digits 1-6 - yymmdd), time (digits - 7-10 - hhmm), type of microstructure (PP - particle place, CA - cellular automaton, DT - diffusion test), coating system parameters - depends on coating system.
Inspired by and using a modified verion of cellauto.js library - https://github.com/sanojian/cellauto a very clever small Javascript library.
Copyright (c) [2021] [Simon R Gibbon]
This project is open-source and is licensed under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or at your option any later version.