Skip to content

Commit

Permalink
checking for typos
Browse files Browse the repository at this point in the history
  • Loading branch information
JavalVyas2000 committed Apr 30, 2024
1 parent ea5f50f commit a12eb4f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@
"\n",
"## 3.1 Importing necessary libraries\n",
"\n",
"Let's commence by importing the essential libraries from pyomo and idaes."
"Let's commence by importing the essential libraries from Pyomo and IDAES."
]
},
{
Expand Down Expand Up @@ -650,7 +650,7 @@
"source": [
"## 3.2 Creating the unit model\n",
"\n",
"Creating a unit model starts by creating a class called `LiqExtractionData` and use the `declare_process_block_class` decorator. The `LiqExtractionData` inherts the properties of `UnitModelBlockData` class, which allows us to create a control volume which is necessary for the unit model. After declaration of the class we proceed to define the relevant config arguments for the control volume. The config arguments includes the following properties:\n",
"Creating a unit model starts by creating a class called `LiqExtractionData` and use the `declare_process_block_class` decorator. The `LiqExtractionData` inherits the properties of `UnitModelBlockData` class, which allows us to create a control volume which is necessary for the unit model. After declaration of the class we proceed to define the relevant config arguments for the control volume. The config arguments includes the following properties:\n",
"\n",
"- `material_balance_type` - Indicates what type of mass balance should be constructed\n",
"- `has_pressure_change` - Indicates whether terms for pressure change should be\n",
Expand Down Expand Up @@ -818,7 +818,7 @@
"- e indicates element index\n",
"- r indicates reaction name index\n",
"\n",
"Here we shall see that $N_{transfer, t, p, j}$ is the term in the equation which is reponsible for the mass transfer and the `mass_transfer_term` should only be equal to the amount being transferred and not include a material balance on our own. For a detailed description of the terms one should refer to the following [resource](https://github.com/IDAES/idaes-pse/blob/2f34dd3abc1bce5ba17c80939a01f9034e4fbeef/docs/reference_guides/core/control_volume_0d.rst)\n",
"Here we shall see that $N_{transfer, t, p, j}$ is the term in the equation which is responsible for the mass transfer and the `mass_transfer_term` should only be equal to the amount being transferred and not include a material balance on our own. For a detailed description of the terms one should refer to the following [resource](https://github.com/IDAES/idaes-pse/blob/2f34dd3abc1bce5ba17c80939a01f9034e4fbeef/docs/reference_guides/core/control_volume_0d.rst)\n",
"\n",
"This concludes the creation of organic phase control volume. Similar procedure is done for the aqueous phase control volume with aqueous property package. \n",
"\n",
Expand All @@ -828,7 +828,7 @@
"\n",
"The subsequent steps involve writing unit-level constraints. A check if the basis is either molar or mass, and unit-level constraints are written accordingly. The first constraint pertains to the mass transfer term for the aqueous phase. The mass transfer term is equal to $mass\\_transfer\\_term_{aq} = (D_{i})\\frac{mass_{i}~in~aq~phase}{flowrate~of~aq~phase}$. The second constraint relates to the mass transfer term in the organic phase, which is the negative of the mass transfer term in the aqueous phase: $mass\\_transfer\\_term_{org} = - mass\\_transfer\\_term_{aq} $\n",
"\n",
"Here $mass\\_transfer\\_term_{p}$ is the term indicating the amount of material being transfered from/to the phase and $D_{i}$ is the Distribution co-efficient for component i. \n",
"Here $mass\\_transfer\\_term_{p}$ is the term indicating the amount of material being transferred from/to the phase and $D_{i}$ is the Distribution co-efficient for component i. \n",
"\n",
"This marks the completion of the build function, and the unit model is now equipped with the necessary process constraints. The subsequent steps involve writing the initialization routine."
]
Expand Down Expand Up @@ -918,7 +918,7 @@
" self.aqueous_phase.add_geometry()\n",
"\n",
" # ---------------------------------------------------------------------\n",
" # Check flow basis is compatable\n",
" # Check flow basis is compatible\n",
" t_init = self.flowsheet().time.first()\n",
" if (\n",
" self.aqueous_phase.properties_out[t_init].get_material_flow_basis()\n",
Expand Down Expand Up @@ -984,11 +984,11 @@
" )\n",
" elif j in self.organic_phase.properties_out.component_list:\n",
" # No mass transfer term\n",
" # Set organic flowrate to an arbitary small value\n",
" # Set organic flowrate to an arbitrary small value\n",
" return self.organic_phase.mass_transfer_term[t, \"Org\", j] == 0 * lunits(fb)\n",
" elif j in self.aqueous_phase.properties_out.component_list:\n",
" # No mass transfer term\n",
" # Set aqueous flowrate to an arbitary small value\n",
" # Set aqueous flowrate to an arbitrary small value\n",
" return self.aqueous_phase.mass_transfer_term[t, \"Aq\", j] == 0 * aunits(fb)\n",
"\n",
" self.material_aq_balance = Constraint(\n",
Expand All @@ -1006,7 +1006,7 @@
" )\n",
" else:\n",
" # No mass transfer term\n",
" # Set organic flowrate to an arbitary small value\n",
" # Set organic flowrate to an arbitrary small value\n",
" return self.organic_phase.mass_transfer_term[t, \"Org\", j] == 0 * aunits(fb)\n",
"\n",
" self.material_org_balance = Constraint(\n",
Expand Down Expand Up @@ -1913,7 +1913,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 4.2 Unit Model\n",
"# 5.2 Unit Model\n",
"### Unit tests\n",
"Unit tests for the unit model encompass verifying the configuration arguments and the build function, similar to the approach taken for the property package. When testing the config arguments, we ensure that the correct number of arguments is provided and then match each argument with the expected one. This ensures that the unit model is properly configured and ready to operate as intended."
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@
"\n",
"## 3.1 Importing necessary libraries\n",
"\n",
"Let's commence by importing the essential libraries from pyomo and idaes."
"Let's commence by importing the essential libraries from Pyomo and IDAES."
]
},
{
Expand Down Expand Up @@ -650,7 +650,7 @@
"source": [
"## 3.2 Creating the unit model\n",
"\n",
"Creating a unit model starts by creating a class called `LiqExtractionData` and use the `declare_process_block_class` decorator. The `LiqExtractionData` inherts the properties of `UnitModelBlockData` class, which allows us to create a control volume which is necessary for the unit model. After declaration of the class we proceed to define the relevant config arguments for the control volume. The config arguments includes the following properties:\n",
"Creating a unit model starts by creating a class called `LiqExtractionData` and use the `declare_process_block_class` decorator. The `LiqExtractionData` inherits the properties of `UnitModelBlockData` class, which allows us to create a control volume which is necessary for the unit model. After declaration of the class we proceed to define the relevant config arguments for the control volume. The config arguments includes the following properties:\n",
"\n",
"- `material_balance_type` - Indicates what type of mass balance should be constructed\n",
"- `has_pressure_change` - Indicates whether terms for pressure change should be\n",
Expand Down Expand Up @@ -818,7 +818,7 @@
"- e indicates element index\n",
"- r indicates reaction name index\n",
"\n",
"Here we shall see that $N_{transfer, t, p, j}$ is the term in the equation which is reponsible for the mass transfer and the `mass_transfer_term` should only be equal to the amount being transferred and not include a material balance on our own. For a detailed description of the terms one should refer to the following [resource](https://github.com/IDAES/idaes-pse/blob/2f34dd3abc1bce5ba17c80939a01f9034e4fbeef/docs/reference_guides/core/control_volume_0d.rst)\n",
"Here we shall see that $N_{transfer, t, p, j}$ is the term in the equation which is responsible for the mass transfer and the `mass_transfer_term` should only be equal to the amount being transferred and not include a material balance on our own. For a detailed description of the terms one should refer to the following [resource](https://github.com/IDAES/idaes-pse/blob/2f34dd3abc1bce5ba17c80939a01f9034e4fbeef/docs/reference_guides/core/control_volume_0d.rst)\n",
"\n",
"This concludes the creation of organic phase control volume. Similar procedure is done for the aqueous phase control volume with aqueous property package. \n",
"\n",
Expand All @@ -828,7 +828,7 @@
"\n",
"The subsequent steps involve writing unit-level constraints. A check if the basis is either molar or mass, and unit-level constraints are written accordingly. The first constraint pertains to the mass transfer term for the aqueous phase. The mass transfer term is equal to $mass\\_transfer\\_term_{aq} = (D_{i})\\frac{mass_{i}~in~aq~phase}{flowrate~of~aq~phase}$. The second constraint relates to the mass transfer term in the organic phase, which is the negative of the mass transfer term in the aqueous phase: $mass\\_transfer\\_term_{org} = - mass\\_transfer\\_term_{aq} $\n",
"\n",
"Here $mass\\_transfer\\_term_{p}$ is the term indicating the amount of material being transfered from/to the phase and $D_{i}$ is the Distribution co-efficient for component i. \n",
"Here $mass\\_transfer\\_term_{p}$ is the term indicating the amount of material being transferred from/to the phase and $D_{i}$ is the Distribution co-efficient for component i. \n",
"\n",
"This marks the completion of the build function, and the unit model is now equipped with the necessary process constraints. The subsequent steps involve writing the initialization routine."
]
Expand Down Expand Up @@ -918,7 +918,7 @@
" self.aqueous_phase.add_geometry()\n",
"\n",
" # ---------------------------------------------------------------------\n",
" # Check flow basis is compatable\n",
" # Check flow basis is compatible\n",
" t_init = self.flowsheet().time.first()\n",
" if (\n",
" self.aqueous_phase.properties_out[t_init].get_material_flow_basis()\n",
Expand Down Expand Up @@ -984,11 +984,11 @@
" )\n",
" elif j in self.organic_phase.properties_out.component_list:\n",
" # No mass transfer term\n",
" # Set organic flowrate to an arbitary small value\n",
" # Set organic flowrate to an arbitrary small value\n",
" return self.organic_phase.mass_transfer_term[t, \"Org\", j] == 0 * lunits(fb)\n",
" elif j in self.aqueous_phase.properties_out.component_list:\n",
" # No mass transfer term\n",
" # Set aqueous flowrate to an arbitary small value\n",
" # Set aqueous flowrate to an arbitrary small value\n",
" return self.aqueous_phase.mass_transfer_term[t, \"Aq\", j] == 0 * aunits(fb)\n",
"\n",
" self.material_aq_balance = Constraint(\n",
Expand All @@ -1006,7 +1006,7 @@
" )\n",
" else:\n",
" # No mass transfer term\n",
" # Set organic flowrate to an arbitary small value\n",
" # Set organic flowrate to an arbitrary small value\n",
" return self.organic_phase.mass_transfer_term[t, \"Org\", j] == 0 * aunits(fb)\n",
"\n",
" self.material_org_balance = Constraint(\n",
Expand Down Expand Up @@ -1913,7 +1913,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 4.2 Unit Model\n",
"# 5.2 Unit Model\n",
"### Unit tests\n",
"Unit tests for the unit model encompass verifying the configuration arguments and the build function, similar to the approach taken for the property package. When testing the config arguments, we ensure that the correct number of arguments is provided and then match each argument with the expected one. This ensures that the unit model is properly configured and ready to operate as intended."
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@
"\n",
"## 3.1 Importing necessary libraries\n",
"\n",
"Let's commence by importing the essential libraries from pyomo and idaes."
"Let's commence by importing the essential libraries from Pyomo and IDAES."
]
},
{
Expand Down Expand Up @@ -650,7 +650,7 @@
"source": [
"## 3.2 Creating the unit model\n",
"\n",
"Creating a unit model starts by creating a class called `LiqExtractionData` and use the `declare_process_block_class` decorator. The `LiqExtractionData` inherts the properties of `UnitModelBlockData` class, which allows us to create a control volume which is necessary for the unit model. After declaration of the class we proceed to define the relevant config arguments for the control volume. The config arguments includes the following properties:\n",
"Creating a unit model starts by creating a class called `LiqExtractionData` and use the `declare_process_block_class` decorator. The `LiqExtractionData` inherits the properties of `UnitModelBlockData` class, which allows us to create a control volume which is necessary for the unit model. After declaration of the class we proceed to define the relevant config arguments for the control volume. The config arguments includes the following properties:\n",
"\n",
"- `material_balance_type` - Indicates what type of mass balance should be constructed\n",
"- `has_pressure_change` - Indicates whether terms for pressure change should be\n",
Expand Down Expand Up @@ -818,7 +818,7 @@
"- e indicates element index\n",
"- r indicates reaction name index\n",
"\n",
"Here we shall see that $N_{transfer, t, p, j}$ is the term in the equation which is reponsible for the mass transfer and the `mass_transfer_term` should only be equal to the amount being transferred and not include a material balance on our own. For a detailed description of the terms one should refer to the following [resource](https://github.com/IDAES/idaes-pse/blob/2f34dd3abc1bce5ba17c80939a01f9034e4fbeef/docs/reference_guides/core/control_volume_0d.rst)\n",
"Here we shall see that $N_{transfer, t, p, j}$ is the term in the equation which is responsible for the mass transfer and the `mass_transfer_term` should only be equal to the amount being transferred and not include a material balance on our own. For a detailed description of the terms one should refer to the following [resource](https://github.com/IDAES/idaes-pse/blob/2f34dd3abc1bce5ba17c80939a01f9034e4fbeef/docs/reference_guides/core/control_volume_0d.rst)\n",
"\n",
"This concludes the creation of organic phase control volume. Similar procedure is done for the aqueous phase control volume with aqueous property package. \n",
"\n",
Expand All @@ -828,7 +828,7 @@
"\n",
"The subsequent steps involve writing unit-level constraints. A check if the basis is either molar or mass, and unit-level constraints are written accordingly. The first constraint pertains to the mass transfer term for the aqueous phase. The mass transfer term is equal to $mass\\_transfer\\_term_{aq} = (D_{i})\\frac{mass_{i}~in~aq~phase}{flowrate~of~aq~phase}$. The second constraint relates to the mass transfer term in the organic phase, which is the negative of the mass transfer term in the aqueous phase: $mass\\_transfer\\_term_{org} = - mass\\_transfer\\_term_{aq} $\n",
"\n",
"Here $mass\\_transfer\\_term_{p}$ is the term indicating the amount of material being transfered from/to the phase and $D_{i}$ is the Distribution co-efficient for component i. \n",
"Here $mass\\_transfer\\_term_{p}$ is the term indicating the amount of material being transferred from/to the phase and $D_{i}$ is the Distribution co-efficient for component i. \n",
"\n",
"This marks the completion of the build function, and the unit model is now equipped with the necessary process constraints. The subsequent steps involve writing the initialization routine."
]
Expand Down Expand Up @@ -918,7 +918,7 @@
" self.aqueous_phase.add_geometry()\n",
"\n",
" # ---------------------------------------------------------------------\n",
" # Check flow basis is compatable\n",
" # Check flow basis is compatible\n",
" t_init = self.flowsheet().time.first()\n",
" if (\n",
" self.aqueous_phase.properties_out[t_init].get_material_flow_basis()\n",
Expand Down Expand Up @@ -984,11 +984,11 @@
" )\n",
" elif j in self.organic_phase.properties_out.component_list:\n",
" # No mass transfer term\n",
" # Set organic flowrate to an arbitary small value\n",
" # Set organic flowrate to an arbitrary small value\n",
" return self.organic_phase.mass_transfer_term[t, \"Org\", j] == 0 * lunits(fb)\n",
" elif j in self.aqueous_phase.properties_out.component_list:\n",
" # No mass transfer term\n",
" # Set aqueous flowrate to an arbitary small value\n",
" # Set aqueous flowrate to an arbitrary small value\n",
" return self.aqueous_phase.mass_transfer_term[t, \"Aq\", j] == 0 * aunits(fb)\n",
"\n",
" self.material_aq_balance = Constraint(\n",
Expand All @@ -1006,7 +1006,7 @@
" )\n",
" else:\n",
" # No mass transfer term\n",
" # Set organic flowrate to an arbitary small value\n",
" # Set organic flowrate to an arbitrary small value\n",
" return self.organic_phase.mass_transfer_term[t, \"Org\", j] == 0 * aunits(fb)\n",
"\n",
" self.material_org_balance = Constraint(\n",
Expand Down Expand Up @@ -1913,7 +1913,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 4.2 Unit Model\n",
"# 5.2 Unit Model\n",
"### Unit tests\n",
"Unit tests for the unit model encompass verifying the configuration arguments and the build function, similar to the approach taken for the property package. When testing the config arguments, we ensure that the correct number of arguments is provided and then match each argument with the expected one. This ensures that the unit model is properly configured and ready to operate as intended."
]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ equil = "equil"
# Atomic elements
Nd = "Nd"
Ba = "Ba" # ba is also used in block names in RSOFC-SOEC example
KNO3 = "KNO3"
KNO = "KNO"
# Numpy
arange = "arange"
[tool.typos.default]
Expand Down

0 comments on commit a12eb4f

Please sign in to comment.