Note
Go to the end to download the full example code.
Arc Coverage Model (Basic)#
This example demonstrates the basic usage of ArcCoverageModel for gas coverage calculation without plotting, suitable for quick validation.
==================================================
Arc Coverage Model - Gas Coverage
==================================================
Coverage Fraction: 17.67
Margin: 3.334e-01 m³/s
Constraint Satisfied: Yes
==================================================
✓ All gas is treated by the arc
import openmdao.api as om
from paroto.models.coverage import ArcCoverageModel
# Create OpenMDAO problem
prob = om.Problem()
prob.model.add_subsystem("coverage", ArcCoverageModel())
prob.setup()
# Set parameters for typical operating conditions
prob.set_val("coverage.gap_distance", 0.01) # 10 mm
prob.set_val("coverage.torch_diameter", 0.02) # 20 mm
prob.set_val("coverage.pulse_frequency", 50e3) # 50 kHz
prob.set_val("coverage.flow_velocity", 1.0) # 1 m/s
prob.set_val("coverage.thermal_diameter", 0.003) # 3 mm arc
# Run model
prob.run_model()
# Extract results
coverage = prob.get_val("coverage.coverage_fraction")[0]
margin = prob.get_val("coverage.coverage_margin")[0]
satisfied = prob.get_val("coverage.coverage_constraint_satisfied")[0]
print("=" * 50)
print("Arc Coverage Model - Gas Coverage")
print("=" * 50)
print(f"Coverage Fraction: {coverage:.2f}")
print(f"Margin: {margin:.3e} m³/s")
print(f"Constraint Satisfied: {'Yes' if satisfied > 0.5 else 'No'}")
print("=" * 50)
if coverage >= 1.0:
print("✓ All gas is treated by the arc")
else:
print(f"✗ Only {coverage * 100:.1f}% of gas is treated")
print(" Increase frequency or arc diameter, or reduce velocity")
Total running time of the script: (0 minutes 0.063 seconds)