소스 정보
- 저장소
- kucherenko/petropowers
- 최근 소스 활동
- 2026년 4월 6일 08:19
- 감지된 SKILL.md 언어
- 영어
- 스타
- 10
- 포크
- 4
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/kucherenko/petropowers --skill refining명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | refining |
| description | Guide AI agents through refinery operations and process optimization. |
Guide AI agents through refinery operations and process optimization.
Support process and chemical engineers in refinery operations, optimization, and product quality control.
| Data | Source | Frequency |
|---|---|---|
| Crude assay | Lab/Supplier | Batch |
| Temperature/pressure | DCS | Real-time (1-sec) |
| Flow rates | DCS | Real-time (1-sec) |
| Product qualities | Lab | 4-8 hours |
| Catalyst activity | Lab | Weekly |
| Energy consumption | Meters | Hourly |
These tasks are handled by this skill:
These tasks invoke petropowers:oil-gas-delegation:
def simplify_crude_assay(api, sulfur_percent, tbp_points):
"""
Simplified crude assay analysis
TBP (True Boiling Point) points: [(temp_F, vol_percent), ...]
"""
# Basic properties
print(f"API Gravity: {api:.1f}°")
print(f"Classification: {'Light' if api > 35 else 'Medium' if api > 25 else 'Heavy'}")
print(f"Sulfur: {sulfur_percent:.2f}%")
print(f"Type: {'Sweet' if sulfur_percent < 0.5 else 'Sour'}")
# Yield estimate (simplified)
tbp_df = pd.DataFrame(tbp_points, columns=['temp_f', 'vol_pct'])
# Cuts (approximate)
naphtha_yield = tbp_df[tbp_df['temp_f'] < 400]['vol_pct'].max()
diesel_yield = tbp_df[(tbp_df['temp_f'] >= 400) & (tbp_df['temp_f'] < 650)]['vol_pct'].max() - naphtha_yield
gasoil_yield = tbp_df[(tbp_df['temp_f'] >= 650) & (tbp_df['temp_f'] < )][].() - naphtha_yield - diesel_yield
()
()
()
()
()
api =
sulfur =
tbp_points = [
(, ),
(, ),
(, ),
(, ),
(, ),
(, ),
]
simplify_crude_assay(api, sulfur, tbp_points)
def optimize_cut_points(demand_prices, unit_capacity, crude_rate):
"""
Optimize cut points based on product prices
Simplified linear programming approach
"""
# Product prices ($/bbl)
gasoline_price = demand_prices['gasoline']
diesel_price = demand_prices['diesel']
fueloil_price = demand_prices['fuel_oil']
# Optimize: where to cut between products
# Higher gasoline price → lower naphtha cut point
# Higher diesel price → raise diesel cut point
# Simplified heuristic
if gasoline_price > diesel_price * 1.1:
# Maximize gasoline
naphtha_cut_temp = 380 # lower = more naphtha
diesel_cut_temp = 650
elif diesel_price > gasoline_price * 1.1:
# Maximize diesel
naphtha_cut_temp = 400 # higher = less naphtha
diesel_cut_temp = 680 # higher = more diesel
else:
# Balanced
naphtha_cut_temp = 390
diesel_cut_temp = 665
return {
'naphtha_end_temp_f': naphtha_cut_temp,
'diesel_end_temp_f': diesel_cut_temp,
}
# Example
prices = {
'gasoline': 85, # $/bbl
'diesel': 95, # $/bbl
'fuel_oil': 60, # $/bbl
}
cuts = optimize_cut_points(prices, unit_capacity=, crude_rate=)
()
def blend_gasoline(components, target_ron, target_rvp):
"""
Simple gasoline blending for RON (Octane) and RVP (Vapor Pressure)
components: [{'name': str, 'vol': bbl, 'ron': float, 'rvp': float}, ...]
"""
total_vol = sum(c['vol'] for c in components)
# Weighted average blending (simplified)
blended_ron = sum(c['vol'] * c['ron'] for c in components) / total_vol
blended_rvp = sum(c['vol'] * c['rvp'] for c in components) / total_vol
# Check specs
meets_ron = blended_ron >= target_ron
meets_rvp = blended_rvp <= target_rvp
return {
'ron': blended_ron,
'rvp': blended_rvp,
'volume': total_vol,
'meets_specs': meets_ron and meets_rvp,
'ron_ok': meets_ron,
'rvp_ok': meets_rvp,
}
# Example
components = [
{'name': 'FCC Gasoline', 'vol': 20000, 'ron': 92, 'rvp': 8.0},
{'name': 'Reformate', 'vol': 15000, 'ron': 100, 'rvp': 4.5},
{'name': , : , : , : },
{: , : , : , : },
]
result = blend_gasoline(components, target_ron=, target_rvp=)
()
()
def calculate_refinery_efficiency(energy_in_mmbtu, crude_in_bbl, product_out_bbl):
"""
Calculate refinery energy efficiency
"""
# Energy intensity (typically 5-15% of crude energy)
energy_per_bbl = energy_in_mmbtu / crude_in_bbl
# Typical refinery uses 8-12% of crude energy
# Good: <10%, Excellent: <8%
if energy_per_bbl < 0.3:
rating = "Excellent"
elif energy_per_bbl < 0.4:
rating = "Good"
elif energy_per_bbl < 0.5:
rating = "Fair"
else:
rating = "Poor"
return {
'energy_mmbtu_per_bbl': energy_per_bbl,
'energy_mj_per_bbl': energy_per_bbl * 1055, # MMBTU to MJ
'rating': rating,
'total_energy_mmbtu': energy_in_mmbtu,
}
# Example: Refinery processing 150,000 bpd
energy_result = calculate_refinery_efficiency(
energy_in_mmbtu=60000, # per day
crude_in_bbl=150000,
product_out_bbl=145000 # some loss
)
print(f"Energy intensity: {energy_result['energy_mmbtu_per_bbl']:.2f} MMBTU/bbl")
print(f"Rating: {energy_result['rating']}")
def simple_yield_accounting(crude_in, outputs):
"""
Simple mass balance for refinery yield
"""
total_out = sum(outputs.values())
loss = crude_in - total_out
print(f"Input: {crude_in:,} bbl")
print(f"\nOutputs:")
for product, volume in outputs.items():
yield_pct = volume / crude_in * 100
print(f" {product}: {volume:,} bbl ({yield_pct:.1f}%)")
print(f"\nLoss: {loss:,} bbl ({loss/crude_in*100:.2f}%)")
print(f"Recovery: {total_out/crude_in*100:.2f}%")
return {
'loss': loss,
'recovery': total_out / crude_in,
'yields': {k: v/crude_in for k, v in outputs.items()}
}
# Example
yield_result = simple_yield_accounting(
crude_in=100000,
outputs={
'gasoline': 45000,
'diesel': 30000,
'jet_fuel': 8000,
'fuel_oil': 12000,
'lpg': 3000,
}
)
| Product | Key Specs | Typical Yield |
|---|---|---|
| Gasoline | RON, RVP, Sulfur | 40-50% |
| Diesel | Cetane, Sulfur, Flash | 25-35% |
| Jet Fuel | Flash, Freeze, Smoke | 5-10% |
| Fuel Oil | Viscosity, Sulfur | 5-15% |
| LPG | Composition | 2-5% |
| KPI | Units | Target |
|---|---|---|
| Utilization | % | >95% |
| Energy intensity | MMBTU/bbl | <0.4 |
| On-spec products | % | >99% |
| Yield (high-value) | % | Maximize |
| Safety (TRIR) | per 200k hrs | <0.5 |
Refinery hazards:
Critical safety systems: