sur.apps module

sur.envelope module

sur.envelope_sp module

sur.eos module

class sur.eos.SRK

Bases: sur.eos.CubicModel

Soave modification of Redlich–Kwong EOS

MODEL_ID = 1
MODEL_NAME = 'SRK'
class sur.eos.PR

Bases: sur.eos.CubicModel

Peng–Robinson equation of state

MODEL_ID = 2
MODEL_NAME = 'PR'
class sur.eos.RKPR

Bases: sur.eos.CubicModel

RKPR equation of state

MODEL_ID = 3
MODEL_NAME = 'RKPR'
classmethod from_constants(tc, pc, acentric_factor, vc=None, del1=None, rhoLsat_t=(), pvdat=())

Given the constants of a pure compound, returns a tuple of arrays with the same constants adjusted and the arrays of correspond model’s parameters.

Constants requires tc, pc, and acentric_factor as mandatory and vc or del1 or rhoLsat_t=(rhoLsat, T).

If a point pvdat = (P, T) is given, it’s used as a constraint to calculate the vapor pressure

Returns:(constants, model_parameters)

Where:

constants = array([tc, pc, acentric_factor, vc])
models_parameters =  array([ac, b, del1, rk])
classmethod from_parameters(ac, b, del1, rk)

Given the model’s parameters, returns a tuple of arrays with the pure compound constants adjusted and the the ajusted model’s array of parameters.

Returns:(constants, model_parameters)

Where:

constants = array([Tc, Pc, acentric_factor, Vc])
models_parameters =  array([ac, b, del1, rk])
sur.eos.get_eos(model)

sur.manage module

sur.models module

sur.plots module

Plot shortcuts utilities

sur.plots.multiplot(envelopes=None, experimental_envelopes=None, formats=None, critical_point='o', experimental_colors=None, experimental_markers=None, legends=None)

merge the plot of multiples envelopes

sur.settings module

sur.tools module

sur.units module

Module contents

sur.data(a)
sur.setup_database()

this is a hackish trick.

It setup the django enviroment through setup_environ(settings)

Then populates the database but, instead of fixtures, it dumps db on disk (‘disk’) to a memory one (‘default’), and then syncs the missing tables on the latter.