.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/00-fluent/species_transport.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_00-fluent_species_transport.py: .. _species_transport: Modeling Species Transport and Gaseous Combustion ================================================= .. GENERATED FROM PYTHON SOURCE LINES 8-58 Introduction ------------ This tutorial examines the mixing of chemical species and the combustion of a gaseous fuel. A cylindrical combustor burning methane (:math:`CH_4`) in air is studied using the eddy-dissipation model in PyFluent. This tutorial demonstrates how to do the following: * Enable physical models, select material properties, and define boundary conditions for a turbulent flow with chemical species mixing and reaction. * Initiate and solve the combustion simulation using the pressure-based solver. * Examine the reacting flow results using graphics. Problem Description ------------------- The cylindrical combustor considered in this tutorial is shown in the following figure. The flame considered is a turbulent diffusion flame. A small nozzle in the center of the combustor introduces methane at 80 m/s. Ambient air enters the combustor coaxially at 0.5 m/s. The overall equivalence ratio is approximately 0.76 (approximately 28% excess air). The high-speed methane jet initially expands with little interference from the outer wall, and entrains and mixes with the low-speed air. The Reynolds number based on the methane jet diameter is approximately :math:`5.7 × 10^3`. .. figure:: /_static/species_transport/setup.png :width: 500pt :align: center Combustion of Methane Gas in a Turbulent Diffusion Flame Furnace Background ---------- In this tutorial, we will use the generalized eddy-dissipation model to analyze the methane-air combustion system. The combustion will be modeled using a global one-step reaction mechanism, assuming complete conversion of the fuel to :math:`CO_2` and :math:`H_2O`. The reaction equation is .. math:: CH_4 + 2H_2O → CO_2 + 4H_2 This reaction will be defined in terms of stoichiometric coefficients, formation enthalpies, and parameters that control the reaction rate. The reaction rate will be determined assuming that turbulent mixing is the rate-limiting process, with the turbulence-chemistry interaction modeled using the eddy-dissipation model. Setup and Solution ------------------ Preparation ^^^^^^^^^^^ Launch Fluent 2D in solution mode and print Fluent version. .. GENERATED FROM PYTHON SOURCE LINES 58-65 .. code-block:: Python import ansys.fluent.core as pyfluent solver = pyfluent.launch_fluent(dimension=2) print(solver.get_fluent_version()) .. rst-class:: sphx-glr-script-out .. code-block:: none Fluent version 2025 R1 .. GENERATED FROM PYTHON SOURCE LINES 68-70 Import some direct settings classes which will be used in the following sections. These classes allow straightforward access to various settings without the need to navigate through the settings hierarchy. .. GENERATED FROM PYTHON SOURCE LINES 70-87 .. code-block:: Python from pathlib import Path # noqa: E402 from ansys.fluent.core import ( # noqa: E402 Contour, Energy, Mesh, MixtureMaterial, PressureOutlet, Species, Vector, VelocityInlet, Viscous, WallBoundary, ) from ansys.fluent.core.examples import download_file # noqa: E402 .. GENERATED FROM PYTHON SOURCE LINES 88-92 Mesh ^^^^ Download the mesh file and read it into the Fluent session. .. GENERATED FROM PYTHON SOURCE LINES 92-96 .. code-block:: Python mesh_file = Path(download_file("gascomb.msh", "pyfluent/tutorials/species_transport")) solver.settings.file.read_mesh(file_name=mesh_file) .. rst-class:: sphx-glr-script-out .. code-block:: none Reading "gascomb.msh"... Buffering for file scan... 1705 nodes. 1615 quadrilateral cells, zone 1. 3141 2D interior faces, zone 4. 58 2D symmetry faces, zone 5. 9 2D wall faces, zone 2. 5 2D velocity-inlet faces, zone 6. 58 2D wall faces, zone 7. 20 2D velocity-inlet faces, zone 8. 28 2D pressure-outlet faces, zone 9. Building... mesh materials, interface, domains, zones, pressure-outlet-9 velocity-inlet-8 wall-7 velocity-inlet-6 wall-2 symmetry-5 interior-4 fluid-1 parallel, Done. .. GENERATED FROM PYTHON SOURCE LINES 97-103 General Settings ^^^^^^^^^^^^^^^^ Check the mesh. Fluent will perform various checks on the mesh and will report the progress in the console. Ensure that the reported minimum volume reported is a positive number. .. GENERATED FROM PYTHON SOURCE LINES 103-106 .. code-block:: Python solver.settings.mesh.check() .. rst-class:: sphx-glr-script-out .. code-block:: none Domain Extents: x-coordinate: min (m) = 0.000000e+00, max (m) = 1.800000e+03 y-coordinate: min (m) = 0.000000e+00, max (m) = 2.250000e+02 Volume statistics: minimum volume (m3): 3.333333e+00 maximum volume (m3): 2.498387e+03 total volume (m3): 4.049600e+05 Face area statistics: minimum face area (m2): 1.000000e+00 maximum face area (m2): 1.096768e+02 Checking mesh............................ Done. .. GENERATED FROM PYTHON SOURCE LINES 107-115 Scale the mesh and check it again. Since this mesh was created in units of millimeters, we will need to scale the mesh into meters. .. note:: We should check the mesh after we manipulate it (scale, convert to polyhedra, merge, separate, fuse, add zones, or smooth and swap). This will ensure that the quality of the mesh has not been compromised. .. GENERATED FROM PYTHON SOURCE LINES 115-119 .. code-block:: Python solver.settings.mesh.scale(x_scale=0.001, y_scale=0.001) solver.settings.mesh.check() .. rst-class:: sphx-glr-script-out .. code-block:: none Domain Extents: x-coordinate: min (m) = 0.000000e+00, max (m) = 1.800000e+00 y-coordinate: min (m) = 0.000000e+00, max (m) = 2.250000e-01 Volume statistics: minimum volume (m3): 3.333333e-06 maximum volume (m3): 2.498387e-03 total volume (m3): 4.049600e-01 Face area statistics: minimum face area (m2): 1.000000e-03 maximum face area (m2): 1.096768e-01 Checking mesh............................ Done. .. GENERATED FROM PYTHON SOURCE LINES 120-121 Display the mesh in Fluent and save the image to a file to examine locally. .. GENERATED FROM PYTHON SOURCE LINES 121-133 .. code-block:: Python mesh = Mesh(solver, new_instance_name="mesh") mesh.surfaces_list = mesh.surfaces_list.allowed_values() mesh.display() graphics = solver.settings.results.graphics graphics.views.auto_scale() if graphics.picture.use_window_resolution.is_active(): graphics.picture.use_window_resolution = False graphics.picture.x_resolution = 3840 graphics.picture.y_resolution = 2880 graphics.picture.save_picture(file_name="mesh.png") .. GENERATED FROM PYTHON SOURCE LINES 134-139 .. figure:: /_static/species_transport/mesh.png :width: 500pt :align: center The Quadrilateral Mesh for the Combustor Model .. GENERATED FROM PYTHON SOURCE LINES 141-142 Inspect the available options for the two-dimensional space setting and set it to axisymmetric. .. GENERATED FROM PYTHON SOURCE LINES 142-145 .. code-block:: Python solver.settings.setup.general.solver.two_dim_space.allowed_values() .. rst-class:: sphx-glr-script-out .. code-block:: none ['swirl', 'axisymmetric', 'planar'] .. GENERATED FROM PYTHON SOURCE LINES 146-149 .. code-block:: Python solver.settings.setup.general.solver.two_dim_space = "axisymmetric" .. GENERATED FROM PYTHON SOURCE LINES 150-153 Models ^^^^^^ Enable heat transfer by enabling the energy model. .. GENERATED FROM PYTHON SOURCE LINES 153-156 .. code-block:: Python Energy(solver).enabled = True .. GENERATED FROM PYTHON SOURCE LINES 157-158 Inspect the default settings for the k-ω SST viscous model. .. GENERATED FROM PYTHON SOURCE LINES 158-161 .. code-block:: Python Viscous(solver).print_state() .. rst-class:: sphx-glr-script-out .. code-block:: none model : k-omega k_omega_model : sst k_omega_options : kw_low_re_correction : False near_wall_treatment : wall_omega_treatment : correlation transition_module : none options : viscous_heating : False production_kato_launder_enabled : False production_limiter : enabled : True clip_factor : 10.0 turbulence_expert : turb_non_newtonian : False thermal_p_function : True restore_sst_v61 : False user_defined : turb_visc_func : none energy_prandtl : none wall_prandtl : none .. GENERATED FROM PYTHON SOURCE LINES 162-163 Inspect the available options for the species model and set it to species transport. .. GENERATED FROM PYTHON SOURCE LINES 163-167 .. code-block:: Python species = Species(solver) species.model.option.allowed_values() .. rst-class:: sphx-glr-script-out .. code-block:: none ['off', 'species-transport', 'non-premixed-combustion', 'premixed-combustion', 'partially-premixed-combustion', 'pdf-transport'] .. GENERATED FROM PYTHON SOURCE LINES 168-171 .. code-block:: Python species.model.option = "species-transport" .. rst-class:: sphx-glr-script-out .. code-block:: none Adjusting the following setting: Density explicit underrelaxation factor: from: 1 to: 0.25 .. GENERATED FROM PYTHON SOURCE LINES 172-173 Inspect the species model settings. .. GENERATED FROM PYTHON SOURCE LINES 173-176 .. code-block:: Python species.print_state() .. rst-class:: sphx-glr-script-out .. code-block:: none model : option : species-transport material : mixture-template number_vol_spec : 3 options : inlet_diffusion : False thermal_diffusion : False diffusion_energy_source : True multi_component_diffusion : False save_gradients : False species_transport_expert : False reactions : enable_volumetric_reactions : False species_transport_expert_options : linearize_convection_source : False linearize_diffusion_source : False blending : False .. GENERATED FROM PYTHON SOURCE LINES 177-178 Enable volumetric reactions. .. GENERATED FROM PYTHON SOURCE LINES 178-181 .. code-block:: Python species.reactions.enable_volumetric_reactions = True .. GENERATED FROM PYTHON SOURCE LINES 182-190 Set the material to methane-air. .. note:: The available material list contains the set of chemical mixtures that exist in the Ansys Fluent database. We can select one of the predefined mixtures to access a complete description of the reacting system. The chemical species in the system and their physical and thermodynamic properties are defined by our selection of the mixture material. We can alter the mixture material selection or modify the mixture material properties using the material settings (see `Materials`_). .. GENERATED FROM PYTHON SOURCE LINES 190-193 .. code-block:: Python species.model.material = "methane-air" .. rst-class:: sphx-glr-script-out .. code-block:: none There are 5 species in the selected mixture .. GENERATED FROM PYTHON SOURCE LINES 194-197 Set the turbulence-chemistry interaction model to eddy-dissipation. *The eddy-dissipation model computes the rate of reaction under the assumption that chemical kinetics are fast compared to the rate at which reactants are mixed by turbulent fluctuations (eddies).* .. GENERATED FROM PYTHON SOURCE LINES 197-200 .. code-block:: Python species.turb_chem_interaction_model = "eddy-dissipation" .. rst-class:: sphx-glr-script-out .. code-block:: none Material methane-air: Changing method of "Reaction" to "eddy-dissipation". Material mixture-template: Changing method of "Reaction" to "eddy-dissipation". .. GENERATED FROM PYTHON SOURCE LINES 201-202 Inspect the species model settings after the changes. .. GENERATED FROM PYTHON SOURCE LINES 202-205 .. code-block:: Python species.print_state() .. rst-class:: sphx-glr-script-out .. code-block:: none model : option : species-transport material : methane-air number_vol_spec : 5 options : inlet_diffusion : False thermal_diffusion : False diffusion_energy_source : True multi_component_diffusion : False save_gradients : False species_transport_expert : False reactions : enable_volumetric_reactions : True enable_electrochemical_surface : False turb_chem_interaction_model : eddy-dissipation turb_chem_interaction_model_options : species_transport_expert_options : linearize_convection_source : False linearize_diffusion_source : False blending : False chemistry_solver : non-direct-source .. GENERATED FROM PYTHON SOURCE LINES 206-211 Materials ^^^^^^^^^ In this step, we will examine the default settings for the mixture material. This tutorial uses mixture properties copied from the Ansys Fluent database. In general, we can modify these or create our own mixture properties for our specific problem as necessary. .. GENERATED FROM PYTHON SOURCE LINES 213-215 Print some specific properties of the mixture material (methane-air). We avoid printing the entire state of the mixture material to keep the output concise. .. GENERATED FROM PYTHON SOURCE LINES 215-225 .. code-block:: Python mixture_material = MixtureMaterial(solver, name="methane-air") print(f"Species list: {mixture_material.species.volumetric_species.get_object_names()}") print(f"Reactions option: {mixture_material.reactions.option()}") print(f"Density option: {mixture_material.density.option()}") print(f"Cp (specific heat) option: {mixture_material.specific_heat.option()}") print(f"Thermal conductivity value: {mixture_material.thermal_conductivity.value()}") print(f"Viscosity value: {mixture_material.viscosity.value()}") print(f"Mass diffusivity value: {mixture_material.mass_diffusivity.value()}") .. rst-class:: sphx-glr-script-out .. code-block:: none Species list: ['ch4', 'o2', 'co2', 'h2o', 'n2'] Reactions option: eddy-dissipation Density option: incompressible-ideal-gas Cp (specific heat) option: mixing-law Thermal conductivity value: 0.0454 Viscosity value: 1.72e-05 Mass diffusivity value: 2.88e-05 .. GENERATED FROM PYTHON SOURCE LINES 226-231 Boundary Conditions ^^^^^^^^^^^^^^^^^^^ Convert the symmetry zone to the axis type. *The symmetry zone must be converted to an axis to prevent numerical difficulties where the radius reduces to zero.* .. GENERATED FROM PYTHON SOURCE LINES 231-236 .. code-block:: Python solver.settings.setup.boundary_conditions.set_zone_type( zone_list=["symmetry-5"], new_type="axis" ) .. GENERATED FROM PYTHON SOURCE LINES 237-242 Set the boundary conditions for the air inlet (velocity-inlet-8). Set the zone name to air-inlet. *This name is more descriptive for the zone than velocity-inlet-8.* .. GENERATED FROM PYTHON SOURCE LINES 242-247 .. code-block:: Python solver.settings.setup.boundary_conditions.set_zone_name( zonename="velocity-inlet-8", newname="air-inlet" ) .. GENERATED FROM PYTHON SOURCE LINES 248-259 Set the following boundary conditions for the air-inlet: * Velocity magnitude: 0.5 m/s * Turbulent intensity: 10% * Hydraulic diameter: 0.44 m * Temperature: 300 K * Species mass fraction for o2: 0.23 .. GENERATED FROM PYTHON SOURCE LINES 259-268 .. code-block:: Python air_inlet = VelocityInlet(solver, name="air-inlet") air_inlet.momentum.velocity_magnitude = 0.5 air_inlet.turbulence.turbulence_specification = "Intensity and Hydraulic Diameter" air_inlet.turbulence.turbulent_intensity = 0.1 air_inlet.turbulence.hydraulic_diameter = 0.44 air_inlet.thermal.temperature = 300 air_inlet.species.species_mass_fraction["o2"] = 0.23 .. GENERATED FROM PYTHON SOURCE LINES 269-270 Verify the state of the air-inlet boundary condition after the changes. .. GENERATED FROM PYTHON SOURCE LINES 270-273 .. code-block:: Python air_inlet.print_state() .. rst-class:: sphx-glr-script-out .. code-block:: none name : air-inlet momentum : velocity_specification_method : Magnitude, Normal to Boundary reference_frame : Absolute velocity_magnitude : option : value value : 0.5 initial_gauge_pressure : option : value value : 0 turbulence : turbulence_specification : Intensity and Hydraulic Diameter turbulent_intensity : 0.1 hydraulic_diameter : 0.44 thermal : temperature : option : value value : 300 species : specify_species_in_mole_fractions : False species_mass_fraction : ch4 : option : value value : 0 co2 : option : value value : 0 h2o : option : value value : 0 o2 : option : value value : 0.23 .. GENERATED FROM PYTHON SOURCE LINES 274-279 Set the boundary conditions for the fuel inlet (velocity-inlet-6). Set the zone name to fuel-inlet. *This name is more descriptive for the zone than velocity-inlet-6.* .. GENERATED FROM PYTHON SOURCE LINES 279-284 .. code-block:: Python solver.settings.setup.boundary_conditions.set_zone_name( zonename="velocity-inlet-6", newname="fuel-inlet" ) .. GENERATED FROM PYTHON SOURCE LINES 285-296 Set the following boundary conditions for the fuel-inlet: * Velocity magnitude: 80 m/s * Turbulent intensity: 10% * Hydraulic diameter: 0.01 m * Temperature: 300 K * Species mass fraction for ch4: 1 .. GENERATED FROM PYTHON SOURCE LINES 296-305 .. code-block:: Python fuel_inlet = VelocityInlet(solver, name="fuel-inlet") fuel_inlet.momentum.velocity_magnitude = 80 fuel_inlet.turbulence.turbulence_specification = "Intensity and Hydraulic Diameter" fuel_inlet.turbulence.turbulent_intensity = 0.1 fuel_inlet.turbulence.hydraulic_diameter = 0.01 fuel_inlet.thermal.temperature = 300 fuel_inlet.species.species_mass_fraction["ch4"] = 1 .. GENERATED FROM PYTHON SOURCE LINES 306-307 Verify the state of the fuel-inlet boundary condition after the changes. .. GENERATED FROM PYTHON SOURCE LINES 307-310 .. code-block:: Python fuel_inlet.print_state() .. rst-class:: sphx-glr-script-out .. code-block:: none name : fuel-inlet momentum : velocity_specification_method : Magnitude, Normal to Boundary reference_frame : Absolute velocity_magnitude : option : value value : 80 initial_gauge_pressure : option : value value : 0 turbulence : turbulence_specification : Intensity and Hydraulic Diameter turbulent_intensity : 0.1 hydraulic_diameter : 0.01 thermal : temperature : option : value value : 300 species : specify_species_in_mole_fractions : False species_mass_fraction : ch4 : option : value value : 1 co2 : option : value value : 0 h2o : option : value value : 0 o2 : option : value value : 0 .. GENERATED FROM PYTHON SOURCE LINES 311-325 Set the following boundary conditions for the exit boundary (pressure-outlet-9): * Gauge pressure: 0 Pa * Backflow turbulence intensity: 10% * Backflow Hydraulic diameter: 0.45 m * Backflow total temperature: 300 K * Backflow species mass fraction for o2: 0.23 *The Backflow values in the pressure outlet boundary condition are utilized only when backflow occurs at the pressure outlet. Always assign reasonable values because backflow may occur during intermediate iterations and could affect the solution stability.* .. GENERATED FROM PYTHON SOURCE LINES 325-334 .. code-block:: Python pressure_outlet = PressureOutlet(solver, name="pressure-outlet-9") pressure_outlet.momentum.gauge_pressure = 0 pressure_outlet.turbulence.turbulence_specification = "Intensity and Hydraulic Diameter" pressure_outlet.turbulence.backflow_turbulent_intensity = 0.1 pressure_outlet.turbulence.backflow_hydraulic_diameter = 0.45 pressure_outlet.thermal.backflow_total_temperature = 300 pressure_outlet.species.backflow_species_mass_fraction["o2"] = 0.23 .. GENERATED FROM PYTHON SOURCE LINES 335-336 Verify the state of the pressure-outlet boundary condition after the changes. .. GENERATED FROM PYTHON SOURCE LINES 336-339 .. code-block:: Python pressure_outlet.print_state() .. rst-class:: sphx-glr-script-out .. code-block:: none name : pressure-outlet-9 momentum : backflow_reference_frame : Absolute gauge_pressure : option : value value : 0 pressure_profile_multiplier : 1.0 backflow_dir_spec_method : Normal to Boundary backflow_pressure_spec : Total Pressure prevent_reverse_flow : False avg_pressure_spec : False target_mass_flow_rate : False turbulence : turbulence_specification : Intensity and Hydraulic Diameter backflow_turbulent_intensity : 0.1 backflow_hydraulic_diameter : 0.45 thermal : backflow_total_temperature : option : value value : 300 species : specify_species_in_mole_fractions : False backflow_species_mass_fraction : ch4 : option : value value : 0 co2 : option : value value : 0 h2o : option : value value : 0 o2 : option : value value : 0.23 .. GENERATED FROM PYTHON SOURCE LINES 340-345 Set the boundary conditions for the outer wall (wall-7). Set the zone name to outer-wall. *This name is more descriptive for the zone than wall-7.* .. GENERATED FROM PYTHON SOURCE LINES 345-350 .. code-block:: Python solver.settings.setup.boundary_conditions.set_zone_name( zonename="wall-7", newname="outer-wall" ) .. GENERATED FROM PYTHON SOURCE LINES 351-354 Set the following boundary conditions for the outer-wall: * Temperature: 300 K .. GENERATED FROM PYTHON SOURCE LINES 354-359 .. code-block:: Python outer_wall = WallBoundary(solver, name="outer-wall") outer_wall.thermal.thermal_condition = "Temperature" outer_wall.thermal.temperature = 300 .. GENERATED FROM PYTHON SOURCE LINES 360-361 Verify the state of thermal properties of the outer-wall boundary condition after the changes. .. GENERATED FROM PYTHON SOURCE LINES 361-364 .. code-block:: Python outer_wall.thermal.print_state() .. rst-class:: sphx-glr-script-out .. code-block:: none thermal_condition : Temperature material : aluminum temperature : option : value value : 300 wall_thickness : option : value value : 0 heat_generation_rate : option : value value : 0 caf : option : value value : 1 .. GENERATED FROM PYTHON SOURCE LINES 365-370 Set the boundary conditions for the fuel inlet nozzle (wall-2). Set the zone name to nozzle. *This name is more descriptive for the zone than wall-2.* .. GENERATED FROM PYTHON SOURCE LINES 370-375 .. code-block:: Python solver.settings.setup.boundary_conditions.set_zone_name( zonename="wall-2", newname="nozzle" ) .. GENERATED FROM PYTHON SOURCE LINES 376-379 Set the following boundary conditions for the nozzle for adiabatic wall conditions: * Heat flux: 0 :math:`W/m^2` .. GENERATED FROM PYTHON SOURCE LINES 379-384 .. code-block:: Python nozzle = WallBoundary(solver, name="nozzle") nozzle.thermal.thermal_condition = "Heat Flux" nozzle.thermal.heat_flux = 0 .. GENERATED FROM PYTHON SOURCE LINES 385-386 Verify the state of thermal properties of the nozzle boundary condition after the changes. .. GENERATED FROM PYTHON SOURCE LINES 386-389 .. code-block:: Python nozzle.thermal.print_state() .. rst-class:: sphx-glr-script-out .. code-block:: none thermal_condition : Heat Flux material : aluminum heat_flux : option : value value : 0 wall_thickness : option : value value : 0 heat_generation_rate : option : value value : 0 caf : option : value value : 1 .. GENERATED FROM PYTHON SOURCE LINES 390-395 Reaction Solution ^^^^^^^^^^^^^^^^^ *We will calculate a solution for the reacting flow.* Inspect the solution methods settings. .. GENERATED FROM PYTHON SOURCE LINES 395-398 .. code-block:: Python solver.settings.solution.methods.print_state() .. rst-class:: sphx-glr-script-out .. code-block:: none p_v_coupling : flow_scheme : Coupled flux_type : pbns_cases : flux_auto_select : True flux_type : Rhie-Chow: momentum based spatial_discretization : gradient_scheme : least-square-cell-based discretization_scheme : k : second-order-upwind mom : second-order-upwind omega : second-order-upwind pressure : second-order species-0 : second-order-upwind species-1 : second-order-upwind species-2 : second-order-upwind species-3 : second-order-upwind temperature : second-order-upwind pseudo_time_method : formulation : coupled_solver : global-time-step expert : reactions : True reaction_source_term_relaxation_factor : 1.0 numerics_pbns : implicit_bodyforce_treatment : False velocity_formulation : absolute physical_velocity_formulation : False disable_rhie_chow_flux : False presto_pressure_scheme : False first_to_second_order_blending : 1.0 high_order_term_relaxation : enable : False warped_face_gradient_correction : enable : False species_disc_together : False .. GENERATED FROM PYTHON SOURCE LINES 399-400 Ensure that plot is enabled in residual monitor options. .. GENERATED FROM PYTHON SOURCE LINES 400-403 .. code-block:: Python solver.settings.solution.monitor.residual.options.plot() .. rst-class:: sphx-glr-script-out .. code-block:: none True .. GENERATED FROM PYTHON SOURCE LINES 404-405 Initialize the field variables. .. GENERATED FROM PYTHON SOURCE LINES 405-408 .. code-block:: Python solver.settings.solution.initialization.hybrid_initialize() .. rst-class:: sphx-glr-script-out .. code-block:: none Initialize using the hybrid initialization method. Checking case topology... -This case has both inlets & outlets -Pressure information is not available at the boundaries. Case will be initialized with constant pressure iter scalar-0 1 1.000000e+00 2 3.835177e-06 3 3.116578e-07 4 2.563081e-08 5 2.109805e-09 6 1.736817e-10 7 1.429777e-11 8 1.171677e-12 9 1.023421e-13 10 1.000789e-14 Hybrid initialization is done. Initializing mass fractions of ch4 o2 co2 h2o to 0.01 for Eddy-Dissipation ignition. .. GENERATED FROM PYTHON SOURCE LINES 409-410 Save the case file (gascomb1.cas.h5). .. GENERATED FROM PYTHON SOURCE LINES 410-413 .. code-block:: Python solver.settings.file.write_case(file_name="gascomb1.cas.h5") .. rst-class:: sphx-glr-script-out .. code-block:: none Fast-loading "/ansys_inc/v251/fluent/fluent25.1.0/addons/afd/lib/hdfio.bin" Done. Writing to 30b945f663a6:"/mnt/pyfluent/gascomb1.cas.h5" in NODE0 mode and compression level 1 ... Grouping cells for Laplace smoothing ... 1615 cells, 1 zone ... 3319 faces, 7 zones ... 1705 nodes, 1 zone ... Done. Done. .. GENERATED FROM PYTHON SOURCE LINES 414-415 Run the calculation for 200 iterations. .. GENERATED FROM PYTHON SOURCE LINES 415-418 .. code-block:: Python solver.settings.solution.run_calculation.iterate(iter_count=200) .. rst-class:: sphx-glr-script-out .. code-block:: none iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter temperature limited to 5.000000e+03 in 36 cells on zone 1 in domain 1 1 1.0000e+00 2.8826e-02 1.9174e-02 4.6440e-02 2.6366e-01 6.7015e-01 3.9592e-02 1.4869e-01 3.4007e-02 2.9870e-02 0:00:10 199 2 1.0000e+00 3.5666e-02 2.1722e-02 7.1504e-03 4.9893e-02 1.2118e-01 6.2070e-02 4.5739e-02 5.5486e-03 5.5019e-03 0:00:12 198 3 1.0000e+00 3.3955e-02 1.3257e-02 7.6401e-03 5.4174e-02 8.5282e-02 4.0745e-02 1.8683e-02 8.0401e-03 8.0555e-03 0:00:13 197 4 1.0000e+00 4.4596e-02 1.0069e-02 7.8902e-03 7.5493e-02 7.2995e-02 1.8150e-02 1.4173e-02 9.0270e-03 9.1146e-03 0:00:13 196 5 1.0000e+00 4.1067e-02 7.7328e-03 5.5725e-03 6.5997e-02 6.9267e-02 1.0832e-02 1.1928e-02 8.1723e-03 7.8901e-03 0:00:13 195 6 1.0692e+00 3.4400e-02 5.6051e-03 4.6318e-03 4.3506e-02 5.3967e-02 7.1736e-03 1.0468e-02 6.7089e-03 6.5196e-03 0:00:13 194 7 1.1962e+00 2.8974e-02 4.5099e-03 4.2423e-03 2.8360e-02 3.9524e-02 5.7701e-03 9.2417e-03 5.5549e-03 5.4469e-03 0:00:14 193 8 1.3274e+00 2.5402e-02 3.5631e-03 4.0078e-03 2.0264e-02 2.9132e-02 4.8462e-03 8.3787e-03 4.9930e-03 4.9204e-03 0:00:14 192 9 1.3793e+00 2.2675e-02 2.9011e-03 3.7286e-03 1.6773e-02 2.2117e-02 4.2519e-03 7.6729e-03 4.6888e-03 4.6607e-03 0:00:14 191 10 1.3590e+00 2.0183e-02 2.4325e-03 3.4266e-03 1.3579e-02 1.6561e-02 3.6275e-03 6.7757e-03 4.4830e-03 4.4618e-03 0:00:14 190 11 1.3243e+00 1.8005e-02 2.0881e-03 3.2174e-03 1.1109e-02 1.2503e-02 3.0570e-03 5.6272e-03 4.0900e-03 4.0646e-03 0:00:22 189 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 12 1.2981e+00 1.6015e-02 1.8316e-03 2.9872e-03 8.9633e-03 1.0166e-02 2.5681e-03 4.7761e-03 3.7870e-03 3.7814e-03 0:00:21 188 13 1.2708e+00 1.4127e-02 1.6151e-03 2.7627e-03 7.2213e-03 8.0496e-03 2.2394e-03 3.9926e-03 3.2169e-03 3.2124e-03 0:00:19 187 14 1.2320e+00 1.2421e-02 1.4198e-03 2.3752e-03 5.7441e-03 6.4755e-03 1.9033e-03 3.2345e-03 2.6924e-03 2.6901e-03 0:00:18 186 15 1.1727e+00 1.0900e-02 1.2516e-03 1.9646e-03 4.8136e-03 5.4285e-03 1.5791e-03 2.6997e-03 2.2201e-03 2.2170e-03 0:00:18 185 16 1.0887e+00 9.5701e-03 1.1065e-03 1.6440e-03 4.1961e-03 4.6501e-03 1.2966e-03 2.2128e-03 1.8121e-03 1.8123e-03 0:00:17 184 17 9.8844e-01 8.3037e-03 9.7512e-04 1.3204e-03 3.6089e-03 4.0329e-03 1.0885e-03 1.8326e-03 1.4521e-03 1.4518e-03 0:00:16 183 18 8.7814e-01 7.3899e-03 8.3648e-04 1.0900e-03 3.0962e-03 3.3631e-03 9.0410e-04 1.5487e-03 1.1798e-03 1.1801e-03 0:00:16 182 19 7.7585e-01 6.4605e-03 7.2467e-04 9.2991e-04 2.7398e-03 2.9672e-03 7.5231e-04 1.3186e-03 9.5184e-04 9.5107e-04 0:00:15 181 20 6.7820e-01 5.6455e-03 6.3492e-04 7.7791e-04 2.4474e-03 2.5511e-03 6.3057e-04 1.1063e-03 7.8948e-04 7.8898e-04 0:00:15 180 21 5.8514e-01 4.9102e-03 5.6112e-04 6.5067e-04 2.2931e-03 2.2844e-03 5.1742e-04 9.7742e-04 7.0009e-04 6.9959e-04 0:00:15 179 22 5.1597e-01 4.2773e-03 5.1700e-04 5.4157e-04 2.0893e-03 2.0184e-03 4.3349e-04 8.6540e-04 5.8095e-04 5.8049e-04 0:00:15 178 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 23 4.3739e-01 3.8274e-03 4.6114e-04 4.6371e-04 1.9375e-03 1.8473e-03 3.7154e-04 7.8419e-04 5.2614e-04 5.2581e-04 0:00:15 177 24 3.7846e-01 3.4272e-03 4.1923e-04 4.1347e-04 1.8026e-03 1.6797e-03 3.2042e-04 7.3926e-04 4.7990e-04 4.7969e-04 0:00:14 176 25 3.3461e-01 3.0316e-03 3.9318e-04 3.7164e-04 1.6594e-03 1.5339e-03 2.8099e-04 6.9245e-04 4.3380e-04 4.3376e-04 0:00:14 175 26 2.9432e-01 2.7206e-03 3.6132e-04 3.3364e-04 1.5196e-03 1.4159e-03 2.5137e-04 6.4412e-04 3.9751e-04 3.9731e-04 0:00:14 174 27 2.6659e-01 2.4575e-03 3.2995e-04 3.0740e-04 1.3848e-03 1.2880e-03 2.2506e-04 5.9354e-04 3.4979e-04 3.4955e-04 0:00:14 173 28 2.4375e-01 2.2219e-03 3.0093e-04 2.8031e-04 1.2680e-03 1.1752e-03 1.9718e-04 5.4710e-04 3.0998e-04 3.0977e-04 0:00:14 172 29 2.2321e-01 2.0166e-03 2.7590e-04 2.5177e-04 1.1671e-03 1.0690e-03 1.6966e-04 4.9919e-04 2.8066e-04 2.8043e-04 0:00:14 171 30 2.0585e-01 1.8317e-03 2.5567e-04 2.2253e-04 1.0746e-03 9.7939e-04 1.4552e-04 4.4839e-04 2.4943e-04 2.4922e-04 0:00:14 170 31 1.9161e-01 1.6690e-03 2.3487e-04 1.9304e-04 9.9016e-04 8.9977e-04 1.2177e-04 4.0343e-04 2.1764e-04 2.1798e-04 0:00:13 169 32 1.7906e-01 1.5244e-03 2.1818e-04 1.6581e-04 9.1151e-04 8.2861e-04 1.0002e-04 3.5773e-04 1.8865e-04 1.8849e-04 0:00:13 168 33 1.6774e-01 1.3970e-03 2.0101e-04 1.4223e-04 8.3596e-04 7.6454e-04 8.2743e-05 3.1144e-04 1.6237e-04 1.6230e-04 0:00:13 167 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 34 1.5696e-01 1.2827e-03 1.8649e-04 1.2108e-04 7.6381e-04 7.0321e-04 6.9354e-05 2.6707e-04 1.3894e-04 1.3891e-04 0:00:13 166 35 1.4685e-01 1.1831e-03 1.7234e-04 1.0285e-04 6.8665e-04 6.4380e-04 5.8720e-05 2.3069e-04 1.2022e-04 1.2019e-04 0:00:13 165 36 1.3481e-01 1.1053e-03 1.5621e-04 9.1006e-05 6.2932e-04 5.9405e-04 4.9125e-05 2.0291e-04 1.0577e-04 1.0574e-04 0:00:12 164 37 1.2848e-01 1.0212e-03 1.4754e-04 7.6609e-05 5.6345e-04 5.4414e-04 4.2682e-05 1.7779e-04 8.9794e-05 8.9761e-05 0:00:12 163 38 1.1801e-01 9.5762e-04 1.3535e-04 6.9377e-05 5.1517e-04 5.0438e-04 3.7616e-05 1.6185e-04 8.2473e-05 8.2447e-05 0:00:12 162 39 1.1189e-01 8.9111e-04 1.2779e-04 5.9480e-05 4.6108e-04 4.6376e-04 3.3398e-05 1.5008e-04 7.4284e-05 7.4243e-05 0:00:12 161 40 1.0253e-01 8.3804e-04 1.1812e-04 5.6994e-05 4.2107e-04 4.2955e-04 2.9508e-05 1.4180e-04 7.0888e-05 7.0857e-05 0:00:12 160 41 9.7426e-02 7.8236e-04 1.1056e-04 5.1328e-05 3.7829e-04 3.9470e-04 2.6283e-05 1.3571e-04 6.6004e-05 6.5973e-05 0:00:12 159 42 8.9433e-02 7.3868e-04 1.0341e-04 4.9780e-05 3.4256e-04 3.6341e-04 2.3534e-05 1.2766e-04 6.2693e-05 6.2663e-05 0:00:12 158 43 8.4454e-02 6.9708e-04 9.6564e-05 4.7888e-05 3.1432e-04 3.3621e-04 2.1388e-05 1.2082e-04 6.0040e-05 6.0015e-05 0:00:12 157 44 8.1112e-02 6.5333e-04 9.0611e-05 4.3112e-05 2.8558e-04 3.1075e-04 1.9854e-05 1.1758e-04 5.6158e-05 5.6127e-05 0:00:12 156 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 45 7.5241e-02 6.1671e-04 8.4945e-05 4.2296e-05 2.6121e-04 2.8969e-04 1.8218e-05 1.1142e-04 5.4231e-05 5.4212e-05 0:00:12 155 46 7.1387e-02 5.8324e-04 7.9330e-05 3.9057e-05 2.3949e-04 2.7075e-04 1.6700e-05 1.0586e-04 5.2007e-05 5.1992e-05 0:00:12 154 47 6.7955e-02 5.5112e-04 7.3988e-05 3.6401e-05 2.2042e-04 2.5412e-04 1.5422e-05 1.0083e-04 4.8040e-05 4.8014e-05 0:00:12 153 48 6.4660e-02 5.2060e-04 6.9366e-05 3.4344e-05 2.0350e-04 2.3914e-04 1.4296e-05 9.5725e-05 4.6186e-05 4.6152e-05 0:00:11 152 49 6.1716e-02 4.9168e-04 6.5292e-05 3.2262e-05 1.8837e-04 2.2570e-04 1.3283e-05 9.0859e-05 4.3880e-05 4.3851e-05 0:00:11 151 50 5.8634e-02 4.6459e-04 6.1491e-05 3.0277e-05 1.7488e-04 2.1347e-04 1.2389e-05 8.6169e-05 4.1648e-05 4.1622e-05 0:00:12 150 51 5.5787e-02 4.3916e-04 5.7824e-05 2.8217e-05 1.6264e-04 2.0251e-04 1.1546e-05 8.1563e-05 3.8070e-05 3.8045e-05 0:00:12 149 52 5.3308e-02 4.1496e-04 5.4360e-05 2.6565e-05 1.5146e-04 1.9263e-04 1.0823e-05 7.7485e-05 3.6448e-05 3.6421e-05 0:00:11 148 53 5.0855e-02 3.9229e-04 5.1090e-05 2.4733e-05 1.4121e-04 1.8350e-04 1.0064e-05 7.3572e-05 3.3658e-05 3.3633e-05 0:00:11 147 54 4.8466e-02 3.7111e-04 4.8094e-05 2.3349e-05 1.3184e-04 1.7515e-04 9.4115e-06 6.9827e-05 3.2351e-05 3.2324e-05 0:00:11 146 55 4.6268e-02 3.5145e-04 4.5166e-05 2.1844e-05 1.2319e-04 1.6740e-04 8.7746e-06 6.6321e-05 2.9971e-05 2.9949e-05 0:00:11 145 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 56 4.4294e-02 3.3299e-04 4.2264e-05 2.0589e-05 1.1520e-04 1.6034e-04 8.2535e-06 6.2972e-05 2.8229e-05 2.8210e-05 0:00:11 144 57 4.2414e-02 3.1564e-04 3.9532e-05 1.9548e-05 1.0780e-04 1.5378e-04 7.8192e-06 5.9928e-05 2.6782e-05 2.6763e-05 0:00:11 143 58 4.0635e-02 2.9932e-04 3.7148e-05 1.8612e-05 1.0088e-04 1.4767e-04 7.5744e-06 5.4996e-05 2.5448e-05 2.5430e-05 0:00:10 142 59 3.8749e-02 2.8394e-04 3.4999e-05 1.7739e-05 9.4508e-05 1.4195e-04 7.1892e-06 5.1412e-05 2.4190e-05 2.4172e-05 0:00:10 141 60 3.7243e-02 2.6946e-04 3.3135e-05 1.6929e-05 8.8618e-05 1.3652e-04 6.7893e-06 4.8515e-05 2.3052e-05 2.3040e-05 0:00:10 140 61 3.5756e-02 2.5579e-04 3.1405e-05 1.6156e-05 8.3137e-05 1.3140e-04 6.4319e-06 4.6048e-05 2.1980e-05 2.1968e-05 0:00:10 139 62 3.4323e-02 2.4294e-04 2.9727e-05 1.5412e-05 7.7998e-05 1.2656e-04 6.1118e-06 4.3819e-05 2.0969e-05 2.0956e-05 0:00:10 138 63 3.2946e-02 2.3087e-04 2.8166e-05 1.4723e-05 7.3190e-05 1.2203e-04 5.8132e-06 4.1772e-05 2.0045e-05 2.0032e-05 0:00:10 137 64 3.1627e-02 2.1948e-04 2.6727e-05 1.4090e-05 6.8718e-05 1.1771e-04 5.5377e-06 3.9924e-05 1.9174e-05 1.9163e-05 0:00:10 136 65 3.0348e-02 2.0872e-04 2.5407e-05 1.3493e-05 6.4544e-05 1.1361e-04 5.2690e-06 3.8199e-05 1.8372e-05 1.8361e-05 0:00:10 135 66 2.9134e-02 1.9855e-04 2.4126e-05 1.2939e-05 6.0673e-05 1.0967e-04 5.0201e-06 3.6583e-05 1.7515e-05 1.7505e-05 0:00:10 134 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 67 2.8014e-02 1.8897e-04 2.2985e-05 1.2370e-05 5.7080e-05 1.0586e-04 4.6967e-06 3.6143e-05 1.6945e-05 1.6935e-05 0:00:10 133 68 2.6943e-02 1.8001e-04 2.1882e-05 1.1941e-05 5.3725e-05 1.0220e-04 4.6181e-06 3.4254e-05 1.6232e-05 1.6223e-05 0:00:10 132 69 2.5993e-02 1.7151e-04 2.0848e-05 1.1425e-05 5.0595e-05 9.8642e-05 4.3559e-06 3.3679e-05 1.5701e-05 1.5693e-05 0:00:10 131 70 2.5064e-02 1.6348e-04 1.9960e-05 1.1051e-05 4.7684e-05 9.5158e-05 4.2438e-06 3.1751e-05 1.5060e-05 1.5052e-05 0:00:10 130 71 2.4170e-02 1.5588e-04 1.9139e-05 1.0585e-05 4.4971e-05 9.1793e-05 4.0001e-06 3.1202e-05 1.4493e-05 1.4486e-05 0:00:10 129 72 2.3308e-02 1.4868e-04 1.8376e-05 1.0200e-05 4.2457e-05 8.8545e-05 3.8224e-06 3.0490e-05 1.3974e-05 1.3967e-05 0:00:10 128 73 2.2514e-02 1.4186e-04 1.7650e-05 9.8330e-06 4.0150e-05 8.5443e-05 3.6664e-06 2.9621e-05 1.3476e-05 1.3470e-05 0:00:10 127 74 2.1766e-02 1.3539e-04 1.6944e-05 9.4719e-06 3.7991e-05 8.2503e-05 3.5223e-06 2.8676e-05 1.3048e-05 1.3041e-05 0:00:10 126 75 2.1066e-02 1.2938e-04 1.6239e-05 9.1722e-06 3.5934e-05 7.9689e-05 3.4357e-06 2.6570e-05 1.2509e-05 1.2503e-05 0:00:09 125 76 2.0409e-02 1.2371e-04 1.5568e-05 8.8832e-06 3.4005e-05 7.6993e-05 3.2375e-06 2.6144e-05 1.2247e-05 1.2242e-05 0:00:09 124 77 1.9743e-02 1.1833e-04 1.4966e-05 8.6415e-06 3.2184e-05 7.4404e-05 3.1473e-06 2.4718e-05 1.1785e-05 1.1779e-05 0:00:09 123 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 78 1.9127e-02 1.1321e-04 1.4459e-05 8.3960e-06 3.0440e-05 7.1893e-05 2.9754e-06 2.4585e-05 1.1548e-05 1.1543e-05 0:00:09 122 79 1.8521e-02 1.0840e-04 1.3967e-05 8.1497e-06 2.8859e-05 6.9464e-05 2.8616e-06 2.4195e-05 1.1292e-05 1.1287e-05 0:00:09 121 80 1.7957e-02 1.0372e-04 1.3495e-05 7.9559e-06 2.7417e-05 6.7095e-05 2.8000e-06 2.2834e-05 1.0892e-05 1.0888e-05 0:00:09 120 81 1.7398e-02 9.9230e-05 1.3020e-05 7.6374e-06 2.6060e-05 6.4741e-05 2.6544e-06 2.2496e-05 1.0640e-05 1.0636e-05 0:00:21 119 82 1.6856e-02 9.4956e-05 1.2565e-05 7.5445e-06 2.4766e-05 6.2393e-05 2.5282e-06 2.1360e-05 1.0255e-05 1.0251e-05 0:00:19 118 83 1.6359e-02 9.0889e-05 1.2120e-05 7.2050e-06 2.3548e-05 6.0008e-05 2.4060e-06 2.1135e-05 1.0054e-05 1.0051e-05 0:00:17 117 84 1.5913e-02 8.7028e-05 1.1687e-05 7.0878e-06 2.2418e-05 5.7612e-05 2.3175e-06 2.0096e-05 9.6488e-06 9.6452e-06 0:00:15 116 85 1.5480e-02 8.3462e-05 1.1286e-05 6.7487e-06 2.1371e-05 5.5216e-05 2.2086e-06 1.9844e-05 9.4419e-06 9.4385e-06 0:00:14 115 86 1.5022e-02 8.0066e-05 1.0924e-05 6.6343e-06 2.0401e-05 5.3119e-05 2.1452e-06 1.8842e-05 9.1088e-06 9.1053e-06 0:00:12 114 87 1.4559e-02 7.6819e-05 1.0582e-05 6.3621e-06 1.9499e-05 5.1395e-05 2.0949e-06 1.8005e-05 8.8298e-06 8.8267e-06 0:00:12 113 88 1.4097e-02 7.3696e-05 1.0222e-05 6.2676e-06 1.8669e-05 4.9734e-05 1.9927e-06 1.7553e-05 8.6541e-06 8.6512e-06 0:00:11 112 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 89 1.3657e-02 7.0742e-05 9.9061e-06 6.1148e-06 1.7896e-05 4.8112e-05 1.9064e-06 1.7160e-05 8.4810e-06 8.4785e-06 0:00:10 111 90 1.3272e-02 6.7928e-05 9.6165e-06 5.9648e-06 1.7169e-05 4.6706e-05 1.8306e-06 1.6810e-05 8.3202e-06 8.3178e-06 0:00:10 110 91 1.2905e-02 6.5235e-05 9.3382e-06 5.8493e-06 1.6484e-05 4.5335e-05 1.7626e-06 1.6510e-05 8.1767e-06 8.1742e-06 0:00:10 109 92 1.2556e-02 6.2659e-05 9.0707e-06 5.7382e-06 1.5836e-05 4.4164e-05 1.7005e-06 1.6228e-05 8.0303e-06 8.0279e-06 0:00:10 108 93 1.2245e-02 6.0198e-05 8.8095e-06 5.6355e-06 1.5225e-05 4.3355e-05 1.6429e-06 1.5958e-05 7.8448e-06 7.8423e-06 0:00:09 107 94 1.1924e-02 5.7873e-05 8.5394e-06 5.4970e-06 1.4656e-05 4.2491e-05 1.5626e-06 1.6182e-05 7.7398e-06 7.7376e-06 0:00:09 106 95 1.1591e-02 5.5669e-05 8.2713e-06 5.4138e-06 1.4118e-05 4.1578e-05 1.5133e-06 1.6332e-05 7.6708e-06 7.6687e-06 0:00:09 105 96 1.1292e-02 5.3568e-05 8.0336e-06 5.3367e-06 1.3606e-05 4.0617e-05 1.4829e-06 1.6382e-05 7.6022e-06 7.5999e-06 0:00:08 104 97 1.1019e-02 5.1562e-05 7.8210e-06 5.2787e-06 1.3104e-05 3.9643e-05 1.4376e-06 1.6297e-05 7.5364e-06 7.5340e-06 0:00:08 103 98 1.0753e-02 4.9718e-05 7.6236e-06 5.2790e-06 1.2619e-05 3.8643e-05 1.3955e-06 1.6055e-05 7.4551e-06 7.4528e-06 0:00:08 102 99 1.0548e-02 4.7976e-05 7.4451e-06 5.2328e-06 1.2172e-05 3.7636e-05 1.3550e-06 1.5833e-05 7.3827e-06 7.3807e-06 0:00:08 101 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 100 1.0303e-02 4.6318e-05 7.2496e-06 5.1768e-06 1.1756e-05 3.6628e-05 1.3243e-06 1.5636e-05 7.3152e-06 7.3133e-06 0:00:08 100 101 1.0042e-02 4.4734e-05 7.0575e-06 5.1297e-06 1.1368e-05 3.5618e-05 1.3011e-06 1.5488e-05 7.2509e-06 7.2489e-06 0:00:08 99 102 9.8180e-03 4.3213e-05 6.8667e-06 5.0908e-06 1.1001e-05 3.4630e-05 1.2810e-06 1.5348e-05 7.1837e-06 7.1820e-06 0:00:08 98 103 9.6107e-03 4.1766e-05 6.6786e-06 5.0494e-06 1.0644e-05 3.3660e-05 1.2615e-06 1.5196e-05 7.1114e-06 7.1097e-06 0:00:07 97 104 9.3982e-03 4.0419e-05 6.4997e-06 5.0012e-06 1.0294e-05 3.2715e-05 1.2423e-06 1.5024e-05 7.0311e-06 7.0290e-06 0:00:07 96 105 9.1985e-03 3.9144e-05 6.3237e-06 4.9468e-06 9.9540e-06 3.1781e-05 1.2229e-06 1.4846e-05 6.9457e-06 6.9436e-06 0:00:07 95 106 9.0254e-03 3.7949e-05 6.1599e-06 4.8860e-06 9.6265e-06 3.0860e-05 1.2022e-06 1.4665e-05 6.8588e-06 6.8566e-06 0:00:07 94 107 8.8429e-03 3.6808e-05 6.0141e-06 4.8187e-06 9.3107e-06 2.9948e-05 1.1805e-06 1.4462e-05 6.7584e-06 6.7561e-06 0:00:07 93 108 8.6411e-03 3.5722e-05 5.8510e-06 4.7414e-06 9.0050e-06 2.9045e-05 1.1530e-06 1.4296e-05 6.6595e-06 6.6555e-06 0:00:07 92 109 8.4519e-03 3.4693e-05 5.7074e-06 4.6698e-06 8.7085e-06 2.8146e-05 1.1303e-06 1.4033e-05 6.5976e-06 6.5958e-06 0:00:07 91 110 8.2756e-03 3.3699e-05 5.5682e-06 4.5943e-06 8.4199e-06 2.7252e-05 1.1085e-06 1.3791e-05 6.5288e-06 6.5267e-06 0:00:07 90 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 111 8.1082e-03 3.2737e-05 5.4286e-06 4.5109e-06 8.1398e-06 2.6369e-05 1.0745e-06 1.3561e-05 6.4650e-06 6.4629e-06 0:00:07 89 112 7.9827e-03 3.1824e-05 5.2911e-06 4.4239e-06 7.8760e-06 2.5496e-05 1.0517e-06 1.3305e-05 6.3538e-06 6.3519e-06 0:00:07 88 113 7.8425e-03 3.0977e-05 5.1661e-06 4.3336e-06 7.6227e-06 2.4631e-05 1.0300e-06 1.3036e-05 6.2105e-06 6.2082e-06 0:00:07 87 114 7.7056e-03 3.0159e-05 5.0425e-06 4.2436e-06 7.3775e-06 2.3784e-05 1.0073e-06 1.2753e-05 6.0718e-06 6.0694e-06 0:00:07 86 115 7.5657e-03 2.9363e-05 4.9139e-06 4.1662e-06 7.1352e-06 2.2963e-05 9.8899e-07 1.2462e-05 5.9273e-06 5.9250e-06 0:00:07 85 116 7.4152e-03 2.8594e-05 4.7867e-06 4.0795e-06 6.8976e-06 2.2120e-05 9.6506e-07 1.2177e-05 5.7883e-06 5.7863e-06 0:00:06 84 117 7.2541e-03 2.7840e-05 4.6728e-06 3.9895e-06 6.6617e-06 2.1528e-05 9.4014e-07 1.1872e-05 5.6378e-06 5.6357e-06 0:00:06 83 118 7.1010e-03 2.7103e-05 4.5741e-06 3.8940e-06 6.4441e-06 2.1181e-05 9.1354e-07 1.1562e-05 5.4859e-06 5.4839e-06 0:00:06 82 119 6.9391e-03 2.6385e-05 4.4821e-06 3.8173e-06 6.2472e-06 2.0818e-05 8.8687e-07 1.1280e-05 5.3530e-06 5.3511e-06 0:00:06 81 120 6.7685e-03 2.5687e-05 4.3956e-06 3.7568e-06 6.0809e-06 2.0453e-05 8.6111e-07 1.1066e-05 5.2507e-06 5.2488e-06 0:00:06 80 121 6.5967e-03 2.5008e-05 4.3140e-06 3.6937e-06 5.9296e-06 2.0087e-05 8.3944e-07 1.0815e-05 5.1272e-06 5.1254e-06 0:00:06 79 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 122 6.4224e-03 2.4355e-05 4.2381e-06 3.6110e-06 5.7846e-06 1.9746e-05 8.3949e-07 1.0683e-05 5.0761e-06 5.0743e-06 0:00:06 78 123 6.2457e-03 2.3721e-05 4.1805e-06 3.6092e-06 5.6490e-06 1.9409e-05 8.0496e-07 1.0501e-05 4.9952e-06 4.9933e-06 0:00:06 77 124 6.0855e-03 2.3128e-05 4.1220e-06 3.5407e-06 5.5215e-06 1.9039e-05 7.9982e-07 1.0358e-05 4.9307e-06 4.9292e-06 0:00:09 76 125 5.9503e-03 2.2553e-05 4.0272e-06 3.4976e-06 5.3973e-06 1.8631e-05 7.8606e-07 1.0215e-05 4.8663e-06 4.8649e-06 0:00:08 75 126 5.8422e-03 2.1986e-05 3.9374e-06 3.4550e-06 5.2750e-06 1.8190e-05 7.6658e-07 1.0065e-05 4.7970e-06 4.7957e-06 0:00:08 74 127 5.7252e-03 2.1428e-05 3.8477e-06 3.4063e-06 5.1547e-06 1.7770e-05 7.4456e-07 9.9042e-06 4.7210e-06 4.7197e-06 0:00:07 73 128 5.6035e-03 2.0908e-05 3.7608e-06 3.3515e-06 5.0386e-06 1.7324e-05 7.2166e-07 9.7289e-06 4.6376e-06 4.6364e-06 0:00:07 72 129 5.4814e-03 2.0411e-05 3.6843e-06 3.2910e-06 4.9248e-06 1.6855e-05 6.9991e-07 9.5454e-06 4.5487e-06 4.5476e-06 0:00:06 71 130 5.3586e-03 1.9923e-05 3.6087e-06 3.2256e-06 4.8101e-06 1.6380e-05 6.7951e-07 9.3532e-06 4.4548e-06 4.4539e-06 0:00:06 70 131 5.2363e-03 1.9444e-05 3.5382e-06 3.1562e-06 4.6951e-06 1.5898e-05 6.5961e-07 9.1513e-06 4.3583e-06 4.3573e-06 0:00:06 69 132 5.1124e-03 1.8969e-05 3.4662e-06 3.0834e-06 4.5787e-06 1.5416e-05 6.3987e-07 8.9409e-06 4.2497e-06 4.2487e-06 0:00:06 68 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 133 4.9877e-03 1.8501e-05 3.3936e-06 3.0106e-06 4.4616e-06 1.4938e-05 6.2047e-07 8.7265e-06 4.1450e-06 4.1440e-06 0:00:06 67 134 4.8643e-03 1.8047e-05 3.3241e-06 2.9366e-06 4.3436e-06 1.4466e-05 6.0134e-07 8.5094e-06 4.0414e-06 4.0404e-06 0:00:05 66 135 4.7427e-03 1.7614e-05 3.2543e-06 2.8614e-06 4.2248e-06 1.4003e-05 5.8247e-07 8.2881e-06 3.9363e-06 3.9354e-06 0:00:05 65 136 4.6237e-03 1.7184e-05 3.1828e-06 2.7854e-06 4.1061e-06 1.3548e-05 5.6387e-07 8.0634e-06 3.8293e-06 3.8284e-06 0:00:05 64 137 4.5112e-03 1.6758e-05 3.1130e-06 2.7087e-06 3.9886e-06 1.3104e-05 5.4530e-07 7.8360e-06 3.7208e-06 3.7199e-06 0:00:05 63 138 4.4031e-03 1.6336e-05 3.0433e-06 2.6313e-06 3.8718e-06 1.2670e-05 5.2736e-07 7.6071e-06 3.6119e-06 3.6110e-06 0:00:05 62 139 4.2897e-03 1.5921e-05 2.9750e-06 2.5541e-06 3.7560e-06 1.2244e-05 5.0996e-07 7.3799e-06 3.5033e-06 3.5025e-06 0:00:05 61 140 4.1700e-03 1.5515e-05 2.9059e-06 2.4862e-06 3.6441e-06 1.1831e-05 4.9424e-07 7.1585e-06 3.3971e-06 3.3963e-06 0:00:05 60 141 4.0523e-03 1.5116e-05 2.8402e-06 2.4154e-06 3.5325e-06 1.1425e-05 4.7834e-07 6.9404e-06 3.2928e-06 3.2920e-06 0:00:05 59 142 3.9366e-03 1.4721e-05 2.7774e-06 2.3431e-06 3.4205e-06 1.1029e-05 4.6168e-07 6.7243e-06 3.1890e-06 3.1882e-06 0:00:05 58 143 3.8238e-03 1.4332e-05 2.7205e-06 2.2709e-06 3.3097e-06 1.0645e-05 4.4469e-07 6.5086e-06 3.0855e-06 3.0848e-06 0:00:05 57 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 144 3.7141e-03 1.3947e-05 2.6692e-06 2.1997e-06 3.2007e-06 1.0273e-05 4.2708e-07 6.2928e-06 2.9823e-06 2.9817e-06 0:00:04 56 145 3.6014e-03 1.3568e-05 2.6170e-06 2.1283e-06 3.0939e-06 9.9152e-06 4.0904e-07 6.0789e-06 2.8808e-06 2.8803e-06 0:00:04 55 146 3.4903e-03 1.3225e-05 2.5635e-06 2.0571e-06 2.9898e-06 9.5627e-06 3.9089e-07 5.8676e-06 2.7810e-06 2.7806e-06 0:00:04 54 147 3.3862e-03 1.2889e-05 2.5089e-06 1.9869e-06 2.8904e-06 9.2201e-06 3.7307e-07 5.6596e-06 2.6829e-06 2.6826e-06 0:00:04 53 148 3.2924e-03 1.2557e-05 2.4546e-06 1.9178e-06 2.7947e-06 8.8876e-06 3.5602e-07 5.4555e-06 2.5872e-06 2.5869e-06 0:00:04 52 149 3.1977e-03 1.2227e-05 2.3996e-06 1.8499e-06 2.7029e-06 8.5626e-06 3.3944e-07 5.2563e-06 2.4939e-06 2.4937e-06 0:00:04 51 150 3.0998e-03 1.1900e-05 2.3436e-06 1.7837e-06 2.6158e-06 8.2465e-06 3.2353e-07 5.0638e-06 2.4032e-06 2.4030e-06 0:00:04 50 151 2.9963e-03 1.1578e-05 2.2891e-06 1.7188e-06 2.5319e-06 7.9377e-06 3.0813e-07 4.8774e-06 2.3154e-06 2.3152e-06 0:00:04 49 152 2.8940e-03 1.1259e-05 2.2364e-06 1.6559e-06 2.4516e-06 7.6355e-06 2.9325e-07 4.6958e-06 2.2299e-06 2.2297e-06 0:00:04 48 153 2.7945e-03 1.0944e-05 2.1828e-06 1.5948e-06 2.3744e-06 7.3401e-06 2.7891e-07 4.5194e-06 2.1468e-06 2.1466e-06 0:00:04 47 154 2.6964e-03 1.0634e-05 2.1362e-06 1.5353e-06 2.3001e-06 7.0519e-06 2.6505e-07 4.3486e-06 2.0663e-06 2.0662e-06 0:00:04 46 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 155 2.5969e-03 1.0327e-05 2.0906e-06 1.4779e-06 2.2285e-06 6.7728e-06 2.5200e-07 4.1832e-06 1.9881e-06 1.9880e-06 0:00:03 45 156 2.4993e-03 1.0023e-05 2.0440e-06 1.4218e-06 2.1610e-06 6.5034e-06 2.3998e-07 4.0236e-06 1.9124e-06 1.9122e-06 0:00:03 44 157 2.4041e-03 9.7244e-06 1.9968e-06 1.3676e-06 2.0951e-06 6.2483e-06 2.2826e-07 3.8691e-06 1.8390e-06 1.8388e-06 0:00:03 43 158 2.3196e-03 9.4314e-06 1.9532e-06 1.3141e-06 2.0294e-06 6.0061e-06 2.1697e-07 3.7166e-06 1.7666e-06 1.7665e-06 0:00:03 42 159 2.2350e-03 9.1409e-06 1.9094e-06 1.2591e-06 1.9679e-06 5.7602e-06 2.0598e-07 3.5574e-06 1.6911e-06 1.6910e-06 0:00:03 41 160 2.1530e-03 8.8706e-06 1.8642e-06 1.2054e-06 1.9086e-06 5.5167e-06 1.9519e-07 3.4005e-06 1.6169e-06 1.6169e-06 0:00:03 40 161 2.0729e-03 8.6113e-06 1.8181e-06 1.1545e-06 1.8502e-06 5.2798e-06 1.8467e-07 3.2488e-06 1.5452e-06 1.5452e-06 0:00:03 39 162 1.9951e-03 8.3540e-06 1.7719e-06 1.1065e-06 1.7926e-06 5.0530e-06 1.7452e-07 3.1090e-06 1.4785e-06 1.4785e-06 0:00:03 38 163 1.9184e-03 8.0999e-06 1.7260e-06 1.0607e-06 1.7362e-06 4.8353e-06 1.6491e-07 2.9756e-06 1.4154e-06 1.4154e-06 0:00:03 37 164 1.8400e-03 7.8499e-06 1.6800e-06 1.0165e-06 1.6809e-06 4.6268e-06 1.5633e-07 2.8474e-06 1.3547e-06 1.3547e-06 0:00:03 36 165 1.7645e-03 7.6026e-06 1.6341e-06 9.7433e-07 1.6264e-06 4.4242e-06 1.4812e-07 2.7245e-06 1.2963e-06 1.2964e-06 0:00:03 35 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 166 1.6913e-03 7.3596e-06 1.5885e-06 9.3390e-07 1.5729e-06 4.2295e-06 1.4029e-07 2.6061e-06 1.2403e-06 1.2403e-06 0:00:03 34 167 1.6225e-03 7.1206e-06 1.5454e-06 8.9451e-07 1.5207e-06 4.0427e-06 1.3275e-07 2.4921e-06 1.1868e-06 1.1868e-06 0:00:03 33 168 1.5571e-03 6.8864e-06 1.5078e-06 8.5647e-07 1.4697e-06 3.8634e-06 1.2552e-07 2.3827e-06 1.1353e-06 1.1354e-06 0:00:02 32 169 1.4934e-03 6.6562e-06 1.4716e-06 8.1987e-07 1.4200e-06 3.6899e-06 1.1851e-07 2.2784e-06 1.0853e-06 1.0855e-06 0:00:02 31 170 1.4322e-03 6.4365e-06 1.4350e-06 7.8430e-07 1.3718e-06 3.5211e-06 1.1176e-07 2.1775e-06 1.0378e-06 1.0380e-06 0:00:02 30 171 1.3752e-03 6.2205e-06 1.3986e-06 7.4989e-07 1.3250e-06 3.3548e-06 1.0528e-07 2.0800e-06 9.9202e-07 9.9220e-07 0:00:02 29 172 1.3177e-03 6.0074e-06 1.3620e-06 7.1640e-07 1.2801e-06 3.1946e-06 9.9040e-08 1.9848e-06 9.4721e-07 9.4738e-07 0:00:02 28 173 1.2619e-03 5.7989e-06 1.3252e-06 6.8425e-07 1.2366e-06 3.0405e-06 9.3117e-08 1.8929e-06 9.0388e-07 9.0407e-07 0:00:05 27 174 1.2088e-03 5.5965e-06 1.2885e-06 6.5329e-07 1.1944e-06 2.8924e-06 8.7649e-08 1.8059e-06 8.6286e-07 8.6305e-07 0:00:04 26 175 1.1654e-03 5.3981e-06 1.2537e-06 6.3672e-07 1.1587e-06 2.7537e-06 8.3151e-08 1.7260e-06 8.3162e-07 8.3188e-07 0:00:04 25 176 1.1405e-03 5.2066e-06 1.2223e-06 5.8504e-07 1.1172e-06 2.6222e-06 7.4876e-08 1.6691e-06 7.9396e-07 7.9393e-07 0:00:03 24 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 177 1.0854e-03 5.0131e-06 1.1938e-06 5.8210e-07 1.0822e-06 2.4963e-06 7.1968e-08 1.5798e-06 7.5219e-07 7.5245e-07 0:00:03 23 178 1.0516e-03 4.8209e-06 1.1607e-06 5.3863e-07 1.0445e-06 2.3787e-06 7.0200e-08 1.5022e-06 7.2523e-07 7.2545e-07 0:00:02 22 179 1.0201e-03 4.6342e-06 1.1302e-06 5.1573e-07 1.0068e-06 2.2649e-06 6.6730e-08 1.4322e-06 6.9447e-07 6.9468e-07 0:00:02 21 180 9.8731e-04 4.4539e-06 1.1000e-06 4.9370e-07 9.7065e-07 2.1552e-06 6.2681e-08 1.3680e-06 6.6391e-07 6.6411e-07 0:00:02 20 ! 180 solution is converged .. GENERATED FROM PYTHON SOURCE LINES 419-423 Set time scale factor to 5. *The Time Scale Factor allows us to further manipulate the computed time step size calculated by Fluent. Larger time steps can lead to faster convergence. However, if the time step is too large it can lead to solution instability.* .. GENERATED FROM PYTHON SOURCE LINES 423-428 .. code-block:: Python solver.settings.solution.run_calculation.pseudo_time_settings.time_step_method.time_step_size_scale_factor = ( 5 ) .. GENERATED FROM PYTHON SOURCE LINES 429-430 Run the calculation for 200 iterations. .. GENERATED FROM PYTHON SOURCE LINES 430-433 .. code-block:: Python solver.settings.solution.run_calculation.iterate(iter_count=200) .. rst-class:: sphx-glr-script-out .. code-block:: none iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 180 9.8731e-04 4.4539e-06 1.1000e-06 4.9370e-07 9.7065e-07 2.1552e-06 6.2681e-08 1.3680e-06 6.6391e-07 6.6411e-07 0:00:20 200 ! 180 solution is converged 181 2.4223e-03 4.5361e-06 1.1305e-06 9.6245e-07 1.4112e-06 2.7110e-06 1.2524e-07 2.7120e-06 1.3544e-06 1.3546e-06 0:00:18 199 182 1.9375e-03 4.0183e-06 1.0338e-06 1.2183e-06 1.2315e-06 2.6664e-06 1.5388e-07 3.4098e-06 1.6380e-06 1.6381e-06 0:00:17 198 183 1.7417e-03 3.5345e-06 9.3314e-07 1.1938e-06 1.0766e-06 2.4145e-06 1.5569e-07 3.2712e-06 1.5644e-06 1.5646e-06 0:00:17 197 184 1.6240e-03 3.0544e-06 8.2972e-07 1.1005e-06 9.2646e-07 2.0884e-06 1.4862e-07 2.9967e-06 1.4167e-06 1.4171e-06 0:00:17 196 185 1.5351e-03 2.6011e-06 7.2541e-07 9.6647e-07 7.7628e-07 1.7522e-06 1.3129e-07 2.5867e-06 1.2302e-06 1.2306e-06 0:00:17 195 186 1.4126e-03 2.1942e-06 6.3148e-07 8.2632e-07 6.4811e-07 1.4628e-06 1.1152e-07 2.1964e-06 1.0501e-06 1.0504e-06 0:00:16 194 187 1.3244e-03 1.8488e-06 5.5063e-07 6.9906e-07 5.4825e-07 1.2277e-06 9.4161e-08 1.8297e-06 8.8227e-07 8.8252e-07 0:00:16 193 188 1.2604e-03 1.5605e-06 4.7758e-07 5.7674e-07 4.6165e-07 1.0204e-06 8.3312e-08 1.5060e-06 7.2567e-07 7.2585e-07 0:00:16 192 189 1.1873e-03 1.3348e-06 4.1791e-07 4.8801e-07 3.9820e-07 8.4752e-07 7.2026e-08 1.2107e-06 5.9737e-07 5.9766e-07 0:00:16 191 190 1.1166e-03 1.1344e-06 3.6601e-07 4.0447e-07 3.4083e-07 7.1274e-07 6.1061e-08 9.9514e-07 4.9642e-07 4.9663e-07 0:00:15 190 iter continuity x-velocity y-velocity energy k omega ch4 o2 co2 h2o time/iter 191 1.0304e-03 9.7570e-07 3.2135e-07 3.3209e-07 2.9517e-07 5.9745e-07 5.3908e-08 8.2685e-07 4.0947e-07 4.0963e-07 0:00:15 189 192 9.3448e-04 8.4421e-07 2.8513e-07 2.7217e-07 2.5466e-07 5.0003e-07 4.8290e-08 6.8293e-07 3.3575e-07 3.3588e-07 0:00:15 188 ! 192 solution is converged .. GENERATED FROM PYTHON SOURCE LINES 434-435 Save the case and data files (gascomb1.cas.h5 and gascomb1.dat.h5). .. GENERATED FROM PYTHON SOURCE LINES 435-438 .. code-block:: Python solver.settings.file.write_case_data(file_name="gascomb1.cas.h5") .. rst-class:: sphx-glr-script-out .. code-block:: none Writing to 30b945f663a6:"/mnt/pyfluent/gascomb1.cas.h5" in NODE0 mode and compression level 1 ... Grouping cells for Laplace smoothing ... 1615 cells, 1 zone ... 3319 faces, 7 zones ... 1705 nodes, 1 zone ... Done. Done. Writing to 30b945f663a6:"/mnt/pyfluent/gascomb1.dat.h5" in NODE0 mode and compression level 1 ... Writing results. Done. .. GENERATED FROM PYTHON SOURCE LINES 439-445 Postprocessing ^^^^^^^^^^^^^^ *Review the solution by examining graphical displays of the results and performing surface integrations at the combustor exit.* Report the total sensible heat flux. We shall use wildcards to specify all zones. .. GENERATED FROM PYTHON SOURCE LINES 445-448 .. code-block:: Python solver.settings.results.report.fluxes.get_heat_transfer_sensible(zones="*") .. rst-class:: sphx-glr-script-out .. code-block:: none {'Net': -0.5353470930422191, 'air-inlet': 173.7936396580586, 'fuel-inlet': 16.64962057794938, 'nozzle': -0.0, 'outer-wall': -12842.71004368723, 'pressure-outlet-9': -191740.9839789067} .. GENERATED FROM PYTHON SOURCE LINES 449-450 Display filled contours of temperature and save the image to a file. .. GENERATED FROM PYTHON SOURCE LINES 450-459 .. code-block:: Python contour1 = Contour(solver, new_instance_name="contour-temp") contour1.field = "temperature" contour1.surfaces_list = contour1.surfaces_list.allowed_values() contour1.coloring.option = "banded" contour1.display() graphics.views.auto_scale() # graphics.picture.save_picture(file_name="contour-temp.png") .. GENERATED FROM PYTHON SOURCE LINES 460-467 .. figure:: /_static/species_transport/contour-temp.png :width: 500pt :align: center Contours of Temperature *The peak temperature is approximately 2300 K.* .. GENERATED FROM PYTHON SOURCE LINES 469-470 Display velocity vectors and save the image to a file. .. GENERATED FROM PYTHON SOURCE LINES 470-476 .. code-block:: Python vector1 = Vector(solver, new_instance_name="vector-vel") vector1.surfaces_list = ["interior-4"] vector1.scale.scale_f = 0.01 vector1.vector_opt.fixed_length = True .. GENERATED FROM PYTHON SOURCE LINES 477-479 *The fixed length option is useful when the vector magnitude varies dramatically. With fixed length vectors, the velocity magnitude is described only by color instead of by both vector length and color.* .. GENERATED FROM PYTHON SOURCE LINES 479-485 .. code-block:: Python vector1.vector_opt.scale_head = 0.1 vector1.display() graphics.views.auto_scale() graphics.picture.save_picture(file_name="vector-vel.png") .. GENERATED FROM PYTHON SOURCE LINES 486-493 .. figure:: /_static/species_transport/vector-vel.png :width: 500pt :align: center Velocity Vectors *The entrainment of air into the high-velocity methane jet is clearly visible.* .. GENERATED FROM PYTHON SOURCE LINES 496-497 Display filled contours of mass fraction of :math:`CH_4` and save the image to a file. .. GENERATED FROM PYTHON SOURCE LINES 497-505 .. code-block:: Python contour2 = Contour(solver, new_instance_name="contour-ch4-mass-fraction") contour2.field = "ch4" contour2.surfaces_list = contour2.surfaces_list.allowed_values() contour2.display() graphics.views.auto_scale() graphics.picture.save_picture(file_name="contour-ch4-mass-fraction.png") .. GENERATED FROM PYTHON SOURCE LINES 506-511 .. figure:: /_static/species_transport/contour-ch4-mass-fraction.png :width: 500pt :align: center Contours of :math:`CH_4` Mass Fraction .. GENERATED FROM PYTHON SOURCE LINES 514-515 Display filled contours of mass fraction of :math:`O_2` and save the image to a file. .. GENERATED FROM PYTHON SOURCE LINES 515-523 .. code-block:: Python contour3 = Contour(solver, new_instance_name="contour-o2-mass-fraction") contour3.field = "o2" contour3.surfaces_list = contour3.surfaces_list.allowed_values() contour3.display() graphics.views.auto_scale() graphics.picture.save_picture(file_name="contour-o2-mass-fraction.png") .. GENERATED FROM PYTHON SOURCE LINES 524-529 .. figure:: /_static/species_transport/contour-o2-mass-fraction.png :width: 500pt :align: center Contours of :math:`O_2` Mass Fraction .. GENERATED FROM PYTHON SOURCE LINES 531-532 Display filled contours of mass fraction of :math:`CO_2` and save the image to a file. .. GENERATED FROM PYTHON SOURCE LINES 532-540 .. code-block:: Python contour4 = Contour(solver, new_instance_name="contour-co2-mass-fraction") contour4.field = "co2" contour4.surfaces_list = contour4.surfaces_list.allowed_values() contour4.display() graphics.views.auto_scale() graphics.picture.save_picture(file_name="contour-co2-mass-fraction.png") .. GENERATED FROM PYTHON SOURCE LINES 541-546 .. figure:: /_static/species_transport/contour-co2-mass-fraction.png :width: 500pt :align: center Contours of :math:`CO_2` Mass Fraction .. GENERATED FROM PYTHON SOURCE LINES 548-549 Display filled contours of mass fraction of :math:`H_2O` and save the image to a file. .. GENERATED FROM PYTHON SOURCE LINES 549-557 .. code-block:: Python contour5 = Contour(solver, new_instance_name="contour-h2o-mass-fraction") contour5.field = "h2o" contour5.surfaces_list = contour5.surfaces_list.allowed_values() contour5.display() graphics.views.auto_scale() graphics.picture.save_picture(file_name="contour-h2o-mass-fraction.png") .. GENERATED FROM PYTHON SOURCE LINES 558-563 .. figure:: /_static/species_transport/contour-h2o-mass-fraction.png :width: 500pt :align: center Contours of :math:`H_2O` Mass Fraction .. GENERATED FROM PYTHON SOURCE LINES 565-572 Determine the average exit temperature. The mass-averaged temperature will be computed as: .. math:: \bar{T}=\frac{\int T \rho \vec{v} \cdot d \vec{A}}{\int \rho \vec{v} \cdot d \vec{A}} *The mass-averaged temperature at the exit is approximately 1840 K.* .. GENERATED FROM PYTHON SOURCE LINES 572-577 .. code-block:: Python solver.settings.results.report.surface_integrals.get_mass_weighted_avg( report_of="temperature", surface_names=["pressure-outlet-9"] ) .. rst-class:: sphx-glr-script-out .. code-block:: none {'pressure-outlet-9': 1840.02573809136} .. GENERATED FROM PYTHON SOURCE LINES 578-585 Determine the average exit velocity. The mass-averaged velocity will be computed as: .. math:: v=\frac{1}{A} \int v d A *The Area-Weighted Average field will show that the exit velocity is approximately 3.37 m/s.* .. GENERATED FROM PYTHON SOURCE LINES 585-590 .. code-block:: Python solver.settings.results.report.surface_integrals.get_area_weighted_avg( report_of="velocity-magnitude", surface_names=["pressure-outlet-9"] ) .. rst-class:: sphx-glr-script-out .. code-block:: none {'pressure-outlet-9': 3.305919548597063} .. GENERATED FROM PYTHON SOURCE LINES 591-592 Save the case file (gascomb1.cas.h5). .. GENERATED FROM PYTHON SOURCE LINES 592-595 .. code-block:: Python solver.settings.file.write_case(file_name="gascomb1.cas.h5") .. rst-class:: sphx-glr-script-out .. code-block:: none Writing to 30b945f663a6:"/mnt/pyfluent/gascomb1.cas.h5" in NODE0 mode and compression level 1 ... Grouping cells for Laplace smoothing ... 1615 cells, 1 zone ... 3319 faces, 7 zones ... 1705 nodes, 1 zone ... Done. Done. .. GENERATED FROM PYTHON SOURCE LINES 596-598 Close Fluent ^^^^^^^^^^^^ .. GENERATED FROM PYTHON SOURCE LINES 598-601 .. code-block:: Python solver.exit() .. GENERATED FROM PYTHON SOURCE LINES 602-608 Summary ------- In this tutorial we used PyFluent to model the transport, mixing, and reaction of chemical species. The reaction system was defined by using a mixture-material entry in the Ansys Fluent database. The procedures used here for simulation of hydrocarbon combustion can be applied to other reacting flow systems. .. rst-class:: sphx-glr-timing **Total running time of the script:** (2 minutes 8.811 seconds) .. _sphx_glr_download_examples_00-fluent_species_transport.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: species_transport.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: species_transport.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: species_transport.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_