The work of Sharareh Ameripour in "PREDICTION OF GAS-HYDRATE FORMATION CONDITIONS IN PRODUCTION AND SURFACE FACILITIES" is excellent. And is already in Excel!
So... Why I’m i in here adding more code?
I honestly cannot make an improvement of the theoretical, practical and statistical solution she proposed. But, i also believe that the user of Excel is looking for a robust, function focused solution. Instead of looking for changing a sub or uploading it's values in another sheet.
The original Sharareh sheets are in a macro, not in an excel formula.
So predicting a trending will be much harder with that approach.
In here you will find the proposed equations, as a easy to use function.
=HydrateAmeripourS(TempInF,PressInPSI,LabelsOfComponents,ValuesOfComponents_MolPercentage)
Where...
TempInF = Temperature in Fahrenheit or 0 (zero) if you want to know the temperature.
PressInPSI = Pressure in PSI or 0 (zero) if you want to know the pressure.
LabelsOfComponents = Name of the components being uploaded.
ValuesOfComponents_MolPercentage = mole percent of the components being uploaded.
for example you can use =HydrateAmeripourS(32,0,$B$8:$B$19,$C$8:$C$19) if you wan't to know the pressure of hydrate formation at 32 °F.
where the selected range can be something like this.
or this.
There is no specific order for the chromatography and several aliases of the components will be recognized. you can find in more detail all the components aliases below. The aliases are not case sensitive.
H2S
SH2
HYDROGEN SULFIDE
CO2
CARBON DIOXIDE
CARBONIC ACID
N2
NITROGEN
N
C1
CH4
METHANE
C2
C2H6
ETHANE
C3
C3H8
PROPANE
IC4
IC4H10
ISOBUTANE
NC4
C4
NC4H10
NORMALBUTANE
NORMAL BUTANE
BUTANE
IC5
IC5H12
ISOPENTANE
NC5
C5
NC5H12
NORMALPENTANE
NORMAL PENTANE
PENTANE
NC6
C6
C6H14
HEXANE
NC7
C7
C7H16
HEPTANE
NC8
C8
C8H18
C8H18+
OCTANE
C2H4
ETHENE
C3H6
PROPENE
NACL
SALT
SODIUM CHLORIDE
KCL
POTASSIUM CHLORIDE
CACL
CALCIUM CHLORIDE
CACL2
CH3OH
METHANOL
EG
ETHYLENE GLYCOL
TEG
TRIETHYLENE GLYCOL
GL
GLYCOL