Skip to content

Commit

Permalink
Merge branch 'main' into ksb_black_24
Browse files Browse the repository at this point in the history
  • Loading branch information
lbianchi-lbl authored Apr 4, 2024
2 parents c4ae6ec + 4e6a0f0 commit 4750950
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 13 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@ astroid = "astroid"
delt = "delt"
# TEMPORARY - Remove after example update
upadate = "upadate"

# false positive from 1.20.3
RTO = "RTO"
PN = "PN"
hd = "hd"
Tge = "Tge"
iy = "iy"
2 changes: 1 addition & 1 deletion docs/explanations/components/ui/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ User Interfaces
There are several types of user interfaces in IDAES.
To learn more about them, follow the links below.

* Graphical user interfaces: see `Flowsheet Visualizer <https://idaes-ui.readthedocs.io/en/latest/fv.html>`_
* Graphical user interfaces: see `Flowsheet Visualizer <https://idaes-ui.readthedocs.io/en/latest/user/fv/>`_
* `Jupyter Notebooks <https://jupyter.org/>`_: see `IDAES Examples <https://idaes-examples.readthedocs.io/en/latest/>`_
* Python Application Programming Interfaces (APIs): see :ref:`API Reference`

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Contents
| :doc:`Logging Processing & Outputs <reference_guides/logging>`
| :doc:`Developing for IDAES <reference_guides/developer/index>`
| :doc:`Grid integration application <reference_guides/apps/grid_integration/index>`
| :external+ui:doc:`Flowsheet Visualizer <fv>`
| `Flowsheet Visualizer <https://idaes-ui.readthedocs.io/en/latest/user/fv/>`_
.. toctree::
:hidden:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Heat Exchanger Cost

.. note:: IDAES does not yet support costing for heat exchangers requiring both shell and tube area (HX1D).

The purchse cost is computed based on the base unit cost and three correction factors (Eq. 22.43 in Seider et al.), and is adjusted by user-defined currency units with the appropriate CE index value. The base cost is computed depending on the heat exchanger type selected by the user.
The purchase cost is computed based on the base unit cost and three correction factors (Eq. 22.43 in Seider et al.), and is adjusted by user-defined currency units with the appropriate CE index value. The base cost is computed depending on the heat exchanger type selected by the user.

The heat exchanger costing method has three arguments, hx_type = heat exchanger type, material_type = construction material, and tube_length = tube length ('*' corresponds to the default options):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Option 1 - "FTPz":
<ul>
<li>Total molar flow rate (mol/s) - <code> <font color="red"> flow_mol </font> </code>
<li>Temperature (K) - <code> <font color="red"> temperature </font> </code>
<li>Presure (Pa) - <code> <font color="red"> pressure</font></code>
<li>Pressure (Pa) - <code> <font color="red"> pressure</font></code>
<li>Mole fraction of the mixture - <code> <font color="red"> mole_frac_comp</font></code>
</ul>
</body>
Expand All @@ -43,7 +43,7 @@ Option 2 - "FcTP":
<ul>
<li>Component molar flow rate (mol/s) - <code> <font color="red"> flow_mol_comp </font> </code>
<li>Temperature (K) - <code> <font color="red"> temperature </font> </code>
<li>Presure (Pa) - <code> <font color="red"> pressure</font></code>
<li>Pressure (Pa) - <code> <font color="red"> pressure</font></code>
</ul>
</body>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ List of Variables
"``fug_phase_comp``", "Fugacity indexed by phase and component", "Pa"
"``fug_coeff_phase_comp``", "Fugacity coefficient indexed by phase and component", "None"
"``gibbs_mol_phase``", "Molar Gibbs energy indexed by phase", "J/mol"
"``heat_capacity_ratio_phase``", "Heat capcity ratio by phase", "-"
"``heat_capacity_ratio_phase``", "Heat capacity ratio by phase", "-"
"``isothermal_speed_sound_phase``", "Isothermal speed of sound by phase", "m/s"
"``isentropic_speed_sound_phase``", "Isentropic speed of sound by phase", "m/s"
"``mw``", "Molecular weight of mixture", "kg/mol"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ The function has has five arguments, self, equipment, scaled_param, temp_C, and
* self : an existing unit model or Pyomo Block
* equipment : The type of equipment to be costed, see table 6
* scaled_param : The Pyomo Variable representing the component's scaled parameter
* temp_C : The Pyomo Variable representing the hottest temperature of the piece of equiment being costed. Some pieces of equipment do not have a temperature associated with them, so the default argument is None. This variable must have units of Celsius (Pyomo label `pyunits.C`).
* temp_C : The Pyomo Variable representing the hottest temperature of the piece of equipment being costed. Some pieces of equipment do not have a temperature associated with them, so the default argument is None. This variable must have units of Celsius (Pyomo label `pyunits.C`).
* n_equip : The number of pieces of equipment to be costed. The function will evenly divide the scaled parameter between the number passed.
* CE_index_year : Chemical Engineering Cost Index base year, defaults to 2018; calling the registered Pyomo currency units dictionary of plant cost index values will allow conversion between base years within the flowsheet
* custom_accounts : Additional accounts to cost
Expand Down
2 changes: 1 addition & 1 deletion idaes/core/solvers/tests/test_petsc_pid.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def inlet_pressure_eqn(b, t):
assert pyo.value(
tj2.get_vec(m.fs.valve_1.control_volume.properties_in[24].pressure)[20]
) == pytest.approx(6e5)
# make sure after the controller comes on the presure goes to the set point
# make sure after the controller comes on the pressure goes to the set point
assert pyo.value(
tj2.get_vec(m.fs.tank.control_volume.properties_out[24].pressure)[9]
) == pytest.approx(3e5)
Expand Down
6 changes: 3 additions & 3 deletions idaes/core/util/model_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def _write_component_data(sd, o, wts, count=None, lookup=None, suffixes=None):
continue
sd[lookup[id(key)]] = el # Assume keys are Pyomo model components
else: # rest of components with normal component data structure
frst = True # on first item when true
is_first_item = True # on first item when true
try:
item_keys = o.keys()
except AttributeError:
Expand All @@ -614,12 +614,12 @@ def _write_component_data(sd, o, wts, count=None, lookup=None, suffixes=None):
el = o
else:
el = o[key]
if frst: # assume all item are same type, use first to get alist
if is_first_item: # assume all item are same type, use first to get alist
# Get all attributes
(alist, _) = wts.get_data_class_attr_list(el)
if alist is None:
return # if None then skip writing
frst = False # done with first only stuff
is_first_item = False # done with first only stuff
edict = {"__type__": str(type(el))}
if Suffix in wts.classes: # if writing suffixes give data components an id
edict["__id__"] = count.count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ def flow_mass_flyash(b, t):
return b.flowrate_daf_flyash[t] + b.flowrate_ash[t]

def _make_momentum_balance(self):
# flue gas pressure is secondary air presure
# flue gas pressure is secondary air pressure
# - pressure drop through windbox
# and burner secondary air register
@self.Constraint(self.flowsheet().time, doc="Flue gas pressure in Pascals")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2866,7 +2866,7 @@ def sigma_eff_P2(b, t):

# rupture time calculation at crotch corner
@self.Expression(
self.flowsheet().time, doc="Rupture Tme at Crotch Corner for Header"
self.flowsheet().time, doc="Rupture Time at Crotch Corner for Header"
)
def rupture_time_crotch_corner(b, t):
if value(b.sigma_eff_P1[t]) > 10: # MPa
Expand Down

0 comments on commit 4750950

Please sign in to comment.