## Phase volumes

### Quick Start

Going from measuring phase volumes in scans to the key properties A, L and ξ (plus surfactant %) is tricky. Here we set the inputs and see the outputs in three common forms. A detailed description of the calculations is added for those who want to do this themselves.

The phases in the scans are shown in orange for oil, sky blue for water, pink for the mixed phase.

### Phase Volumes

We can see the effects of A, L, ξ and %Surf in three ways. The most obvious is the view of the tubes. Then we have a calculation of the phase volumes, φ, of oil in water and water in oil, meeting in the middle where, by definition, they are 50:50. It takes some time to work out what this graph means. The meanings of "water" at HLD< 0 and "oil" at HLD > 0 take some time to work out and can be ignored at first.

Then we have the common, but confusing, diagram of where the interfaces are. Again, it makes sense once you compare it to the images of the tubes.

### Doing the calculations

HLD-NAC theory is super simple with just a few formulae. However, everyone finds it tricky to use it. Thanks to discussions with Prof Acosta and with HLD-NAC expert Alejandro Gutierrez at VLCI, I've been able to produce the calculations for this app in a step-by-step manner (for those who can read Javascript) and in a HLD-NAC Calcs spreadsheet you are free to download. *Note that Type IV behaviour is not included in these calculations as that's another level of complexity of less general interest in terms of scans.*

We first needs some tricky basics. We go from Surfactant g/100ml to g/l to moles/litre (via MWt). From the molar concentration we multiply by VolWater the volume of water (this cancels out in the end but it's convenient to use it, and VolOil, the volume of oil is made to be the same), Avogadro's Number and surfactant head Area to get the total area, A, of surfactant if it were all in the water. A factor of 1E24 enters to fix the units into Å²/ml - odd units but convenient for the calculation. The actual volume of surfactant, VolSurf, creeps in as a minor adjustment and is simplified as %*2*Volume of Water.

We now calculate the all-important virtual radius of water when water's the continuous phase (or oil if the oil phase) as `(3Vs)/(As)` - three times the volume of the water divided by the head area. I call it R_{ref} as a reference radius used to calculate Net and Average curvatures.

We now have all the basics. They are easy once you have them all worked out step-by-step, but most of us get something wrong at first.

Now we have everything we need to calculate the values of interest for any given HLD value. Here we go!

`H_n = -(HLD)/L`. This is the Net Curvature. In the calculations below we use the absolute value, ignoring the sign.

`1/R_o = 1/H_n+1/R_"ref"` if HLD < 0 or else Ro = Ref. This is the basic oil radius

`1/R_w = 1/H_n+1/R_"ref"` if HLD > 0 or else Rw = Ref. This is the basic water radius

`H_a = 0.5(1/R_o+1/R_w)`. This is the Average Curvature.

`1/H_a` is a sort of average radius

If `1/H_a > ξ` then we're Type III. Otherwise our type is I if HLD < 0 or II if HLD > 0. You can see that ξ is crucial for knowing about the Type III phase.

If we are in Type III then we need to calculate the microemulsion (me)radii `R_"wme"` and `R_"ome"`. If not then they are simple `R_w` and `R_o`. ξ is again needed in the Type III.

- `1/R_"wme" = "HLD"/(2L)+1/ξ`
- `1/R_"ome" = 1/R_"wme"-"HLD"/`L

We need to convert radii into volumes via the total head area, A. The factor 3 appears because volume is `4/(3πr^2)` and area is `4πr^3` so when you divide them you end up with 3 remaining.

`V_"ome" = R_"ome"A/3`

`V_"wme" = R_"wme"A/3`

`V_"tot" = V_"ome" + V_"wme"`

It's now easy! We first start with the phase volumes. These can be plotted directly

`φ_o = V_"ome"/V_"tot"` if HLD < 0 otherwise a pseudo-volume, `1-φ_w`

`φ_w = V_"wme"/V_"tot"` if HLD > 0 otherwise a pseudo-volume, `1-φ_o`

Then we need the true volume fractions of oil, middle and water phase, `V_o, V_m, V_w`. These get summed to `V_t` and then turned into fractions `V_"of", V_"mf", V_"wf"`, but as that's an obvious step it's not spelled out here.

`V_o = "VolOil" - V_"ome"` if HLD < 0 or else `V_"wme" + "VolOil" + "VolSurf"`.

`V_m = V_"ome" + V_wme" + "VolSurf"` when we're Type III or 0 otherwise

`V_w = "VolWater" - V_"wme"` if HLD > 0 or else `V_"ome" + "VolWater" + "VolSurf"`

The phase boundary lines can now be calculated as fractions of a tube. These are not at all obvious, at least to me.

`Bound_1 = V_"mf" + V_"wf"` in Type III and `V_"wf"` if `V_"of" lt V_"wf"`, otherwise 1

`Bound_2 = V_"mf" + V_"of"` in Type III and `V_"of"` if `V_"of" lt V_"wf"`, otherwise 0