opendrift.models.openoil.adios.computation.gnome_oil

Code for making a “GnomeOil” from an Oil Object

See the PyGNOME code for more about GNOME’s requirements

NOTE: This make s JSON compatible Python structure from which to build a GnomeOil

Module Contents

Functions

get_empty_dict()

This provides an empty dictionary with everything that is needed

make_gnome_oil(oil)

Make a dict that a GnomeOil can be built from

estimate_pour_point(oil)

estimate pour point from kinematic viscosity

estimate_flash_point(oil)

estimate flash point from api or boiling point

component_temps(cut_temps[, N])

component temps from boiling point

component_types(cut_temps[, N])

set component SARA types

component_densities(boiling_points)

estimate component densities from boiling point

component_mol_wt(boiling_points)

estimate component molecular weight from boiling point

inert_fractions(oil[, density, viscosity])

resins and asphaltenes from database or estimated if None

_linear_curve(x, a, b)

Here we describe the form of a linear function for the purpose of

clamp(x, M[, zeta])

We make use of a generalized logistic function or Richard's curve

_inverse_linear_curve(y, a, b, M[, zeta])

normalized_cut_values_adios(oil)

normalized_cut_values(oil)

normalized_cut_values_james(oil[, N])

estimate cut temperatures

component_mass_fractions(oil)

estimate pseudocomponent mass fractions

sara_totals(oil)

get SARA from database

Attributes

logger

opendrift.models.openoil.adios.computation.gnome_oil.logger
opendrift.models.openoil.adios.computation.gnome_oil.get_empty_dict()[source]

This provides an empty dictionary with everything that is needed to generate a GNOME Oil

opendrift.models.openoil.adios.computation.gnome_oil.make_gnome_oil(oil)[source]

Make a dict that a GnomeOil can be built from

A GnomeOil needs:

“name, “# Physical properties “api, “pour_point, “solubility, # kg/m^3 “# emulsification properties “bullwinkle_fraction, “bullwinkle_time, “emulsion_water_fraction_max, “densities, “density_ref_temps, “density_weathering, “kvis, “kvis_ref_temps, “kvis_weathering, “# PCs: “mass_fraction, “boiling_point, “molecular_weight, “component_density, “sara_type, “flash_point=None, “adios_oil_id=None,

opendrift.models.openoil.adios.computation.gnome_oil.estimate_pour_point(oil)[source]

estimate pour point from kinematic viscosity

opendrift.models.openoil.adios.computation.gnome_oil.estimate_flash_point(oil)[source]

estimate flash point from api or boiling point

opendrift.models.openoil.adios.computation.gnome_oil.component_temps(cut_temps, N=10)[source]

component temps from boiling point

opendrift.models.openoil.adios.computation.gnome_oil.component_types(cut_temps, N=10)[source]

set component SARA types

opendrift.models.openoil.adios.computation.gnome_oil.component_densities(boiling_points)[source]

estimate component densities from boiling point

opendrift.models.openoil.adios.computation.gnome_oil.component_mol_wt(boiling_points)[source]

estimate component molecular weight from boiling point

opendrift.models.openoil.adios.computation.gnome_oil.inert_fractions(oil, density=None, viscosity=None)[source]

resins and asphaltenes from database or estimated if None

opendrift.models.openoil.adios.computation.gnome_oil._linear_curve(x, a, b)[source]

Here we describe the form of a linear function for the purpose of curve-fitting measured data points.

opendrift.models.openoil.adios.computation.gnome_oil.clamp(x, M, zeta=0.03)[source]

We make use of a generalized logistic function or Richard’s curve to generate a linear function that is clamped at x == M. We make use of a zeta value to tune the parameters nu, resulting in a smooth transition as we cross the M boundary.

opendrift.models.openoil.adios.computation.gnome_oil._inverse_linear_curve(y, a, b, M, zeta=0.12)[source]
opendrift.models.openoil.adios.computation.gnome_oil.normalized_cut_values_adios(oil)[source]
opendrift.models.openoil.adios.computation.gnome_oil.normalized_cut_values(oil)[source]
opendrift.models.openoil.adios.computation.gnome_oil.normalized_cut_values_james(oil, N=10)[source]

estimate cut temperatures

opendrift.models.openoil.adios.computation.gnome_oil.component_mass_fractions(oil)[source]

estimate pseudocomponent mass fractions

opendrift.models.openoil.adios.computation.gnome_oil.sara_totals(oil)[source]

get SARA from database estimate if no data