Skip to content

Commit

Permalink
[samples] Replace show_solution by show
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Feb 28, 2023
1 parent 95cf8c7 commit aacc987
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions samples/python/onedim/adiabatic_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Set up flame object
f = ct.FreeFlame(gas, width=width)
f.set_refine_criteria(ratio=3, slope=0.06, curve=0.12)
f.show_solution()
f.show()

# Solve with mixture-averaged transport model
f.transport_model = 'Mix'
Expand All @@ -41,13 +41,13 @@
# Solve with the energy equation enabled
f.save(output, name="mix", description="solution with mixture-averaged transport")

f.show_solution()
f.show()
print(f"mixture-averaged flamespeed = {f.velocity[0]:7f} m/s")

# Solve with multi-component transport properties
f.transport_model = 'Multi'
f.solve(loglevel) # don't use 'auto' on subsequent solves
f.show_solution()
f.show()
print(f"multicomponent flamespeed = {f.velocity[0]:7f} m/s")
f.save(output, name="multi", description="solution with multicomponent transport")

Expand Down
4 changes: 2 additions & 2 deletions samples/python/onedim/burner_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
f = ct.BurnerFlame(gas, width=width)
f.burner.mdot = mdot
f.set_refine_criteria(ratio=3.0, slope=0.05, curve=0.1)
f.show_solution()
f.show()

f.transport_model = 'Mix'
f.solve(loglevel, auto=True)
Expand All @@ -37,7 +37,7 @@

f.transport_model = 'Multi'
f.solve(loglevel) # don't use 'auto' on subsequent solves
f.show_solution()
f.show()
f.save(output, name="multi", description="solution with multicomponent transport")

f.write_csv('burner_flame.csv', quiet=False)
4 changes: 2 additions & 2 deletions samples/python/onedim/diffusion_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

# Solve the problem
f.solve(loglevel, auto=True)
f.show_solution()
f.show()

if "native" in ct.hdf_support():
output = Path() / "diffusion_flame.h5"
Expand All @@ -78,7 +78,7 @@
# Turn on radiation and solve again
f.radiation_enabled = True
f.solve(loglevel=1, refine_grid=False)
f.show_solution()
f.show()

# Plot Temperature with radiation
plt.plot(f.flame.grid, f.T, label='Temperature with radiation')
Expand Down
2 changes: 1 addition & 1 deletion samples/python/onedim/flame_fixed_T.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
f.flame.set_fixed_temp_profile(zloc, tvalues)

# show the initial estimate for the solution
f.show_solution()
f.show()

# don't solve the energy equation
f.energy_enabled = False
Expand Down
2 changes: 1 addition & 1 deletion samples/python/onedim/ion_burner_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
f = ct.IonBurnerFlame(gas, width=width)
f.burner.mdot = mdot
f.set_refine_criteria(ratio=3.0, slope=0.05, curve=0.1)
f.show_solution()
f.show()

f.transport_model = 'Ion'
f.solve(loglevel, auto=True)
Expand Down
4 changes: 2 additions & 2 deletions samples/python/onedim/ion_free_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# Set up flame object
f = ct.IonFreeFlame(gas, width=width)
f.set_refine_criteria(ratio=3, slope=0.05, curve=0.1)
f.show_solution()
f.show()

# stage one
f.solve(loglevel=loglevel, auto=True)
Expand All @@ -40,7 +40,7 @@

f.save(output, name="ion", description="solution with ionized gas transport")

f.show_solution()
f.show()
print(f"mixture-averaged flamespeed = {f.velocity[0]:7f} m/s")

# write the velocity, temperature, density, and mole fractions to a CSV file
Expand Down
4 changes: 2 additions & 2 deletions samples/python/onedim/premixed_counterflow_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
sim.products.mdot = mdot_products

sim.set_initial_guess() # assume adiabatic equilibrium products
sim.show_solution()
sim.show()

sim.solve(loglevel, auto=True)

Expand All @@ -55,4 +55,4 @@
# write the velocity, temperature, and mole fractions to a CSV file
sim.write_csv("premixed_counterflow_flame.csv", quiet=False)
sim.show_stats()
sim.show_solution()
sim.show()
2 changes: 1 addition & 1 deletion samples/python/onedim/premixed_counterflow_twin_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def solveOpposedFlame(oppFlame, massFlux=0.12, loglevel=1,
oppFlame.reactants.mdot = massFlux
oppFlame.set_refine_criteria(ratio=ratio, slope=slope, curve=curve, prune=prune)

oppFlame.show_solution()
oppFlame.show()
oppFlame.solve(loglevel, auto=True)

# Compute the strain rate, just before the flame. This is not necessarily
Expand Down
2 changes: 1 addition & 1 deletion samples/python/onedim/stagnation_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
sim.set_refine_criteria(ratio=ratio, slope=slope, curve=curve, prune=prune)

sim.set_initial_guess(products='equil') # assume adiabatic equilibrium products
sim.show_solution()
sim.show()

sim.solve(loglevel, auto=True)

Expand Down
6 changes: 3 additions & 3 deletions samples/python/surface_chemistry/catalytic_combustion.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
sim.surface.T = tsurf

# Show the initial solution estimate
sim.show_solution()
sim.show()

# Solving problems with stiff chemistry coupled to flow can require a
# sequential approach where solutions are first obtained for simpler problems
Expand All @@ -94,7 +94,7 @@
sim.solve(loglevel)

# At this point, we should have the solution for the hydrogen/air problem.
sim.show_solution()
sim.show()

# Now switch the inlet to the methane/air composition.
sim.inlet.X = comp2
Expand All @@ -106,7 +106,7 @@
sim.solve(loglevel)

# show the solution
sim.show_solution()
sim.show()

# save the full solution. The 'restore' method can be used to restart
# a simulation from a solution stored in this form.
Expand Down

0 comments on commit aacc987

Please sign in to comment.