Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve nozzle continuity equations #3

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e935669
First elements to improve nozzle continuity equations:
LouisFonteneauMarcel Aug 22, 2024
c38fbe1
Simple nozzle with Mach defined at inlet and outlet
LouisFonteneauMarcel Aug 22, 2024
bdc401a
modified equations to calculate the variations in density for mass fl…
LouisFonteneauMarcel Aug 22, 2024
3c3e7e0
modified nozzle aero and test to capture datas of mach number
LouisFonteneauMarcel Aug 22, 2024
5a241ee
repair all tests except test_nozzle, different values calculated and …
LouisFonteneauMarcel Aug 22, 2024
311d4ca
modified test_nozzle as I can't figure out if the value is an error y…
LouisFonteneauMarcel Aug 22, 2024
cd23bfc
Modified unitary test to target one purpose for the nozzle (Free the …
LouisFonteneauMarcel Aug 22, 2024
ddbcb20
Modified test as without if condtionning in the compute of the nozzle…
LouisFonteneauMarcel Aug 23, 2024
5d6baeb
Modified case and outwards after review, removed unecessary component…
LouisFonteneauMarcel Aug 23, 2024
b50f26a
Modified residue and unkown for outlet mach number calculation, used …
LouisFonteneauMarcel Aug 23, 2024
6f919b8
added De Laval nozzle test befor building a converging diverging nozzle
LouisFonteneauMarcel Aug 23, 2024
94c41bc
Modified Nozzle architecture to make a general nozzle with potential …
LouisFonteneauMarcel Aug 23, 2024
f116282
Use ideal_gas gamma function for heat capacity ratio instead of decla…
LouisFonteneauMarcel Aug 23, 2024
4182659
More tests for different inlet mach number to force the work on mach …
LouisFonteneauMarcel Aug 26, 2024
118544e
redefined the nozzle aero model with an advanced one and used the old…
LouisFonteneauMarcel Aug 26, 2024
9cf7167
First tests working, not limited at mach=1 for maximum in converging …
LouisFonteneauMarcel Aug 26, 2024
b9b9c30
pre-commit and comments added
LouisFonteneauMarcel Aug 26, 2024
fad4f29
Tests on converging nozzle working
LouisFonteneauMarcel Aug 27, 2024
08b8a57
Converging Nozzle model modified for better evaluation of a started n…
LouisFonteneauMarcel Aug 27, 2024
020d3c8
- More explicit area parameters
LouisFonteneauMarcel Sep 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
270 changes: 135 additions & 135 deletions pyturbo/notebooks/gas_generator.ipynb
Original file line number Diff line number Diff line change
@@ -1,138 +1,138 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "6cd009f7-9662-4cf5-860c-e411371ebf0a",
"metadata": {},
"outputs": [],
"source": [
"from pyturbo.systems.gas_generator import GasGenerator"
]
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "6cd009f7-9662-4cf5-860c-e411371ebf0a",
"metadata": {},
"outputs": [],
"source": [
"from pyturbo.systems.gas_generator import GasGenerator"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d223162a-7ef1-4796-9d30-ef513ad99697",
"metadata": {},
"outputs": [],
"source": [
"from cosapp.drivers import NonLinearSolver\n",
"from cosapp.utils import LogLevel, set_log\n",
"from cosapp.recorders import DataFrameRecorder\n",
"\n",
"set_log()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "af960069-e1fe-40dd-b8c1-cadf1d9ecbf7",
"metadata": {},
"outputs": [],
"source": [
"core = GasGenerator(\"core\")\n",
"\n",
"core.kp.inlet_tip[0] = 0.25\n",
"core.kp.exit_tip[0] = 0.25\n",
"core.fuel_W = 0.11\n",
"core.turbine.aero.Ncdes = 15.\n",
"core.compressor.geom.blade_hub_to_tip_ratio = 0.8\n",
"core.turbine.sh_out.power = 30e6\n",
"core.turbine.geom.blade_height_ratio = 0.1\n",
"\n",
"core.fl_in.Tt = 409.\n",
"core.fl_in.Pt = 2.67e5\n",
"\n",
"core.compressor.sh_in.power = core.turbine.sh_out.power\n",
"\n",
"core.compressor.geom.blade_hub_to_tip_ratio = 0.7\n",
"\n",
"run = core.add_driver(NonLinearSolver('run', factor=0.8, history=True))\n",
"\n",
"run.add_equation(\"turbine.aero.Ncqdes == 100.\").add_unknown(\"compressor.fl_in.W\", max_rel_step=0.8)\n",
"run.add_equation(\"compressor.aero.phi == 0.45\").add_unknown(\"compressor.aero.phiP\")\n",
"run.add_equation(\"compressor.aero.pr == 11.\")\n",
"run.add_equation(\"combustor.aero.Tcomb == 1650.\").add_unknown(\"fuel_W\")\n",
"run.add_equation(\"compressor.aero.utip == 450.\").add_unknown(\"turbine.aero.Ncdes\")\n",
"run.add_unknown(\"kp.inlet_tip[0]\", lower_bound=1e-5, max_rel_step=0.8).add_target(\"turbine.sh_out.power\")\n",
"run.add_unknown(\"kp.exit_tip[0]\", lower_bound=1e-5, max_rel_step=0.8).add_equation(\"turbine.aero.psi == 1.1\")\n",
"run.add_unknown(\"compressor.aero.xnd\").add_equation(\"compressor.aero.pcnr == 98.\")\n",
"run.add_unknown(\"turbine.geom.blade_height_ratio\", lower_bound=0., upper_bound=1.)\n",
"\n",
"rec = run.runner.add_recorder(DataFrameRecorder(includes='*'))\n",
" \n",
"core.run_drivers()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "53e5d904-449d-43da-8070-2a61fcfd2d2f",
"metadata": {},
"outputs": [],
"source": [
"run.problem"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1fc2dc38-136c-46ef-b2eb-cb13b1b71e41",
"metadata": {},
"outputs": [],
"source": [
"run = core.add_driver(NonLinearSolver('run', factor=0.95, history=True))\n",
"run.add_unknown(\"fuel_W\").add_equation(\"compressor.aero.pcnr == 95.\")\n",
"run.add_unknown(\"compressor.fl_in.W\").add_target(\"turbine.aero.fl_out.Wc\")\n",
"\n",
"core.run_drivers()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b6d19600-4e41-44cf-b58b-58557800d491",
"metadata": {},
"outputs": [],
"source": [
"core.turbine.aero.dhqt, core.turbine.aero.Ncqdes"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "29bd570c-984a-4fd8-9680-3d088a612493",
"metadata": {},
"outputs": [],
"source": [
"core.jupyter_view(options={\n",
" \"compressor\": dict(opacity=0.8),\n",
" \"combustor\": dict(face_color=\"red\", opacity=0.8),\n",
" \"turbine\": dict(opacity=0.8),\n",
"})"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
}
},
{
"cell_type": "code",
"execution_count": null,
"id": "d223162a-7ef1-4796-9d30-ef513ad99697",
"metadata": {},
"outputs": [],
"source": [
"from cosapp.drivers import NonLinearSolver\n",
"from cosapp.utils import LogLevel, set_log\n",
"from cosapp.recorders import DataFrameRecorder\n",
"\n",
"set_log()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "af960069-e1fe-40dd-b8c1-cadf1d9ecbf7",
"metadata": {},
"outputs": [],
"source": [
"core = GasGenerator(\"core\")\n",
"\n",
"core.kp.inlet_tip[0] = 0.25\n",
"core.kp.exit_tip[0] = 0.25\n",
"core.fuel_W = 0.11\n",
"core.turbine.aero.Ncdes = 15.\n",
"core.compressor.geom.blade_hub_to_tip_ratio = 0.8\n",
"core.turbine.sh_out.power = 30e6\n",
"core.turbine.geom.blade_height_ratio = 0.1\n",
"\n",
"core.fl_in.Tt = 409.\n",
"core.fl_in.Pt = 2.67e5\n",
"\n",
"core.compressor.sh_in.power = core.turbine.sh_out.power\n",
"\n",
"core.compressor.geom.blade_hub_to_tip_ratio = 0.7\n",
"\n",
"run = core.add_driver(NonLinearSolver('run', factor=0.8, history=True))\n",
"\n",
"run.add_equation(\"turbine.aero.Ncqdes == 100.\").add_unknown(\"compressor.fl_in.W\", max_rel_step=0.8)\n",
"run.add_equation(\"compressor.aero.phi == 0.45\").add_unknown(\"compressor.aero.phiP\")\n",
"run.add_equation(\"compressor.aero.pr == 11.\")\n",
"run.add_equation(\"combustor.aero.Tcomb == 1650.\").add_unknown(\"fuel_W\")\n",
"run.add_equation(\"compressor.aero.utip == 450.\").add_unknown(\"turbine.aero.Ncdes\")\n",
"run.add_unknown(\"kp.inlet_tip[0]\", lower_bound=1e-5, max_rel_step=0.8).add_target(\"turbine.sh_out.power\")\n",
"run.add_unknown(\"kp.exit_tip[0]\", lower_bound=1e-5, max_rel_step=0.8).add_equation(\"turbine.aero.psi == 1.1\")\n",
"run.add_unknown(\"compressor.aero.xnd\").add_equation(\"compressor.aero.pcnr == 98.\")\n",
"run.add_unknown(\"turbine.geom.blade_height_ratio\", lower_bound=0., upper_bound=1.)\n",
"\n",
"rec = run.runner.add_recorder(DataFrameRecorder(includes='*'))\n",
" \n",
"core.run_drivers()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "53e5d904-449d-43da-8070-2a61fcfd2d2f",
"metadata": {},
"outputs": [],
"source": [
"run.problem"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1fc2dc38-136c-46ef-b2eb-cb13b1b71e41",
"metadata": {},
"outputs": [],
"source": [
"run = core.add_driver(NonLinearSolver('run', factor=0.95, history=True))\n",
"run.add_unknown(\"fuel_W\").add_equation(\"compressor.aero.pcnr == 95.\")\n",
"run.add_unknown(\"compressor.fl_in.W\").add_target(\"turbine.aero.fl_out.Wc\")\n",
"\n",
"core.run_drivers()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b6d19600-4e41-44cf-b58b-58557800d491",
"metadata": {},
"outputs": [],
"source": [
"core.turbine.aero.dhqt, core.turbine.aero.Ncqdes"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "29bd570c-984a-4fd8-9680-3d088a612493",
"metadata": {},
"outputs": [],
"source": [
"core.jupyter_view(options={\n",
" \"compressor\": dict(opacity=0.8),\n",
" \"combustor\": dict(face_color=\"red\", opacity=0.8),\n",
" \"turbine\": dict(opacity=0.8),\n",
"})"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
"nbformat": 4,
"nbformat_minor": 5
}
Loading