diff --git a/.DS_Store b/.DS_Store index bca8fe8..8e28051 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/p4/README.md b/p4/README.md new file mode 100644 index 0000000..920df14 --- /dev/null +++ b/p4/README.md @@ -0,0 +1,334 @@ +# Task 4: Environmental Impact Analysis + +## 问题描述 + +> Discuss the impact on the Earth's environment for achieving the 100,000-person Moon Colony under the different scenarios. How would you adjust your model to minimize the environmental impact? + +分析建设月球殖民地对地球环境的影响,并给出最小化环境影响的模型调整策略。 + +--- + +## 模型概述 + +### 燃料参数 (LOX/CH4 液氧甲烷) + +| 参数 | 值 | 说明 | +|------|-----|------| +| 比冲 (Isp) | 360 s | Raptor发动机级别 | +| 排气速度 | 3,532 m/s | | +| 燃料比能量 | 12.9 MJ/kg | | +| 氧燃比 (O₂:CH₄) | 3.5:1 | | +| CH₄质量占比 | 22.2% | | + +### 燃烧化学方程 + +``` +CH₄ + 2O₂ → CO₂ + 2H₂O +``` + +| 排放物 | 每kg燃料产生量 | +|--------|---------------| +| CO₂ | 0.611 kg | +| H₂O | 0.500 kg | + +--- + +## 情景分析结果 + +### 四个基准情景 + +| 情景 | 完成时间 | 总能耗 | 总燃料 | 总CO₂ | 平流层H₂O | 年均CO₂ | +|------|---------|--------|--------|-------|-----------|---------| +| **纯火箭** | 219年 | 123,792 PJ | 9,596 Mt | 12,968 Mt | 1,919 Mt | 59.2 Mt/yr | +| **纯电梯** | 186年 | 15,720 PJ | 69 Mt | 846 Mt | 0 Mt | 4.5 Mt/yr | +| **混合(最短)** | 101年 | 65,363 PJ | 4,445 Mt | 6,414 Mt | 882 Mt | 63.7 Mt/yr | +| **混合(膝点)** | 139年 | 42,519 PJ | 2,438 Mt | 3,856 Mt | 477 Mt | 27.7 Mt/yr | + +### CO₂排放分解 + +| 情景 | 燃烧排放 | 燃料生产 | 电力消耗 | 总计 | +|------|---------|---------|---------|------| +| 纯火箭 | 5,864 Mt | 7,104 Mt | 0 Mt | 12,968 Mt | +| 纯电梯 | 42 Mt | 51 Mt | 752 Mt | 846 Mt | +| 混合(最短) | 2,717 Mt | 3,291 Mt | 407 Mt | 6,414 Mt | +| 混合(膝点) | 1,490 Mt | 1,805 Mt | 561 Mt | 3,856 Mt | + +**关键发现**:燃料生产阶段的CO₂排放占总排放的约55%,是减排的重要目标。 + +--- + +## 可视化分析 + +### 图1:环境影响对比图 + +![环境影响对比](environmental_comparison.png) + +**图表解读**: + +- **左上 (CO₂ Emissions Breakdown)**:展示四种情景的CO₂排放来源分解 + - 红色:燃烧直接排放 - 火箭方案最高(5,864 Mt) + - 青色:燃料生产排放 - 占总排放的主要部分(~55%) + - 蓝色:电力消耗排放 - 仅电梯方案有显著值 + +- **右上 (Water Vapor Emissions)**:水蒸气排放对比 + - 深红色部分表示进入平流层的水蒸气 + - 纯火箭方案注入1,919 Mt到平流层,可能影响臭氧化学 + - 纯电梯方案完全避免了平流层H₂O注入 + +- **左下 (Annual CO₂)**:年均CO₂排放 + - 纯火箭:59.2 Mt/yr(占全球年排放的0.16%) + - 纯电梯:4.5 Mt/yr(占全球的0.01%) + - 显示了不同方案对年度碳预算的影响 + +- **右下 (Carbon Intensity)**:碳强度(kg CO₂/吨载荷) + - 纯火箭:129,683 kg CO₂/ton - 碳效率最低 + - 纯电梯:8,455 kg CO₂/ton - 碳效率最高 + - 膝点方案:38,561 kg CO₂/ton - 平衡选择 + +--- + +### 图2:Pareto环境分析 + +![Pareto环境分析](pareto_environmental.png) + +**图表解读**: + +- **左图 (Time vs CO₂)**:完成时间与CO₂排放的权衡 + - 颜色表示电梯使用比例(绿色=高电梯比例) + - 红色虚线:膝点(139年)- 边际收益开始递减 + - 绿色虚线:纯电梯点(186年)- 最低排放 + - **关键洞察**:延长工期可显著降低CO₂,但存在边际效应 + +- **右图 (Energy vs CO₂)**:能量消耗与CO₂排放关系 + - 颜色表示完成年限 + - 呈现近似线性关系,说明能耗与排放强相关 + - 低能耗方案(电梯为主)同时也是低排放方案 + +--- + +### 图3:Pareto膝点分析 + +![Pareto膝点分析](pareto_knee_analysis.png) + +**图表解读**: + +此图展示了在时间-能量-环境三目标优化中的膝点检测: + +- **曲线走势**:随着工期延长,总能耗和CO₂排放均下降 +- **膝点位置**:约139年处,曲线斜率发生明显变化 +- **决策意义**: + - 101-139年:每延长1年,减排效果显著 + - 139-186年:继续延长的边际减排收益递减 + - **建议**:139年是时间与环境影响的最佳平衡点 + +--- + +### 图4:3D Pareto前沿 + +![3D Pareto](pareto_3d.png) + +**图表解读**: + +三维可视化展示时间、能量、CO₂三目标的权衡关系: + +- **X轴**:完成时间(年) +- **Y轴**:总能耗(PJ) +- **Z轴**:CO₂排放(Mt) + +**空间分布特征**: +- 点云呈现明显的"膝部"弯曲 +- 颜色越深(紫色→黄色)表示工期越长 +- 最优解位于"膝部"区域,兼顾三个目标 + +--- + +### 图5:减排策略对比 + +![减排策略](mitigation_strategies.png) + +**图表解读**: + +基于膝点方案(139年)的不同减排策略效果: + +| 策略 | CO₂总量 | 相对减排 | +|------|---------|---------| +| 基准(膝点) | 3,856 Mt | 0% | +| +50%可再生能源 | 3,575 Mt | -7.3% | +| +100%可再生能源 | 3,295 Mt | -14.6% | +| 纯电梯(186年) | 846 Mt | -78.1% | +| 纯电梯+100%可再生 | 94 Mt | **-97.6%** | + +**关键洞察**: +1. **电梯优先是最有效的减排策略**(减排70-97%) +2. 可再生能源主要影响电力消耗部分(减排5-15%) +3. 组合策略可实现近乎零排放(94 Mt vs 基准12,968 Mt) + +--- + +### 图6:决策分析图 + +![决策分析](decision_analysis.png) + +**图表解读**: + +决策支持分析,帮助在多目标间做出权衡: + +- 展示不同决策点的综合评估 +- 考虑时间、成本、环境影响的多维权衡 +- 标注推荐决策区域 + +**决策建议**: +- 若**时间优先**:选择101年混合方案(环境代价最高) +- 若**环境优先**:选择186年纯电梯方案(时间最长) +- 若**平衡考虑**:选择139年膝点方案(最佳权衡) + +--- + +### 图7:决策图表 + +![决策图表](decision_chart.png) + +**图表解读**: + +简化的决策流程图,展示: + +- 各方案的核心指标对比 +- 决策路径和推荐选择 +- 关键权衡点的可视化 + +--- + +### 图8:综合汇总图 + +![综合汇总](comprehensive_summary.png) + +**图表解读**: + +**顶部雷达图**:多维指标综合对比 +- 五个维度:时间(反向)、能量(反向)、CO₂(反向)、发射次数(反向)、平流层H₂O(反向) +- 外围=更优,内部=较差 +- **纯电梯(绿色)**在所有环境维度上表现最优 +- **纯火箭(红色)**环境指标最差,但时间维度较好 + +**中部数据表**:关键数据汇总 +- 绿色高亮:该列最优值 +- 纯电梯在能耗、CO₂、平流层H₂O上均为最优 +- 混合方案(Min Time)完成时间最短 + +**底部结论**: +1. 纯火箭方案CO₂排放最高(12,968 Mt),年均59.2 Mt/yr +2. 纯电梯方案CO₂最低(846 Mt),减排93.5% +3. 膝点方案(139年)提供最佳时间-环境权衡 +4. 推荐策略:优先电梯+可再生能源+低纬度发射 + +--- + +## 环境影响量化 + +### 1. 气候影响 (CO₂) + +| 情景 | 总CO₂ | 年均CO₂ | 占全球年排放比例 | +|------|------|--------|-----------------| +| 纯火箭 | 12,968 Mt | 59.2 Mt/yr | 0.16% | +| 纯电梯 | 846 Mt | 4.5 Mt/yr | 0.01% | +| 混合(膝点) | 3,856 Mt | 27.7 Mt/yr | 0.07% | + +*全球年CO₂排放约37,000 Mt (2023)* + +### 2. 平流层影响 (H₂O) + +| 情景 | 平流层H₂O注入 | 滞留时间 | 潜在影响 | +|------|--------------|---------|---------| +| 纯火箭 | 1,919 Mt | ~3年 | 温室效应、臭氧化学 | +| 纯电梯 | 0 Mt | - | 无 | +| 混合(膝点) | 477 Mt | ~3年 | 较小 | + +**重要**:电梯方案完全避免了平流层水蒸气注入问题。 + +### 3. 相对影响评估 + +| 指标 | 纯火箭 (基准) | 纯电梯 | 减少比例 | +|------|--------------|--------|---------| +| CO₂排放 | 12,968 Mt | 846 Mt | **-93.5%** | +| 平流层H₂O | 1,919 Mt | 0 Mt | **-100%** | +| 燃料消耗 | 9,596 Mt | 69 Mt | **-99.3%** | + +--- + +## 模型调整建议 + +### 修改后的目标函数 + +**原始** (任务一): +``` +min(α×Time + β×Energy) +``` + +**修改后** (含环境约束): +``` +min(α×Time + β×Energy + γ×CO₂_total + δ×H₂O_stratosphere) +``` + +其中 γ、δ 为环境成本权重。 + +### 量化减排路径 + +| 措施 | CO₂减排效果 | 实施难度 | +|------|------------|---------| +| 优先使用电梯 | 70-93% | 中 (需等待电梯建成) | +| 使用可再生能源供电 | 5-15% | 低 | +| 仅用低纬度发射场 | 3-5% | 低 | +| 绿色甲烷生产 | 15-25% | 中 | +| 延长工期 | 按比例 | 低 | + +### 最优策略组合 + +``` +推荐方案: 纯电梯 + 100%可再生能源 +- 完成时间: 186年 +- CO₂总排放: 94 Mt (相比纯火箭减少99.3%) +- 平流层H₂O: 0 Mt +- 代价: 比最短方案多85年 +``` + +--- + +## 结论 + +1. **纯火箭方案环境影响最大**:12,968 Mt CO₂ + 1,919 Mt平流层水蒸气 + +2. **纯电梯方案环境影响最小**:仅846 Mt CO₂,无平流层影响 + +3. **混合方案提供权衡**:膝点方案(139年)在时间和环境间取得平衡 + +4. **关键减排途径**: + - 优先电梯运输(减少93%+ CO₂) + - 使用可再生能源(减少电力排放) + - 绿色燃料生产(减少生产排放) + +5. **模型调整**:在目标函数中加入环境成本权重,可通过调节γ、δ参数获得不同环境约束下的最优解。 + +--- + +## 运行方法 + +```bash +cd p4 +python environmental_impact.py +``` + +## 输出文件 + +| 文件名 | 描述 | +|--------|------| +| `environmental_comparison.png` | 环境影响对比图(CO₂分解、H₂O排放、碳强度) | +| `pareto_environmental.png` | Pareto前沿分析(时间-CO₂-能量权衡) | +| `pareto_knee_analysis.png` | 膝点检测分析 | +| `pareto_3d.png` | 三维Pareto可视化 | +| `mitigation_strategies.png` | 减排策略对比 | +| `decision_analysis.png` | 决策分析图 | +| `decision_chart.png` | 决策流程图 | +| `comprehensive_summary.png` | 综合汇总图(雷达图+表格+结论) | +| `environmental_report.txt` | 详细文字报告 | +| `scenario_comparison.csv` | 数据表 | +| `pareto_front_data.csv` | Pareto前沿数据 | diff --git a/p4/__pycache__/environmental_impact.cpython-313.pyc b/p4/__pycache__/environmental_impact.cpython-313.pyc new file mode 100644 index 0000000..d826e35 Binary files /dev/null and b/p4/__pycache__/environmental_impact.cpython-313.pyc differ diff --git a/p4/comprehensive_summary.png b/p4/comprehensive_summary.png new file mode 100644 index 0000000..9895e75 Binary files /dev/null and b/p4/comprehensive_summary.png differ diff --git a/p4/decision_analysis.png b/p4/decision_analysis.png new file mode 100644 index 0000000..f92dcb8 Binary files /dev/null and b/p4/decision_analysis.png differ diff --git a/p4/decision_chart.png b/p4/decision_chart.png new file mode 100644 index 0000000..931515b Binary files /dev/null and b/p4/decision_chart.png differ diff --git a/p4/environmental_comparison.png b/p4/environmental_comparison.png new file mode 100644 index 0000000..7bb4668 Binary files /dev/null and b/p4/environmental_comparison.png differ diff --git a/p4/environmental_impact.py b/p4/environmental_impact.py new file mode 100644 index 0000000..d56e5da --- /dev/null +++ b/p4/environmental_impact.py @@ -0,0 +1,1101 @@ +""" +Task 4: Environmental Impact Analysis for Moon Colony Construction +使用液氧甲烷(LOX/CH4)燃料的环境影响评估 + +分析不同建设方案对地球环境的影响,并给出最小化环境影响的模型调整策略。 +""" + +import numpy as np +import matplotlib +matplotlib.use('Agg') +import matplotlib.pyplot as plt +from matplotlib import rcParams +from dataclasses import dataclass +from typing import List, Dict, Tuple +import pandas as pd + +# 设置字体 +rcParams['font.sans-serif'] = ['Arial Unicode MS', 'DejaVu Sans', 'SimHei'] +rcParams['axes.unicode_minus'] = False + +# ============== 物理常数 ============== +G0 = 9.81 # m/s² +OMEGA_EARTH = 7.27e-5 # rad/s +R_EARTH = 6.371e6 # m + +# ============== 任务参数 (与任务一一致) ============== +TOTAL_PAYLOAD = 100e6 # 100 million metric tons + +# ============== 太空电梯参数 ============== +NUM_ELEVATORS = 3 +ELEVATOR_CAPACITY_PER_YEAR = 179000 # metric tons per elevator per year +TOTAL_ELEVATOR_CAPACITY = NUM_ELEVATORS * ELEVATOR_CAPACITY_PER_YEAR # 537,000 tons/year +ELEVATOR_SPECIFIC_ENERGY = 157.2e9 # J per metric ton (157.2 MJ/kg) + +# 电梯能量分解 +ELEVATOR_LIFT_ENERGY = 57.0e9 # J/ton (电力提升能) +ELEVATOR_TOP_ROCKET_ENERGY = 100.2e9 # J/ton (顶端火箭推进) + +# ============== 液氧甲烷燃料参数 (LOX/CH4) ============== +@dataclass +class MethaneFuelParams: + """液氧甲烷燃料参数""" + name: str = "LOX/CH4" + isp: float = 360 # 比冲 (秒), Raptor发动机级别 + specific_energy: float = 12.9e6 # 燃料比能量 (J/kg) + ox_fuel_ratio: float = 3.5 # 氧燃比 O2:CH4 + + @property + def exhaust_velocity(self) -> float: + """排气速度 (m/s)""" + return self.isp * G0 + + @property + def ch4_mass_fraction(self) -> float: + """甲烷在燃料中的质量分数""" + return 1 / (1 + self.ox_fuel_ratio) # ≈ 0.222 + + @property + def lox_mass_fraction(self) -> float: + """液氧在燃料中的质量分数""" + return self.ox_fuel_ratio / (1 + self.ox_fuel_ratio) # ≈ 0.778 + + +# ============== 排放因子 (基于化学计量) ============== +@dataclass +class EmissionFactors: + """排放因子 (kg排放物/kg燃料)""" + # 燃烧排放: CH4 + 2O2 → CO2 + 2H2O + # 每kg CH4产生: 44/16 = 2.75 kg CO2, 36/16 = 2.25 kg H2O + + fuel_params: MethaneFuelParams = None + + def __post_init__(self): + if self.fuel_params is None: + self.fuel_params = MethaneFuelParams() + + @property + def co2_per_kg_fuel(self) -> float: + """每kg燃料的CO2排放 (kg)""" + return self.fuel_params.ch4_mass_fraction * 2.75 # ≈ 0.611 kg CO2/kg燃料 + + @property + def h2o_per_kg_fuel(self) -> float: + """每kg燃料的H2O排放 (kg)""" + return self.fuel_params.ch4_mass_fraction * 2.25 # ≈ 0.500 kg H2O/kg燃料 + + # 燃料生产排放 + ch4_production_co2: float = 2.5 # kg CO2/kg CH4 (天然气制甲烷,含开采和加工) + lox_production_kwh: float = 0.5 # kWh/kg LOX (空气分离) + + # 电网碳强度 + grid_carbon_intensity: float = 0.475 # kg CO2/kWh (全球平均, IEA 2023) + grid_carbon_intensity_renewable: float = 0.05 # kg CO2/kWh (可再生能源) + + # 平流层排放比例 + stratosphere_emission_fraction: float = 0.40 # 40%的排放进入平流层 + stratosphere_h2o_residence_time: float = 3.0 # 年 (平流层水蒸气滞留时间) + + +# ============== 发射场定义 ============== +@dataclass +class LaunchSite: + name: str + short_name: str + latitude: float + max_launches_per_day: int = 1 + + @property + def abs_latitude(self) -> float: + return abs(self.latitude) + + @property + def rotation_velocity(self) -> float: + return OMEGA_EARTH * R_EARTH * np.cos(np.radians(self.abs_latitude)) + + @property + def delta_v_loss(self) -> float: + v_equator = OMEGA_EARTH * R_EARTH + return v_equator - self.rotation_velocity + + +# 10个发射场 (按纬度排序) +LAUNCH_SITES = sorted([ + LaunchSite("Kourou (French Guiana)", "Kourou", 5.2), + LaunchSite("Satish Dhawan (India)", "SDSC", 13.7), + LaunchSite("Boca Chica (Texas)", "Texas", 26.0), + LaunchSite("Cape Canaveral (Florida)", "Florida", 28.5), + LaunchSite("Vandenberg (California)", "California", 34.7), + LaunchSite("Wallops (Virginia)", "Virginia", 37.8), + LaunchSite("Taiyuan (China)", "Taiyuan", 38.8), + LaunchSite("Mahia (New Zealand)", "Mahia", 39.3), + LaunchSite("Baikonur (Kazakhstan)", "Baikonur", 45.6), + LaunchSite("Kodiak (Alaska)", "Alaska", 57.4), +], key=lambda x: x.abs_latitude) + + +# ============== 火箭参数 ============== +PAYLOAD_PER_LAUNCH = 125 # metric tons per launch +ALPHA = 0.10 # 结构系数 +NUM_STAGES = 3 +DELTA_V_BASE = 13300 # m/s (赤道发射到月球) + +FUEL_PARAMS = MethaneFuelParams() +EMISSION_FACTORS = EmissionFactors(fuel_params=FUEL_PARAMS) + + +# ============== 核心计算函数 ============== + +def fuel_ratio_multistage(delta_v: float, fuel_params: MethaneFuelParams = FUEL_PARAMS) -> float: + """多级火箭燃料/载荷比""" + ve = fuel_params.exhaust_velocity + delta_v_per_stage = delta_v / NUM_STAGES + R_stage = np.exp(delta_v_per_stage / ve) + + denominator = 1 - ALPHA * (R_stage - 1) + if denominator <= 0: + return np.inf + + k_stage = (R_stage - 1) / denominator + + total_fuel_ratio = 0 + remaining_ratio = 1.0 + + for _ in range(NUM_STAGES): + fuel_this_stage = remaining_ratio * k_stage + total_fuel_ratio += fuel_this_stage + remaining_ratio *= (1 + k_stage * (1 + ALPHA)) + + return total_fuel_ratio + + +def rocket_fuel_per_ton(site: LaunchSite) -> float: + """每吨载荷的燃料消耗 (kg燃料/ton载荷)""" + delta_v = DELTA_V_BASE + site.delta_v_loss + k = fuel_ratio_multistage(delta_v) + return k * 1000 # kg fuel per metric ton payload + + +def rocket_energy_per_ton(site: LaunchSite) -> float: + """火箭发射每吨载荷的能量消耗 (J/ton)""" + return rocket_fuel_per_ton(site) * FUEL_PARAMS.specific_energy + + +# ============== 环境影响计算 ============== + +@dataclass +class EnvironmentalImpact: + """环境影响结果""" + scenario_name: str + completion_years: float + total_payload_tons: float + + # 能量消耗 + total_energy_PJ: float + rocket_energy_PJ: float + elevator_energy_PJ: float + + # 燃料消耗 + total_fuel_Mt: float # 百万吨 + rocket_fuel_Mt: float + elevator_top_rocket_fuel_Mt: float + + # 排放量 + co2_combustion_Mt: float # 燃烧直接排放 + co2_fuel_production_Mt: float # 燃料生产排放 + co2_electricity_Mt: float # 电力消耗排放 + h2o_total_Mt: float + h2o_stratosphere_Mt: float # 平流层水蒸气 + + # 发射统计 + rocket_launches: int + + @property + def co2_total_Mt(self) -> float: + """总CO2排放 (百万吨)""" + return self.co2_combustion_Mt + self.co2_fuel_production_Mt + self.co2_electricity_Mt + + @property + def co2_per_ton_payload(self) -> float: + """每吨载荷的CO2排放 (kg)""" + return self.co2_total_Mt * 1e9 / self.total_payload_tons + + @property + def annual_co2_Mt(self) -> float: + """年均CO2排放 (百万吨/年)""" + return self.co2_total_Mt / self.completion_years if self.completion_years > 0 else 0 + + +def calculate_scenario_impact( + scenario_name: str, + completion_years: float, + elevator_fraction: float, + rocket_sites_used: List[LaunchSite], + emission_factors: EmissionFactors = EMISSION_FACTORS, + renewable_energy_fraction: float = 0.0 +) -> EnvironmentalImpact: + """ + 计算单个情景的环境影响 + + 参数: + scenario_name: 情景名称 + completion_years: 完成年限 + elevator_fraction: 电梯运输比例 (0-1) + rocket_sites_used: 使用的火箭发射场列表 + emission_factors: 排放因子 + renewable_energy_fraction: 可再生能源占比 (0-1) + """ + # 载荷分配 + elevator_payload = TOTAL_PAYLOAD * elevator_fraction + rocket_payload = TOTAL_PAYLOAD * (1 - elevator_fraction) + + # ===== 电梯部分 ===== + elevator_energy = elevator_payload * ELEVATOR_SPECIFIC_ENERGY # J + elevator_lift_energy = elevator_payload * ELEVATOR_LIFT_ENERGY # J (电力) + elevator_top_rocket_energy = elevator_payload * ELEVATOR_TOP_ROCKET_ENERGY # J (化学能) + + # 电梯顶端火箭燃料 (使用较小的燃料比,因为已在高轨道) + # 顶端ΔV约1800 m/s (LOI + 轨道调整) + elevator_top_delta_v = 1800 + elevator_top_fuel_ratio = fuel_ratio_multistage(elevator_top_delta_v) + elevator_top_rocket_fuel = elevator_payload * 1000 * elevator_top_fuel_ratio # kg + + # ===== 火箭部分 ===== + if rocket_payload > 0 and len(rocket_sites_used) > 0: + launches_per_site = int(np.ceil(rocket_payload / PAYLOAD_PER_LAUNCH / len(rocket_sites_used))) + total_launches = launches_per_site * len(rocket_sites_used) + + # 按发射场计算燃料消耗 (简化:均匀分配) + rocket_fuel_total = 0 + rocket_energy_total = 0 + for site in rocket_sites_used: + site_payload = rocket_payload / len(rocket_sites_used) + site_fuel = site_payload * 1000 * fuel_ratio_multistage(DELTA_V_BASE + site.delta_v_loss) + rocket_fuel_total += site_fuel + rocket_energy_total += site_fuel * FUEL_PARAMS.specific_energy + else: + total_launches = 0 + rocket_fuel_total = 0 + rocket_energy_total = 0 + + # ===== 总燃料消耗 ===== + total_fuel = rocket_fuel_total + elevator_top_rocket_fuel # kg + + # ===== 排放计算 ===== + # 1. 燃烧直接排放 + co2_combustion = total_fuel * emission_factors.co2_per_kg_fuel # kg + h2o_combustion = total_fuel * emission_factors.h2o_per_kg_fuel # kg + + # 2. 燃料生产排放 + ch4_mass = total_fuel * FUEL_PARAMS.ch4_mass_fraction + lox_mass = total_fuel * FUEL_PARAMS.lox_mass_fraction + + co2_ch4_production = ch4_mass * emission_factors.ch4_production_co2 + co2_lox_production = lox_mass * emission_factors.lox_production_kwh * emission_factors.grid_carbon_intensity + co2_fuel_production = co2_ch4_production + co2_lox_production + + # 3. 电梯电力消耗排放 + elevator_electricity_kwh = elevator_lift_energy / 3.6e6 # J -> kWh + grid_intensity = (emission_factors.grid_carbon_intensity * (1 - renewable_energy_fraction) + + emission_factors.grid_carbon_intensity_renewable * renewable_energy_fraction) + co2_electricity = elevator_electricity_kwh * grid_intensity + + # 4. 平流层水蒸气 (仅火箭发射部分) + # 电梯顶端释放点已在GEO以上,不经过平流层 + h2o_rocket = rocket_fuel_total * emission_factors.h2o_per_kg_fuel + h2o_stratosphere = h2o_rocket * emission_factors.stratosphere_emission_fraction + + return EnvironmentalImpact( + scenario_name=scenario_name, + completion_years=completion_years, + total_payload_tons=TOTAL_PAYLOAD, + total_energy_PJ=(rocket_energy_total + elevator_energy) / 1e15, + rocket_energy_PJ=rocket_energy_total / 1e15, + elevator_energy_PJ=elevator_energy / 1e15, + total_fuel_Mt=total_fuel / 1e9, + rocket_fuel_Mt=rocket_fuel_total / 1e9, + elevator_top_rocket_fuel_Mt=elevator_top_rocket_fuel / 1e9, + co2_combustion_Mt=co2_combustion / 1e9, + co2_fuel_production_Mt=co2_fuel_production / 1e9, + co2_electricity_Mt=co2_electricity / 1e9, + h2o_total_Mt=h2o_combustion / 1e9, + h2o_stratosphere_Mt=h2o_stratosphere / 1e9, + rocket_launches=total_launches + ) + + +# ============== 情景定义 ============== + +def define_scenarios() -> List[Dict]: + """ + 定义四个基准情景 (基于任务一结果) + """ + scenarios = [] + + # 情景1: 纯火箭 (全部10个发射场) + rocket_only_years = TOTAL_PAYLOAD / (len(LAUNCH_SITES) * 365 * PAYLOAD_PER_LAUNCH) + scenarios.append({ + 'name': 'Rocket Only', + 'completion_years': rocket_only_years, # ~219年 + 'elevator_fraction': 0.0, + 'rocket_sites': LAUNCH_SITES.copy(), + 'description': '纯火箭方案:10个发射场满负荷' + }) + + # 情景2: 纯电梯 + elevator_only_years = TOTAL_PAYLOAD / TOTAL_ELEVATOR_CAPACITY + scenarios.append({ + 'name': 'Elevator Only', + 'completion_years': elevator_only_years, # ~186年 + 'elevator_fraction': 1.0, + 'rocket_sites': [], + 'description': '纯电梯方案:3个电梯满负荷' + }) + + # 情景3: 混合方案 (最短时间) + combined_capacity = TOTAL_ELEVATOR_CAPACITY + len(LAUNCH_SITES) * 365 * PAYLOAD_PER_LAUNCH + combined_min_years = TOTAL_PAYLOAD / combined_capacity + elevator_payload_min = TOTAL_ELEVATOR_CAPACITY * combined_min_years + elevator_fraction_min = elevator_payload_min / TOTAL_PAYLOAD + scenarios.append({ + 'name': 'Combined (Min Time)', + 'completion_years': combined_min_years, # ~101年 + 'elevator_fraction': elevator_fraction_min, # ~54% + 'rocket_sites': LAUNCH_SITES.copy(), + 'description': '混合方案(最短时间):电梯+全部火箭站点' + }) + + # 情景4: 混合方案 (膝点优化) + knee_years = 139 # 从任务一Pareto分析 + elevator_payload_knee = min(TOTAL_ELEVATOR_CAPACITY * knee_years, TOTAL_PAYLOAD) + elevator_fraction_knee = elevator_payload_knee / TOTAL_PAYLOAD + # 膝点时只需要部分低纬度发射场 + scenarios.append({ + 'name': 'Combined (Knee Point)', + 'completion_years': knee_years, + 'elevator_fraction': elevator_fraction_knee, # ~74.6% + 'rocket_sites': LAUNCH_SITES[:5], # 只使用5个低纬度站点 + 'description': '混合方案(膝点):电梯优先+低纬度火箭' + }) + + return scenarios + + +def analyze_all_scenarios(renewable_fraction: float = 0.0) -> pd.DataFrame: + """分析所有情景""" + scenarios = define_scenarios() + results = [] + + for scenario in scenarios: + impact = calculate_scenario_impact( + scenario_name=scenario['name'], + completion_years=scenario['completion_years'], + elevator_fraction=scenario['elevator_fraction'], + rocket_sites_used=scenario['rocket_sites'], + renewable_energy_fraction=renewable_fraction + ) + + results.append({ + 'Scenario': impact.scenario_name, + 'Years': impact.completion_years, + 'Elevator %': impact.elevator_energy_PJ / impact.total_energy_PJ * 100 if impact.total_energy_PJ > 0 else 0, + 'Energy (PJ)': impact.total_energy_PJ, + 'Fuel (Mt)': impact.total_fuel_Mt, + 'CO2 Total (Mt)': impact.co2_total_Mt, + 'CO2 Combustion (Mt)': impact.co2_combustion_Mt, + 'CO2 Production (Mt)': impact.co2_fuel_production_Mt, + 'CO2 Electricity (Mt)': impact.co2_electricity_Mt, + 'H2O Total (Mt)': impact.h2o_total_Mt, + 'H2O Stratosphere (Mt)': impact.h2o_stratosphere_Mt, + 'Annual CO2 (Mt/yr)': impact.annual_co2_Mt, + 'CO2/ton (kg)': impact.co2_per_ton_payload, + 'Launches': impact.rocket_launches, + }) + + return pd.DataFrame(results) + + +# ============== 模型优化:环境约束优化 ============== + +def optimize_for_environment( + max_annual_co2_Mt: float = 50.0, + min_completion_years: float = 100.0, + renewable_fraction: float = 0.5 +) -> Dict: + """ + 带环境约束的优化模型 + + 目标: 最小化 总CO2排放 + 约束: + - 完成时间 >= min_completion_years + - 年均CO2 <= max_annual_co2_Mt + + 决策变量: + - 电梯运输比例 (0-1) + - 使用的火箭站点数量 (0-10) + """ + best_result = None + best_co2 = float('inf') + + # 网格搜索 + for elevator_frac in np.linspace(0, 1, 21): + for n_sites in range(0, 11): + # 计算完成时间 + elevator_capacity = TOTAL_ELEVATOR_CAPACITY + rocket_capacity = n_sites * 365 * PAYLOAD_PER_LAUNCH if n_sites > 0 else 0 + + elevator_payload = TOTAL_PAYLOAD * elevator_frac + rocket_payload = TOTAL_PAYLOAD * (1 - elevator_frac) + + if elevator_frac == 1.0: + years = elevator_payload / elevator_capacity if elevator_capacity > 0 else float('inf') + elif elevator_frac == 0.0: + years = rocket_payload / rocket_capacity if rocket_capacity > 0 else float('inf') + else: + # 电梯和火箭并行 + elevator_years = elevator_payload / elevator_capacity + rocket_years = rocket_payload / rocket_capacity if rocket_capacity > 0 else float('inf') + years = max(elevator_years, rocket_years) + + if years < min_completion_years: + continue + + # 计算环境影响 + sites_used = LAUNCH_SITES[:n_sites] if n_sites > 0 else [] + impact = calculate_scenario_impact( + scenario_name='Optimization', + completion_years=years, + elevator_fraction=elevator_frac, + rocket_sites_used=sites_used, + renewable_energy_fraction=renewable_fraction + ) + + # 检查约束 + if impact.annual_co2_Mt > max_annual_co2_Mt: + continue + + # 更新最优解 + if impact.co2_total_Mt < best_co2: + best_co2 = impact.co2_total_Mt + best_result = { + 'elevator_fraction': elevator_frac, + 'n_sites': n_sites, + 'years': years, + 'impact': impact + } + + return best_result + + +# ============== 可视化 ============== + +def plot_environmental_comparison(save_dir: str = '/Volumes/Files/code/mm/20260130_b/p4'): + """绘制环境影响对比图""" + df = analyze_all_scenarios() + + fig, axes = plt.subplots(2, 2, figsize=(14, 12)) + + scenarios = df['Scenario'].tolist() + x = np.arange(len(scenarios)) + width = 0.6 + + # ========== 图1: CO2排放分解 ========== + ax1 = axes[0, 0] + + co2_combustion = df['CO2 Combustion (Mt)'].values + co2_production = df['CO2 Production (Mt)'].values + co2_electricity = df['CO2 Electricity (Mt)'].values + + bars1 = ax1.bar(x, co2_combustion, width, label='Combustion', color='#FF6B6B') + bars2 = ax1.bar(x, co2_production, width, bottom=co2_combustion, label='Fuel Production', color='#4ECDC4') + bars3 = ax1.bar(x, co2_electricity, width, bottom=co2_combustion+co2_production, + label='Electricity', color='#45B7D1') + + ax1.set_ylabel('CO₂ Emissions (Mt)', fontsize=12) + ax1.set_title('CO₂ Emissions Breakdown by Scenario', fontsize=14) + ax1.set_xticks(x) + ax1.set_xticklabels(scenarios, rotation=15, ha='right') + ax1.legend() + ax1.grid(True, alpha=0.3, axis='y') + + # 添加总量标签 + totals = df['CO2 Total (Mt)'].values + for i, total in enumerate(totals): + ax1.text(i, total + 50, f'{total:.0f}', ha='center', fontsize=10, fontweight='bold') + + # ========== 图2: 平流层水蒸气 ========== + ax2 = axes[0, 1] + + h2o_surface = df['H2O Total (Mt)'].values - df['H2O Stratosphere (Mt)'].values + h2o_strat = df['H2O Stratosphere (Mt)'].values + + bars1 = ax2.bar(x, h2o_surface, width, label='Troposphere', color='#96CEB4') + bars2 = ax2.bar(x, h2o_strat, width, bottom=h2o_surface, label='Stratosphere', color='#D4A5A5') + + ax2.set_ylabel('H₂O Emissions (Mt)', fontsize=12) + ax2.set_title('Water Vapor Emissions\n(Stratospheric emissions have climate impact)', fontsize=14) + ax2.set_xticks(x) + ax2.set_xticklabels(scenarios, rotation=15, ha='right') + ax2.legend() + ax2.grid(True, alpha=0.3, axis='y') + + # ========== 图3: 年均CO2排放 ========== + ax3 = axes[1, 0] + + annual_co2 = df['Annual CO2 (Mt/yr)'].values + colors = ['#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4'] + + bars = ax3.bar(x, annual_co2, width, color=colors) + + # 添加参考线:全球年排放量的比例 + global_annual_co2 = 37000 # Mt/yr (2023年全球CO2排放) + for i, val in enumerate(annual_co2): + pct = val / global_annual_co2 * 100 + ax3.text(i, val + 1, f'{val:.1f}\n({pct:.2f}%)', ha='center', fontsize=9) + + ax3.set_ylabel('Annual CO₂ (Mt/yr)', fontsize=12) + ax3.set_title('Annual CO₂ Emissions\n(% of global annual emissions shown)', fontsize=14) + ax3.set_xticks(x) + ax3.set_xticklabels(scenarios, rotation=15, ha='right') + ax3.grid(True, alpha=0.3, axis='y') + + # ========== 图4: 能效对比 (CO2/ton) ========== + ax4 = axes[1, 1] + + co2_per_ton = df['CO2/ton (kg)'].values + + bars = ax4.bar(x, co2_per_ton, width, color=colors) + + ax4.set_ylabel('CO₂ per ton payload (kg)', fontsize=12) + ax4.set_title('Carbon Intensity: CO₂ Emissions per Ton Payload', fontsize=14) + ax4.set_xticks(x) + ax4.set_xticklabels(scenarios, rotation=15, ha='right') + ax4.grid(True, alpha=0.3, axis='y') + + for bar, val in zip(bars, co2_per_ton): + ax4.text(bar.get_x() + bar.get_width()/2, bar.get_height() + 5, + f'{val:.0f}', ha='center', fontsize=10, fontweight='bold') + + plt.tight_layout() + plt.savefig(f'{save_dir}/environmental_comparison.png', dpi=150, bbox_inches='tight') + print(f"环境影响对比图已保存至: {save_dir}/environmental_comparison.png") + + return df + + +def plot_pareto_with_environment(save_dir: str = '/Volumes/Files/code/mm/20260130_b/p4'): + """绘制时间-能量-环境三目标Pareto图""" + + fig, axes = plt.subplots(1, 2, figsize=(14, 6)) + + # 生成Pareto数据 + years_range = np.linspace(101, 220, 50) + + results = [] + for years in years_range: + # 计算电梯运输比例 + elevator_payload = min(TOTAL_ELEVATOR_CAPACITY * years, TOTAL_PAYLOAD) + elevator_frac = elevator_payload / TOTAL_PAYLOAD + + # 确定使用的发射场 + rocket_payload = TOTAL_PAYLOAD - elevator_payload + if rocket_payload > 0: + rocket_capacity_per_site = 365 * years * PAYLOAD_PER_LAUNCH + n_sites_needed = int(np.ceil(rocket_payload / rocket_capacity_per_site)) + n_sites_needed = min(n_sites_needed, 10) + sites = LAUNCH_SITES[:n_sites_needed] + else: + sites = [] + + impact = calculate_scenario_impact( + scenario_name=f'{years:.0f}yr', + completion_years=years, + elevator_fraction=elevator_frac, + rocket_sites_used=sites + ) + + results.append({ + 'Years': years, + 'Energy (PJ)': impact.total_energy_PJ, + 'CO2 (Mt)': impact.co2_total_Mt, + 'Elevator %': elevator_frac * 100 + }) + + df = pd.DataFrame(results) + + # ========== 图1: 时间 vs CO2 ========== + ax1 = axes[0] + + scatter = ax1.scatter(df['Years'], df['CO2 (Mt)'], c=df['Elevator %'], + cmap='RdYlGn', s=50, alpha=0.8) + plt.colorbar(scatter, ax=ax1, label='Elevator %') + + ax1.set_xlabel('Completion Time (years)', fontsize=12) + ax1.set_ylabel('Total CO₂ Emissions (Mt)', fontsize=12) + ax1.set_title('Pareto Front: Time vs CO₂ Emissions\n(Color: Elevator Usage)', fontsize=14) + ax1.grid(True, alpha=0.3) + + # 标记关键点 + ax1.axvline(x=139, color='red', linestyle='--', alpha=0.7, label='Knee Point (139yr)') + ax1.axvline(x=186, color='green', linestyle='--', alpha=0.7, label='Elevator Only (186yr)') + ax1.legend() + + # ========== 图2: 能量 vs CO2 ========== + ax2 = axes[1] + + scatter = ax2.scatter(df['Energy (PJ)'], df['CO2 (Mt)'], c=df['Years'], + cmap='viridis', s=50, alpha=0.8) + plt.colorbar(scatter, ax=ax2, label='Years') + + ax2.set_xlabel('Total Energy (PJ)', fontsize=12) + ax2.set_ylabel('Total CO₂ Emissions (Mt)', fontsize=12) + ax2.set_title('Pareto Front: Energy vs CO₂ Emissions\n(Color: Completion Time)', fontsize=14) + ax2.grid(True, alpha=0.3) + + plt.tight_layout() + plt.savefig(f'{save_dir}/pareto_environmental.png', dpi=150, bbox_inches='tight') + print(f"Pareto环境分析图已保存至: {save_dir}/pareto_environmental.png") + + return df + + +def plot_mitigation_strategies(save_dir: str = '/Volumes/Files/code/mm/20260130_b/p4'): + """绘制减排策略对比图""" + + # 基准情景 (混合膝点) + baseline = calculate_scenario_impact( + scenario_name='Baseline', + completion_years=139, + elevator_fraction=0.746, + rocket_sites_used=LAUNCH_SITES[:5], + renewable_energy_fraction=0.0 + ) + + # 策略1: 50%可再生能源 + strategy1 = calculate_scenario_impact( + scenario_name='50% Renewable', + completion_years=139, + elevator_fraction=0.746, + rocket_sites_used=LAUNCH_SITES[:5], + renewable_energy_fraction=0.5 + ) + + # 策略2: 100%可再生能源 + strategy2 = calculate_scenario_impact( + scenario_name='100% Renewable', + completion_years=139, + elevator_fraction=0.746, + rocket_sites_used=LAUNCH_SITES[:5], + renewable_energy_fraction=1.0 + ) + + # 策略3: 延长工期到纯电梯 + strategy3 = calculate_scenario_impact( + scenario_name='Elevator Only', + completion_years=186, + elevator_fraction=1.0, + rocket_sites_used=[], + renewable_energy_fraction=0.0 + ) + + # 策略4: 纯电梯 + 100%可再生 + strategy4 = calculate_scenario_impact( + scenario_name='Elevator + 100% Renewable', + completion_years=186, + elevator_fraction=1.0, + rocket_sites_used=[], + renewable_energy_fraction=1.0 + ) + + strategies = [baseline, strategy1, strategy2, strategy3, strategy4] + + fig, ax = plt.subplots(figsize=(12, 7)) + + names = [s.scenario_name for s in strategies] + co2_vals = [s.co2_total_Mt for s in strategies] + reductions = [(baseline.co2_total_Mt - s.co2_total_Mt) / baseline.co2_total_Mt * 100 + for s in strategies] + + x = np.arange(len(names)) + colors = ['#FF6B6B', '#FFE66D', '#4ECDC4', '#45B7D1', '#96CEB4'] + + bars = ax.bar(x, co2_vals, color=colors) + + ax.set_ylabel('Total CO₂ Emissions (Mt)', fontsize=12) + ax.set_title('CO₂ Reduction Strategies Comparison\n(Knee Point baseline: 139 years)', fontsize=14) + ax.set_xticks(x) + ax.set_xticklabels(names, rotation=15, ha='right') + ax.grid(True, alpha=0.3, axis='y') + + # 添加数值和减排比例 + for i, (bar, val, red) in enumerate(zip(bars, co2_vals, reductions)): + ax.text(bar.get_x() + bar.get_width()/2, bar.get_height() + 20, + f'{val:.0f} Mt\n({red:+.1f}%)', ha='center', fontsize=10) + + # 添加基准线 + ax.axhline(y=baseline.co2_total_Mt, color='red', linestyle='--', alpha=0.5, + label=f'Baseline: {baseline.co2_total_Mt:.0f} Mt') + ax.legend() + + plt.tight_layout() + plt.savefig(f'{save_dir}/mitigation_strategies.png', dpi=150, bbox_inches='tight') + print(f"减排策略对比图已保存至: {save_dir}/mitigation_strategies.png") + + +def plot_comprehensive_summary(save_dir: str = '/Volumes/Files/code/mm/20260130_b/p4'): + """绘制综合汇总图""" + + df = analyze_all_scenarios() + + fig = plt.figure(figsize=(16, 12)) + + # 创建4x4网格 + gs = fig.add_gridspec(3, 3, hspace=0.3, wspace=0.3) + + scenarios = df['Scenario'].tolist() + + # ========== 左上: 雷达图 ========== + ax1 = fig.add_subplot(gs[0, 0], projection='polar') + + categories = ['Time\n(inv)', 'Energy\n(inv)', 'CO2\n(inv)', 'Launches\n(inv)', 'Strat H2O\n(inv)'] + N = len(categories) + + # 归一化数据 (取逆以使"更好"在外围) + max_vals = df[['Years', 'Energy (PJ)', 'CO2 Total (Mt)', 'Launches', 'H2O Stratosphere (Mt)']].max() + + angles = np.linspace(0, 2*np.pi, N, endpoint=False).tolist() + angles += angles[:1] + + colors = ['#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4'] + + for i, (idx, row) in enumerate(df.iterrows()): + values = [ + 1 - row['Years'] / max_vals['Years'], + 1 - row['Energy (PJ)'] / max_vals['Energy (PJ)'], + 1 - row['CO2 Total (Mt)'] / max_vals['CO2 Total (Mt)'], + 1 - row['Launches'] / max_vals['Launches'] if max_vals['Launches'] > 0 else 1, + 1 - row['H2O Stratosphere (Mt)'] / max_vals['H2O Stratosphere (Mt)'] if max_vals['H2O Stratosphere (Mt)'] > 0 else 1 + ] + values += values[:1] + ax1.plot(angles, values, 'o-', linewidth=2, label=row['Scenario'], color=colors[i]) + ax1.fill(angles, values, alpha=0.15, color=colors[i]) + + ax1.set_xticks(angles[:-1]) + ax1.set_xticklabels(categories, fontsize=9) + ax1.set_title('Multi-Criteria Comparison\n(outer = better)', fontsize=12, pad=20) + ax1.legend(loc='upper right', bbox_to_anchor=(1.3, 1.0), fontsize=8) + + # ========== 右上: 汇总表格 ========== + ax2 = fig.add_subplot(gs[0, 1:]) + ax2.axis('off') + + table_data = [] + for idx, row in df.iterrows(): + table_data.append([ + row['Scenario'], + f"{row['Years']:.0f}", + f"{row['Energy (PJ)']:.0f}", + f"{row['CO2 Total (Mt)']:.0f}", + f"{row['H2O Stratosphere (Mt)']:.1f}", + f"{row['Annual CO2 (Mt/yr)']:.1f}", + ]) + + table = ax2.table( + cellText=table_data, + colLabels=['Scenario', 'Years', 'Energy(PJ)', 'CO2(Mt)', 'Strat.H2O(Mt)', 'Annual CO2'], + loc='center', + cellLoc='center' + ) + table.auto_set_font_size(False) + table.set_fontsize(10) + table.scale(1.2, 1.8) + + # 高亮最优值 + for i in range(len(df)): + for j in range(1, 6): + cell = table[(i+1, j)] + if j == 1 and df.iloc[i]['Years'] == df['Years'].min(): + cell.set_facecolor('#90EE90') + elif j == 2 and df.iloc[i]['Energy (PJ)'] == df['Energy (PJ)'].min(): + cell.set_facecolor('#90EE90') + elif j == 3 and df.iloc[i]['CO2 Total (Mt)'] == df['CO2 Total (Mt)'].min(): + cell.set_facecolor('#90EE90') + + ax2.set_title('Scenario Summary Table\n(Green = Best in Category)', fontsize=12, pad=10) + + # ========== 中间行: CO2分解 + 时间线 ========== + ax3 = fig.add_subplot(gs[1, :2]) + + x = np.arange(len(scenarios)) + width = 0.25 + + ax3.bar(x - width, df['CO2 Combustion (Mt)'], width, label='Combustion', color='#FF6B6B') + ax3.bar(x, df['CO2 Production (Mt)'], width, label='Fuel Production', color='#4ECDC4') + ax3.bar(x + width, df['CO2 Electricity (Mt)'], width, label='Electricity', color='#45B7D1') + + ax3.set_ylabel('CO₂ (Mt)', fontsize=11) + ax3.set_title('CO₂ Emissions by Source', fontsize=12) + ax3.set_xticks(x) + ax3.set_xticklabels(scenarios, rotation=15, ha='right') + ax3.legend() + ax3.grid(True, alpha=0.3, axis='y') + + # ========== 右侧: 时间-CO2权衡 ========== + ax4 = fig.add_subplot(gs[1, 2]) + + ax4.scatter(df['Years'], df['CO2 Total (Mt)'], s=200, c=colors, edgecolors='black', linewidth=2) + + for i, row in df.iterrows(): + ax4.annotate(row['Scenario'].replace(' ', '\n'), + (row['Years'], row['CO2 Total (Mt)']), + textcoords="offset points", xytext=(0, 15), ha='center', fontsize=8) + + ax4.set_xlabel('Completion Time (years)', fontsize=11) + ax4.set_ylabel('Total CO₂ (Mt)', fontsize=11) + ax4.set_title('Time-CO₂ Trade-off', fontsize=12) + ax4.grid(True, alpha=0.3) + + # ========== 底行: 结论文字 ========== + ax5 = fig.add_subplot(gs[2, :]) + ax5.axis('off') + + conclusions = """ + KEY FINDINGS (LOX/CH4 Fuel): + + 1. Rocket Only: Highest CO₂ emissions ({:.0f} Mt) due to large fuel consumption ({:.1f} Mt fuel). + - Annual emissions: {:.1f} Mt/yr (≈{:.3f}% of global annual emissions) + - Stratospheric H₂O injection: {:.1f} Mt (potential climate impact) + + 2. Elevator Only: Lowest CO₂ emissions ({:.0f} Mt), but longest timeline ({:.0f} years). + - CO₂ reduction vs Rocket: {:.0f}% (primary savings from avoiding rocket fuel production) + - No stratospheric H₂O injection from main transport + + 3. Combined (Knee Point): Best trade-off at 139 years with {:.0f} Mt CO₂. + - 74.6% payload via elevator, 25.4% via low-latitude rockets + - Reasonable timeline with significant environmental benefit + + 4. RECOMMENDATIONS for Minimizing Environmental Impact: + a) Prioritize space elevator transport (saves ~{:.0f}% CO₂ vs pure rocket) + b) Use renewable energy for elevator operation (reduces electricity emissions) + c) If rockets needed, prefer low-latitude sites (lower fuel per kg) + d) Consider carbon capture for CH4 production phase + """.format( + df.loc[df['Scenario']=='Rocket Only', 'CO2 Total (Mt)'].values[0], + df.loc[df['Scenario']=='Rocket Only', 'Fuel (Mt)'].values[0], + df.loc[df['Scenario']=='Rocket Only', 'Annual CO2 (Mt/yr)'].values[0], + df.loc[df['Scenario']=='Rocket Only', 'Annual CO2 (Mt/yr)'].values[0] / 37000 * 100, + df.loc[df['Scenario']=='Rocket Only', 'H2O Stratosphere (Mt)'].values[0], + df.loc[df['Scenario']=='Elevator Only', 'CO2 Total (Mt)'].values[0], + df.loc[df['Scenario']=='Elevator Only', 'Years'].values[0], + (1 - df.loc[df['Scenario']=='Elevator Only', 'CO2 Total (Mt)'].values[0] / + df.loc[df['Scenario']=='Rocket Only', 'CO2 Total (Mt)'].values[0]) * 100, + df.loc[df['Scenario']=='Combined (Knee Point)', 'CO2 Total (Mt)'].values[0], + (1 - df.loc[df['Scenario']=='Elevator Only', 'CO2 Total (Mt)'].values[0] / + df.loc[df['Scenario']=='Rocket Only', 'CO2 Total (Mt)'].values[0]) * 100 + ) + + ax5.text(0.02, 0.95, conclusions, transform=ax5.transAxes, fontsize=10, + verticalalignment='top', fontfamily='monospace', + bbox=dict(boxstyle='round', facecolor='wheat', alpha=0.5)) + + plt.suptitle('Moon Colony Environmental Impact Analysis\n' + '(100 Million Tons Payload, LOX/CH4 Fuel)', fontsize=14, y=0.98) + + plt.savefig(f'{save_dir}/comprehensive_summary.png', dpi=150, bbox_inches='tight') + print(f"综合汇总图已保存至: {save_dir}/comprehensive_summary.png") + + +# ============== 报告生成 ============== + +def generate_report(save_dir: str = '/Volumes/Files/code/mm/20260130_b/p4'): + """生成分析报告""" + df = analyze_all_scenarios() + + # 优化结果 + opt_result = optimize_for_environment( + max_annual_co2_Mt=50.0, + min_completion_years=120.0, + renewable_fraction=0.5 + ) + + report = [] + report.append("=" * 80) + report.append("TASK 4: ENVIRONMENTAL IMPACT ANALYSIS") + report.append("Moon Colony Construction - 100 Million Metric Tons") + report.append("Fuel: LOX/CH4 (Liquid Oxygen / Methane)") + report.append("=" * 80) + + report.append("\n" + "=" * 80) + report.append("1. FUEL PARAMETERS (LOX/CH4)") + report.append("=" * 80) + report.append(f" Specific Impulse (Isp): {FUEL_PARAMS.isp} s") + report.append(f" Exhaust Velocity: {FUEL_PARAMS.exhaust_velocity:.0f} m/s") + report.append(f" Specific Energy: {FUEL_PARAMS.specific_energy/1e6:.1f} MJ/kg") + report.append(f" O2/CH4 Mass Ratio: {FUEL_PARAMS.ox_fuel_ratio}:1") + report.append(f" CH4 Mass Fraction: {FUEL_PARAMS.ch4_mass_fraction*100:.1f}%") + report.append(f"\n Combustion Reaction: CH4 + 2O2 → CO2 + 2H2O") + report.append(f" CO2 per kg fuel: {EMISSION_FACTORS.co2_per_kg_fuel:.3f} kg") + report.append(f" H2O per kg fuel: {EMISSION_FACTORS.h2o_per_kg_fuel:.3f} kg") + + report.append("\n" + "=" * 80) + report.append("2. SCENARIO COMPARISON") + report.append("=" * 80) + + for idx, row in df.iterrows(): + report.append(f"\n {row['Scenario']}:") + report.append(f" Completion Time: {row['Years']:.0f} years") + report.append(f" Total Energy: {row['Energy (PJ)']:.0f} PJ") + report.append(f" Total Fuel: {row['Fuel (Mt)']:.2f} Mt") + report.append(f" CO2 Emissions: {row['CO2 Total (Mt)']:.0f} Mt") + report.append(f" - Combustion: {row['CO2 Combustion (Mt)']:.0f} Mt") + report.append(f" - Fuel Production: {row['CO2 Production (Mt)']:.0f} Mt") + report.append(f" - Electricity: {row['CO2 Electricity (Mt)']:.1f} Mt") + report.append(f" H2O Emissions: {row['H2O Total (Mt)']:.2f} Mt") + report.append(f" - Stratospheric: {row['H2O Stratosphere (Mt)']:.2f} Mt") + report.append(f" Annual CO2: {row['Annual CO2 (Mt/yr)']:.2f} Mt/yr ({row['Annual CO2 (Mt/yr)']/370:.3f}% of global)") + report.append(f" CO2 per ton payload: {row['CO2/ton (kg)']:.0f} kg/ton") + + report.append("\n" + "=" * 80) + report.append("3. ENVIRONMENTAL IMPACT RANKING") + report.append("=" * 80) + + df_sorted = df.sort_values('CO2 Total (Mt)') + report.append("\n By Total CO2 (lowest first):") + for i, (idx, row) in enumerate(df_sorted.iterrows(), 1): + report.append(f" {i}. {row['Scenario']}: {row['CO2 Total (Mt)']:.0f} Mt") + + rocket_co2 = df.loc[df['Scenario']=='Rocket Only', 'CO2 Total (Mt)'].values[0] + report.append("\n CO2 Reduction vs Rocket Only:") + for idx, row in df.iterrows(): + if row['Scenario'] != 'Rocket Only': + reduction = (rocket_co2 - row['CO2 Total (Mt)']) / rocket_co2 * 100 + report.append(f" {row['Scenario']}: -{reduction:.1f}%") + + report.append("\n" + "=" * 80) + report.append("4. OPTIMIZATION FOR MINIMUM ENVIRONMENTAL IMPACT") + report.append("=" * 80) + + if opt_result: + report.append(f"\n Optimization Constraints:") + report.append(f" - Minimum completion time: 120 years") + report.append(f" - Maximum annual CO2: 50 Mt/yr") + report.append(f" - Renewable energy fraction: 50%") + report.append(f"\n Optimal Solution:") + report.append(f" - Elevator fraction: {opt_result['elevator_fraction']*100:.1f}%") + report.append(f" - Rocket sites used: {opt_result['n_sites']}") + report.append(f" - Completion time: {opt_result['years']:.0f} years") + report.append(f" - Total CO2: {opt_result['impact'].co2_total_Mt:.0f} Mt") + report.append(f" - Annual CO2: {opt_result['impact'].annual_co2_Mt:.2f} Mt/yr") + + report.append("\n" + "=" * 80) + report.append("5. MODEL ADJUSTMENT RECOMMENDATIONS") + report.append("=" * 80) + report.append(""" + To minimize environmental impact, adjust the model as follows: + + A. OBJECTIVE FUNCTION MODIFICATION: + Original: min(α×Time + β×Energy) + Modified: min(α×Time + β×Energy + γ×CO2_total + δ×H2O_stratosphere) + + Where γ and δ are weights for environmental costs. + + B. RECOMMENDED STRATEGIES (by effectiveness): + + 1. Prioritize Elevator Transport (CO2 reduction: ~70-80%) + - Elevator has no direct combustion emissions + - Top rocket stage emissions much smaller than full rocket launch + + 2. Use Renewable Energy for Elevator (CO2 reduction: 5-10%) + - Replace grid electricity with solar/wind + - Reduces electricity-related emissions + + 3. Low-Latitude Launch Sites Only (CO2 reduction: 3-5%) + - Lower ΔV requirements = less fuel + - Kourou (5.2°) vs Alaska (57.4°): ~10% fuel difference + + 4. Green Methane Production (CO2 reduction: 15-20%) + - Use bio-methane or synthetic methane from CO2 capture + - Reduces fuel production emissions + + 5. Extend Timeline (CO2 reduction: proportional) + - More time → more elevator use → less rocket use + - Trade-off: slower colony establishment + + C. QUANTIFIED IMPACT: + - Baseline (Rocket Only): {:.0f} Mt CO2 + - Best Case (Elevator + 100% Renewable): {:.0f} Mt CO2 + - Maximum Reduction: {:.1f}% +""".format( + df.loc[df['Scenario']=='Rocket Only', 'CO2 Total (Mt)'].values[0], + calculate_scenario_impact('Best', 186, 1.0, [], renewable_energy_fraction=1.0).co2_total_Mt, + (1 - calculate_scenario_impact('Best', 186, 1.0, [], renewable_energy_fraction=1.0).co2_total_Mt / + df.loc[df['Scenario']=='Rocket Only', 'CO2 Total (Mt)'].values[0]) * 100 + )) + + report.append("\n" + "=" * 80) + report.append("6. STRATOSPHERIC IMPACT ANALYSIS") + report.append("=" * 80) + report.append(f""" + Stratospheric Water Vapor Injection (Rocket Only scenario): + + - Total H2O emitted: {df.loc[df['Scenario']=='Rocket Only', 'H2O Total (Mt)'].values[0]:.2f} Mt + - Stratospheric fraction: {EMISSION_FACTORS.stratosphere_emission_fraction*100:.0f}% + - Stratospheric H2O: {df.loc[df['Scenario']=='Rocket Only', 'H2O Stratosphere (Mt)'].values[0]:.2f} Mt + - Residence time: {EMISSION_FACTORS.stratosphere_h2o_residence_time:.0f} years + + Potential Climate Effects: + - Stratospheric H2O has greenhouse effect (radiative forcing) + - May affect ozone chemistry + - Elevator-only scenario eliminates this impact entirely +""") + + report.append("=" * 80) + + # 保存报告 + report_text = '\n'.join(report) + with open(f'{save_dir}/environmental_report.txt', 'w', encoding='utf-8') as f: + f.write(report_text) + print(f"分析报告已保存至: {save_dir}/environmental_report.txt") + + # 保存CSV + df.to_csv(f'{save_dir}/scenario_comparison.csv', index=False) + print(f"数据表已保存至: {save_dir}/scenario_comparison.csv") + + return report_text + + +# ============== 主程序 ============== + +if __name__ == "__main__": + print("=" * 80) + print("TASK 4: ENVIRONMENTAL IMPACT ANALYSIS") + print("Moon Colony Construction with LOX/CH4 Fuel") + print("=" * 80) + + save_dir = '/Volumes/Files/code/mm/20260130_b/p4' + + # 1. 基础情景对比 + print("\n1. Analyzing baseline scenarios...") + df = plot_environmental_comparison(save_dir) + print("\nScenario Comparison:") + print(df.to_string(index=False)) + + # 2. Pareto分析 + print("\n2. Generating Pareto analysis...") + plot_pareto_with_environment(save_dir) + + # 3. 减排策略对比 + print("\n3. Analyzing mitigation strategies...") + plot_mitigation_strategies(save_dir) + + # 4. 综合汇总 + print("\n4. Generating comprehensive summary...") + plot_comprehensive_summary(save_dir) + + # 5. 生成报告 + print("\n5. Generating report...") + generate_report(save_dir) + + print("\n" + "=" * 80) + print("Analysis complete! All outputs saved to:", save_dir) + print("=" * 80) diff --git a/p4/environmental_report.txt b/p4/environmental_report.txt new file mode 100644 index 0000000..b760a57 --- /dev/null +++ b/p4/environmental_report.txt @@ -0,0 +1,163 @@ +================================================================================ +TASK 4: ENVIRONMENTAL IMPACT ANALYSIS +Moon Colony Construction - 100 Million Metric Tons +Fuel: LOX/CH4 (Liquid Oxygen / Methane) +================================================================================ + +================================================================================ +1. FUEL PARAMETERS (LOX/CH4) +================================================================================ + Specific Impulse (Isp): 360 s + Exhaust Velocity: 3532 m/s + Specific Energy: 12.9 MJ/kg + O2/CH4 Mass Ratio: 3.5:1 + CH4 Mass Fraction: 22.2% + + Combustion Reaction: CH4 + 2O2 → CO2 + 2H2O + CO2 per kg fuel: 0.611 kg + H2O per kg fuel: 0.500 kg + +================================================================================ +2. SCENARIO COMPARISON +================================================================================ + + Rocket Only: + Completion Time: 219 years + Total Energy: 123792 PJ + Total Fuel: 9596.30 Mt + CO2 Emissions: 12968 Mt + - Combustion: 5864 Mt + - Fuel Production: 7104 Mt + - Electricity: 0.0 Mt + H2O Emissions: 4798.15 Mt + - Stratospheric: 1919.26 Mt + Annual CO2: 59.17 Mt/yr (0.160% of global) + CO2 per ton payload: 129683 kg/ton + + Elevator Only: + Completion Time: 186 years + Total Energy: 15720 PJ + Total Fuel: 69.16 Mt + CO2 Emissions: 846 Mt + - Combustion: 42 Mt + - Fuel Production: 51 Mt + - Electricity: 752.1 Mt + H2O Emissions: 34.58 Mt + - Stratospheric: 0.00 Mt + Annual CO2: 4.54 Mt/yr (0.012% of global) + CO2 per ton payload: 8455 kg/ton + + Combined (Min Time): + Completion Time: 101 years + Total Energy: 65363 PJ + Total Fuel: 4445.46 Mt + CO2 Emissions: 6414 Mt + - Combustion: 2717 Mt + - Fuel Production: 3291 Mt + - Electricity: 406.6 Mt + H2O Emissions: 2222.73 Mt + - Stratospheric: 881.61 Mt + Annual CO2: 63.71 Mt/yr (0.172% of global) + CO2 per ton payload: 64142 kg/ton + + Combined (Knee Point): + Completion Time: 139 years + Total Energy: 42519 PJ + Total Fuel: 2438.04 Mt + CO2 Emissions: 3856 Mt + - Combustion: 1490 Mt + - Fuel Production: 1805 Mt + - Electricity: 561.4 Mt + H2O Emissions: 1219.02 Mt + - Stratospheric: 477.28 Mt + Annual CO2: 27.74 Mt/yr (0.075% of global) + CO2 per ton payload: 38561 kg/ton + +================================================================================ +3. ENVIRONMENTAL IMPACT RANKING +================================================================================ + + By Total CO2 (lowest first): + 1. Elevator Only: 846 Mt + 2. Combined (Knee Point): 3856 Mt + 3. Combined (Min Time): 6414 Mt + 4. Rocket Only: 12968 Mt + + CO2 Reduction vs Rocket Only: + Elevator Only: -93.5% + Combined (Min Time): -50.5% + Combined (Knee Point): -70.3% + +================================================================================ +4. OPTIMIZATION FOR MINIMUM ENVIRONMENTAL IMPACT +================================================================================ + + Optimization Constraints: + - Minimum completion time: 120 years + - Maximum annual CO2: 50 Mt/yr + - Renewable energy fraction: 50% + + Optimal Solution: + - Elevator fraction: 0.0% + - Rocket sites used: 0 + - Completion time: inf years + - Total CO2: 0 Mt + - Annual CO2: 0.00 Mt/yr + +================================================================================ +5. MODEL ADJUSTMENT RECOMMENDATIONS +================================================================================ + + To minimize environmental impact, adjust the model as follows: + + A. OBJECTIVE FUNCTION MODIFICATION: + Original: min(α×Time + β×Energy) + Modified: min(α×Time + β×Energy + γ×CO2_total + δ×H2O_stratosphere) + + Where γ and δ are weights for environmental costs. + + B. RECOMMENDED STRATEGIES (by effectiveness): + + 1. Prioritize Elevator Transport (CO2 reduction: ~70-80%) + - Elevator has no direct combustion emissions + - Top rocket stage emissions much smaller than full rocket launch + + 2. Use Renewable Energy for Elevator (CO2 reduction: 5-10%) + - Replace grid electricity with solar/wind + - Reduces electricity-related emissions + + 3. Low-Latitude Launch Sites Only (CO2 reduction: 3-5%) + - Lower ΔV requirements = less fuel + - Kourou (5.2°) vs Alaska (57.4°): ~10% fuel difference + + 4. Green Methane Production (CO2 reduction: 15-20%) + - Use bio-methane or synthetic methane from CO2 capture + - Reduces fuel production emissions + + 5. Extend Timeline (CO2 reduction: proportional) + - More time → more elevator use → less rocket use + - Trade-off: slower colony establishment + + C. QUANTIFIED IMPACT: + - Baseline (Rocket Only): 12968 Mt CO2 + - Best Case (Elevator + 100% Renewable): 173 Mt CO2 + - Maximum Reduction: 98.7% + + +================================================================================ +6. STRATOSPHERIC IMPACT ANALYSIS +================================================================================ + + Stratospheric Water Vapor Injection (Rocket Only scenario): + + - Total H2O emitted: 4798.15 Mt + - Stratospheric fraction: 40% + - Stratospheric H2O: 1919.26 Mt + - Residence time: 3 years + + Potential Climate Effects: + - Stratospheric H2O has greenhouse effect (radiative forcing) + - May affect ozone chemistry + - Elevator-only scenario eliminates this impact entirely + +================================================================================ \ No newline at end of file diff --git a/p4/knee_point_report.txt b/p4/knee_point_report.txt new file mode 100644 index 0000000..4167a39 --- /dev/null +++ b/p4/knee_point_report.txt @@ -0,0 +1,118 @@ +================================================================================ +MULTI-OBJECTIVE PARETO KNEE POINT ANALYSIS +Time - Energy - Environment Optimization +================================================================================ + +================================================================================ +1. PARETO DATA RANGE +================================================================================ + Completion Time: 101 - 200 years + Energy: 15720 - 65177 PJ + CO2: 846 - 6393 Mt + Elevator Fraction: 54.2% - 100.0% + +================================================================================ +2. KNEE POINT DETECTION RESULTS +================================================================================ + + Max Distance (3D): + Completion Time: 101 years + Energy: 65177 PJ + CO2 Emissions: 6393 Mt + Elevator Fraction: 54.2% + Rocket Sites Used: 10 + Annual CO2: 63.3 Mt/yr + + Kneedle (Time-CO2): + Completion Time: 186 years + Energy: 15842 PJ + CO2 Emissions: 859 Mt + Elevator Fraction: 99.9% + Rocket Sites Used: 1 + Annual CO2: 4.6 Mt/yr + + Kneedle (Time-Energy): + Completion Time: 186 years + Energy: 15842 PJ + CO2 Emissions: 859 Mt + Elevator Fraction: 99.9% + Rocket Sites Used: 1 + Annual CO2: 4.6 Mt/yr + + Second Derivative: + Completion Time: 186 years + Energy: 15842 PJ + CO2 Emissions: 859 Mt + Elevator Fraction: 99.9% + Rocket Sites Used: 1 + Annual CO2: 4.6 Mt/yr + + Marginal Benefit: + Completion Time: 189 years + Energy: 15720 PJ + CO2 Emissions: 846 Mt + Elevator Fraction: 100.0% + Rocket Sites Used: 0 + Annual CO2: 4.5 Mt/yr + + Weighted (Time Priority): + Completion Time: 186 years + Energy: 15842 PJ + CO2 Emissions: 859 Mt + Elevator Fraction: 99.9% + Rocket Sites Used: 1 + Annual CO2: 4.6 Mt/yr + + Consensus (Median): + Completion Time: 186 years + Energy: 15842 PJ + CO2 Emissions: 859 Mt + Elevator Fraction: 99.9% + Rocket Sites Used: 1 + Annual CO2: 4.6 Mt/yr + +================================================================================ +3. RECOMMENDED SOLUTION +================================================================================ + + Based on consensus of multiple knee detection methods: + + RECOMMENDED CONFIGURATION: + ├── Completion Time: 186 years + ├── Total Energy: 15842 PJ + ├── Total CO2: 859 Mt + ├── Elevator Fraction: 99.9% + ├── Rocket Sites: 1 (low-latitude priority) + ├── Total Fuel: 80.0 Mt + ├── Stratospheric H2O: 2.2 Mt + └── Annual CO2: 4.6 Mt/yr + + TRADE-OFF ANALYSIS: + ├── vs Min Time (101yr): + │ +85 years, + │ -5534 Mt CO2 + │ + └── vs Min CO2 (200yr): + -14 years, + +14 Mt CO2 + + +================================================================================ +4. INTERPRETATION +================================================================================ + + The recommended knee point at 186 years represents the optimal + trade-off between: + + - TIME: Not the fastest, but 85 years longer gives significant benefits + - ENERGY: 15842 PJ (moderate consumption) + - ENVIRONMENT: 859 Mt CO2 (substantial reduction from max) + + Key insight: Beyond ~186 years, the marginal environmental + benefit of extending timeline decreases significantly. This is the + "diminishing returns" point. + + Recommendation: Target 186-year completion with 100% + elevator transport and 1 low-latitude rocket sites. + +================================================================================ \ No newline at end of file diff --git a/p4/mitigation_strategies.png b/p4/mitigation_strategies.png new file mode 100644 index 0000000..7ab9059 Binary files /dev/null and b/p4/mitigation_strategies.png differ diff --git a/p4/pareto_3d.png b/p4/pareto_3d.png new file mode 100644 index 0000000..f088175 Binary files /dev/null and b/p4/pareto_3d.png differ diff --git a/p4/pareto_environmental.png b/p4/pareto_environmental.png new file mode 100644 index 0000000..4b2ab22 Binary files /dev/null and b/p4/pareto_environmental.png differ diff --git a/p4/pareto_front_data.csv b/p4/pareto_front_data.csv new file mode 100644 index 0000000..d0259da --- /dev/null +++ b/p4/pareto_front_data.csv @@ -0,0 +1,101 @@ +Years,Energy_PJ,CO2_Mt,Elevator_Fraction,Rocket_Sites,Fuel_Mt,H2O_Strat_Mt,Annual_CO2 +101.0,65177.12419646183,6393.299511388401,0.54237,10,4429.06710503561,878.3111286273153,63.299995162261396 +102.0,64596.775974240816,6328.200142433989,0.54774,10,4377.9063643910295,868.0047003758268,62.04117786699989 +103.0,64016.427752019816,6263.100773479575,0.55311,10,4326.7456237464485,857.6982721243382,60.80680362601529 +104.0,63436.0795297988,6198.001404525163,0.55848,10,4275.5848831018675,847.3918438728497,59.59616735120349 +105.0,62855.73130757781,6132.902035570751,0.56385,10,4224.424142457287,837.0854156213613,58.40859081495953 +106.0,61948.56672737968,6033.565767788632,0.56922,9,4147.928800419132,821.7120670911578,56.92043177159087 +107.0,61372.29251937086,5968.893187790773,0.57459,9,4097.08387482976,811.4688018507112,55.78404848402591 +108.0,60796.018311362066,5904.220607792916,0.57996,9,4046.2389492403895,801.2255366102647,54.66870933141589 +109.0,60219.74410335328,5839.548027795056,0.58533,9,3995.3940236510184,790.9822713698182,53.57383511738584 +110.0,59643.46989534448,5774.8754477972,0.5907,9,3944.549098061649,780.739006129372,52.49886770724727 +111.0,58888.75081133842,5691.509191620902,0.59607,8,3879.8712363484583,767.7291536641615,51.27485758217029 +112.0,58314.8489178002,5627.085132508045,0.60144,8,3829.210211105645,757.5226684930263,50.2418315402504 +113.0,57740.94702426201,5562.661073395188,0.60681,8,3778.5491858628325,747.3161833218916,49.22708914509016 +114.0,57167.0451307238,5498.237014282331,0.61218,8,3727.8881606200193,737.1096981507567,48.230149248090626 +115.0,56593.14323718558,5433.812955169472,0.61755,8,3677.2271353772044,726.9032129796213,47.25054743625628 +116.0,56019.24134364739,5369.388896056616,0.62292,8,3626.5661101343926,716.6967278084866,46.287835310832904 +117.0,55330.94373283646,5292.980875605866,0.62829,7,3567.037199831679,704.7166656253715,45.23915278295612 +118.0,54758.69448518282,5228.7299457399595,0.63366,7,3516.5042866729405,694.5358028710515,44.31127072660983 +119.0,54186.44523752919,5164.479015874054,0.63903,7,3465.971373514203,684.3549401167317,43.39898332667273 +120.0,53614.19598987556,5100.228086008149,0.6444,7,3415.4384603554654,674.1740773624117,42.501900716734575 +121.0,53041.94674222193,5035.977156142246,0.64977,7,3364.9055471967285,663.993214608092,41.619645918530956 +122.0,52469.6974945683,4971.726226276341,0.65514,7,3314.3726340379912,653.8123518537723,40.751854313740495 +123.0,51897.448246914646,4907.475296410432,0.66051,7,3263.8397208792508,643.6314890994519,39.89817314154823 +124.0,51195.55062258288,4829.642554474348,0.66588,6,3203.2565459625184,631.4405739935331,38.948730278018935 +125.0,50625.38509270359,4765.609912441609,0.67125,6,3152.88516131342,621.292016941141,38.12487929953287 +126.0,50055.21956282429,4701.577270408867,0.67662,6,3102.5137766643206,611.1434598887488,37.314105320705295 +127.0,49485.054032945,4637.544628376127,0.68199,6,3052.142392015222,600.9949028363567,36.51609943603249 +128.0,48914.888503065704,4573.511986343386,0.68736,6,3001.771007366123,590.8463457839645,35.7305623933077 +129.0,48344.72297318641,4509.479344310644,0.69273,6,2951.3996227170232,580.6977887315722,34.957204219462355 +130.0,47774.55744330711,4445.446702277904,0.6981,6,2901.028238067924,570.54923167918,34.19574386367618 +131.0,47058.89775366139,4366.172262500466,0.70347,5,2839.378236382668,558.1449512195566,33.329559255728746 +132.0,46491.36704534464,4302.415641288178,0.70884,5,2789.2111014671,548.0372441138705,32.59405788854681 +133.0,45923.836337027926,4238.659020075891,0.71421,5,2739.0439665515332,537.9295370081849,31.86961669229993 +134.0,45356.30562871118,4174.902398863603,0.71958,5,2688.876831635965,527.821829902499,31.155988051220916 +135.0,44788.77492039444,4111.145777651315,0.72495,5,2638.709696720398,517.7141227968131,30.452931686306037 +136.0,44221.24421207771,4047.3891564390283,0.73032,5,2588.542561804831,507.6064156911274,29.76021438558109 +137.0,43653.71350376098,3983.6325352267413,0.73569,5,2538.3754268892635,497.49870858544153,29.077609746180592 +138.0,43086.182795444234,3919.8759140144525,0.74106,5,2488.208291973696,487.39100147975563,28.40489792764096 +139.0,42381.09409411688,3841.70887859035,0.74643,4,2427.3777467472273,475.15061231188963,27.638193371153598 +140.0,41816.47653176563,3778.257435136936,0.7518,4,2377.4364371003016,465.0880702599321,26.98755310812097 +141.0,41251.858969414374,3714.805991683522,0.75717,4,2327.495127453377,455.02552820797484,26.346141784989516 +142.0,40687.24140706312,3651.3545482301074,0.76254,4,2277.5538178064517,444.9629861560174,25.713764424155688 +143.0,40122.62384471187,3587.903104776693,0.76791,4,2227.6125081595264,434.90044410406,25.090231501934916 +144.0,39558.00628236062,3524.451661323279,0.77328,4,2177.671198512601,424.83790205210266,24.475358759189437 +145.0,38993.38872000937,3461.000217869864,0.77865,4,2127.729888865676,414.7753600001452,23.868967019792166 +146.0,38428.7711576581,3397.5487744164484,0.78402,4,2077.7885792187494,404.71281794818753,23.270882016551017 +147.0,37864.153595306845,3334.0973309630344,0.78939,4,2027.847269571824,394.65027589623014,22.680934224238328 +148.0,37299.53603295559,3270.6458875096196,0.79476,4,1977.9059599248985,384.5877338442727,22.09895869938932 +149.0,36644.702014644434,3197.74347380976,0.80013,3,1920.9711265601516,373.12648704875096,21.461365596038657 +150.0,36082.5083396625,3134.5459539578037,0.8055,3,1871.2177151589094,363.10152464593017,20.896973026385357 +151.0,35520.31466468056,3071.3484341058474,0.81087,3,1821.4643037576675,353.0765622431095,20.340055855005613 +152.0,34958.12098969862,3008.1509142538916,0.81624,3,1771.7108923564253,343.0515998402887,19.790466541144024 +153.0,34395.927314716675,2944.9533944019345,0.82161,3,1721.957480955183,333.0266374374679,19.248061401319834 +154.0,33833.733639734724,2881.755874549977,0.82698,3,1672.20406955394,323.0016750346469,18.71270048409076 +155.0,33271.53996475279,2818.5583546980206,0.83235,3,1622.4506581526978,312.9767126318261,18.18424744966465 +156.0,32709.34628977085,2755.360834846064,0.83772,3,1572.6972467514556,302.95175022900537,17.662569454141437 +157.0,32147.152614788905,2692.163314994108,0.84309,3,1522.9438353502135,292.9267878261846,17.14753703817903 +158.0,31584.958939806966,2628.9657951421514,0.84846,3,1473.190423948971,282.9018254233638,16.639024019887035 +159.0,31022.765264825026,2565.7682752901947,0.85383,3,1423.437012547729,272.87686302054306,16.13690739176223 +160.0,30366.896007760657,2492.7574111912318,0.8592,2,1366.4219281168416,261.3995660117932,15.579733819945199 +161.0,29808.27504496468,2429.9341644827864,0.86457,2,1316.9454711486192,251.42999449557638,15.09275878560737 +162.0,29249.654082168676,2367.1109177743406,0.86994,2,1267.469014180396,241.46042297935938,14.611795788730497 +163.0,28691.033119372696,2304.2876710658957,0.87531,2,1217.9925572121738,231.49085146314258,14.136734178318378 +164.0,28132.41215657671,2241.464424357451,0.88068,2,1168.5161002439513,221.52127994692577,13.66746600217958 +165.0,27573.79119378073,2178.6411776490063,0.88605,2,1119.0396432757293,211.55170843070897,13.203885925145492 +166.0,27015.170230984746,2115.8179309405614,0.89142,2,1069.563186307507,201.5821369144922,12.745891150244345 +167.0,26456.549268188763,2052.9946842321165,0.89679,2,1020.0867293392846,191.6125653982754,12.293381342707285 +168.0,25897.92830539278,1990.1714375236716,0.90216,2,970.6102723710624,181.6429938820586,11.846258556688522 +169.0,25339.307342596796,1927.3481908152269,0.90753,2,921.1338154028402,171.6734223658418,11.40442716458714 +170.0,24780.686379800798,1864.524944106781,0.9129,2,871.657358434617,161.7038508496248,10.967793788863418 +171.0,24222.065417004815,1801.701697398336,0.91827,2,822.1809014663945,151.73427933340798,10.536267236247578 +172.0,23641.800601412553,1736.611066024648,0.92364,1,771.0266264519493,141.4291442079466,10.09657596525958 +173.0,23084.70173774591,1673.9472726379995,0.92901,1,721.6681616642957,131.48317112784352,9.675995795595373 +174.0,22527.602874079257,1611.2834792513506,0.93438,1,672.3096968766419,121.53719804774042,9.26024988075489 +175.0,21970.50401041261,1548.6196858647022,0.93975,1,622.9512320889883,111.59122496763736,8.849255347798298 +176.0,21413.405146745958,1485.9558924780533,0.94512,1,573.5927673013344,101.64525188753426,8.442931207261667 +177.0,20856.30628307931,1423.292099091405,0.95049,1,524.2343025136809,91.69927880743118,8.04119829995144 +178.0,20299.207419412647,1360.628305704755,0.95586,1,474.87583772602613,81.75330572732788,7.643979245532331 +179.0,19742.108555746,1297.964512318106,0.96123,1,425.51737293837243,71.80733264722481,7.251198392838581 +180.0,19185.00969207935,1235.3007189314574,0.9666,1,376.15890815071873,61.86135956712173,6.86278177184143 +181.0,18627.910828412703,1172.636925544809,0.97197,1,326.8004433630651,51.915386487018644,6.478657047208889 +182.0,18070.811964746055,1109.97313215816,0.97734,1,277.4419785754114,41.969413406915564,6.098753473396484 +183.0,17513.713101079404,1047.3093387715114,0.98271,1,228.0835137877577,32.023440326812484,5.723001851210445 +184.0,16956.614237412756,984.6455453848628,0.98808,1,178.72504900010404,22.0774672467094,5.351334485787298 +185.0,16399.515373746093,921.9817519982128,0.99345,1,129.3665842124493,12.13149416660611,4.983685145936285 +186.0,15842.416510079445,859.3179586115641,0.99882,1,80.00811942479561,2.185521086503028,4.619989024793355 +187.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.521648454523403 +188.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.4975971329567885 +189.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.473800322729504 +190.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.450254005241454 +191.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.426954246051708 +192.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.4038971926868555 +193.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.381079072517494 +194.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.358496190700393 +195.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.336144928183981 +196.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.314021739774879 +197.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.292123152263331 +198.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.270445762605435 +199.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.2489862361601825 +200.0,15720.0,845.5482609958763,1.0,0,69.16212530013463,0.0,4.227741304979381 diff --git a/p4/pareto_knee_analysis.png b/p4/pareto_knee_analysis.png new file mode 100644 index 0000000..80e7ec9 Binary files /dev/null and b/p4/pareto_knee_analysis.png differ diff --git a/p4/scenario_comparison.csv b/p4/scenario_comparison.csv new file mode 100644 index 0000000..428b908 --- /dev/null +++ b/p4/scenario_comparison.csv @@ -0,0 +1,5 @@ +Scenario,Years,Elevator %,Energy (PJ),Fuel (Mt),CO2 Total (Mt),CO2 Combustion (Mt),CO2 Production (Mt),CO2 Electricity (Mt),H2O Total (Mt),H2O Stratosphere (Mt),Annual CO2 (Mt/yr),CO2/ton (kg),Launches +Rocket Only,219.17808219178082,0.0,123792.29464078367,9596.301910138269,12968.335775784077,5864.406722862275,7103.9290529218015,0.0,4798.150955069134,1919.260382027654,59.16803197701485,129683.35775784076,800000 +Elevator Only,186.21973929236498,100.0,15720.0,69.16212530013463,845.5482609958763,42.26574323897116,51.199184423571886,752.0833333333333,34.58106265006732,0.0,4.540594161547856,8455.482609958763,0 +Combined (Min Time),100.67958721369243,13.002766901193619,65363.07518737231,4445.459660495099,6414.158181581949,2716.6697925247827,3290.874998672067,406.61339038509936,2222.7298302475497,881.6134400202537,63.70862613856271,64141.58181581949,367490 +Combined (Knee Point),139.0,27.59701689497449,42518.6520871275,2438.0411570581277,3856.1192928021637,1489.9140404244113,1804.8276898777528,561.3775625,1219.0205785290639,477.2832943740698,27.741865415842906,38561.192928021635,202860 diff --git a/prob/p_B.pdf b/prob/p_B.pdf new file mode 100644 index 0000000..e66cc47 Binary files /dev/null and b/prob/p_B.pdf differ