From 21c6f3cb7274663069f289329724833ad535f944 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Wed, 3 Sep 2025 15:53:13 +0200 Subject: [PATCH] SOC examples updated to use new slicing --- examples/soec_syngas.md | 2 +- examples/sofc_methane.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/soec_syngas.md b/examples/soec_syngas.md index dc51ec7..c389ed3 100644 --- a/examples/soec_syngas.md +++ b/examples/soec_syngas.md @@ -24,7 +24,7 @@ p = 1e5 # Pa fs = gp.fluid_system('H2, H2O, O2, CH4, CO, CO2') feed_fuel = gp.fluid({'H2O': 2, 'CO2': 1}, fs) -o2_full_conv = np.sum(gp.elements(feed_fuel)[['C' ,'O']] * [-1/2, 1/2]) +o2_full_conv = np.sum(gp.elements(feed_fuel).get_n(['C' ,'O']) * [-1/2, 1/2]) feed_air = gp.fluid({'O2': 1, 'N2': 4}) * o2_full_conv * utilization * air_dilution diff --git a/examples/sofc_methane.md b/examples/sofc_methane.md index 03a54a2..5af2fee 100644 --- a/examples/sofc_methane.md +++ b/examples/sofc_methane.md @@ -25,7 +25,7 @@ p = 1e5 # Pa fs = gp.fluid_system('H2, H2O, O2, CH4, CO, CO2') feed_fuel = gp.fluid({'CH4': 1, 'H2O': 0.1}, fs) -o2_full_conv = np.sum(gp.elements(feed_fuel)[['H', 'C' ,'O']] * [1/4, 1, -1/2]) +o2_full_conv = np.sum(gp.elements(feed_fuel).get_n(['H', 'C' ,'O']) * [1/4, 1, -1/2]) feed_air = gp.fluid({'O2': 1, 'N2': 4}) * o2_full_conv * fuel_utilization / air_utilization