turbo_moc.deprecated.app module#

turbo_moc.app – interactive Dash app for MOC nozzle design.

Structured after turbodash’s app.py: one Dash app, a compute callback that calls a single engine function (here, turbo_moc.design_nozzle) and stores its result in a dcc.Store, and a second callback that fans that result out into plots. The one deliberate departure from turbodash’s pattern: the compute callback runs in the background (background=True + DiskcacheManager) with a live progress bar, since a solve here takes 5-30s+ (turbodash’s own algebraic core is sub-second, so it never needed this) – an explicit “Compute” button, not live recompute-on-slider-drag, is the intended UX.

Plots are displayed with turbo_moc.plotly (interactive dcc.Graph – zoom, pan, hover, and a native download-as-PNG toolbar button, same as turbodash’s own app.py). turbo_moc.plotly’s figures are styled (see plotting_plotly._apply_journal_style) to read close to turbo_moc.mpl’s boxed-axes/gridline look rather than Plotly’s own default template, since visual consistency with examples/plot_design.py’s output mattered too – same colors either way, only the interactive vs. static trade-off differs. The “Download this plot” button + format dropdown (PNG/SVG/PDF) is separate from Plotly’s own toolbar button (PNG only): it re-renders the SAME figure with turbo_moc.mpl on click, so an SVG/PDF download is a real vector file, not a rasterized PNG relabeled – display and file-export are genuinely two different renders of the same data, not one converted into the other.

Run locally:

conda activate turbo_moc_env
python -m turbo_moc.app
(or: turbo_moc-app-legacy, the console-script entry point from pyproject.toml)

then open the printed http://127.0.0.1:8050/ URL in a browser.

turbo_moc.deprecated.app.apply_loaded_nozzle_design(cfg)[source]#
turbo_moc.deprecated.app.download_blade_plot(n_clicks, base_blade, edited_blade, reference, fmt, n_blades)[source]#
turbo_moc.deprecated.app.download_cascade_rotor_step(n_clicks, stator_sizing, rotor_sizing, gap, stator_wrap, rotor_wrap, stator_radial, rotor_radial)[source]#
turbo_moc.deprecated.app.download_cascade_stator_step(n_clicks, stator_sizing, stator_wrap, rotor_wrap, stator_radial)[source]#
turbo_moc.deprecated.app.download_plot(n_clicks, active_tab, data, reference, fmt, conv_enable, conv_length)[source]#
turbo_moc.deprecated.app.download_rotor_plot(n_clicks, data, reference, display_options, fmt)[source]#
turbo_moc.deprecated.app.download_rotor_sizing_step(n_clicks, sizing_result)[source]#
turbo_moc.deprecated.app.download_sizing_json(n_clicks, sizing_result)[source]#
turbo_moc.deprecated.app.download_sizing_step(n_clicks, sizing_result)[source]#
turbo_moc.deprecated.app.download_stator_mesh3d_cgns(n_clicks, mesh3d)[source]#
turbo_moc.deprecated.app.download_stator_mesh3d_msh(n_clicks, mesh3d)[source]#
turbo_moc.deprecated.app.download_stator_mesh_cgns(n_clicks, mesh, span)[source]#
turbo_moc.deprecated.app.download_step(n_clicks, base_blade, edited_blade, target, flow_domain)[source]#

2D face only: the 3D blade comes from Phase 2’s 3D tab (sized annular solid), so an arbitrary flat extrusion here no longer has a use. The fluid domain is written from the mesher’s own CAD (stator_flow_domain).

turbo_moc.deprecated.app.download_wall_csv(n_clicks, data, conv_enable, conv_length)[source]#
turbo_moc.deprecated.app.load_nozzle_file(contents)[source]#
turbo_moc.deprecated.app.main()[source]#
turbo_moc.deprecated.app.make_table(data, columns)[source]#

A dash_table.DataTable in turbodash’s own convention: monospace, right-aligned cells, bold header with a light-gray fill and a 2px bottom rule – used for geometry/summary readouts in place of inline status text.

turbo_moc.deprecated.app.manage_blade_reference(pin_clicks, clear_clicks, base_blade, edited_blade)[source]#
turbo_moc.deprecated.app.manage_reference(pin_clicks, clear_clicks, current_data)[source]#
turbo_moc.deprecated.app.manage_rotor_reference(pin_clicks, clear_clicks, current_data)[source]#
turbo_moc.deprecated.app.nudge_cp(n_clicks, base_blade, edited_blade, cp_index, distance)[source]#
turbo_moc.deprecated.app.reset_cp_editor(blade)[source]#

A fresh Compute invalidates any in-progress edits (they were nudges on top of the PREVIOUS fit) and repopulates the CP index dropdown for the new n_cp.

turbo_moc.deprecated.app.reset_cp_edits(n_clicks)[source]#
turbo_moc.deprecated.app.run_blade(n_clicks, nozzle_data, method, metal_angle_in, metal_angle_out, r_trailing, inlet_opening_ratio, n_cp)[source]#
turbo_moc.deprecated.app.run_design(set_progress, n_clicks, fluid_name, inlet_mode, P0, T0, Q0, p_back, solver, stage1_mode, y_t, rho_d, n)[source]#
turbo_moc.deprecated.app.run_radial_rotor(n_clicks, rotor_data, r1, r2_target, depth)[source]#

Geometric radial wrap; N_blades and the exact r2 are derived as for the stator (run_radial_stator). The raw (r*) rotor blade is used as-is: the map normalises it by its own chordwise extent, so the mapped geometry/pitch only depend on r1/r2.

turbo_moc.deprecated.app.run_radial_rotor_mesh3d(n_clicks, radial_result, previous, *values_and_core)[source]#
turbo_moc.deprecated.app.run_radial_stator(n_clicks, base_blade, edited_blade, nozzle_data, r1, r2_target, depth)[source]#

Radial wrap that keeps the designed passage: N_blades and the exact r2 come from r1, the target r2 and the designed pitch (consistent_radial_wrap; the map’s pitch consistency has no free scale lever the way the axial Case A’s k does). The implied mass flow is then reported for that N and depth.

turbo_moc.deprecated.app.run_radial_stator_mesh3d(n_clicks, radial_result, nozzle_data, previous, *values_and_core)[source]#
turbo_moc.deprecated.app.run_rotor(n_clicks, fluid_name, P0, T0, M_inlet, M_outlet, M_lower, M_upper, beta_inlet, num_points)[source]#
turbo_moc.deprecated.app.run_rotor_mesh3d(n_clicks, sizing_result, rotor_data, previous, blade_size, domain_size, y_plus, num_layers, growth_ratio, transition_ratio, core_size)[source]#

Gmsh runs in the background worker process, never in the Dash server.

turbo_moc.deprecated.app.run_rotor_sizing(n_clicks, rotor_data, stator_sizing, n_blades)[source]#
turbo_moc.deprecated.app.run_stator_mesh(n_clicks, sizing_result, nozzle_data, blade_size, domain_size, y_plus, num_layers, growth_ratio, transition_ratio, topology, flow_domain)[source]#

Gmsh runs in the background worker process, never in the Dash server.

turbo_moc.deprecated.app.run_stator_mesh3d(n_clicks, mesh, previous, core_size)[source]#
turbo_moc.deprecated.app.run_stator_sizing(n_clicks, mode, base_blade, edited_blade, nozzle_data, mdot_a, n_blades_a, r_hub_a, r_hub_b, H_b, n_blades_b, mdot_b)[source]#
turbo_moc.deprecated.app.save_nozzle_design(n_clicks, result_data, fluid_name, inlet_mode, P0, T0, Q0, p_back, solver, stage1_mode, y_t, rho_d, n)[source]#
turbo_moc.deprecated.app.toggle_inlet_inputs(mode)[source]#
turbo_moc.deprecated.app.update_blade_plot(base_blade, edited_blade, reference, n_blades, cp_index, step_export_target, flow_domain)[source]#
turbo_moc.deprecated.app.update_plots(data, reference, conv_enable, conv_length)[source]#
turbo_moc.deprecated.app.update_rotor_plot(data, reference, display_options)[source]#