Skip to content

Commit

Permalink
[samples] Overwrite existing CSV files
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl authored and speth committed Jul 3, 2023
1 parent 7bdce8f commit 6f2c665
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 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.save('adiabatic_flame.csv', basis="mole")
f.save('adiabatic_flame.csv', basis="mole", overwrite=True)
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.save('burner_flame.csv.csv', basis="mole")
f.save('burner_flame.csv', basis="mole", overwrite=True)
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.save('diffusion_flame.csv', basis="mole")
f.save('diffusion_flame.csv', basis="mole", overwrite=True)

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.save('flame_fixed_T.csv', basis="mole")
f.save('flame_fixed_T.csv', basis="mole", overwrite=True)
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.save(csv_filepath, basis="mole")
f.save(csv_filepath, basis="mole", overwrite=True)

if "native" in ct.hdf_support():
# HDF is not a required dependency
Expand Down
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.save("premixed_counterflow_flame.csv", basis="mole")
sim.save("premixed_counterflow_flame.csv", basis="mole", overwrite=True)
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.save("premixed_counterflow_twin_flame.csv", basis="mole")
oppFlame.save("premixed_counterflow_twin_flame.csv", basis="mole", overwrite=True)

# 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.save(output_path / f"stagnation_flame_{m}.csv", basis="mole")
sim.save(output_path / f"stagnation_flame_{m}.csv", basis="mole", overwrite=True)

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.save('catalytic_combustion.csv', basis="mole")
sim.save('catalytic_combustion.csv', basis="mole", overwrite=True)

sim.show_stats(0)

0 comments on commit 6f2c665

Please sign in to comment.