Skip to content

Commit

Permalink
Corrected thermal stress mistake for multiple walls
Browse files Browse the repository at this point in the history
Was using the wrong dQ/dA for outer walls.
  • Loading branch information
dug20 committed May 6, 2022
1 parent 25f09c5 commit bee91b5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Introduction to Bamboo.ipynb

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions cusfbamboo/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ def steady_heating_analysis(self, num_grid = 1000, counterflow = True, iter_star
results["info"]["T_exhaust"] = "Exhaust temperature at each position (K). T_exhaust[i] is the value at x[i]. "
results["info"]["dQ_dx"] = "Heat transfer rate per unit axial length (W/m). dQ_dx[i] is the value at x[i]."
results["info"]["dQ_dLc"] = "Heat transfer rate per unit length along the cooling channel (W/m) - equal to dQ/dx for 'vertical' channels but not for 'spiral' channels. dQ_dx[i] is the value at x[i]."
results["info"]["dQ_dA"] = "Heat transfer rate per unit chamber area (W/m2). dQ_dA[i] is the value at x[i]."
results["info"]["dQ_dA"] = "Heat transfer rate per unit chamber area at the innermost wall (W/m2). dQ_dA[i] is the value at x[i]."
results["info"]["Rdx"] = "Local thermal resistances at each position (K m/W), in the order coolant convection (index 0) --> exhaust convection. R_dx[i] a list of resistances at the value at x[i]"
results["info"]["rho_coolant"] = "Density of coolant (kg/m3). rho_coolant[i] is the value at x[i]."
results["info"]["p_coolant"] = "Static pressure of coolant (Pa). p_coolant[i] is the value at x[i]."
Expand Down Expand Up @@ -1239,7 +1239,9 @@ def steady_heating_analysis(self, num_grid = 1000, counterflow = True, iter_star
poisson = self.walls[j].material.poisson
t_w = self.walls[j].thickness(x)

results["sigma_t_thermal"][i][j] = E * alpha * results["dQ_dA"][i] * t_w / (2 * (1 - poisson) * k)
corrected_dQ_dA = results["dQ_dA"][i] * self.geometry.r(x = results["x"][i]) / (D/2) # Need to get the actual dQ/dA at the local wall radius (the local radius increases as you move out for each wall)

results["sigma_t_thermal"][i][j] = E * alpha * corrected_dQ_dA * t_w / (2 * (1 - poisson) * k)

# Pressure stress from Heister [9]
D += t_w / 2 # Average diameter
Expand Down
8 changes: 4 additions & 4 deletions examples/Cantera Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\Daniel\\anaconda3\\lib\\site-packages\\numpy\\lib\\function_base.py:1073: RuntimeWarning: divide by zero encountered in true_divide\n",
"C:\\Users\\Daniel\\AppData\\Roaming\\Python\\Python38\\site-packages\\numpy\\lib\\function_base.py:1215: RuntimeWarning: divide by zero encountered in true_divide\n",
" a = -(dx2)/(dx1 * (dx1 + dx2))\n",
"C:\\Users\\Daniel\\anaconda3\\lib\\site-packages\\numpy\\lib\\function_base.py:1074: RuntimeWarning: divide by zero encountered in true_divide\n",
"C:\\Users\\Daniel\\AppData\\Roaming\\Python\\Python38\\site-packages\\numpy\\lib\\function_base.py:1216: RuntimeWarning: divide by zero encountered in true_divide\n",
" b = (dx2 - dx1) / (dx1 * dx2)\n",
"C:\\Users\\Daniel\\anaconda3\\lib\\site-packages\\numpy\\lib\\function_base.py:1075: RuntimeWarning: divide by zero encountered in true_divide\n",
"C:\\Users\\Daniel\\AppData\\Roaming\\Python\\Python38\\site-packages\\numpy\\lib\\function_base.py:1217: RuntimeWarning: divide by zero encountered in true_divide\n",
" c = dx1 / (dx2 * (dx1 + dx2))\n",
"C:\\Users\\Daniel\\anaconda3\\lib\\site-packages\\numpy\\lib\\function_base.py:1081: RuntimeWarning: invalid value encountered in add\n",
"C:\\Users\\Daniel\\AppData\\Roaming\\Python\\Python38\\site-packages\\numpy\\lib\\function_base.py:1223: RuntimeWarning: invalid value encountered in add\n",
" out[tuple(slice1)] = a * f[tuple(slice2)] + b * f[tuple(slice3)] + c * f[tuple(slice4)]\n"
]
},
Expand Down
12 changes: 6 additions & 6 deletions examples/Simple Engine.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\Daniel\\anaconda3\\lib\\site-packages\\numpy\\lib\\function_base.py:1073: RuntimeWarning: divide by zero encountered in true_divide\n",
"C:\\Users\\Daniel\\AppData\\Roaming\\Python\\Python38\\site-packages\\numpy\\lib\\function_base.py:1215: RuntimeWarning: divide by zero encountered in true_divide\n",
" a = -(dx2)/(dx1 * (dx1 + dx2))\n",
"C:\\Users\\Daniel\\anaconda3\\lib\\site-packages\\numpy\\lib\\function_base.py:1074: RuntimeWarning: divide by zero encountered in true_divide\n",
"C:\\Users\\Daniel\\AppData\\Roaming\\Python\\Python38\\site-packages\\numpy\\lib\\function_base.py:1216: RuntimeWarning: divide by zero encountered in true_divide\n",
" b = (dx2 - dx1) / (dx1 * dx2)\n",
"C:\\Users\\Daniel\\anaconda3\\lib\\site-packages\\numpy\\lib\\function_base.py:1075: RuntimeWarning: divide by zero encountered in true_divide\n",
"C:\\Users\\Daniel\\AppData\\Roaming\\Python\\Python38\\site-packages\\numpy\\lib\\function_base.py:1217: RuntimeWarning: divide by zero encountered in true_divide\n",
" c = dx1 / (dx2 * (dx1 + dx2))\n",
"C:\\Users\\Daniel\\anaconda3\\lib\\site-packages\\numpy\\lib\\function_base.py:1081: RuntimeWarning: invalid value encountered in add\n",
"C:\\Users\\Daniel\\AppData\\Roaming\\Python\\Python38\\site-packages\\numpy\\lib\\function_base.py:1223: RuntimeWarning: invalid value encountered in add\n",
" out[tuple(slice1)] = a * f[tuple(slice2)] + b * f[tuple(slice3)] + c * f[tuple(slice4)]\n"
]
},
Expand Down Expand Up @@ -176,7 +176,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 5,
"metadata": {
"scrolled": false
},
Expand All @@ -199,7 +199,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 6,
"metadata": {
"scrolled": false
},
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
name='cusfbamboo',
author = 'Daniel Gibbons',
author_email = 'daniel.u.gibbons@gmail.com',
version = '0.2.3',
license = ' gpl-3.0',
version = '0.2.4',
license = ' AGPL-3.0',
packages = find_packages(),
install_requires = ['numpy', 'matplotlib', 'scipy'],
description = 'Cooling system modelling for liquid rocket engines',
Expand All @@ -26,7 +26,7 @@
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Programming Language :: Python :: 3'],
long_description = long_description,
long_description_content_type='text/markdown'
Expand Down

0 comments on commit bee91b5

Please sign in to comment.