repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_documentation_string
stringlengths
1
47.2k
func_code_url
stringlengths
85
339
ssalentin/plip
plip/modules/preparation.py
Ligand.find_charged
def find_charged(self, all_atoms): """Identify all positively charged groups in a ligand. This search is not exhaustive, as the cases can be quite diverse. The typical cases seem to be protonated amines, quaternary ammoinium and sulfonium as mentioned in 'Cation-pi interactions in ligand recogni...
python
def find_charged(self, all_atoms): """Identify all positively charged groups in a ligand. This search is not exhaustive, as the cases can be quite diverse. The typical cases seem to be protonated amines, quaternary ammoinium and sulfonium as mentioned in 'Cation-pi interactions in ligand recogni...
Identify all positively charged groups in a ligand. This search is not exhaustive, as the cases can be quite diverse. The typical cases seem to be protonated amines, quaternary ammoinium and sulfonium as mentioned in 'Cation-pi interactions in ligand recognition and catalysis' (Zacharias et al., 2002))....
https://github.com/ssalentin/plip/blob/906c8d36463689779b403f6c2c9ed06174acaf9a/plip/modules/preparation.py#L1131-L1195
ssalentin/plip
plip/modules/preparation.py
Ligand.find_metal_binding
def find_metal_binding(self, lig_atoms, water_oxygens): """Looks for atoms that could possibly be involved in binding a metal ion. This can be any water oxygen, as well as oxygen from carboxylate, phophoryl, phenolate, alcohol; nitrogen from imidazole; sulfur from thiolate. """ a...
python
def find_metal_binding(self, lig_atoms, water_oxygens): """Looks for atoms that could possibly be involved in binding a metal ion. This can be any water oxygen, as well as oxygen from carboxylate, phophoryl, phenolate, alcohol; nitrogen from imidazole; sulfur from thiolate. """ a...
Looks for atoms that could possibly be involved in binding a metal ion. This can be any water oxygen, as well as oxygen from carboxylate, phophoryl, phenolate, alcohol; nitrogen from imidazole; sulfur from thiolate.
https://github.com/ssalentin/plip/blob/906c8d36463689779b403f6c2c9ed06174acaf9a/plip/modules/preparation.py#L1197-L1263
ssalentin/plip
plip/modules/preparation.py
PDBComplex.load_pdb
def load_pdb(self, pdbpath, as_string=False): """Loads a pdb file with protein AND ligand(s), separates and prepares them. If specified 'as_string', the input is a PDB string instead of a path.""" if as_string: self.sourcefiles['pdbcomplex.original'] = None self.sourcefil...
python
def load_pdb(self, pdbpath, as_string=False): """Loads a pdb file with protein AND ligand(s), separates and prepares them. If specified 'as_string', the input is a PDB string instead of a path.""" if as_string: self.sourcefiles['pdbcomplex.original'] = None self.sourcefil...
Loads a pdb file with protein AND ligand(s), separates and prepares them. If specified 'as_string', the input is a PDB string instead of a path.
https://github.com/ssalentin/plip/blob/906c8d36463689779b403f6c2c9ed06174acaf9a/plip/modules/preparation.py#L1294-L1377
ssalentin/plip
plip/modules/preparation.py
PDBComplex.characterize_complex
def characterize_complex(self, ligand): """Handles all basic functions for characterizing the interactions for one ligand""" single_sites = [] for member in ligand.members: single_sites.append(':'.join([str(x) for x in member])) site = ' + '.join(single_sites) site =...
python
def characterize_complex(self, ligand): """Handles all basic functions for characterizing the interactions for one ligand""" single_sites = [] for member in ligand.members: single_sites.append(':'.join([str(x) for x in member])) site = ' + '.join(single_sites) site =...
Handles all basic functions for characterizing the interactions for one ligand
https://github.com/ssalentin/plip/blob/906c8d36463689779b403f6c2c9ed06174acaf9a/plip/modules/preparation.py#L1384-L1440
ssalentin/plip
plip/modules/preparation.py
PDBComplex.extract_bs
def extract_bs(self, cutoff, ligcentroid, resis): """Return list of ids from residues belonging to the binding site""" return [obres.GetIdx() for obres in resis if self.res_belongs_to_bs(obres, cutoff, ligcentroid)]
python
def extract_bs(self, cutoff, ligcentroid, resis): """Return list of ids from residues belonging to the binding site""" return [obres.GetIdx() for obres in resis if self.res_belongs_to_bs(obres, cutoff, ligcentroid)]
Return list of ids from residues belonging to the binding site
https://github.com/ssalentin/plip/blob/906c8d36463689779b403f6c2c9ed06174acaf9a/plip/modules/preparation.py#L1442-L1444
ssalentin/plip
plip/modules/preparation.py
PDBComplex.res_belongs_to_bs
def res_belongs_to_bs(self, res, cutoff, ligcentroid): """Check for each residue if its centroid is within a certain distance to the ligand centroid. Additionally checks if a residue belongs to a chain restricted by the user (e.g. by defining a peptide chain)""" rescentroid = centroid([(atm.x(),...
python
def res_belongs_to_bs(self, res, cutoff, ligcentroid): """Check for each residue if its centroid is within a certain distance to the ligand centroid. Additionally checks if a residue belongs to a chain restricted by the user (e.g. by defining a peptide chain)""" rescentroid = centroid([(atm.x(),...
Check for each residue if its centroid is within a certain distance to the ligand centroid. Additionally checks if a residue belongs to a chain restricted by the user (e.g. by defining a peptide chain)
https://github.com/ssalentin/plip/blob/906c8d36463689779b403f6c2c9ed06174acaf9a/plip/modules/preparation.py#L1446-L1454
ella/ella
ella/core/context_processors.py
url_info
def url_info(request): """ Make MEDIA_URL and current HttpRequest object available in template code. """ return { 'MEDIA_URL' : core_settings.MEDIA_URL, 'STATIC_URL': core_settings.STATIC_URL, 'VERSION' : core_settings.VERSION, 'SERVER_INFO' : core_settings.SERVER_IN...
python
def url_info(request): """ Make MEDIA_URL and current HttpRequest object available in template code. """ return { 'MEDIA_URL' : core_settings.MEDIA_URL, 'STATIC_URL': core_settings.STATIC_URL, 'VERSION' : core_settings.VERSION, 'SERVER_INFO' : core_settings.SERVER_IN...
Make MEDIA_URL and current HttpRequest object available in template code.
https://github.com/ella/ella/blob/4a1414991f649dc21c4b777dc6b41a922a13faa7/ella/core/context_processors.py#L9-L22
ella/ella
ella/core/middleware.py
UpdateCacheMiddleware.process_response
def process_response(self, request, response): """Sets the cache, if needed.""" # never cache headers + ETag add_never_cache_headers(response) if not hasattr(request, '_cache_update_cache') or not request._cache_update_cache: # We don't need to update the cache, just return...
python
def process_response(self, request, response): """Sets the cache, if needed.""" # never cache headers + ETag add_never_cache_headers(response) if not hasattr(request, '_cache_update_cache') or not request._cache_update_cache: # We don't need to update the cache, just return...
Sets the cache, if needed.
https://github.com/ella/ella/blob/4a1414991f649dc21c4b777dc6b41a922a13faa7/ella/core/middleware.py#L85-L111
ella/ella
ella/core/middleware.py
FetchFromCacheMiddleware.process_request
def process_request(self, request): """ Checks whether the page is already cached and returns the cached version if available. """ if self.cache_anonymous_only: assert hasattr(request, 'user'), "The Django cache middleware with CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True req...
python
def process_request(self, request): """ Checks whether the page is already cached and returns the cached version if available. """ if self.cache_anonymous_only: assert hasattr(request, 'user'), "The Django cache middleware with CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True req...
Checks whether the page is already cached and returns the cached version if available.
https://github.com/ella/ella/blob/4a1414991f649dc21c4b777dc6b41a922a13faa7/ella/core/middleware.py#L128-L166
ella/ella
ella/core/managers.py
RelatedManager.collect_related
def collect_related(self, finder_funcs, obj, count, *args, **kwargs): """ Collects objects related to ``obj`` using a list of ``finder_funcs``. Stops when required count is collected or the function list is exhausted. """ collected = [] for func in finder_funcs: ...
python
def collect_related(self, finder_funcs, obj, count, *args, **kwargs): """ Collects objects related to ``obj`` using a list of ``finder_funcs``. Stops when required count is collected or the function list is exhausted. """ collected = [] for func in finder_funcs: ...
Collects objects related to ``obj`` using a list of ``finder_funcs``. Stops when required count is collected or the function list is exhausted.
https://github.com/ella/ella/blob/4a1414991f649dc21c4b777dc6b41a922a13faa7/ella/core/managers.py#L83-L97
ella/ella
ella/core/managers.py
RelatedManager.get_related_for_object
def get_related_for_object(self, obj, count, finder=None, mods=[], only_from_same_site=True): """ Returns at most ``count`` publishable objects related to ``obj`` using named related finder ``finder``. If only specific type of publishable is prefered, use ``mods`` attribute to l...
python
def get_related_for_object(self, obj, count, finder=None, mods=[], only_from_same_site=True): """ Returns at most ``count`` publishable objects related to ``obj`` using named related finder ``finder``. If only specific type of publishable is prefered, use ``mods`` attribute to l...
Returns at most ``count`` publishable objects related to ``obj`` using named related finder ``finder``. If only specific type of publishable is prefered, use ``mods`` attribute to list required classes. Finally, use ``only_from_same_site`` if you don't want cross-site content. ...
https://github.com/ella/ella/blob/4a1414991f649dc21c4b777dc6b41a922a13faa7/ella/core/managers.py#L123-L138
ella/ella
ella/core/managers.py
ListingManager.get_listing
def get_listing(self, category=None, children=ListingHandler.NONE, count=10, offset=0, content_types=[], date_range=(), exclude=None, **kwargs): """ Get top objects for given category and potentionally also its child categories. Params: category - Category object to list objects for...
python
def get_listing(self, category=None, children=ListingHandler.NONE, count=10, offset=0, content_types=[], date_range=(), exclude=None, **kwargs): """ Get top objects for given category and potentionally also its child categories. Params: category - Category object to list objects for...
Get top objects for given category and potentionally also its child categories. Params: category - Category object to list objects for. None if any category will do count - number of objects to output, defaults to 10 offset - starting with object number... 1-based ...
https://github.com/ella/ella/blob/4a1414991f649dc21c4b777dc6b41a922a13faa7/ella/core/managers.py#L258-L306
ella/ella
ella/core/templatetags/pagination.py
paginator
def paginator(context, adjacent_pages=2, template_name=None): """ Renders a ``inclusion_tags/paginator.html`` or ``inc/paginator.html`` template with additional pagination context. To be used in conjunction with the ``object_list`` generic view. If ``TEMPLATE_NAME`` parameter is given, ``in...
python
def paginator(context, adjacent_pages=2, template_name=None): """ Renders a ``inclusion_tags/paginator.html`` or ``inc/paginator.html`` template with additional pagination context. To be used in conjunction with the ``object_list`` generic view. If ``TEMPLATE_NAME`` parameter is given, ``in...
Renders a ``inclusion_tags/paginator.html`` or ``inc/paginator.html`` template with additional pagination context. To be used in conjunction with the ``object_list`` generic view. If ``TEMPLATE_NAME`` parameter is given, ``inclusion_tags/paginator_TEMPLATE_NAME.html`` or ``inc/paginator_TEMPLA...
https://github.com/ella/ella/blob/4a1414991f649dc21c4b777dc6b41a922a13faa7/ella/core/templatetags/pagination.py#L45-L75
ella/ella
ella/core/templatetags/authors.py
do_author_listing
def do_author_listing(parser, token): """ Get N listing objects that were published by given author recently and optionally omit a publishable object in results. **Usage**:: {% author_listing <author> <limit> as <result> [omit <obj>] %} **Parameters**:: ===========================...
python
def do_author_listing(parser, token): """ Get N listing objects that were published by given author recently and optionally omit a publishable object in results. **Usage**:: {% author_listing <author> <limit> as <result> [omit <obj>] %} **Parameters**:: ===========================...
Get N listing objects that were published by given author recently and optionally omit a publishable object in results. **Usage**:: {% author_listing <author> <limit> as <result> [omit <obj>] %} **Parameters**:: ================================== =========================================...
https://github.com/ella/ella/blob/4a1414991f649dc21c4b777dc6b41a922a13faa7/ella/core/templatetags/authors.py#L40-L72
jjgomera/iapws
iapws/iapws08.py
_Tb
def _Tb(P, S): """Procedure to calculate the boiling temperature of seawater Parameters ---------- P : float Pressure, [MPa] S : float Salinity, [kg/kg] Returns ------- Tb : float Boiling temperature, [K] References ---------- IAPWS, Advisory Note ...
python
def _Tb(P, S): """Procedure to calculate the boiling temperature of seawater Parameters ---------- P : float Pressure, [MPa] S : float Salinity, [kg/kg] Returns ------- Tb : float Boiling temperature, [K] References ---------- IAPWS, Advisory Note ...
Procedure to calculate the boiling temperature of seawater Parameters ---------- P : float Pressure, [MPa] S : float Salinity, [kg/kg] Returns ------- Tb : float Boiling temperature, [K] References ---------- IAPWS, Advisory Note No. 5: Industrial Calc...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws08.py#L408-L439
jjgomera/iapws
iapws/iapws08.py
_Tf
def _Tf(P, S): """Procedure to calculate the freezing temperature of seawater Parameters ---------- P : float Pressure, [MPa] S : float Salinity, [kg/kg] Returns ------- Tf : float Freezing temperature, [K] References ---------- IAPWS, Advisory Not...
python
def _Tf(P, S): """Procedure to calculate the freezing temperature of seawater Parameters ---------- P : float Pressure, [MPa] S : float Salinity, [kg/kg] Returns ------- Tf : float Freezing temperature, [K] References ---------- IAPWS, Advisory Not...
Procedure to calculate the freezing temperature of seawater Parameters ---------- P : float Pressure, [MPa] S : float Salinity, [kg/kg] Returns ------- Tf : float Freezing temperature, [K] References ---------- IAPWS, Advisory Note No. 5: Industrial Ca...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws08.py#L442-L473
jjgomera/iapws
iapws/iapws08.py
_Triple
def _Triple(S): """Procedure to calculate the triple point pressure and temperature for seawater Parameters ---------- S : float Salinity, [kg/kg] Returns ------- prop : dict Dictionary with the triple point properties: * Tt: Triple point temperature, [K] ...
python
def _Triple(S): """Procedure to calculate the triple point pressure and temperature for seawater Parameters ---------- S : float Salinity, [kg/kg] Returns ------- prop : dict Dictionary with the triple point properties: * Tt: Triple point temperature, [K] ...
Procedure to calculate the triple point pressure and temperature for seawater Parameters ---------- S : float Salinity, [kg/kg] Returns ------- prop : dict Dictionary with the triple point properties: * Tt: Triple point temperature, [K] * Pt: Triple...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws08.py#L476-L516
jjgomera/iapws
iapws/iapws08.py
_OsmoticPressure
def _OsmoticPressure(T, P, S): """Procedure to calculate the osmotic pressure of seawater Parameters ---------- T : float Tmperature, [K] P : float Pressure, [MPa] S : float Salinity, [kg/kg] Returns ------- Posm : float Osmotic pressure, [MPa] ...
python
def _OsmoticPressure(T, P, S): """Procedure to calculate the osmotic pressure of seawater Parameters ---------- T : float Tmperature, [K] P : float Pressure, [MPa] S : float Salinity, [kg/kg] Returns ------- Posm : float Osmotic pressure, [MPa] ...
Procedure to calculate the osmotic pressure of seawater Parameters ---------- T : float Tmperature, [K] P : float Pressure, [MPa] S : float Salinity, [kg/kg] Returns ------- Posm : float Osmotic pressure, [MPa] References ---------- IAPWS, ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws08.py#L519-L551
jjgomera/iapws
iapws/iapws08.py
_ThCond_SeaWater
def _ThCond_SeaWater(T, P, S): """Equation for the thermal conductivity of seawater Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] S : float Salinity, [kg/kg] Returns ------- k : float Thermal conductivity excess relative ...
python
def _ThCond_SeaWater(T, P, S): """Equation for the thermal conductivity of seawater Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] S : float Salinity, [kg/kg] Returns ------- k : float Thermal conductivity excess relative ...
Equation for the thermal conductivity of seawater Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] S : float Salinity, [kg/kg] Returns ------- k : float Thermal conductivity excess relative to that of the pure water, [W/mK] ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws08.py#L554-L606
jjgomera/iapws
iapws/iapws08.py
_solNa2SO4
def _solNa2SO4(T, mH2SO4, mNaCl): """Equation for the solubility of sodium sulfate in aqueous mixtures of sodium chloride and sulfuric acid Parameters ---------- T : float Temperature, [K] mH2SO4 : float Molality of sufuric acid, [mol/kg(water)] mNaCl : float Molalit...
python
def _solNa2SO4(T, mH2SO4, mNaCl): """Equation for the solubility of sodium sulfate in aqueous mixtures of sodium chloride and sulfuric acid Parameters ---------- T : float Temperature, [K] mH2SO4 : float Molality of sufuric acid, [mol/kg(water)] mNaCl : float Molalit...
Equation for the solubility of sodium sulfate in aqueous mixtures of sodium chloride and sulfuric acid Parameters ---------- T : float Temperature, [K] mH2SO4 : float Molality of sufuric acid, [mol/kg(water)] mNaCl : float Molality of sodium chloride, [mol/kg(water)] ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws08.py#L609-L663
jjgomera/iapws
iapws/iapws08.py
_critNaCl
def _critNaCl(x): """Equation for the critical locus of aqueous solutions of sodium chloride Parameters ---------- x : float Mole fraction of NaCl, [-] Returns ------- prop : dict A dictionary withe the properties: * Tc: critical temperature, [K] * ...
python
def _critNaCl(x): """Equation for the critical locus of aqueous solutions of sodium chloride Parameters ---------- x : float Mole fraction of NaCl, [-] Returns ------- prop : dict A dictionary withe the properties: * Tc: critical temperature, [K] * ...
Equation for the critical locus of aqueous solutions of sodium chloride Parameters ---------- x : float Mole fraction of NaCl, [-] Returns ------- prop : dict A dictionary withe the properties: * Tc: critical temperature, [K] * Pc: critical pressure, [M...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws08.py#L666-L725
jjgomera/iapws
iapws/iapws08.py
SeaWater.calculo
def calculo(self): """Calculate procedure""" T = self.kwargs["T"] P = self.kwargs["P"] S = self.kwargs["S"] self.m = S/(1-S)/Ms if self.kwargs["fast"] and T <= 313.15: pw = self._waterSupp(T, P) elif self.kwargs["IF97"]: pw = self._waterIF...
python
def calculo(self): """Calculate procedure""" T = self.kwargs["T"] P = self.kwargs["P"] S = self.kwargs["S"] self.m = S/(1-S)/Ms if self.kwargs["fast"] and T <= 313.15: pw = self._waterSupp(T, P) elif self.kwargs["IF97"]: pw = self._waterIF...
Calculate procedure
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws08.py#L178-L236
jjgomera/iapws
iapws/iapws08.py
SeaWater._water
def _water(cls, T, P): """Get properties of pure water, Table4 pag 8""" water = IAPWS95(P=P, T=T) prop = {} prop["g"] = water.h-T*water.s prop["gt"] = -water.s prop["gp"] = 1./water.rho prop["gtt"] = -water.cp/T prop["gtp"] = water.betas*water.cp/T ...
python
def _water(cls, T, P): """Get properties of pure water, Table4 pag 8""" water = IAPWS95(P=P, T=T) prop = {} prop["g"] = water.h-T*water.s prop["gt"] = -water.s prop["gp"] = 1./water.rho prop["gtt"] = -water.cp/T prop["gtp"] = water.betas*water.cp/T ...
Get properties of pure water, Table4 pag 8
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws08.py#L244-L257
jjgomera/iapws
iapws/iapws08.py
SeaWater._waterSupp
def _waterSupp(cls, T, P): """Get properties of pure water using the supplementary release SR7-09, Table4 pag 6""" tau = (T-273.15)/40 pi = (P-0.101325)/100 J = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5,...
python
def _waterSupp(cls, T, P): """Get properties of pure water using the supplementary release SR7-09, Table4 pag 6""" tau = (T-273.15)/40 pi = (P-0.101325)/100 J = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5,...
Get properties of pure water using the supplementary release SR7-09, Table4 pag 6
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws08.py#L275-L323
jjgomera/iapws
iapws/iapws08.py
SeaWater._saline
def _saline(cls, T, P, S): """Eq 4""" # Check input in range of validity if T <= 261 or T > 353 or P <= 0 or P > 100 or S < 0 or S > 0.12: warnings.warn("Incoming out of bound") S_ = 0.03516504*40/35 X = (S/S_)**0.5 tau = (T-273.15)/40 pi = (P-0.1013...
python
def _saline(cls, T, P, S): """Eq 4""" # Check input in range of validity if T <= 261 or T > 353 or P <= 0 or P > 100 or S < 0 or S > 0.12: warnings.warn("Incoming out of bound") S_ = 0.03516504*40/35 X = (S/S_)**0.5 tau = (T-273.15)/40 pi = (P-0.1013...
Eq 4
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws08.py#L326-L405
jjgomera/iapws
iapws/iapws95.py
_phir
def _phir(tau, delta, coef): """Residual contribution to the adimensional free Helmholtz energy Parameters ---------- tau : float Inverse reduced temperature Tc/T, [-] delta : float Reduced density rho/rhoc, [-] coef : dict Dictionary with equation of state parameters ...
python
def _phir(tau, delta, coef): """Residual contribution to the adimensional free Helmholtz energy Parameters ---------- tau : float Inverse reduced temperature Tc/T, [-] delta : float Reduced density rho/rhoc, [-] coef : dict Dictionary with equation of state parameters ...
Residual contribution to the adimensional free Helmholtz energy Parameters ---------- tau : float Inverse reduced temperature Tc/T, [-] delta : float Reduced density rho/rhoc, [-] coef : dict Dictionary with equation of state parameters Returns ------- fir : flo...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L28-L96
jjgomera/iapws
iapws/iapws95.py
mainClassDoc
def mainClassDoc(): """Function decorator used to automatic adiction of base class MEoS in subclass __doc__""" def decorator(f): # __doc__ is only writable in python3. # The doc build must be done with python3 so this snnippet do the work py_version = platform.python_version() ...
python
def mainClassDoc(): """Function decorator used to automatic adiction of base class MEoS in subclass __doc__""" def decorator(f): # __doc__ is only writable in python3. # The doc build must be done with python3 so this snnippet do the work py_version = platform.python_version() ...
Function decorator used to automatic adiction of base class MEoS in subclass __doc__
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L2195-L2217
jjgomera/iapws
iapws/iapws95.py
MEoS.calculable
def calculable(self): """Check if inputs are enough to define state""" self._mode = "" if self.kwargs["T"] and self.kwargs["P"]: self._mode = "TP" elif self.kwargs["T"] and self.kwargs["rho"]: self._mode = "Trho" elif self.kwargs["T"] and self.kwargs["h"] ...
python
def calculable(self): """Check if inputs are enough to define state""" self._mode = "" if self.kwargs["T"] and self.kwargs["P"]: self._mode = "TP" elif self.kwargs["T"] and self.kwargs["rho"]: self._mode = "Trho" elif self.kwargs["T"] and self.kwargs["h"] ...
Check if inputs are enough to define state
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L434-L471
jjgomera/iapws
iapws/iapws95.py
MEoS.calculo
def calculo(self): """Calculate procedure""" T = self.kwargs["T"] rho = self.kwargs["rho"] P = self.kwargs["P"] s = self.kwargs["s"] h = self.kwargs["h"] u = self.kwargs["u"] x = self.kwargs["x"] # Initial values T0 = self.kwargs["T0"] ...
python
def calculo(self): """Calculate procedure""" T = self.kwargs["T"] rho = self.kwargs["rho"] P = self.kwargs["P"] s = self.kwargs["s"] h = self.kwargs["h"] u = self.kwargs["u"] x = self.kwargs["x"] # Initial values T0 = self.kwargs["T0"] ...
Calculate procedure
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L473-L1477
jjgomera/iapws
iapws/iapws95.py
MEoS.fill
def fill(self, fase, estado): """Fill phase properties""" fase.rho = estado["rho"] fase.v = 1/fase.rho fase.h = estado["h"] fase.s = estado["s"] fase.u = fase.h-self.P*1000*fase.v fase.a = fase.u-self.T*fase.s fase.g = fase.h-self.T*fase.s fase.Z...
python
def fill(self, fase, estado): """Fill phase properties""" fase.rho = estado["rho"] fase.v = 1/fase.rho fase.h = estado["h"] fase.s = estado["s"] fase.u = fase.h-self.P*1000*fase.v fase.a = fase.u-self.T*fase.s fase.g = fase.h-self.T*fase.s fase.Z...
Fill phase properties
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L1479-L1555
jjgomera/iapws
iapws/iapws95.py
MEoS.derivative
def derivative(self, z, x, y, fase): """Wrapper derivative for custom derived properties where x, y, z can be: P, T, v, rho, u, h, s, g, a""" return deriv_H(self, z, x, y, fase)
python
def derivative(self, z, x, y, fase): """Wrapper derivative for custom derived properties where x, y, z can be: P, T, v, rho, u, h, s, g, a""" return deriv_H(self, z, x, y, fase)
Wrapper derivative for custom derived properties where x, y, z can be: P, T, v, rho, u, h, s, g, a
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L1557-L1560
jjgomera/iapws
iapws/iapws95.py
MEoS._saturation
def _saturation(self, T): """Saturation calculation for two phase search""" rhoc = self._constants.get("rhoref", self.rhoc) Tc = self._constants.get("Tref", self.Tc) if T > Tc: T = Tc tau = Tc/T rhoLo = self._Liquid_Density(T) rhoGo = self._Vapor_Den...
python
def _saturation(self, T): """Saturation calculation for two phase search""" rhoc = self._constants.get("rhoref", self.rhoc) Tc = self._constants.get("Tref", self.Tc) if T > Tc: T = Tc tau = Tc/T rhoLo = self._Liquid_Density(T) rhoGo = self._Vapor_Den...
Saturation calculation for two phase search
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L1562-L1598
jjgomera/iapws
iapws/iapws95.py
MEoS._Helmholtz
def _Helmholtz(self, rho, T): """Calculated properties from helmholtz free energy and derivatives Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- prop : dict Dictionary wit...
python
def _Helmholtz(self, rho, T): """Calculated properties from helmholtz free energy and derivatives Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- prop : dict Dictionary wit...
Calculated properties from helmholtz free energy and derivatives Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- prop : dict Dictionary with calculated properties: ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L1600-L1671
jjgomera/iapws
iapws/iapws95.py
MEoS._prop0
def _prop0(self, rho, T): """Ideal gas properties""" rhoc = self._constants.get("rhoref", self.rhoc) Tc = self._constants.get("Tref", self.Tc) delta = rho/rhoc tau = Tc/T ideal = self._phi0(tau, delta) fio = ideal["fio"] fiot = ideal["fiot"] fiott ...
python
def _prop0(self, rho, T): """Ideal gas properties""" rhoc = self._constants.get("rhoref", self.rhoc) Tc = self._constants.get("Tref", self.Tc) delta = rho/rhoc tau = Tc/T ideal = self._phi0(tau, delta) fio = ideal["fio"] fiot = ideal["fiot"] fiott ...
Ideal gas properties
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L1673-L1691
jjgomera/iapws
iapws/iapws95.py
MEoS._phi0
def _phi0(self, tau, delta): """Ideal gas Helmholtz free energy and derivatives Parameters ---------- tau : float Inverse reduced temperature Tc/T, [-] delta : float Reduced density rho/rhoc, [-] Returns ------- prop : dictionary ...
python
def _phi0(self, tau, delta): """Ideal gas Helmholtz free energy and derivatives Parameters ---------- tau : float Inverse reduced temperature Tc/T, [-] delta : float Reduced density rho/rhoc, [-] Returns ------- prop : dictionary ...
Ideal gas Helmholtz free energy and derivatives Parameters ---------- tau : float Inverse reduced temperature Tc/T, [-] delta : float Reduced density rho/rhoc, [-] Returns ------- prop : dictionary with ideal adimensional helmholtz energy...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L1693-L1756
jjgomera/iapws
iapws/iapws95.py
MEoS._phir
def _phir(self, tau, delta): """Residual contribution to the free Helmholtz energy Parameters ---------- tau : float Inverse reduced temperature Tc/T, [-] delta : float Reduced density rho/rhoc, [-] Returns ------- prop : dict ...
python
def _phir(self, tau, delta): """Residual contribution to the free Helmholtz energy Parameters ---------- tau : float Inverse reduced temperature Tc/T, [-] delta : float Reduced density rho/rhoc, [-] Returns ------- prop : dict ...
Residual contribution to the free Helmholtz energy Parameters ---------- tau : float Inverse reduced temperature Tc/T, [-] delta : float Reduced density rho/rhoc, [-] Returns ------- prop : dict Dictionary with residual adimensi...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L1758-L1890
jjgomera/iapws
iapws/iapws95.py
MEoS._virial
def _virial(self, T): """Virial coefficient Parameters ---------- T : float Temperature [K] Returns ------- prop : dict Dictionary with residual adimensional helmholtz energy: * B: ∂fir/∂δ|δ->0 * C: ∂²fir/∂...
python
def _virial(self, T): """Virial coefficient Parameters ---------- T : float Temperature [K] Returns ------- prop : dict Dictionary with residual adimensional helmholtz energy: * B: ∂fir/∂δ|δ->0 * C: ∂²fir/∂...
Virial coefficient Parameters ---------- T : float Temperature [K] Returns ------- prop : dict Dictionary with residual adimensional helmholtz energy: * B: ∂fir/∂δ|δ->0 * C: ∂²fir/∂δ²|δ->0
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L1892-L1978
jjgomera/iapws
iapws/iapws95.py
MEoS._derivDimensional
def _derivDimensional(self, rho, T): """Calcule the dimensional form or Helmholtz free energy derivatives Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- prop : dict Dictio...
python
def _derivDimensional(self, rho, T): """Calcule the dimensional form or Helmholtz free energy derivatives Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- prop : dict Dictio...
Calcule the dimensional form or Helmholtz free energy derivatives Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- prop : dict Dictionary with residual helmholtz energy and derivati...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L1980-L2047
jjgomera/iapws
iapws/iapws95.py
MEoS._surface
def _surface(self, T): """Generic equation for the surface tension Parameters ---------- T : float Temperature, [K] Returns ------- σ : float Surface tension, [N/m] Notes ----- Need a _surf dict in the derived cla...
python
def _surface(self, T): """Generic equation for the surface tension Parameters ---------- T : float Temperature, [K] Returns ------- σ : float Surface tension, [N/m] Notes ----- Need a _surf dict in the derived cla...
Generic equation for the surface tension Parameters ---------- T : float Temperature, [K] Returns ------- σ : float Surface tension, [N/m] Notes ----- Need a _surf dict in the derived class with the parameters keys: ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L2049-L2072
jjgomera/iapws
iapws/iapws95.py
MEoS._Vapor_Pressure
def _Vapor_Pressure(cls, T): """Auxiliary equation for the vapour pressure Parameters ---------- T : float Temperature, [K] Returns ------- Pv : float Vapour pressure, [Pa] References ---------- IAPWS, Revised Sup...
python
def _Vapor_Pressure(cls, T): """Auxiliary equation for the vapour pressure Parameters ---------- T : float Temperature, [K] Returns ------- Pv : float Vapour pressure, [Pa] References ---------- IAPWS, Revised Sup...
Auxiliary equation for the vapour pressure Parameters ---------- T : float Temperature, [K] Returns ------- Pv : float Vapour pressure, [Pa] References ---------- IAPWS, Revised Supplementary Release on Saturation Propert...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L2075-L2100
jjgomera/iapws
iapws/iapws95.py
MEoS._Liquid_Density
def _Liquid_Density(cls, T): """Auxiliary equation for the density of saturated liquid Parameters ---------- T : float Temperature, [K] Returns ------- rho : float Saturated liquid density, [kg/m³] References ---------- ...
python
def _Liquid_Density(cls, T): """Auxiliary equation for the density of saturated liquid Parameters ---------- T : float Temperature, [K] Returns ------- rho : float Saturated liquid density, [kg/m³] References ---------- ...
Auxiliary equation for the density of saturated liquid Parameters ---------- T : float Temperature, [K] Returns ------- rho : float Saturated liquid density, [kg/m³] References ---------- IAPWS, Revised Supplementary Rele...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L2103-L2131
jjgomera/iapws
iapws/iapws95.py
MEoS._Vapor_Density
def _Vapor_Density(cls, T): """Auxiliary equation for the density of saturated vapor Parameters ---------- T : float Temperature, [K] Returns ------- rho : float Saturated vapor density, [kg/m³] References ---------- ...
python
def _Vapor_Density(cls, T): """Auxiliary equation for the density of saturated vapor Parameters ---------- T : float Temperature, [K] Returns ------- rho : float Saturated vapor density, [kg/m³] References ---------- ...
Auxiliary equation for the density of saturated vapor Parameters ---------- T : float Temperature, [K] Returns ------- rho : float Saturated vapor density, [kg/m³] References ---------- IAPWS, Revised Supplementary Releas...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L2134-L2162
jjgomera/iapws
iapws/iapws95.py
MEoS._dPdT_sat
def _dPdT_sat(cls, T): """Auxiliary equation for the dP/dT along saturation line Parameters ---------- T : float Temperature, [K] Returns ------- dPdT : float dPdT, [MPa/K] References ---------- IAPWS, Revised Sup...
python
def _dPdT_sat(cls, T): """Auxiliary equation for the dP/dT along saturation line Parameters ---------- T : float Temperature, [K] Returns ------- dPdT : float dPdT, [MPa/K] References ---------- IAPWS, Revised Sup...
Auxiliary equation for the dP/dT along saturation line Parameters ---------- T : float Temperature, [K] Returns ------- dPdT : float dPdT, [MPa/K] References ---------- IAPWS, Revised Supplementary Release on Saturation P...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws95.py#L2165-L2192
jjgomera/iapws
iapws/humidAir.py
_virial
def _virial(T): """Virial equations for humid air Parameters ---------- T : float Temperature [K] Returns ------- prop : dict Dictionary with critical coefficient: * Baa: Second virial coefficient of dry air, [m³/mol] * Baw: Second air-water cross v...
python
def _virial(T): """Virial equations for humid air Parameters ---------- T : float Temperature [K] Returns ------- prop : dict Dictionary with critical coefficient: * Baa: Second virial coefficient of dry air, [m³/mol] * Baw: Second air-water cross v...
Virial equations for humid air Parameters ---------- T : float Temperature [K] Returns ------- prop : dict Dictionary with critical coefficient: * Baa: Second virial coefficient of dry air, [m³/mol] * Baw: Second air-water cross virial coefficient, [m³/...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/humidAir.py#L32-L198
jjgomera/iapws
iapws/humidAir.py
_fugacity
def _fugacity(T, P, x): """Fugacity equation for humid air Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] x : float Mole fraction of water-vapor, [-] Returns ------- fv : float fugacity coefficient, [MPa] Notes --...
python
def _fugacity(T, P, x): """Fugacity equation for humid air Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] x : float Mole fraction of water-vapor, [-] Returns ------- fv : float fugacity coefficient, [MPa] Notes --...
Fugacity equation for humid air Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] x : float Mole fraction of water-vapor, [-] Returns ------- fv : float fugacity coefficient, [MPa] Notes ------ Raise :class:`NotImple...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/humidAir.py#L201-L258
jjgomera/iapws
iapws/humidAir.py
MEoSBlend._bubbleP
def _bubbleP(cls, T): """Using ancillary equation return the pressure of bubble point""" c = cls._blend["bubble"] Tj = cls._blend["Tj"] Pj = cls._blend["Pj"] Tita = 1-T/Tj suma = 0 for i, n in zip(c["i"], c["n"]): suma += n*Tita**(i/2.) P = Pj...
python
def _bubbleP(cls, T): """Using ancillary equation return the pressure of bubble point""" c = cls._blend["bubble"] Tj = cls._blend["Tj"] Pj = cls._blend["Pj"] Tita = 1-T/Tj suma = 0 for i, n in zip(c["i"], c["n"]): suma += n*Tita**(i/2.) P = Pj...
Using ancillary equation return the pressure of bubble point
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/humidAir.py#L279-L290
jjgomera/iapws
iapws/humidAir.py
HumidAir.calculable
def calculable(self): """Check if inputs are enough to define state""" self._mode = "" if self.kwargs["T"] and self.kwargs["P"]: self._mode = "TP" elif self.kwargs["T"] and self.kwargs["rho"]: self._mode = "Trho" elif self.kwargs["P"] and self.kwargs["rho"...
python
def calculable(self): """Check if inputs are enough to define state""" self._mode = "" if self.kwargs["T"] and self.kwargs["P"]: self._mode = "TP" elif self.kwargs["T"] and self.kwargs["rho"]: self._mode = "Trho" elif self.kwargs["P"] and self.kwargs["rho"...
Check if inputs are enough to define state
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/humidAir.py#L643-L660
jjgomera/iapws
iapws/humidAir.py
HumidAir.calculo
def calculo(self): """Calculate procedure""" T = self.kwargs["T"] rho = self.kwargs["rho"] P = self.kwargs["P"] # Composition alternate definition if self._composition == "A": A = self.kwargs["A"] elif self._composition == "xa": xa = self....
python
def calculo(self): """Calculate procedure""" T = self.kwargs["T"] rho = self.kwargs["rho"] P = self.kwargs["P"] # Composition alternate definition if self._composition == "A": A = self.kwargs["A"] elif self._composition == "xa": xa = self....
Calculate procedure
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/humidAir.py#L662-L722
jjgomera/iapws
iapws/humidAir.py
HumidAir._eq
def _eq(self, T, P): """Procedure for calculate the composition in saturation state Parameters ---------- T : float Temperature [K] P : float Pressure [MPa] Returns ------- Asat : float Saturation mass fraction of dry ...
python
def _eq(self, T, P): """Procedure for calculate the composition in saturation state Parameters ---------- T : float Temperature [K] P : float Pressure [MPa] Returns ------- Asat : float Saturation mass fraction of dry ...
Procedure for calculate the composition in saturation state Parameters ---------- T : float Temperature [K] P : float Pressure [MPa] Returns ------- Asat : float Saturation mass fraction of dry air in humid air [kg/kg]
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/humidAir.py#L729-L761
jjgomera/iapws
iapws/humidAir.py
HumidAir._prop
def _prop(self, T, rho, fav): """Thermodynamic properties of humid air Parameters ---------- T : float Temperature, [K] rho : float Density, [kg/m³] fav : dict dictionary with helmholtz energy and derivatives Returns -...
python
def _prop(self, T, rho, fav): """Thermodynamic properties of humid air Parameters ---------- T : float Temperature, [K] rho : float Density, [kg/m³] fav : dict dictionary with helmholtz energy and derivatives Returns -...
Thermodynamic properties of humid air Parameters ---------- T : float Temperature, [K] rho : float Density, [kg/m³] fav : dict dictionary with helmholtz energy and derivatives Returns ------- prop : dict Di...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/humidAir.py#L763-L813
jjgomera/iapws
iapws/humidAir.py
HumidAir._coligative
def _coligative(self, rho, A, fav): """Miscelaneous properties of humid air Parameters ---------- rho : float Density, [kg/m³] A : float Mass fraction of dry air in humid air, [kg/kg] fav : dict dictionary with helmholtz energy and der...
python
def _coligative(self, rho, A, fav): """Miscelaneous properties of humid air Parameters ---------- rho : float Density, [kg/m³] A : float Mass fraction of dry air in humid air, [kg/kg] fav : dict dictionary with helmholtz energy and der...
Miscelaneous properties of humid air Parameters ---------- rho : float Density, [kg/m³] A : float Mass fraction of dry air in humid air, [kg/kg] fav : dict dictionary with helmholtz energy and derivatives Returns ------- ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/humidAir.py#L815-L853
jjgomera/iapws
iapws/humidAir.py
HumidAir._fav
def _fav(self, T, rho, A): r"""Specific Helmholtz energy of humid air and derivatives Parameters ---------- T : float Temperature, [K] rho : float Density, [kg/m³] A : float Mass fraction of dry air in humid air, [kg/kg] Retur...
python
def _fav(self, T, rho, A): r"""Specific Helmholtz energy of humid air and derivatives Parameters ---------- T : float Temperature, [K] rho : float Density, [kg/m³] A : float Mass fraction of dry air in humid air, [kg/kg] Retur...
r"""Specific Helmholtz energy of humid air and derivatives Parameters ---------- T : float Temperature, [K] rho : float Density, [kg/m³] A : float Mass fraction of dry air in humid air, [kg/kg] Returns ------- prop : d...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/humidAir.py#L855-L925
jjgomera/iapws
iapws/humidAir.py
HumidAir._fmix
def _fmix(self, T, rho, A): r"""Specific Helmholtz energy of air-water interaction Parameters ---------- T : float Temperature, [K] rho : float Density, [kg/m³] A : float Mass fraction of dry air in humid air, [kg/kg] Returns ...
python
def _fmix(self, T, rho, A): r"""Specific Helmholtz energy of air-water interaction Parameters ---------- T : float Temperature, [K] rho : float Density, [kg/m³] A : float Mass fraction of dry air in humid air, [kg/kg] Returns ...
r"""Specific Helmholtz energy of air-water interaction Parameters ---------- T : float Temperature, [K] rho : float Density, [kg/m³] A : float Mass fraction of dry air in humid air, [kg/kg] Returns ------- prop : dict ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/humidAir.py#L927-L1013
jjgomera/iapws
iapws/_iapws.py
_Ice
def _Ice(T, P): """Basic state equation for Ice Ih Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Returns ------- prop : dict Dict with calculated properties of ice. The available properties are: * rho: Density, [kg/m³] ...
python
def _Ice(T, P): """Basic state equation for Ice Ih Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Returns ------- prop : dict Dict with calculated properties of ice. The available properties are: * rho: Density, [kg/m³] ...
Basic state equation for Ice Ih Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Returns ------- prop : dict Dict with calculated properties of ice. The available properties are: * rho: Density, [kg/m³] * h: Specifi...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L62-L206
jjgomera/iapws
iapws/_iapws.py
_Liquid
def _Liquid(T, P=0.1): """Supplementary release on properties of liquid water at 0.1 MPa Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Although this relation is for P=0.1MPa, can be extrapoled at pressure 0.3 MPa Returns ------- ...
python
def _Liquid(T, P=0.1): """Supplementary release on properties of liquid water at 0.1 MPa Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Although this relation is for P=0.1MPa, can be extrapoled at pressure 0.3 MPa Returns ------- ...
Supplementary release on properties of liquid water at 0.1 MPa Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Although this relation is for P=0.1MPa, can be extrapoled at pressure 0.3 MPa Returns ------- prop : dict Dict w...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L210-L385
jjgomera/iapws
iapws/_iapws.py
_Supercooled
def _Supercooled(T, P): """Guideline on thermodynamic properties of supercooled water Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Returns ------- prop : dict Dict with calculated properties of water. The available properties are: ...
python
def _Supercooled(T, P): """Guideline on thermodynamic properties of supercooled water Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Returns ------- prop : dict Dict with calculated properties of water. The available properties are: ...
Guideline on thermodynamic properties of supercooled water Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Returns ------- prop : dict Dict with calculated properties of water. The available properties are: * L: Ordering field...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L389-L561
jjgomera/iapws
iapws/_iapws.py
_Sublimation_Pressure
def _Sublimation_Pressure(T): """Sublimation Pressure correlation Parameters ---------- T : float Temperature, [K] Returns ------- P : float Pressure at sublimation line, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * ...
python
def _Sublimation_Pressure(T): """Sublimation Pressure correlation Parameters ---------- T : float Temperature, [K] Returns ------- P : float Pressure at sublimation line, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * ...
Sublimation Pressure correlation Parameters ---------- T : float Temperature, [K] Returns ------- P : float Pressure at sublimation line, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * 50 ≤ T ≤ 273.16 Examples ---...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L564-L602
jjgomera/iapws
iapws/_iapws.py
_Melting_Pressure
def _Melting_Pressure(T, ice="Ih"): """Melting Pressure correlation Parameters ---------- T : float Temperature, [K] ice: string Type of ice: Ih, III, V, VI, VII. Below 273.15 is a mandatory input, the ice Ih is the default value. Above 273.15, the ice type is unnece...
python
def _Melting_Pressure(T, ice="Ih"): """Melting Pressure correlation Parameters ---------- T : float Temperature, [K] ice: string Type of ice: Ih, III, V, VI, VII. Below 273.15 is a mandatory input, the ice Ih is the default value. Above 273.15, the ice type is unnece...
Melting Pressure correlation Parameters ---------- T : float Temperature, [K] ice: string Type of ice: Ih, III, V, VI, VII. Below 273.15 is a mandatory input, the ice Ih is the default value. Above 273.15, the ice type is unnecesary. Returns ------- P : floa...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L605-L678
jjgomera/iapws
iapws/_iapws.py
_Viscosity
def _Viscosity(rho, T, fase=None, drho=None): """Equation for the Viscosity Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] fase: dict, optional for calculate critical enhancement phase properties drho: float, optional for calculate crit...
python
def _Viscosity(rho, T, fase=None, drho=None): """Equation for the Viscosity Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] fase: dict, optional for calculate critical enhancement phase properties drho: float, optional for calculate crit...
Equation for the Viscosity Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] fase: dict, optional for calculate critical enhancement phase properties drho: float, optional for calculate critical enhancement [∂ρ/∂P]T at reference state,...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L682-L768
jjgomera/iapws
iapws/_iapws.py
_ThCond
def _ThCond(rho, T, fase=None, drho=None): """Equation for the thermal conductivity Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] fase: dict, optional for calculate critical enhancement phase properties drho: float, optional for calcul...
python
def _ThCond(rho, T, fase=None, drho=None): """Equation for the thermal conductivity Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] fase: dict, optional for calculate critical enhancement phase properties drho: float, optional for calcul...
Equation for the thermal conductivity Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] fase: dict, optional for calculate critical enhancement phase properties drho: float, optional for calculate critical enhancement [∂ρ/∂P]T at refer...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L771-L869
jjgomera/iapws
iapws/_iapws.py
_Tension
def _Tension(T): """Equation for the surface tension Parameters ---------- T : float Temperature, [K] Returns ------- σ : float Surface tension, [N/m] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * 248.15 ≤ T ≤ 647 *...
python
def _Tension(T): """Equation for the surface tension Parameters ---------- T : float Temperature, [K] Returns ------- σ : float Surface tension, [N/m] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * 248.15 ≤ T ≤ 647 *...
Equation for the surface tension Parameters ---------- T : float Temperature, [K] Returns ------- σ : float Surface tension, [N/m] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * 248.15 ≤ T ≤ 647 * Estrapolate to -25ºC in...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L872-L908
jjgomera/iapws
iapws/_iapws.py
_Dielectric
def _Dielectric(rho, T): """Equation for the Dielectric constant Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- epsilon : float Dielectric constant, [-] Notes ------ Raise :class:`NotImplementedError` i...
python
def _Dielectric(rho, T): """Equation for the Dielectric constant Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- epsilon : float Dielectric constant, [-] Notes ------ Raise :class:`NotImplementedError` i...
Equation for the Dielectric constant Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- epsilon : float Dielectric constant, [-] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L911-L970
jjgomera/iapws
iapws/_iapws.py
_Refractive
def _Refractive(rho, T, l=0.5893): """Equation for the refractive index Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] l : float, optional Light Wavelength, [μm] Returns ------- n : float Refractive index, [-] Note...
python
def _Refractive(rho, T, l=0.5893): """Equation for the refractive index Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] l : float, optional Light Wavelength, [μm] Returns ------- n : float Refractive index, [-] Note...
Equation for the refractive index Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] l : float, optional Light Wavelength, [μm] Returns ------- n : float Refractive index, [-] Notes ------ Raise :class:`NotImplemen...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L973-L1024
jjgomera/iapws
iapws/_iapws.py
_Kw
def _Kw(rho, T): """Equation for the ionization constant of ordinary water Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- pKw : float Ionization constant in -log10(kw), [-] Notes ------ Raise :class:`No...
python
def _Kw(rho, T): """Equation for the ionization constant of ordinary water Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- pKw : float Ionization constant in -log10(kw), [-] Notes ------ Raise :class:`No...
Equation for the ionization constant of ordinary water Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- pKw : float Ionization constant in -log10(kw), [-] Notes ------ Raise :class:`NotImplementedError` if in...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L1027-L1077
jjgomera/iapws
iapws/_iapws.py
_Conductivity
def _Conductivity(rho, T): """Equation for the electrolytic conductivity of liquid and dense supercrítical water Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- K : float Electrolytic conductivity, [S/m] Not...
python
def _Conductivity(rho, T): """Equation for the electrolytic conductivity of liquid and dense supercrítical water Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- K : float Electrolytic conductivity, [S/m] Not...
Equation for the electrolytic conductivity of liquid and dense supercrítical water Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- K : float Electrolytic conductivity, [S/m] Notes ------ Raise :class:`No...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L1080-L1130
jjgomera/iapws
iapws/_iapws.py
_D2O_Viscosity
def _D2O_Viscosity(rho, T): """Equation for the Viscosity of heavy water Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- μ : float Viscosity, [Pa·s] Examples -------- >>> _D2O_Viscosity(998, 298.15) ...
python
def _D2O_Viscosity(rho, T): """Equation for the Viscosity of heavy water Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- μ : float Viscosity, [Pa·s] Examples -------- >>> _D2O_Viscosity(998, 298.15) ...
Equation for the Viscosity of heavy water Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- μ : float Viscosity, [Pa·s] Examples -------- >>> _D2O_Viscosity(998, 298.15) 0.0008897351001498108 >>> _D2O_...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L1134-L1180
jjgomera/iapws
iapws/_iapws.py
_D2O_ThCond
def _D2O_ThCond(rho, T): """Equation for the thermal conductivity of heavy water Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- k : float Thermal conductivity, [W/mK] Examples -------- >>> _D2O_ThCond(9...
python
def _D2O_ThCond(rho, T): """Equation for the thermal conductivity of heavy water Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- k : float Thermal conductivity, [W/mK] Examples -------- >>> _D2O_ThCond(9...
Equation for the thermal conductivity of heavy water Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- k : float Thermal conductivity, [W/mK] Examples -------- >>> _D2O_ThCond(998, 298.15) 0.60771286758806...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L1183-L1229
jjgomera/iapws
iapws/_iapws.py
_D2O_Sublimation_Pressure
def _D2O_Sublimation_Pressure(T): """Sublimation Pressure correlation for heavy water Parameters ---------- T : float Temperature, [K] Returns ------- P : float Pressure at sublimation line, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't i...
python
def _D2O_Sublimation_Pressure(T): """Sublimation Pressure correlation for heavy water Parameters ---------- T : float Temperature, [K] Returns ------- P : float Pressure at sublimation line, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't i...
Sublimation Pressure correlation for heavy water Parameters ---------- T : float Temperature, [K] Returns ------- P : float Pressure at sublimation line, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * 210 ≤ T ≤ 276.969 ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L1270-L1308
jjgomera/iapws
iapws/_iapws.py
_D2O_Melting_Pressure
def _D2O_Melting_Pressure(T, ice="Ih"): """Melting Pressure correlation for heavy water Parameters ---------- T : float Temperature, [K] ice: string Type of ice: Ih, III, V, VI, VII. Below 276.969 is a mandatory input, the ice Ih is the default value. Above 276.969, ...
python
def _D2O_Melting_Pressure(T, ice="Ih"): """Melting Pressure correlation for heavy water Parameters ---------- T : float Temperature, [K] ice: string Type of ice: Ih, III, V, VI, VII. Below 276.969 is a mandatory input, the ice Ih is the default value. Above 276.969, ...
Melting Pressure correlation for heavy water Parameters ---------- T : float Temperature, [K] ice: string Type of ice: Ih, III, V, VI, VII. Below 276.969 is a mandatory input, the ice Ih is the default value. Above 276.969, the ice type is unnecesary. Returns --...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L1311-L1369
jjgomera/iapws
iapws/_iapws.py
_Henry
def _Henry(T, gas, liquid="H2O"): """Equation for the calculation of Henry's constant Parameters ---------- T : float Temperature, [K] gas : string Name of gas to calculate solubility liquid : string Name of liquid solvent, can be H20 (default) or D2O Returns --...
python
def _Henry(T, gas, liquid="H2O"): """Equation for the calculation of Henry's constant Parameters ---------- T : float Temperature, [K] gas : string Name of gas to calculate solubility liquid : string Name of liquid solvent, can be H20 (default) or D2O Returns --...
Equation for the calculation of Henry's constant Parameters ---------- T : float Temperature, [K] gas : string Name of gas to calculate solubility liquid : string Name of liquid solvent, can be H20 (default) or D2O Returns ------- kw : float Henry's cons...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L1372-L1493
jjgomera/iapws
iapws/_iapws.py
_Kvalue
def _Kvalue(T, gas, liquid="H2O"): """Equation for the vapor-liquid distribution constant Parameters ---------- T : float Temperature, [K] gas : string Name of gas to calculate solubility liquid : string Name of liquid solvent, can be H20 (default) or D2O Returns ...
python
def _Kvalue(T, gas, liquid="H2O"): """Equation for the vapor-liquid distribution constant Parameters ---------- T : float Temperature, [K] gas : string Name of gas to calculate solubility liquid : string Name of liquid solvent, can be H20 (default) or D2O Returns ...
Equation for the vapor-liquid distribution constant Parameters ---------- T : float Temperature, [K] gas : string Name of gas to calculate solubility liquid : string Name of liquid solvent, can be H20 (default) or D2O Returns ------- kd : float Vapor-liq...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_iapws.py#L1496-L1617
jjgomera/iapws
iapws/_utils.py
getphase
def getphase(Tc, Pc, T, P, x, region): """Return fluid phase string name Parameters ---------- Tc : float Critical temperature, [K] Pc : float Critical pressure, [MPa] T : float Temperature, [K] P : float Pressure, [MPa] x : float Quality, [-] ...
python
def getphase(Tc, Pc, T, P, x, region): """Return fluid phase string name Parameters ---------- Tc : float Critical temperature, [K] Pc : float Critical pressure, [MPa] T : float Temperature, [K] P : float Pressure, [MPa] x : float Quality, [-] ...
Return fluid phase string name Parameters ---------- Tc : float Critical temperature, [K] Pc : float Critical pressure, [MPa] T : float Temperature, [K] P : float Pressure, [MPa] x : float Quality, [-] region: int Region number, used only ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_utils.py#L17-L61
jjgomera/iapws
iapws/_utils.py
deriv_H
def deriv_H(state, z, x, y, fase): r"""Calculate generic partial derivative :math:`\left.\frac{\partial z}{\partial x}\right|_{y}` from a fundamental helmholtz free energy equation of state Parameters ---------- state : any python object Only need to define P and T properties, non phase...
python
def deriv_H(state, z, x, y, fase): r"""Calculate generic partial derivative :math:`\left.\frac{\partial z}{\partial x}\right|_{y}` from a fundamental helmholtz free energy equation of state Parameters ---------- state : any python object Only need to define P and T properties, non phase...
r"""Calculate generic partial derivative :math:`\left.\frac{\partial z}{\partial x}\right|_{y}` from a fundamental helmholtz free energy equation of state Parameters ---------- state : any python object Only need to define P and T properties, non phase specific properties z : str ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_utils.py#L119-L191
jjgomera/iapws
iapws/_utils.py
deriv_G
def deriv_G(state, z, x, y, fase): r"""Calculate generic partial derivative :math:`\left.\frac{\partial z}{\partial x}\right|_{y}` from a fundamental Gibbs free energy equation of state Parameters ---------- state : any python object Only need to define P and T properties, non phase spe...
python
def deriv_G(state, z, x, y, fase): r"""Calculate generic partial derivative :math:`\left.\frac{\partial z}{\partial x}\right|_{y}` from a fundamental Gibbs free energy equation of state Parameters ---------- state : any python object Only need to define P and T properties, non phase spe...
r"""Calculate generic partial derivative :math:`\left.\frac{\partial z}{\partial x}\right|_{y}` from a fundamental Gibbs free energy equation of state Parameters ---------- state : any python object Only need to define P and T properties, non phase specific properties z : str Na...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/_utils.py#L194-L261
jjgomera/iapws
iapws/iapws97.py
_h13_s
def _h13_s(s): """Define the boundary between Region 1 and 3, h=f(s) Parameters ---------- s : float Specific entropy, [kJ/kgK] Returns ------- h : float Specific enthalpy, [kJ/kg] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: ...
python
def _h13_s(s): """Define the boundary between Region 1 and 3, h=f(s) Parameters ---------- s : float Specific entropy, [kJ/kgK] Returns ------- h : float Specific enthalpy, [kJ/kg] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: ...
Define the boundary between Region 1 and 3, h=f(s) Parameters ---------- s : float Specific entropy, [kJ/kgK] Returns ------- h : float Specific enthalpy, [kJ/kg] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * s(100MPa,623.15K) ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L106-L153
jjgomera/iapws
iapws/iapws97.py
_PSat_T
def _PSat_T(T): """Define the saturated line, P=f(T) Parameters ---------- T : float Temperature, [K] Returns ------- P : float Pressure, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * 273.15 ≤ T ≤ 647.096 Referen...
python
def _PSat_T(T): """Define the saturated line, P=f(T) Parameters ---------- T : float Temperature, [K] Returns ------- P : float Pressure, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * 273.15 ≤ T ≤ 647.096 Referen...
Define the saturated line, P=f(T) Parameters ---------- T : float Temperature, [K] Returns ------- P : float Pressure, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * 273.15 ≤ T ≤ 647.096 References ---------- ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L278-L320
jjgomera/iapws
iapws/iapws97.py
_TSat_P
def _TSat_P(P): """Define the saturated line, T=f(P) Parameters ---------- P : float Pressure, [MPa] Returns ------- T : float Temperature, [K] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * 0.00061121 ≤ P ≤ 22.064 Refe...
python
def _TSat_P(P): """Define the saturated line, T=f(P) Parameters ---------- P : float Pressure, [MPa] Returns ------- T : float Temperature, [K] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * 0.00061121 ≤ P ≤ 22.064 Refe...
Define the saturated line, T=f(P) Parameters ---------- P : float Pressure, [MPa] Returns ------- T : float Temperature, [K] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * 0.00061121 ≤ P ≤ 22.064 References ---------- ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L323-L366
jjgomera/iapws
iapws/iapws97.py
_PSat_h
def _PSat_h(h): """Define the saturated line, P=f(h) for region 3 Parameters ---------- h : float Specific enthalpy, [kJ/kg] Returns ------- P : float Pressure, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * h'(623.15K...
python
def _PSat_h(h): """Define the saturated line, P=f(h) for region 3 Parameters ---------- h : float Specific enthalpy, [kJ/kg] Returns ------- P : float Pressure, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * h'(623.15K...
Define the saturated line, P=f(h) for region 3 Parameters ---------- h : float Specific enthalpy, [kJ/kg] Returns ------- P : float Pressure, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * h'(623.15K) ≤ h ≤ h''(623.15K) ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L369-L420
jjgomera/iapws
iapws/iapws97.py
_PSat_s
def _PSat_s(s): """Define the saturated line, P=f(s) for region 3 Parameters ---------- s : float Specific entropy, [kJ/kgK] Returns ------- P : float Pressure, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * s'(623.15K...
python
def _PSat_s(s): """Define the saturated line, P=f(s) for region 3 Parameters ---------- s : float Specific entropy, [kJ/kgK] Returns ------- P : float Pressure, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * s'(623.15K...
Define the saturated line, P=f(s) for region 3 Parameters ---------- s : float Specific entropy, [kJ/kgK] Returns ------- P : float Pressure, [MPa] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: * s'(623.15K) ≤ s ≤ s''(623.15K) ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L423-L473
jjgomera/iapws
iapws/iapws97.py
_h2ab_s
def _h2ab_s(s): """Define the saturated line boundary between Region 4 and 2a-2b, h=f(s) Parameters ---------- s : float Specific entropy, [kJ/kgK] Returns ------- h : float Specific enthalpy, [kJ/kg] Notes ------ Raise :class:`NotImplementedError` if input isn...
python
def _h2ab_s(s): """Define the saturated line boundary between Region 4 and 2a-2b, h=f(s) Parameters ---------- s : float Specific entropy, [kJ/kgK] Returns ------- h : float Specific enthalpy, [kJ/kg] Notes ------ Raise :class:`NotImplementedError` if input isn...
Define the saturated line boundary between Region 4 and 2a-2b, h=f(s) Parameters ---------- s : float Specific entropy, [kJ/kgK] Returns ------- h : float Specific enthalpy, [kJ/kg] Notes ------ Raise :class:`NotImplementedError` if input isn't in limit: *...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L590-L648
jjgomera/iapws
iapws/iapws97.py
_Region1
def _Region1(T, P): """Basic equation for region 1 Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Returns ------- prop : dict Dict with calculated properties. The available properties are: * v: Specific volume, [m³/kg] ...
python
def _Region1(T, P): """Basic equation for region 1 Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Returns ------- prop : dict Dict with calculated properties. The available properties are: * v: Specific volume, [m³/kg] ...
Basic equation for region 1 Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Returns ------- prop : dict Dict with calculated properties. The available properties are: * v: Specific volume, [m³/kg] * h: Specific ent...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L706-L800
jjgomera/iapws
iapws/iapws97.py
_Backward1_T_Ph
def _Backward1_T_Ph(P, h): """ Backward equation for region 1, T=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Release ...
python
def _Backward1_T_Ph(P, h): """ Backward equation for region 1, T=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Release ...
Backward equation for region 1, T=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Release on the IAPWS Industrial Formulation 199...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L803-L847
jjgomera/iapws
iapws/iapws97.py
_Backward1_P_hs
def _Backward1_P_hs(h, s): """Backward equation for region 1, P=f(h,s) Parameters ---------- h : float Specific enthalpy, [kJ/kg] s : float Specific entropy, [kJ/kgK] Returns ------- P : float Pressure, [MPa] References ---------- IAPWS, Revised Sup...
python
def _Backward1_P_hs(h, s): """Backward equation for region 1, P=f(h,s) Parameters ---------- h : float Specific enthalpy, [kJ/kg] s : float Specific entropy, [kJ/kgK] Returns ------- P : float Pressure, [MPa] References ---------- IAPWS, Revised Sup...
Backward equation for region 1, P=f(h,s) Parameters ---------- h : float Specific enthalpy, [kJ/kg] s : float Specific entropy, [kJ/kgK] Returns ------- P : float Pressure, [MPa] References ---------- IAPWS, Revised Supplementary Release on Backward Equ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L896-L942
jjgomera/iapws
iapws/iapws97.py
_Region2
def _Region2(T, P): """Basic equation for region 2 Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Returns ------- prop : dict Dict with calculated properties. The available properties are: * v: Specific volume, [m³/kg] ...
python
def _Region2(T, P): """Basic equation for region 2 Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Returns ------- prop : dict Dict with calculated properties. The available properties are: * v: Specific volume, [m³/kg] ...
Basic equation for region 2 Parameters ---------- T : float Temperature, [K] P : float Pressure, [MPa] Returns ------- prop : dict Dict with calculated properties. The available properties are: * v: Specific volume, [m³/kg] * h: Specific ent...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L946-L1053
jjgomera/iapws
iapws/iapws97.py
Region2_cp0
def Region2_cp0(Tr, Pr): """Ideal properties for Region 2 Parameters ---------- Tr : float Reduced temperature, [-] Pr : float Reduced pressure, [-] Returns ------- prop : array Array with ideal Gibbs energy partial derivatives: * g: Ideal Specific ...
python
def Region2_cp0(Tr, Pr): """Ideal properties for Region 2 Parameters ---------- Tr : float Reduced temperature, [-] Pr : float Reduced pressure, [-] Returns ------- prop : array Array with ideal Gibbs energy partial derivatives: * g: Ideal Specific ...
Ideal properties for Region 2 Parameters ---------- Tr : float Reduced temperature, [-] Pr : float Reduced pressure, [-] Returns ------- prop : array Array with ideal Gibbs energy partial derivatives: * g: Ideal Specific Gibbs energy [kJ/kg] ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L1056-L1097
jjgomera/iapws
iapws/iapws97.py
_hab_s
def _hab_s(s): """Define the boundary between Region 2a and 2b, h=f(s) Parameters ---------- s : float Specific entropy, [kJ/kgK] Returns ------- h : float Specific enthalpy, [kJ/kg] References ---------- IAPWS, Revised Supplementary Release on Backward Equatio...
python
def _hab_s(s): """Define the boundary between Region 2a and 2b, h=f(s) Parameters ---------- s : float Specific entropy, [kJ/kgK] Returns ------- h : float Specific enthalpy, [kJ/kg] References ---------- IAPWS, Revised Supplementary Release on Backward Equatio...
Define the boundary between Region 2a and 2b, h=f(s) Parameters ---------- s : float Specific entropy, [kJ/kgK] Returns ------- h : float Specific enthalpy, [kJ/kg] References ---------- IAPWS, Revised Supplementary Release on Backward Equations for Pressure as...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L1154-L1188
jjgomera/iapws
iapws/iapws97.py
_Backward2_T_Ph
def _Backward2_T_Ph(P, h): """Backward equation for region 2, T=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- T : float Temperature, [K] """ if P <= 4: T = _Backward2a_T_Ph(P, h) e...
python
def _Backward2_T_Ph(P, h): """Backward equation for region 2, T=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- T : float Temperature, [K] """ if P <= 4: T = _Backward2a_T_Ph(P, h) e...
Backward equation for region 2, T=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- T : float Temperature, [K]
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L1347-L1376
jjgomera/iapws
iapws/iapws97.py
_Backward2a_T_Ps
def _Backward2a_T_Ps(P, s): """Backward equation for region 2a, T=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Release on ...
python
def _Backward2a_T_Ps(P, s): """Backward equation for region 2a, T=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Release on ...
Backward equation for region 2a, T=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Release on the IAPWS Industrial Formulation 19...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L1379-L1436
jjgomera/iapws
iapws/iapws97.py
_Backward2_T_Ps
def _Backward2_T_Ps(P, s): """Backward equation for region 2, T=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- T : float Temperature, [K] """ if P <= 4: T = _Backward2a_T_Ps(P, s) e...
python
def _Backward2_T_Ps(P, s): """Backward equation for region 2, T=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- T : float Temperature, [K] """ if P <= 4: T = _Backward2a_T_Ps(P, s) e...
Backward equation for region 2, T=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- T : float Temperature, [K]
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L1547-L1572
jjgomera/iapws
iapws/iapws97.py
_Backward2_P_hs
def _Backward2_P_hs(h, s): """Backward equation for region 2, P=f(h,s) Parameters ---------- h : float Specific enthalpy, [kJ/kg] s : float Specific entropy, [kJ/kgK] Returns ------- P : float Pressure, [MPa] """ sfbc = 5.85 hamin = _hab_s(s) if ...
python
def _Backward2_P_hs(h, s): """Backward equation for region 2, P=f(h,s) Parameters ---------- h : float Specific enthalpy, [kJ/kg] s : float Specific entropy, [kJ/kgK] Returns ------- P : float Pressure, [MPa] """ sfbc = 5.85 hamin = _hab_s(s) if ...
Backward equation for region 2, P=f(h,s) Parameters ---------- h : float Specific enthalpy, [kJ/kg] s : float Specific entropy, [kJ/kgK] Returns ------- P : float Pressure, [MPa]
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L1739-L1762
jjgomera/iapws
iapws/iapws97.py
_Region3
def _Region3(rho, T): """Basic equation for region 3 Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- prop : dict Dict with calculated properties. The available properties are: * v: Specific volume, [m³/k...
python
def _Region3(rho, T): """Basic equation for region 3 Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- prop : dict Dict with calculated properties. The available properties are: * v: Specific volume, [m³/k...
Basic equation for region 3 Parameters ---------- rho : float Density, [kg/m³] T : float Temperature, [K] Returns ------- prop : dict Dict with calculated properties. The available properties are: * v: Specific volume, [m³/kg] * h: Specific ...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L1766-L1865
jjgomera/iapws
iapws/iapws97.py
_tab_P
def _tab_P(P): """Define the boundary between Region 3a-3b, T=f(P) Parameters ---------- P : float Pressure, [MPa] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Supplementary Release on Backward Equations for Specific Volum...
python
def _tab_P(P): """Define the boundary between Region 3a-3b, T=f(P) Parameters ---------- P : float Pressure, [MPa] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Supplementary Release on Backward Equations for Specific Volum...
Define the boundary between Region 3a-3b, T=f(P) Parameters ---------- P : float Pressure, [MPa] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pre...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L1890-L1923
jjgomera/iapws
iapws/iapws97.py
_txx_P
def _txx_P(P, xy): """Define the boundary between 3x-3y, T=f(P) Parameters ---------- P : float Pressure, [MPa] xy: string Subregions options: cd, gh, ij, jk, mn, qu, rx, uv Returns ------- T : float Temperature, [K] References ---------- IAPWS, Rev...
python
def _txx_P(P, xy): """Define the boundary between 3x-3y, T=f(P) Parameters ---------- P : float Pressure, [MPa] xy: string Subregions options: cd, gh, ij, jk, mn, qu, rx, uv Returns ------- T : float Temperature, [K] References ---------- IAPWS, Rev...
Define the boundary between 3x-3y, T=f(P) Parameters ---------- P : float Pressure, [MPa] xy: string Subregions options: cd, gh, ij, jk, mn, qu, rx, uv Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Supplementary Release...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L2026-L2090
jjgomera/iapws
iapws/iapws97.py
_Backward3a_v_Ph
def _Backward3a_v_Ph(P, h): """Backward equation for region 3a, v=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] References ---------- IAPWS, Revised Supplementary Release on Backward Equations for the Functions T(p,h), v...
python
def _Backward3a_v_Ph(P, h): """Backward equation for region 3a, v=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] References ---------- IAPWS, Revised Supplementary Release on Backward Equations for the Functions T(p,h), v...
Backward equation for region 3a, v=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] References ---------- IAPWS, Revised Supplementary Release on Backward Equations for the Functions T(p,h), v(p,h) and T(p,s), v(p,s) for Region...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L2093-L2143
jjgomera/iapws
iapws/iapws97.py
_Backward3_v_Ph
def _Backward3_v_Ph(P, h): """Backward equation for region 3, v=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- v : float Specific volume, [m³/kg] """ hf = _h_3ab(P) if h <= hf: retu...
python
def _Backward3_v_Ph(P, h): """Backward equation for region 3, v=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- v : float Specific volume, [m³/kg] """ hf = _h_3ab(P) if h <= hf: retu...
Backward equation for region 3, v=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- v : float Specific volume, [m³/kg]
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L2198-L2217
jjgomera/iapws
iapws/iapws97.py
_Backward3a_T_Ph
def _Backward3a_T_Ph(P, h): """Backward equation for region 3a, T=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Supplementa...
python
def _Backward3a_T_Ph(P, h): """Backward equation for region 3a, T=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Supplementa...
Backward equation for region 3a, T=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Supplementary Release on Backward Equations fo...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L2220-L2270
jjgomera/iapws
iapws/iapws97.py
_Backward3_T_Ph
def _Backward3_T_Ph(P, h): """Backward equation for region 3, T=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- T : float Temperature, [K] """ hf = _h_3ab(P) if h <= hf: T = _Backwar...
python
def _Backward3_T_Ph(P, h): """Backward equation for region 3, T=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- T : float Temperature, [K] """ hf = _h_3ab(P) if h <= hf: T = _Backwar...
Backward equation for region 3, T=f(P,h) Parameters ---------- P : float Pressure, [MPa] h : float Specific enthalpy, [kJ/kg] Returns ------- T : float Temperature, [K]
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L2326-L2346
jjgomera/iapws
iapws/iapws97.py
_Backward3_v_Ps
def _Backward3_v_Ps(P, s): """Backward equation for region 3, v=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- v : float Specific volume, [m³/kg] """ if s <= sc: return _Backward3a_v_Ps...
python
def _Backward3_v_Ps(P, s): """Backward equation for region 3, v=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- v : float Specific volume, [m³/kg] """ if s <= sc: return _Backward3a_v_Ps...
Backward equation for region 3, v=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- v : float Specific volume, [m³/kg]
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L2454-L2472
jjgomera/iapws
iapws/iapws97.py
_Backward3a_T_Ps
def _Backward3a_T_Ps(P, s): """Backward equation for region 3a, T=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Supplementa...
python
def _Backward3a_T_Ps(P, s): """Backward equation for region 3a, T=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Supplementa...
Backward equation for region 3a, T=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- T : float Temperature, [K] References ---------- IAPWS, Revised Supplementary Release on Backward Equations fo...
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L2475-L2525
jjgomera/iapws
iapws/iapws97.py
_Backward3_T_Ps
def _Backward3_T_Ps(P, s): """Backward equation for region 3, T=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- T : float Temperature, [K] """ sc = 4.41202148223476 if s <= sc: T = _...
python
def _Backward3_T_Ps(P, s): """Backward equation for region 3, T=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- T : float Temperature, [K] """ sc = 4.41202148223476 if s <= sc: T = _...
Backward equation for region 3, T=f(P,s) Parameters ---------- P : float Pressure, [MPa] s : float Specific entropy, [kJ/kgK] Returns ------- T : float Temperature, [K]
https://github.com/jjgomera/iapws/blob/1e5812aab38212fb8a63736f61cdcfa427d223b1/iapws/iapws97.py#L2580-L2600