Skip to content

Commit

Permalink
change alias-related methods to synonym as thermosteam hasn't been up…
Browse files Browse the repository at this point in the history
…dated
  • Loading branch information
yalinli2 committed Jan 19, 2022
1 parent b47e36c commit 8b61f59
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions qsdsan/_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ def load_default(cls, use_default_data=True, store_data=False, default_compile=T
if default_compile:
new.default_compile(lock_state_at='', particulate_ref='NaCl')
new.compile()
# Add aliases
new.set_alias('H2O', 'Water')
# Add aliases (`set_synonym` is the same as `set_alias`)
new.set_synonym('H2O', 'Water')
# Pre-define the group used in `composition` calculation
new.define_group('S_VFA', ('S_Ac', 'S_Prop'))
new.define_group('X_Stor', ('X_OHO_PHA', 'X_GAO_PHA', 'X_PAO_PHA',
Expand Down Expand Up @@ -473,7 +473,7 @@ def append_combustion_components(components, alt_IDs={},
except RuntimeError: # cannot compile due to missing properties
cmps.default_compile(**default_compile_kwargs)
for k, v in aliases.items():
cmps.set_alias(k, v)
cmps.set_synonym(k, v)
return cmps


Expand Down Expand Up @@ -637,8 +637,8 @@ def subgroup(self, IDs):
new = Components(components)
new.compile()
for i in new.IDs:
for j in self.get_aliases(i):
try: new.set_alias(i, j)
for j in self.get_synonyms(i):
try: new.set_synonym(i, j)
except: pass
return new

Expand Down

0 comments on commit 8b61f59

Please sign in to comment.