Skip to content

Commit

Permalink
[samples] Replace write_csv with save
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Jun 22, 2023
1 parent 794ca91 commit 9a37030
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion samples/python/onedim/adiabatic_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
f.save(output, name="multi", description="solution with multicomponent transport")

# write the velocity, temperature, density, and mole fractions to a CSV file
f.write_csv('adiabatic_flame.csv', quiet=False)
f.save('adiabatic_flame.csv', basis="mole")
2 changes: 1 addition & 1 deletion samples/python/onedim/burner_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
f.show()
f.save(output, name="multi", description="solution with multicomponent transport")

f.write_csv('burner_flame.csv', quiet=False)
f.save('burner_flame.csv.csv', basis="mole")
2 changes: 1 addition & 1 deletion samples/python/onedim/diffusion_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
f.save(output)

# write the velocity, temperature, and mole fractions to a CSV file
f.write_csv('diffusion_flame.csv', quiet=False)
f.save('diffusion_flame.csv', basis="mole")

f.show_stats(0)

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 @@ -78,5 +78,5 @@
f.save(output, name="multi", description="solution with multicomponent transport")

# write the velocity, temperature, density, and mole fractions to a CSV file
f.write_csv('flame_fixed_T.csv', quiet=False)
f.save('flame_fixed_T.csv', basis="mole")
f.show_stats()
2 changes: 1 addition & 1 deletion samples/python/onedim/flame_initial_guess.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def describe(flame):

print("Save CSV")
csv_filepath = output_path / "flame.csv"
f.write_csv(csv_filepath)
f.save(csv_filepath, basis="mole")

if "native" in ct.hdf_support():
# HDF is not a required dependency
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 @@ -36,4 +36,4 @@

f.save(output, name="mix", description="solution with mixture-averaged transport")

f.write_csv('ion_burner_flame.csv', quiet=False)
f.save('ion_burner_flame.csv', basis="mole")
2 changes: 1 addition & 1 deletion samples/python/onedim/ion_free_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@
print(f"mixture-averaged flamespeed = {f.velocity[0]:7f} m/s")

# write the velocity, temperature, density, and mole fractions to a CSV file
f.write_csv('ion_free_flame.csv', quiet=False)
f.save('ion_free_flame.csv', basis="mole")
2 changes: 1 addition & 1 deletion samples/python/onedim/premixed_counterflow_flame.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@
sim.save(output, name="mix", description="solution with mixture-averaged transport")

# write the velocity, temperature, and mole fractions to a CSV file
sim.write_csv("premixed_counterflow_flame.csv", quiet=False)
sim.save("premixed_counterflow_flame.csv", basis="mole")
sim.show_stats()
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 @@ -127,7 +127,7 @@ def solveOpposedFlame(oppFlame, massFlux=0.12, loglevel=1,
print(f"Peak temperature: {T:.1f} K")
print(f"Strain Rate: {K:.1f} 1/s")
print(f"Consumption Speed: {Sc * 100:.2f} cm/s")
oppFlame.write_csv("premixed_counterflow_twin_flame.csv", quiet=False)
oppFlame.save("premixed_counterflow_twin_flame.csv", basis="mole")

# Generate plots to see results, if user desires
if '--plot' in sys.argv:
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 @@ -85,6 +85,6 @@
sim.save(output, name=f"mdot-{m}", description=f"mdot = {md} kg/m2/s")

# write the velocity, temperature, and mole fractions to a CSV file
sim.write_csv(output_path / f"stagnation_flame_{m}.csv", quiet=False)
sim.save(output_path / f"stagnation_flame_{m}.csv", basis="mole")

sim.show_stats()
2 changes: 1 addition & 1 deletion samples/python/surface_chemistry/catalytic_combustion.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@
sim.save(filename, "soln1", description="catalytic combustion example")

# save selected solution components in a CSV file for plotting in Excel or MATLAB.
sim.write_csv('catalytic_combustion.csv', quiet=False)
sim.save('catalytic_combustion.csv', basis="mole")

sim.show_stats(0)

0 comments on commit 9a37030

Please sign in to comment.