Merge branch 'master' of ssh://gitea.danesabo.com:1738/danesabo/Obsidian

This commit is contained in:
Dane Sabo 2025-11-11 11:44:21 -05:00
commit be5b48e723
36 changed files with 2833 additions and 190 deletions

View File

@ -268,3 +268,6 @@
{"description":"Problem 3","entry":"20251105T160709Z","modified":"20251108T202716Z","project":"class.NUCE2101.Exam2","start":"20251108T202716Z","status":"pending","uuid":"5429f3ab-06f9-4df3-909d-ba5920169000"} {"description":"Problem 3","entry":"20251105T160709Z","modified":"20251108T202716Z","project":"class.NUCE2101.Exam2","start":"20251108T202716Z","status":"pending","uuid":"5429f3ab-06f9-4df3-909d-ba5920169000"}
{"description":"Problem 3","end":"20251108T225056Z","entry":"20251105T160709Z","modified":"20251108T225056Z","project":"class.NUCE2101.Exam2","status":"completed","uuid":"5429f3ab-06f9-4df3-909d-ba5920169000"} {"description":"Problem 3","end":"20251108T225056Z","entry":"20251105T160709Z","modified":"20251108T225056Z","project":"class.NUCE2101.Exam2","status":"completed","uuid":"5429f3ab-06f9-4df3-909d-ba5920169000"}
{"description":"Problem 2","end":"20251109T205515Z","entry":"20251105T160706Z","modified":"20251109T205515Z","project":"class.NUCE2101.Exam2","status":"completed","uuid":"5c30cc0b-222a-4975-a62b-9de8a78ab813"} {"description":"Problem 2","end":"20251109T205515Z","entry":"20251105T160706Z","modified":"20251109T205515Z","project":"class.NUCE2101.Exam2","status":"completed","uuid":"5c30cc0b-222a-4975-a62b-9de8a78ab813"}
{"description":"Problem 5","end":"20251110T203913Z","entry":"20251105T160716Z","modified":"20251110T203913Z","project":"class.NUCE2101.Exam2","status":"completed","uuid":"7bdde787-042d-4b9b-b2de-19e11b40d032"}
{"description":"Problem 1","end":"20251110T213122Z","entry":"20251105T160652Z","modified":"20251110T213122Z","project":"class.NUCE2101.Exam2","status":"completed","uuid":"a2c8dc0b-e889-451a-a8c0-00a3ae9c5efd"}
{"description":"Problem 4","entry":"20251105T160711Z","modified":"20251110T213128Z","project":"class.NUCE2101.Exam2","start":"20251110T213128Z","status":"pending","uuid":"c39c9349-74b7-4a5c-8e75-27d341488c14"}

View File

@ -1,3 +1,5 @@
[description:"Problem 1" end:"1762810282" entry:"1762358812" modified:"1762810282" project:"class.NUCE2101.Exam2" status:"completed" uuid:"a2c8dc0b-e889-451a-a8c0-00a3ae9c5efd"]
[description:"Problem 5" end:"1762807153" entry:"1762358836" modified:"1762807153" project:"class.NUCE2101.Exam2" status:"completed" uuid:"7bdde787-042d-4b9b-b2de-19e11b40d032"]
[description:"Problem 2" end:"1762721715" entry:"1762358826" modified:"1762721715" project:"class.NUCE2101.Exam2" status:"completed" uuid:"5c30cc0b-222a-4975-a62b-9de8a78ab813"] [description:"Problem 2" end:"1762721715" entry:"1762358826" modified:"1762721715" project:"class.NUCE2101.Exam2" status:"completed" uuid:"5c30cc0b-222a-4975-a62b-9de8a78ab813"]
[description:"Problem 3" end:"1762642256" entry:"1762358829" modified:"1762642256" project:"class.NUCE2101.Exam2" status:"completed" uuid:"5429f3ab-06f9-4df3-909d-ba5920169000"] [description:"Problem 3" end:"1762642256" entry:"1762358829" modified:"1762642256" project:"class.NUCE2101.Exam2" status:"completed" uuid:"5429f3ab-06f9-4df3-909d-ba5920169000"]
[description:"Problem 6" end:"1762633599" entry:"1762358840" modified:"1762633599" project:"class.NUCE2101.Exam2" status:"completed" uuid:"fcbcec80-81e1-4a7d-9ea8-d8b1c6f9737c"] [description:"Problem 6" end:"1762633599" entry:"1762358840" modified:"1762633599" project:"class.NUCE2101.Exam2" status:"completed" uuid:"fcbcec80-81e1-4a7d-9ea8-d8b1c6f9737c"]

View File

@ -58,7 +58,5 @@
[description:"project zk.perm Heat Removal" entry:"1761852415" modified:"1761852541" project:"zk.perm" status:"pending" uuid:"e77893e0-5ba6-4dcb-bdb0-4828845c64fe"] [description:"project zk.perm Heat Removal" entry:"1761852415" modified:"1761852541" project:"zk.perm" status:"pending" uuid:"e77893e0-5ba6-4dcb-bdb0-4828845c64fe"]
[description:"project zk.perm Reactor Coolant Inventory Control" entry:"1761852439" modified:"1761852541" project:"zk.perm" status:"pending" uuid:"8e9a01f7-fe14-4a41-a085-0d99d8e0f03e"] [description:"project zk.perm Reactor Coolant Inventory Control" entry:"1761852439" modified:"1761852541" project:"zk.perm" status:"pending" uuid:"8e9a01f7-fe14-4a41-a085-0d99d8e0f03e"]
[description:"Review Simeonas comments and implement them\n" entry:"1762182404" modified:"1762182404" project:"ERLM" status:"pending" tags:"editing" tags_editing:"x" uuid:"4f55e685-ed77-4533-9865-2ebe64b80632"] [description:"Review Simeonas comments and implement them\n" entry:"1762182404" modified:"1762182404" project:"ERLM" status:"pending" tags:"editing" tags_editing:"x" uuid:"4f55e685-ed77-4533-9865-2ebe64b80632"]
[description:"Problem 1" entry:"1762358812" modified:"1762358812" project:"class.NUCE2101.Exam2" status:"pending" uuid:"a2c8dc0b-e889-451a-a8c0-00a3ae9c5efd"] [description:"Problem 4" entry:"1762358831" modified:"1762810288" project:"class.NUCE2101.Exam2" start:"1762810288" status:"pending" uuid:"c39c9349-74b7-4a5c-8e75-27d341488c14"]
[description:"Problem 4" entry:"1762358831" modified:"1762358831" project:"class.NUCE2101.Exam2" status:"pending" uuid:"c39c9349-74b7-4a5c-8e75-27d341488c14"]
[description:"Problem 5" entry:"1762358836" modified:"1762358836" project:"class.NUCE2101.Exam2" status:"pending" uuid:"7bdde787-042d-4b9b-b2de-19e11b40d032"]
[dep_5429f3ab-06f9-4df3-909d-ba5920169000:"x" dep_5c30cc0b-222a-4975-a62b-9de8a78ab813:"x" dep_7bdde787-042d-4b9b-b2de-19e11b40d032:"x" dep_a2c8dc0b-e889-451a-a8c0-00a3ae9c5efd:"x" dep_c39c9349-74b7-4a5c-8e75-27d341488c14:"x" dep_fcbcec80-81e1-4a7d-9ea8-d8b1c6f9737c:"x" depends:"5429f3ab-06f9-4df3-909d-ba5920169000,5c30cc0b-222a-4975-a62b-9de8a78ab813,7bdde787-042d-4b9b-b2de-19e11b40d032,a2c8dc0b-e889-451a-a8c0-00a3ae9c5efd,c39c9349-74b7-4a5c-8e75-27d341488c14,fcbcec80-81e1-4a7d-9ea8-d8b1c6f9737c" description:"Submit Exam 2" due:"1762750800" entry:"1762358874" modified:"1762358874" project:"class.NUCE2101.Exam2" status:"pending" uuid:"ab2e56e4-4d9f-4e85-b40d-6f312ac17332"] [dep_5429f3ab-06f9-4df3-909d-ba5920169000:"x" dep_5c30cc0b-222a-4975-a62b-9de8a78ab813:"x" dep_7bdde787-042d-4b9b-b2de-19e11b40d032:"x" dep_a2c8dc0b-e889-451a-a8c0-00a3ae9c5efd:"x" dep_c39c9349-74b7-4a5c-8e75-27d341488c14:"x" dep_fcbcec80-81e1-4a7d-9ea8-d8b1c6f9737c:"x" depends:"5429f3ab-06f9-4df3-909d-ba5920169000,5c30cc0b-222a-4975-a62b-9de8a78ab813,7bdde787-042d-4b9b-b2de-19e11b40d032,a2c8dc0b-e889-451a-a8c0-00a3ae9c5efd,c39c9349-74b7-4a5c-8e75-27d341488c14,fcbcec80-81e1-4a7d-9ea8-d8b1c6f9737c" description:"Submit Exam 2" due:"1762750800" entry:"1762358874" modified:"1762358874" project:"class.NUCE2101.Exam2" status:"pending" uuid:"ab2e56e4-4d9f-4e85-b40d-6f312ac17332"]

View File

@ -959,3 +959,15 @@ time 1762721715
old [description:"Problem 2" entry:"1762358826" modified:"1762358826" project:"class.NUCE2101.Exam2" status:"pending" uuid:"5c30cc0b-222a-4975-a62b-9de8a78ab813"] old [description:"Problem 2" entry:"1762358826" modified:"1762358826" project:"class.NUCE2101.Exam2" status:"pending" uuid:"5c30cc0b-222a-4975-a62b-9de8a78ab813"]
new [description:"Problem 2" end:"1762721715" entry:"1762358826" modified:"1762721715" project:"class.NUCE2101.Exam2" status:"completed" uuid:"5c30cc0b-222a-4975-a62b-9de8a78ab813"] new [description:"Problem 2" end:"1762721715" entry:"1762358826" modified:"1762721715" project:"class.NUCE2101.Exam2" status:"completed" uuid:"5c30cc0b-222a-4975-a62b-9de8a78ab813"]
--- ---
time 1762807153
old [description:"Problem 5" entry:"1762358836" modified:"1762358836" project:"class.NUCE2101.Exam2" status:"pending" uuid:"7bdde787-042d-4b9b-b2de-19e11b40d032"]
new [description:"Problem 5" end:"1762807153" entry:"1762358836" modified:"1762807153" project:"class.NUCE2101.Exam2" status:"completed" uuid:"7bdde787-042d-4b9b-b2de-19e11b40d032"]
---
time 1762810282
old [description:"Problem 1" entry:"1762358812" modified:"1762358812" project:"class.NUCE2101.Exam2" status:"pending" uuid:"a2c8dc0b-e889-451a-a8c0-00a3ae9c5efd"]
new [description:"Problem 1" end:"1762810282" entry:"1762358812" modified:"1762810282" project:"class.NUCE2101.Exam2" status:"completed" uuid:"a2c8dc0b-e889-451a-a8c0-00a3ae9c5efd"]
---
time 1762810288
old [description:"Problem 4" entry:"1762358831" modified:"1762358831" project:"class.NUCE2101.Exam2" status:"pending" uuid:"c39c9349-74b7-4a5c-8e75-27d341488c14"]
new [description:"Problem 4" entry:"1762358831" modified:"1762810288" project:"class.NUCE2101.Exam2" start:"1762810288" status:"pending" uuid:"c39c9349-74b7-4a5c-8e75-27d341488c14"]
---

Binary file not shown.

View File

@ -0,0 +1,321 @@
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint
# Problem 1: Two-Loop Reactor System
print("=== Problem 1: Two-Loop Reactor with Steam Generators ===\n")
# Given Parameters
mu = None # Reactor Water Mass Fraction (RWMF) - to be determined or specified
# Base parameters
C_0 = 33.33 # Base Heat Capacity [%-sec/°F]
tau_0 = 0.75 * C_0 # Base Time Constant [sec/(%-sec/°F)] * C_0 = [sec]
# Initial steady state temperature
T_hot_initial = 450 # °F (reactor outlet / hot leg temperature)
T_cold_1_initial = 450 # °F (cold leg 1 temperature)
T_cold_2_initial = 450 # °F (cold leg 2 temperature)
print("Base Parameters:")
print(f"C_0 (Base Heat Capacity) = {C_0:.2f} %-sec/°F")
print(f"tau_0 (Base Time Constant) = {tau_0:.2f} sec")
print(f"\nInitial Steady State:")
print(f"T_hot = {T_hot_initial} °F")
print(f"T_cold_1 = {T_cold_1_initial} °F")
print(f"T_cold_2 = {T_cold_2_initial} °F")
# System parameters as functions of mu (RWMF)
def calculate_system_parameters(mu):
"""
Calculate system parameters based on Reactor Water Mass Fraction (mu)
Parameters:
mu: Reactor Water Mass Fraction (RWMF)
Returns:
dict: Dictionary containing all calculated parameters
"""
# Reactor parameters
tau_r = mu * tau_0 # Reactor time constant [sec]
C_r = mu * C_0 # Reactor heat capacity [%-sec/°F]
# Steam Generator parameters (each)
tau_sg = (1 - mu) * tau_r / 2 # Steam Generator water time constant [sec]
C_sg = (1 - mu) * C_0 / 2 # Steam Generator heat capacity [%-sec/°F]
params = {
"mu": mu,
"tau_r": tau_r,
"C_r": C_r,
"tau_sg": tau_sg,
"C_sg": C_sg,
"C_0": C_0,
"tau_0": tau_0,
}
return params
# Example: Calculate parameters for mu = 0.5 (50% of water in reactor)
if mu is None:
mu_example = 0.5
print(f"\n--- Example with mu = {mu_example} ---")
params = calculate_system_parameters(mu_example)
print(f"\nReactor Parameters:")
print(f" tau_r (Reactor time constant) = {params['tau_r']:.2f} sec")
print(f" C_r (Reactor heat capacity) = {params['C_r']:.2f} %-sec/°F")
print(f"\nSteam Generator Parameters (each):")
print(f" tau_sg (SG water time constant) = {params['tau_sg']:.2f} sec")
print(f" C_sg (SG heat capacity) = {params['C_sg']:.2f} %-sec/°F")
# System description
print(f"\n" + "=" * 60)
print("System Description:")
print("=" * 60)
print(
"""
Two-Loop Reactor System:
- Reactor (hot leg) at T_hot
- Steam Generator 1 with cold leg at T_cold_1
- Steam Generator 2 with cold leg at T_cold_2
- Each loop: pump reactor steam generator back to pump
- Lumped reactor volume with combined hot branches
- Equal mass flow rates in each loop
- Ignore loop transport times
Key Assumptions:
- Each SG + cold loop has same water mass and flow rate
- Reactor and hot branches lumped into single water volume
- System initially at equilibrium (100% power, balanced)
- Constant average temperature maintained
"""
)
# Part A: Differential Equations
print(f"\n" + "=" * 60)
print("Part A: Differential Equations")
print("=" * 60)
def get_differential_equations(mu):
"""
Develop differential equations for T_hot, T_cold1, T_cold2
Key insight: Flow heat capacity rate W = C_0 / (2 * tau_0)
This is the (mass flow rate * specific heat) for each loop
"""
params = calculate_system_parameters(mu)
# Flow heat capacity rate for each loop (same for both loops)
W = C_0 / (2 * tau_0)
print(f"\nFor mu = {mu}:")
print(f"Flow heat capacity rate (each loop): W = {W:.4f} %-sec/°F")
print(f"C_r = {params['C_r']:.2f}, C_sg = {params['C_sg']:.2f}")
print(f"\nDifferential Equations:")
print(f" C_r * dT_hot/dt = P_r - W*(T_hot - T_cold1) - W*(T_hot - T_cold2)")
print(f" C_sg * dT_cold1/dt = W*(T_hot - T_cold1) - Qdot1")
print(f" C_sg * dT_cold2/dt = W*(T_hot - T_cold2) - Qdot2")
print(f"\nwhere:")
print(f" P_r = reactor power (positive for heat generation)")
print(f" Qdot1, Qdot2 = SG heat removal rates (positive for heat removal)")
print(f" W = {W:.4f} %-sec/°F (flow heat capacity rate per loop)")
# Matrix form: dT/dt = A*T + B
print(f"\n--- Matrix Form: dT/dt = A*T + B ---")
# Coefficient matrix A
A = np.array(
[
[-2 * W / params["C_r"], W / params["C_r"], W / params["C_r"]],
[W / params["C_sg"], -W / params["C_sg"], 0],
[W / params["C_sg"], 0, -W / params["C_sg"]],
]
)
print(f"\nMatrix A (coefficients):")
print(f" [{A[0,0]:7.4f} {A[0,1]:7.4f} {A[0,2]:7.4f}]")
print(f" [{A[1,0]:7.4f} {A[1,1]:7.4f} {A[1,2]:7.4f}]")
print(f" [{A[2,0]:7.4f} {A[2,1]:7.4f} {A[2,2]:7.4f}]")
# For general case with P_r, Qdot1, Qdot2
print(f"\nVector B (forcing terms, depends on P_r, Qdot1, Qdot2):")
print(f" [P_r/C_r, -Qdot1/C_sg, -Qdot2/C_sg]^T")
print(
f" [P_r/{params['C_r']:.2f}, -Qdot1/{params['C_sg']:.2f}, -Qdot2/{params['C_sg']:.2f}]^T"
)
return W, params
# Part D: Transient Simulation Setup
print(f"\n" + "=" * 60)
print("Part D: Transient Simulation (0 to 30 seconds)")
print("=" * 60)
def reactor_odes(y, t, W, C_r, C_sg, P_r, Q1, Q2):
"""
ODE system for two-loop reactor
y = [T_hot, T_cold1, T_cold2]
Parameters:
P_r: Reactor power (heat generation rate)
Q1, Q2: Steam generator heat removal rates (Qdot_1, Qdot_2)
"""
T_hot, T_cold1, T_cold2 = y
# Reactor energy balance
dT_hot_dt = (P_r - W * (T_hot - T_cold1) - W * (T_hot - T_cold2)) / C_r
# Steam generator 1 energy balance (Q1 is heat removal rate)
dT_cold1_dt = (W * (T_hot - T_cold1) - Q1) / C_sg
# Steam generator 2 energy balance (Q2 is heat removal rate)
dT_cold2_dt = (W * (T_hot - T_cold2) - Q2) / C_sg
return [dT_hot_dt, dT_cold1_dt, dT_cold2_dt]
def simulate_transient(mu, Q1_percent, Q2_percent, t_max=30):
"""
Simulate reactor transient
Parameters:
mu: Reactor Water Mass Fraction
Q1_percent: Steam generator 1 heat removal rate (% of nominal)
Q2_percent: Steam generator 2 heat removal rate (% of nominal)
t_max: Simulation time (seconds)
"""
params = calculate_system_parameters(mu)
W = C_0 / (2 * tau_0)
# Initial conditions (steady state at 100% power balanced)
T_hot_0 = T_hot_initial
T_cold1_0 = T_cold_1_initial
T_cold2_0 = T_cold_2_initial
y0 = [T_hot_0, T_cold1_0, T_cold2_0]
# Power levels (normalized - 100% = 1.0 in appropriate units)
P_r = 100.0 # Reactor power (heat generation rate)
Q1 = Q1_percent # SG1 heat removal rate
Q2 = Q2_percent # SG2 heat removal rate
# Time array
t = np.linspace(0, t_max, 500)
# Solve ODE system
solution = odeint(
reactor_odes, y0, t, args=(W, params["C_r"], params["C_sg"], P_r, Q1, Q2)
)
T_hot = solution[:, 0]
T_cold1 = solution[:, 1]
T_cold2 = solution[:, 2]
# Calculate average temperature (mass-weighted, depends on mu)
T_ave = mu * T_hot + (1 - mu) * (T_cold1 + T_cold2) / 2
return t, T_hot, T_cold1, T_cold2, T_ave
# Example: Show how to set up simulations
print("\nSimulation cases to run:")
print("1. mu=0.5, Q1=50%, Q2=50% (equally loaded)")
print("2. mu=0.75, Q1=50%, Q2=50% (equally loaded)")
print("3. mu=0.5, Q1=60%, Q2=40% (unequally loaded)")
print("4. mu=0.75, Q1=60%, Q2=40% (unequally loaded)")
print("\nNote: Percentages are fractions of reactor power (P_r = 100%)")
# Run example simulation
print("\n--- Running Example: mu=0.5, Equal Loading ---")
W_example, params_example = get_differential_equations(0.5)
# Run all simulations and create plots
print("\n" + "=" * 60)
print("Running Simulations and Creating Plots")
print("=" * 60)
# Case 1 & 2: Equally loaded (Q1=50%, Q2=50%)
fig1, axes1 = plt.subplots(2, 2, figsize=(14, 10))
fig1.suptitle(
"Equally Loaded Steam Generators (Q1=50%, Q2=50%)", fontsize=14, fontweight="bold"
)
for idx, mu in enumerate([0.5, 0.75]):
print(f"\nSimulating mu={mu}, Q1=50%, Q2=50%")
t, T_hot, T_cold1, T_cold2, T_ave = simulate_transient(mu, 50.0, 50.0)
# Plot temperatures
ax = axes1[idx, 0]
ax.plot(t, T_hot, "r-", linewidth=2, label="T_hot")
ax.plot(t, T_cold1, "b-", linewidth=2, label="T_cold1")
ax.plot(t, T_cold2, "g-", linewidth=2, label="T_cold2")
ax.plot(t, T_ave, "k--", linewidth=2, label="T_ave")
ax.set_xlabel("Time (sec)", fontsize=10)
ax.set_ylabel("Temperature (°F)", fontsize=10)
ax.set_title(f"mu = {mu} (RWMF)", fontsize=11, fontweight="bold")
ax.grid(True, alpha=0.3)
ax.legend(loc="best")
# Plot temperature differences
ax = axes1[idx, 1]
ax.plot(t, T_hot - T_cold1, "b-", linewidth=2, label="ΔT1 = T_hot - T_cold1")
ax.plot(t, T_hot - T_cold2, "g-", linewidth=2, label="ΔT2 = T_hot - T_cold2")
ax.set_xlabel("Time (sec)", fontsize=10)
ax.set_ylabel("Temperature Difference (°F)", fontsize=10)
ax.set_title(f"Temperature Differences (mu = {mu})", fontsize=11, fontweight="bold")
ax.grid(True, alpha=0.3)
ax.legend(loc="best")
plt.tight_layout()
plt.savefig("problem1_equal_loading.png", dpi=300, bbox_inches="tight")
print("Plot saved: problem1_equal_loading.png")
plt.close()
# Case 3 & 4: Unequally loaded (Q1=60%, Q2=40%)
fig2, axes2 = plt.subplots(2, 2, figsize=(14, 10))
fig2.suptitle(
"Unequally Loaded Steam Generators (Q1=60%, Q2=40%)", fontsize=14, fontweight="bold"
)
for idx, mu in enumerate([0.5, 0.75]):
print(f"\nSimulating mu={mu}, Q1=60%, Q2=40%")
t, T_hot, T_cold1, T_cold2, T_ave = simulate_transient(mu, 60.0, 40.0)
# Plot temperatures
ax = axes2[idx, 0]
ax.plot(t, T_hot, "r-", linewidth=2, label="T_hot")
ax.plot(t, T_cold1, "b-", linewidth=2, label="T_cold1")
ax.plot(t, T_cold2, "g-", linewidth=2, label="T_cold2")
ax.plot(t, T_ave, "k--", linewidth=2, label="T_ave")
ax.set_xlabel("Time (sec)", fontsize=10)
ax.set_ylabel("Temperature (°F)", fontsize=10)
ax.set_title(f"mu = {mu} (RWMF)", fontsize=11, fontweight="bold")
ax.grid(True, alpha=0.3)
ax.legend(loc="best")
# Plot temperature differences
ax = axes2[idx, 1]
ax.plot(t, T_hot - T_cold1, "b-", linewidth=2, label="ΔT1 = T_hot - T_cold1")
ax.plot(t, T_hot - T_cold2, "g-", linewidth=2, label="ΔT2 = T_hot - T_cold2")
ax.set_xlabel("Time (sec)", fontsize=10)
ax.set_ylabel("Temperature Difference (°F)", fontsize=10)
ax.set_title(f"Temperature Differences (mu = {mu})", fontsize=11, fontweight="bold")
ax.grid(True, alpha=0.3)
ax.legend(loc="best")
plt.tight_layout()
plt.savefig("problem1_unequal_loading.png", dpi=300, bbox_inches="tight")
print("Plot saved: problem1_unequal_loading.png")
plt.close()
print("\n" + "=" * 60)
print("Simulation Complete!")
print("=" * 60)

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 KiB

View File

@ -0,0 +1,210 @@
import sympy as sm
import numpy as np
print("="*70)
print("Problem 1: SymPy Verification")
print("="*70)
# Define symbols
T_hot, T_cold1, T_cold2 = sm.symbols('T_hot T_cold1 T_cold2')
P_r, Qdot1, Qdot2 = sm.symbols('P_r Qdot_1 Qdot_2', positive=True)
C_r, C_sg, W = sm.symbols('C_r C_sg W', positive=True)
C_0, tau_0, mu = sm.symbols('C_0 tau_0 mu', positive=True)
t = sm.symbols('t', positive=True)
print("\n--- Part A: Derive Differential Equations ---")
# Energy balance equations
print("\nReactor energy balance:")
reactor_eq = sm.Eq(C_r * sm.Derivative(T_hot, t),
P_r - W*(T_hot - T_cold1) - W*(T_hot - T_cold2))
print(f"C_r * dT_hot/dt = P_r - W*(T_hot - T_cold1) - W*(T_hot - T_cold2)")
print(reactor_eq)
print("\nSteam Generator 1 energy balance:")
sg1_eq = sm.Eq(C_sg * sm.Derivative(T_cold1, t),
W*(T_hot - T_cold1) - Qdot1)
print(f"C_sg * dT_cold1/dt = W*(T_hot - T_cold1) - Qdot1")
print(sg1_eq)
print("\nSteam Generator 2 energy balance:")
sg2_eq = sm.Eq(C_sg * sm.Derivative(T_cold2, t),
W*(T_hot - T_cold2) - Qdot2)
print(f"C_sg * dT_cold2/dt = W*(T_hot - T_cold2) - Qdot2")
print(sg2_eq)
# Expand and simplify to get matrix form
print("\n--- Expanding to Matrix Form: dT/dt = A*T + B ---")
# Reactor equation expanded
reactor_rhs = P_r - W*T_hot + W*T_cold1 - W*T_hot + W*T_cold2
reactor_rhs_simplified = sm.expand(reactor_rhs)
print(f"\nReactor RHS expanded:")
print(f" = P_r - 2W*T_hot + W*T_cold1 + W*T_cold2")
print(f" = {reactor_rhs_simplified}")
dT_hot_dt = reactor_rhs_simplified / C_r
print(f"\ndT_hot/dt = {dT_hot_dt}")
# SG1 equation expanded
sg1_rhs = W*T_hot - W*T_cold1 - Qdot1
dT_cold1_dt = sg1_rhs / C_sg
print(f"\ndT_cold1/dt = {dT_cold1_dt}")
# SG2 equation expanded
sg2_rhs = W*T_hot - W*T_cold2 - Qdot2
dT_cold2_dt = sg2_rhs / C_sg
print(f"\ndT_cold2/dt = {dT_cold2_dt}")
# Extract coefficient matrix A
print("\n--- Constructing Matrix A ---")
A_symbolic = sm.Matrix([
[sm.diff(dT_hot_dt, T_hot), sm.diff(dT_hot_dt, T_cold1), sm.diff(dT_hot_dt, T_cold2)],
[sm.diff(dT_cold1_dt, T_hot), sm.diff(dT_cold1_dt, T_cold1), sm.diff(dT_cold1_dt, T_cold2)],
[sm.diff(dT_cold2_dt, T_hot), sm.diff(dT_cold2_dt, T_cold1), sm.diff(dT_cold2_dt, T_cold2)]
])
print("\nMatrix A (symbolic):")
sm.pprint(A_symbolic)
# Extract forcing vector B
print("\n--- Constructing Vector B ---")
# B contains the terms without T_hot, T_cold1, T_cold2
B_symbolic = sm.Matrix([
P_r/C_r,
-Qdot1/C_sg,
-Qdot2/C_sg
])
print("\nVector B (symbolic):")
sm.pprint(B_symbolic)
# Verify: dT/dt = A*T + B
T_vector = sm.Matrix([T_hot, T_cold1, T_cold2])
dT_dt_vector = sm.Matrix([dT_hot_dt, dT_cold1_dt, dT_cold2_dt])
reconstructed = A_symbolic * T_vector + B_symbolic
print("\n--- Verification: A*T + B = dT/dt ---")
print("Checking if A*T + B equals our derived dT/dt...")
for i in range(3):
diff = sm.simplify(reconstructed[i] - dT_dt_vector[i])
if diff == 0:
print(f" Row {i+1}: ✓ VERIFIED")
else:
print(f" Row {i+1}: ✗ ERROR - Difference: {diff}")
# Numerical example for mu = 0.5
print("\n" + "="*70)
print("Numerical Example: mu = 0.5")
print("="*70)
C_0_val = 33.33
tau_0_val = 25.00
W_val = C_0_val / (2 * tau_0_val)
mu_val = 0.5
C_r_val = mu_val * C_0_val
C_sg_val = (1 - mu_val) * C_0_val / 2
print(f"\nC_0 = {C_0_val:.2f} %-sec/°F")
print(f"tau_0 = {tau_0_val:.2f} sec")
print(f"W = {W_val:.4f} %-sec/°F")
print(f"C_r = {C_r_val:.2f} %-sec/°F")
print(f"C_sg = {C_sg_val:.2f} %-sec/°F")
# Substitute numerical values
A_numerical = A_symbolic.subs([(C_r, C_r_val), (C_sg, C_sg_val), (W, W_val)])
print("\nMatrix A (numerical for mu=0.5):")
sm.pprint(A_numerical)
print("\nAs float matrix:")
A_float = np.array(A_numerical).astype(float)
print(A_float)
print("\n--- Part B: Steady State Analysis ---")
# At steady state, dT/dt = 0, so A*T + B = 0
# This means A*T = -B
print("\nAt steady state: A*T_ss + B = 0")
print("Solving for temperature differences...")
# From SG1: 0 = W*T_hot - W*T_cold1 - Qdot1
# Rearranging: W*(T_hot - T_cold1) = Qdot1
DeltaT1 = Qdot1 / W
print(f"\nFrom SG1: W*(T_hot - T_cold1) = Qdot1")
print(f"ΔT1 = T_hot - T_cold1 = {DeltaT1}")
# From SG2: 0 = W*T_hot - W*T_cold2 - Qdot2
# Rearranging: W*(T_hot - T_cold2) = Qdot2
DeltaT2 = Qdot2 / W
print(f"\nFrom SG2: W*(T_hot - T_cold2) = Qdot2")
print(f"ΔT2 = T_hot - T_cold2 = {DeltaT2}")
# From reactor: 0 = P_r - W*DeltaT1 - W*DeltaT2
power_balance = sm.simplify(P_r - W*DeltaT1 - W*DeltaT2)
print(f"\nPower balance check:")
print(f"P_r - W*ΔT1 - W*ΔT2 = {power_balance}")
print(f"Therefore: P_r = Qdot1 + Qdot2 ✓")
print("\n--- Part C: Average Temperature ---")
# Given formula
T_ave_given = T_hot/2 + (T_cold1 + T_cold2)/4
print(f"\nGiven: T_ave = T_hot/2 + (T_cold1 + T_cold2)/4")
print(f"T_ave = {T_ave_given}")
# Mass-weighted average
T_ave_mass_weighted = (C_r*T_hot + C_sg*T_cold1 + C_sg*T_cold2) / (C_r + 2*C_sg)
print(f"\nMass-weighted: T_ave = (C_r*T_hot + C_sg*T_cold1 + C_sg*T_cold2)/(C_r + 2*C_sg)")
# Substitute C_r = mu*C_0 and C_sg = (1-mu)*C_0/2
T_ave_mass_weighted_sub = T_ave_mass_weighted.subs([
(C_r, mu*C_0),
(C_sg, (1-mu)*C_0/2)
])
T_ave_mass_weighted_simplified = sm.simplify(T_ave_mass_weighted_sub)
print(f"\nSubstituting C_r = mu*C_0, C_sg = (1-mu)*C_0/2:")
print(f"T_ave = {T_ave_mass_weighted_simplified}")
# Check if they're equal
print(f"\nChecking if given formula equals mass-weighted formula...")
difference = sm.simplify(T_ave_given - T_ave_mass_weighted_simplified)
print(f"Difference: {difference}")
if difference == 0:
print("✓ VERIFIED: Both formulas are equivalent!")
else:
print("✗ WARNING: Formulas differ!")
print(f"Given formula gives: {T_ave_given}")
print(f"Mass-weighted gives: {T_ave_mass_weighted_simplified}")
# Time derivative of total energy
print("\n--- Energy Conservation ---")
total_energy = C_r*T_hot + C_sg*T_cold1 + C_sg*T_cold2
dE_dt = sm.diff(total_energy, t)
print(f"\nTotal system energy: E = C_r*T_hot + C_sg*T_cold1 + C_sg*T_cold2")
print(f"dE/dt = {dE_dt}")
# Substitute the differential equations
dE_dt_expanded = (C_r*dT_hot_dt + C_sg*dT_cold1_dt + C_sg*dT_cold2_dt)
dE_dt_simplified = sm.simplify(dE_dt_expanded)
print(f"\nSubstituting the differential equations:")
print(f"dE/dt = {dE_dt_simplified}")
print(f"\nTherefore: dE/dt = P_r - Qdot1 - Qdot2")
print(f"When P_r = Qdot1 + Qdot2 (balanced), dE/dt = 0 ✓")
print("\n" + "="*70)
print("Verification Complete!")
print("="*70)
print("\nSummary:")
print("✓ Matrix form correctly derived")
print("✓ Steady-state equations verified")
print("✓ Average temperature formula needs clarification")
print("✓ Energy conservation verified")

View File

@ -0,0 +1,217 @@
import numpy as np
# Two-group cross-section data
cross_sections = {
"fast": {
"D": 1.4, # Diffusion constant [cm]
"Sigma_a": 0.010, # Absorption [cm^-1]
"Sigma_s": 0.050, # Scattering from fast to thermal [cm^-1]
"nu_Sigma_f": 0.000, # Neutrons per fission times fission cross section [cm^-1]
"chi": 1, # Neutron group distribution (fission spectrum)
"v": 1.8e7, # Average group velocity [cm/sec]
},
"thermal": {
"D": 0.35, # Diffusion constant [cm]
"Sigma_a": 0.080, # Absorption [cm^-1]
"Sigma_s": 0.0, # Scattering from thermal to fast [cm^-1]
"nu_Sigma_f": 0.125, # Neutrons per fission times fission cross section [cm^-1]
"chi": 0, # Neutron group distribution (fission spectrum)
"v": 2.2e5, # Average group velocity [cm/sec]
},
"scattering": {
"fast_to_thermal": 0.050, # Sigma_s^(1->2) [cm^-1]
"thermal_to_fast": 0.0, # Sigma_s^(2->1) [cm^-1]
},
}
# Easy access shortcuts
D_fast = cross_sections["fast"]["D"]
D_thermal = cross_sections["thermal"]["D"]
Sigma_a_fast = cross_sections["fast"]["Sigma_a"]
Sigma_a_thermal = cross_sections["thermal"]["Sigma_a"]
Sigma_s_fast = cross_sections["fast"]["Sigma_s"] # Scattering from fast to thermal
Sigma_s_thermal = cross_sections["thermal"][
"Sigma_s"
] # Scattering from thermal to fast
nu_Sigma_f_fast = cross_sections["fast"]["nu_Sigma_f"]
nu_Sigma_f_thermal = cross_sections["thermal"]["nu_Sigma_f"]
chi_fast = cross_sections["fast"]["chi"]
chi_thermal = cross_sections["thermal"]["chi"]
v_fast = cross_sections["fast"]["v"]
v_thermal = cross_sections["thermal"]["v"]
print("Two-Group Cross-Section Data Loaded")
print(f"Fast Group: D={D_fast} cm, Sigma_a={Sigma_a_fast} cm^-1, v={v_fast:.2e} cm/s")
print(
f"Thermal Group: D={D_thermal} cm, Sigma_a={Sigma_a_thermal} cm^-1, v={v_thermal:.2e} cm/s"
)
# Problem 2A: Calculate k_inf using Four-Factor Formula
# k_inf = epsilon * p * f * eta
# where:
# epsilon = fast fission factor (neutrons from fast fission per thermal fission)
# p = resonance escape probability (fraction of fast neutrons reaching thermal)
# f = thermal utilization factor (thermal neutrons absorbed in fuel vs total)
# eta = reproduction factor (neutrons produced per thermal neutron absorbed in fuel)
# Fast fission factor: epsilon = 1 (no fast fissions since nu_Sigma_f_fast = 0)
epsilon = 1.0
# Resonance escape probability: fraction of fast neutrons that scatter to thermal
# p = Sigma_s_fast / (Sigma_a_fast + Sigma_s_fast)
p = Sigma_s_fast / (Sigma_a_fast + Sigma_s_fast)
# Thermal utilization factor: f = 1 (single-region, all absorptions in "fuel")
f = 1.0
# Reproduction factor: eta = nu*Sigma_f / Sigma_a (thermal group)
eta = nu_Sigma_f_thermal / Sigma_a_thermal
# Four-Factor Formula
k_inf = epsilon * p * f * eta
print(f"\n=== Problem 2A: k_infinity (Four-Factor Formula) ===")
print(f"epsilon (fast fission factor) = {epsilon:.4f}")
print(f"p (resonance escape probability) = {p:.4f}")
print(f"f (thermal utilization) = {f:.4f}")
print(f"eta (reproduction factor) = {eta:.4f}")
print(f"k_inf = epsilon * p * f * eta = {k_inf:.4f}")
# Problem 2B: Calculate diffusion lengths
import sympy as sm
# Define buckling as a symbol
B_squared = sm.Symbol("B^2", positive=True)
# Calculate diffusion lengths
# L^2_fast = D_fast / Sigma_total_fast
# where Sigma_total_fast = Sigma_a_fast + Sigma_s_fast (removal from fast group)
Sigma_total_fast = Sigma_a_fast + Sigma_s_fast
L_squared_fast = D_fast / Sigma_total_fast
# L^2_th = D_th / Sigma_a_th
L_squared_th = D_thermal / Sigma_a_thermal
print(f"\n=== Problem 2B: Diffusion Lengths ===")
print(f"L_fast = {np.sqrt(L_squared_fast):.3f} cm")
print(f"L_thermal = {np.sqrt(L_squared_th):.3f} cm")
print(f"\nL^2_fast = {L_squared_fast:.3f} cm^2")
print(f"L^2_thermal = {L_squared_th:.3f} cm^2")
# k_eff equation as function of buckling (for reference):
# k_eff = k_inf / [(L^2_fast * B^2 + 1)(L^2_th * B^2 + 1)]
# At criticality: k_eff = 1
k_eff_expr = k_inf / ((L_squared_fast * B_squared + 1) * (L_squared_th * B_squared + 1))
print(f"\nCriticality relation:")
print(f"k_eff = k_inf / [(L^2_fast * B^2 + 1)(L^2_thermal * B^2 + 1)]")
print(
f"k_eff = {k_inf:.4f} / [({L_squared_fast:.3f}*B^2 + 1)({L_squared_th:.3f}*B^2 + 1)]"
)
# Problem 2C: Geometric buckling for rectangular solid
print(f"\n=== Problem 2C: Geometric Buckling ===")
print(f"For a rectangular solid with dimensions L_x, L_y, L_z")
print(f"with flux going to zero at the boundaries (bare reactor):")
print(f"\nB^2 = (pi/L_x)^2 + (pi/L_y)^2 + (pi/L_z)^2")
print(f"\nThis is the geometric buckling for the fundamental mode.")
# Example calculation with symbolic dimensions
L_x, L_y, L_z = sm.symbols("L_x L_y L_z", positive=True)
B_squared_geometric = (sm.pi / L_x) ** 2 + (sm.pi / L_y) ** 2 + (sm.pi / L_z) ** 2
print(f"\nSymbolic expression:")
print(f"B^2 = {B_squared_geometric}")
# Problem 2D: Critical height of trough
print(f"\n=== Problem 2D: Critical Height of Trough ===")
print(f"Given: Width L_x = 150 cm, Length L_y = 200 cm")
print(f"Find: Height L_z for criticality (k_eff = 1)")
# Given dimensions
L_x_val = 150 # cm
L_y_val = 200 # cm
# At criticality: k_eff = 1 = k_inf / [(L²_fast * B² + 1)(L²_thermal * B² + 1)]
# Rearranging: (L²_fast * B² + 1)(L²_thermal * B² + 1) = k_inf
# where: B² = (π/L_x)² + (π/L_y)² + (π/L_z)²
# Define L_z as unknown
L_z_sym = sm.Symbol("L_z", positive=True)
# Buckling with known dimensions and unknown height
B_sq = (sm.pi / L_x_val) ** 2 + (sm.pi / L_y_val) ** 2 + (sm.pi / L_z_sym) ** 2
# Criticality equation: k_inf = (L²_fast * B² + 1)(L²_thermal * B² + 1)
criticality_eq = (L_squared_fast * B_sq + 1) * (L_squared_th * B_sq + 1) - k_inf
# Solve for L_z
L_z_solutions = sm.solve(criticality_eq, L_z_sym)
# Filter for positive real solutions
L_z_critical = None
for sol in L_z_solutions:
if sol.is_real and sol > 0:
L_z_critical = float(sol)
break
if L_z_critical:
print(f"\nCritical height L_z = {L_z_critical:.2f} cm")
# Verify by calculating k_eff
B_sq_check = (
(np.pi / L_x_val) ** 2 + (np.pi / L_y_val) ** 2 + (np.pi / L_z_critical) ** 2
)
k_eff_check = k_inf / (
(L_squared_fast * B_sq_check + 1) * (L_squared_th * B_sq_check + 1)
)
print(f"\nVerification: k_eff = {k_eff_check:.6f} (should be 1.0)")
print(f"Geometric buckling B^2 = {B_sq_check:.6f} cm^-2")
else:
print("No positive real solution found!")
# Problem 2E: Prompt criticality
print(f"\n=== Problem 2E: Prompt Critical Height ===")
BETA = 640e-5 # Delayed neutron fraction
print(f"Beta (delayed neutron fraction) = {BETA:.6f}")
# Prompt criticality occurs when k_eff = 1/(1-beta)
k_eff_prompt = 1 / (1 - BETA)
print(f"Prompt critical k_eff = 1/(1-beta) = {k_eff_prompt:.6f}")
# Solve for height at prompt criticality
# k_eff_prompt = k_inf / [(L²_fast * B² + 1)(L²_thermal * B² + 1)]
# Rearranging: (L²_fast * B² + 1)(L²_thermal * B² + 1) = k_inf / k_eff_prompt
L_z_prompt_sym = sm.Symbol("L_z_prompt", positive=True)
B_sq_prompt = (
(sm.pi / L_x_val) ** 2 + (sm.pi / L_y_val) ** 2 + (sm.pi / L_z_prompt_sym) ** 2
)
prompt_crit_eq = (L_squared_fast * B_sq_prompt + 1) * (
L_squared_th * B_sq_prompt + 1
) - k_inf / k_eff_prompt
L_z_prompt_solutions = sm.solve(prompt_crit_eq, L_z_prompt_sym)
# Filter for positive real solutions
L_z_prompt = None
for sol in L_z_prompt_solutions:
if sol.is_real and sol > 0:
L_z_prompt = float(sol)
break
if L_z_prompt:
print(f"\nPrompt critical height L_z = {L_z_prompt:.2f} cm")
# Verify
B_sq_prompt_check = (
(np.pi / L_x_val) ** 2 + (np.pi / L_y_val) ** 2 + (np.pi / L_z_prompt) ** 2
)
k_eff_prompt_check = k_inf / (
(L_squared_fast * B_sq_prompt_check + 1)
* (L_squared_th * B_sq_prompt_check + 1)
)
print(f"\nVerification: k_eff = {k_eff_prompt_check:.6f}")
print(f"Difference from delayed critical: {L_z_prompt - L_z_critical:.2f} cm")
else:
print("No positive real solution found!")

View File

@ -0,0 +1,63 @@
import numpy as np
import sympy as sm
# Problem 3A
## Using formulas from Fundamental Kinetics Ideas R17 Page 51
DRW = 10 # pcm/step
STEPS = 8
LAMBDA_EFF = 0.1 # hz
# ASSUMING AFTER ROD PULL COMPLETE, RHO_DOT = 0
RHO_DOT = 0
BETA = 640 # pcm
# FIND RHO AFTER ROD PULL
rho = DRW * STEPS # pcm
sur = 26.06 * (RHO_DOT + LAMBDA_EFF * rho) / (BETA - rho)
print(f"The Start Up Rate is: {sur:.3f}")
# Problem 3C
# rho_net = rho_T + rho_rods + rho_poison + rho_fuel + ...
# rho_net = alpha_w * (4 degrees) + rho (from above) + 0 + alpha_f * 2.5
D_POWER = 2.5 # %
D_T_AVG = 4 # degrees
HEAT_UP_RATE = 0.15 # F/s
ALPHA_F = -10 # pcm/%power (negative feedback)
rho_rod = rho
# The heat up rate introduces a rho_dot, so SUR becomes 0 at the peak power.
alpha_w_sym = sm.Symbol("alpha_w")
rho_dot = alpha_w_sym * HEAT_UP_RATE
rho_net = alpha_w_sym * D_T_AVG + rho_rod + ALPHA_F * D_POWER
# At peak power, SUR = 0, which means: rho_dot + lambda_eff * rho_net = 0
# (the numerator must be zero)
equation = rho_dot + LAMBDA_EFF * rho_net
# Solve for alpha_w
alpha_w_solution = sm.solve(equation, alpha_w_sym)[0]
alpha_w = float(alpha_w_solution)
print(f"\nThe water temperature reactivity coefficient is: {alpha_w:.3f} pcm/°F")
# Problem 3D
# At final equilibrium: temperature stops changing (rho_dot = 0) and rho_net = 0
# This means: alpha_w * T_final + rho_rod + alpha_f * P_final = 0
#
# However, without knowing the heat removal characteristics (relationship between
# power and temperature at equilibrium), we cannot solve for exact values.
#
# Qualitative analysis:
# - At peak (4°F, 2.5%): SUR = 0 but temperature still rising
# - After peak: Temperature continues to rise → more negative reactivity → power decreases
# - At final equilibrium: Temperature plateaus at T_final > 4°F, Power at P_final < 2.5%
print(f"\nPart D - Qualitative Answer:")
print(f"At peak power: ΔT = {D_T_AVG}°F, ΔP = {D_POWER}%")
print(f"At final equilibrium:")
print(f" - Temperature: T_final > {D_T_AVG}°F (continues rising after peak)")
print(f" - Power: P_final < {D_POWER}% (decreases from peak as T rises further)")

View File

@ -0,0 +1,99 @@
import numpy as np
import matplotlib.pyplot as plt
# Problem 4: PWR Power Increase Transient (25% → 50% Steam Load)
print("=" * 70)
print("Problem 4: PWR Power Increase Transient")
print("=" * 70)
# Given Initial Conditions (25% power steady state)
T_ave_initial = 500 # °F - Average temperature
T_h_initial = 510 # °F - Hot leg temperature
T_c_initial = 490 # °F - Cold leg temperature
P_initial = 25 # % - Initial power level
P_final = 50 # % - Final power level
print("\n--- Initial Conditions (25% Power) ---")
print(f"T_ave = {T_ave_initial} °F")
print(f"T_h = {T_h_initial} °F")
print(f"T_c = {T_c_initial} °F")
print(f"Power = {P_initial}%")
# Calculate initial ΔT across core
DeltaT_initial = T_h_initial - T_c_initial
print(f"ΔT across core = {DeltaT_initial} °F")
print("\n" + "=" * 70)
print("Part A: Chronological Physical Impacts")
print("=" * 70)
print("\n" + "=" * 70)
print("Part B: Final State Comparison")
print("=" * 70)
# For a PWR at steady state:
# Power ∝ mass flow rate × Cp × ΔT
# If flow rate is constant (no pump speed change):
# P_new / P_old = ΔT_new / ΔT_old
# Calculate new ΔT
DeltaT_final = DeltaT_initial * (P_final / P_initial)
print(f"\nΔT calculation:")
print(f"ΔT_initial = {DeltaT_initial} °F at {P_initial}% power")
print(f"ΔT_final = ΔT_initial × (P_final/P_initial)")
print(f"ΔT_final = {DeltaT_initial} × ({P_final}/{P_initial}) = {DeltaT_final} °F")
# Estimate final temperatures
# Assume T_ave returns to approximately initial value (no automatic control,
# but moderator feedback will drive it back toward equilibrium)
# This is a simplification - in reality, T_ave might be slightly different
# Method 1: Assume T_ave = constant (strong moderator feedback)
T_ave_final_method1 = T_ave_initial
T_h_final_method1 = T_ave_final_method1 + DeltaT_final / 2
T_c_final_method1 = T_ave_final_method1 - DeltaT_final / 2
print(f"\n--- Method 1: Assume T_ave constant (strong moderator feedback) ---")
print(f"T_ave_final = {T_ave_final_method1} °F")
print(
f"T_h_final = T_ave + ΔT/2 = {T_ave_final_method1} + {DeltaT_final/2} = {T_h_final_method1} °F"
)
print(
f"T_c_final = T_ave - ΔT/2 = {T_ave_final_method1} - {DeltaT_final/2} = {T_c_final_method1} °F"
)
# Method 2: More realistic - Tc drops somewhat, Th rises more
# The SG cooling will lower Tc, but not back to initial Tc
# Let's estimate Tc drops by ~5-10°F, then Th rises to accommodate ΔT
T_c_drop = 5 # °F - estimated drop in Tc due to increased SG cooling
T_c_final_method2 = T_c_initial - T_c_drop
T_h_final_method2 = T_c_final_method2 + DeltaT_final
T_ave_final_method2 = (T_h_final_method2 + T_c_final_method2) / 2
print(f"\n--- Method 2: Estimate Tc drop due to SG cooling ---")
print(f"Assume Tc drops by ~{T_c_drop}°F due to increased steam flow")
print(f"T_c_final = {T_c_final_method2} °F")
print(
f"T_h_final = T_c + ΔT = {T_c_final_method2} + {DeltaT_final} = {T_h_final_method2} °F"
)
print(f"T_ave_final = {T_ave_final_method2} °F")
print(f"\n--- Comparison Table ---")
print(
f"{'Parameter':<20} {'Initial (25%)':<20} {'Final (50%) M1':<20} {'Final (50%) M2':<20}"
)
print(f"{'-'*80}")
print(f"{'Power':<20} {P_initial:<20} {P_final:<20} {P_final:<20}")
print(
f"{'T_h (°F)':<20} {T_h_initial:<20} {T_h_final_method1:<20.1f} {T_h_final_method2:<20.1f}"
)
print(
f"{'T_c (°F)':<20} {T_c_initial:<20} {T_c_final_method1:<20.1f} {T_c_final_method2:<20.1f}"
)
print(
f"{'T_ave (°F)':<20} {T_ave_initial:<20} {T_ave_final_method1:<20.1f} {T_ave_final_method2:<20.1f}"
)
print(
f"{'ΔT (°F)':<20} {DeltaT_initial:<20} {DeltaT_final:<20.1f} {DeltaT_final:<20.1f}"
)

View File

@ -0,0 +1,187 @@
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint
# Problem 5: Xenon-135 Transient Analysis
# Given parameters
gamma_I = 0.057 # I-135 fission yield (5.7%)
gamma_Xe = 0.003 # Xe-135 fission yield (0.3%)
lambda_I = 2.87e-5 # I-135 decay constant [sec^-1] (t_1/2 = 6.7 hr)
lambda_Xe = 2.09e-5 # Xe-135 decay constant [sec^-1] (t_1/2 = 9.2 hr)
R_max = 7.34e-5 # Full power burnout factor [sec^-1]
K = 4.56 # Power constant [pcm*sec^-1]
Xe_eq_reactivity = -2900 # Full power equilibrium Xe reactivity [pcm]
print("=== Problem 5: Xenon-135 Transient ===")
print(f"\nGiven Parameters:")
print(f"gamma_I = {gamma_I} (I-135 fission yield)")
print(f"gamma_Xe = {gamma_Xe} (Xe-135 fission yield)")
print(f"lambda_I = {lambda_I:.2e} sec^-1 (t_1/2 = 6.7 hr)")
print(f"lambda_Xe = {lambda_Xe:.2e} sec^-1 (t_1/2 = 9.2 hr)")
print(f"R_max = {R_max:.2e} sec^-1 (full power burnout)")
print(f"K = {K} pcm*sec^-1")
print(f"Initial Xe reactivity = {Xe_eq_reactivity} pcm (at 100% power)")
# Power history (normalized to 1.0 = 100% power)
# Time ranges in hours
power_history = [
(0, 5, 1.0), # 0-5 hr: 100% power
(5, 15, 0.0), # 5-15 hr: Shutdown
(15, 50, 1.0), # 15-50 hr: 100% power
(50, 80, 0.4), # 50-80 hr: 40% power
(80, 100, 0.0), # 80-100 hr: Shutdown
(100, 150, 1.0), # 100-150 hr: 100% power
]
def get_power(t_hours):
"""Return normalized power at time t (in hours)"""
for t_start, t_end, power in power_history:
if t_start <= t_hours < t_end:
return power
return 0.0 # Default to shutdown
# Calculate equilibrium I and Xe at full power
# At equilibrium: dI/dt = 0, dX/dt = 0, rho = 1.0
# I_eq = gamma_I * Sigma_f * phi / lambda_I
# X_eq = (lambda_I * I_eq + gamma_Xe * Sigma_f * phi) / (lambda_Xe + sigma_a^Xe * phi)
# From the reactivity equation and given parameters, we can compute equilibrium
# Xe_reactivity = -K * X / rho
# At full power equilibrium: -2900 = -K * X_eq / 1.0
# X_eq = 2900 / K (in relative units)
# But we need to be careful about units. Let's work in terms of production rates.
# Production rate at full power: P_I = gamma_I * (production source)
# At equilibrium: I_eq = P_I / lambda_I
# At equilibrium: X_eq = (lambda_I * I_eq + gamma_Xe * P_source) / (lambda_Xe + R_max)
# Let's define production in terms that give correct equilibrium
# From B = rho*K*[gamma_I, gamma_Xe], production scales with power
# For now, let's compute initial conditions at full power equilibrium
rho_initial = 1.0 # Full power
# At equilibrium with rho=1:
# dI/dt = 0 = -lambda_I * I + rho * gamma_I * P0
# dX/dt = 0 = -lambda_Xe * X - rho * R_max * X + lambda_I * I + rho * gamma_Xe * P0
# Let P0 be a production constant we need to determine
# From equilibrium: I_eq = rho * gamma_I * P0 / lambda_I
# X_eq = (lambda_I * I_eq + rho * gamma_Xe * P0) / (lambda_Xe + rho * R_max)
# We know Xe_reactivity = -K * X at full power
# So X_eq = 2900 / K at rho = 1
X_eq_fullpower = abs(Xe_eq_reactivity) / K # Equilibrium Xe "concentration" at full power
print(f"\nEquilibrium Xe concentration (full power) = {X_eq_fullpower:.2f} [arbitrary units]")
# From equilibrium equation at full power (rho=1):
# X_eq = (lambda_I * I_eq + gamma_Xe * P0) / (lambda_Xe + R_max)
# And: I_eq = gamma_I * P0 / lambda_I
# Substituting:
# X_eq = (lambda_I * gamma_I * P0 / lambda_I + gamma_Xe * P0) / (lambda_Xe + R_max)
# X_eq = P0 * (gamma_I + gamma_Xe) / (lambda_Xe + R_max)
# Solving for P0:
P0 = X_eq_fullpower * (lambda_Xe + R_max) / (gamma_I + gamma_Xe)
I_eq_fullpower = gamma_I * P0 / lambda_I
print(f"Equilibrium I-135 concentration (full power) = {I_eq_fullpower:.2f} [arbitrary units]")
print(f"Production constant P0 = {P0:.2e}")
# Define ODE system for I-135 and Xe-135
def xenon_ode(y, t, power_func):
"""
ODE system for I-135 and Xe-135
y = [I, X] where I is I-135, X is Xe-135
t is time in seconds
"""
I, X = y
t_hours = t / 3600 # Convert to hours for power lookup
rho = power_func(t_hours)
# dI/dt = -lambda_I * I + rho * gamma_I * P0
dI_dt = -lambda_I * I + rho * gamma_I * P0
# dX/dt = -lambda_Xe * X - rho * R_max * X + lambda_I * I + rho * gamma_Xe * P0
dX_dt = -lambda_Xe * X - rho * R_max * X + lambda_I * I + rho * gamma_Xe * P0
return [dI_dt, dX_dt]
# Initial conditions at t=0 (full power equilibrium)
I0 = I_eq_fullpower
X0 = X_eq_fullpower
y0 = [I0, X0]
print(f"\nInitial conditions at t=0 (full power equilibrium):")
print(f"I-135 = {I0:.2f}")
print(f"Xe-135 = {X0:.2f}")
print(f"Xe reactivity = {-K * X0:.1f} pcm")
# Part A: Solve and sketch the xenon transient
print(f"\n=== Part A: Xenon Transient Sketch ===")
# Time array: 0 to 150 hours
t_hours = np.linspace(0, 150, 2000)
t_seconds = t_hours * 3600
# Solve ODE
solution = odeint(xenon_ode, y0, t_seconds, args=(get_power,))
I_transient = solution[:, 0]
X_transient = solution[:, 1]
# Calculate xenon reactivity
Xe_reactivity_transient = -K * X_transient
# Plot results
fig, (ax1, ax2, ax3) = plt.subplots(3, 1, figsize=(12, 10))
# Plot power history
power_values = [get_power(t) for t in t_hours]
ax1.plot(t_hours, power_values, 'b-', linewidth=2)
ax1.set_ylabel('Normalized Power', fontsize=12)
ax1.set_title('Power History', fontsize=14, fontweight='bold')
ax1.grid(True, alpha=0.3)
ax1.set_ylim(-0.1, 1.2)
# Plot I-135
ax2.plot(t_hours, I_transient, 'g-', linewidth=2, label='I-135')
ax2.set_ylabel('I-135 Concentration', fontsize=12)
ax2.set_title('I-135 Transient', fontsize=14, fontweight='bold')
ax2.grid(True, alpha=0.3)
ax2.legend()
# Plot Xe reactivity
ax3.plot(t_hours, Xe_reactivity_transient, 'r-', linewidth=2)
ax3.axhline(y=-2900, color='k', linestyle='--', alpha=0.5, label='Initial Eq (-2900 pcm)')
ax3.set_xlabel('Time (hours)', fontsize=12)
ax3.set_ylabel('Xenon Reactivity (pcm)', fontsize=12)
ax3.set_title('Xenon Reactivity Transient', fontsize=14, fontweight='bold')
ax3.grid(True, alpha=0.3)
ax3.legend()
plt.tight_layout()
plt.savefig('problem5_xenon_transient.png', dpi=300, bbox_inches='tight')
print("Xenon transient plot saved as 'problem5_xenon_transient.png'")
plt.close()
# Part B: Find the peak xenon after first shutdown (at t=5 hours)
print(f"\n=== Part B: First Xenon Peak Analysis ===")
# Focus on the first shutdown period (5 to 15 hours)
mask = (t_hours >= 5) & (t_hours <= 15)
t_peak_range = t_hours[mask]
Xe_react_peak_range = Xe_reactivity_transient[mask]
# Find the peak (most negative reactivity)
peak_idx = np.argmin(Xe_react_peak_range)
t_peak = t_peak_range[peak_idx]
Xe_peak_reactivity = Xe_react_peak_range[peak_idx]
print(f"\nFirst shutdown: t = 5 hours to t = 15 hours")
print(f"Peak xenon occurs at t = {t_peak:.2f} hours")
print(f"Time after shutdown = {t_peak - 5:.2f} hours")
print(f"Peak xenon reactivity = {Xe_peak_reactivity:.1f} pcm")
print(f"\nChange from equilibrium: {Xe_peak_reactivity - Xe_eq_reactivity:.1f} pcm")

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 KiB

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
\relax \relax
\bibstyle{unsrt} \bibstyle{unsrt}
\providecommand \oddpage@label [2]{} \providecommand \oddpage@label [2]{}
\gdef \@abspage@last{16} \gdef \@abspage@last{25}

View File

@ -1,6 +1,8 @@
# Fdb version 4 # Fdb version 4
["pdflatex"] 1762722326.59226 "main.tex" "main.pdf" "main" 1762722327.77528 0 ["pdflatex"] 1762815206.90205 "main.tex" "main.pdf" "main" 1762815209.49686 2
"../python/problem5_xenon_transient.png" 1762722262.28745 362131 23d1ffde6d27e1396c2d7648a6aac3c8 "" "../python/problem1_equal_loading.png" 1762810066.64818 490952 c3d2889704ac3c642a17c272fc29d5c0 ""
"../python/problem1_unequal_loading.png" 1762810067.35317 506618 4dbac737988188edebda8a0f36d15c69 ""
"../python/problem5_xenon_transient.png" 1762722349.40363 362131 23d1ffde6d27e1396c2d7648a6aac3c8 ""
"/etc/texmf/web2c/texmf.cnf" 1726065852.27662 475 c0e671620eb5563b2130f56340a5fde8 "" "/etc/texmf/web2c/texmf.cnf" 1726065852.27662 475 c0e671620eb5563b2130f56340a5fde8 ""
"/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc" 1165713224 4850 80dc9bab7f31fb78a000ccfed0e27cab "" "/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc" 1165713224 4850 80dc9bab7f31fb78a000ccfed0e27cab ""
"/usr/share/texlive/texmf-dist/fonts/map/fontname/texfonts.map" 1577235249 3524 cb3e574dea2d1052e39280babc910dc8 "" "/usr/share/texlive/texmf-dist/fonts/map/fontname/texfonts.map" 1577235249 3524 cb3e574dea2d1052e39280babc910dc8 ""
@ -40,6 +42,7 @@
"/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmb7t.vf" 1136768653 1372 788387fea833ef5963f4c5bffe33eb89 "" "/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmb7t.vf" 1136768653 1372 788387fea833ef5963f4c5bffe33eb89 ""
"/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmr7t.vf" 1136768653 1380 0ea3a3370054be6da6acd929ec569f06 "" "/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmr7t.vf" 1136768653 1380 0ea3a3370054be6da6acd929ec569f06 ""
"/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmr8c.vf" 1136768653 3556 8a9a6dcbcd146ef985683f677f4758a6 "" "/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmr8c.vf" 1136768653 3556 8a9a6dcbcd146ef985683f677f4758a6 ""
"/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmri7t.vf" 1136768653 1384 a9d8adaf491ce34e5fba99dc7bbe5f39 ""
"/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7m.vf" 1136768653 1132 27520247d3fe18d4266a226b461885c2 "" "/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7m.vf" 1136768653 1132 27520247d3fe18d4266a226b461885c2 ""
"/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7t.vf" 1136768653 1108 d271d6f9de4122c3f8d3b65666167fac "" "/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7t.vf" 1136768653 1108 d271d6f9de4122c3f8d3b65666167fac ""
"/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7v.vf" 1136768653 1012 046369ac6a83af997c3aa05a43256ad5 "" "/usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7v.vf" 1136768653 1012 046369ac6a83af997c3aa05a43256ad5 ""
@ -230,13 +233,13 @@
"/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map" 1760105440.02229 5312232 f3296911be9cc021788f3f879cf0a47d "" "/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map" 1760105440.02229 5312232 f3296911be9cc021788f3f879cf0a47d ""
"/var/lib/texmf/web2c/pdftex/pdflatex.fmt" 1726065868 6800790 607442c924ed54405961d2b8ac2a25ae "" "/var/lib/texmf/web2c/pdftex/pdflatex.fmt" 1726065868 6800790 607442c924ed54405961d2b8ac2a25ae ""
"dane_proposal_format.cls" 1762633537.1272 2292 c3dc1b9d4d9635e69847824a1055af84 "" "dane_proposal_format.cls" 1762633537.1272 2292 c3dc1b9d4d9635e69847824a1055af84 ""
"main.aux" 1762722327.70358 87 617deccf33e53eb4c168a3ea45b9bdfe "pdflatex" "main.aux" 1762815209.4077 87 f13fe4720a1356cbba6e7fc4abdd6688 "pdflatex"
"main.tex" 1762637252.88998 381 e3fa84403624479024c4d1493906da41 "" "main.tex" 1762637252.88998 381 e3fa84403624479024c4d1493906da41 ""
"problem1.tex" 1762631049.07356 0 d41d8cd98f00b204e9800998ecf8427e "" "problem1.tex" 1762815205.84015 9372 ac198b260449a8c4f45beefc5ff56406 ""
"problem2.tex" 1762721391.36755 13840 025c9b84901565e51d00dbe48ced4f6b "" "problem2.tex" 1762815141.16803 12874 20c30bdda69f982ad0238bb65ae08f7f ""
"problem3.tex" 1762642107.75225 5471 4fa0087126c706f9320fe51d4e376901 "" "problem3.tex" 1762807208.96384 5514 79233e8052740d07b77afef5bb37cc08 ""
"problem4.tex" 1762631059.52892 0 d41d8cd98f00b204e9800998ecf8427e "" "problem4.tex" 1762814264.09169 8326 daf10b524edd2f2aa7aa644b7dd686b5 ""
"problem5.tex" 1762722326.08958 6129 548b59696b661740891ab0c9a06daf81 "" "problem5.tex" 1762814875.73711 5085 a3ea374a1ad09c6426b68984b2ca47d5 ""
"problem6.tex" 1762633505.37954 1522 0be652ea60d5f77900c12441c2e8c487 "" "problem6.tex" 1762633505.37954 1522 0be652ea60d5f77900c12441c2e8c487 ""
(generated) (generated)
"main.aux" "main.aux"

View File

@ -404,10 +404,36 @@ INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr8r.tfm
INPUT ./problem1.tex INPUT ./problem1.tex
INPUT ./problem1.tex INPUT ./problem1.tex
INPUT problem1.tex INPUT problem1.tex
INPUT ./problem2.tex
INPUT ./problem2.tex
INPUT problem2.tex
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmb7t.tfm INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmb7t.tfm
INPUT /usr/share/texlive/texmf-dist/tex/latex/psnfss/ts1ptm.fd
INPUT /usr/share/texlive/texmf-dist/tex/latex/psnfss/ts1ptm.fd
INPUT /usr/share/texlive/texmf-dist/tex/latex/psnfss/ts1ptm.fd
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr8c.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7m.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7m.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7m.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7y.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7y.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7y.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7v.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7v.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7v.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmb7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmb7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmri7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmri7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmri7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr7t.tfm
INPUT /usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty INPUT /usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty
INPUT /usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty INPUT /usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty
INPUT /usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty INPUT /usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty
@ -420,73 +446,63 @@ INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmb7t.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmb8r.tfm INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmb8r.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmr7t.vf INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmr7t.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr8r.tfm INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr8r.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmr7t.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr8r.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7m.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7m.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7m.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7y.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7y.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7y.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7v.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7v.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/zptmcm7v.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmb7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmb7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmri7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmri7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmri7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
INPUT /usr/share/texlive/texmf-dist/tex/latex/psnfss/ts1ptm.fd
INPUT /usr/share/texlive/texmf-dist/tex/latex/psnfss/ts1ptm.fd
INPUT /usr/share/texlive/texmf-dist/tex/latex/psnfss/ts1ptm.fd
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr8c.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr7t.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7m.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/psyro.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmri8r.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7y.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/symbol/psyr.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr8r.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/rsfs/rsfs10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7t.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/symbol/psyr.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7y.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/rsfs/rsfs10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmr8c.vf INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmr8c.vf
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7m.vf INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7m.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/psyro.tfm INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/psyro.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmri8r.tfm INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmri8r.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7t.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7v.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmex10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmex10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/symbol/psyr.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7m.vf INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7m.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/psyro.tfm INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/psyro.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmri8r.tfm INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmri8r.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7t.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/symbol/psyr.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr8r.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7t.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/symbol/psyr.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7y.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/rsfs/rsfs10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmri7t.vf
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7y.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/rsfs/rsfs10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7m.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/psyro.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmri8r.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7t.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/symbol/psyr.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr8r.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmr10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmr7t.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/times/ptmr8r.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/zptmcm7v.vf
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmex10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmex10.tfm
INPUT /usr/share/texlive/texmf-dist/fonts/tfm/adobe/symbol/psyr.tfm
INPUT ../python/problem1_equal_loading.png
INPUT ../python/problem1_equal_loading.png
INPUT ../python/problem1_equal_loading.png
INPUT ../python/problem1_equal_loading.png
INPUT ../python/problem1_equal_loading.png
INPUT ../python/problem1_unequal_loading.png
INPUT ../python/problem1_unequal_loading.png
INPUT ../python/problem1_unequal_loading.png
INPUT ../python/problem1_unequal_loading.png
INPUT ../python/problem1_unequal_loading.png
INPUT ./problem2.tex
INPUT ./problem2.tex
INPUT problem2.tex
INPUT ./problem3.tex INPUT ./problem3.tex
INPUT ./problem3.tex INPUT ./problem3.tex
INPUT problem3.tex INPUT problem3.tex
INPUT ./problem4.tex INPUT ./problem4.tex
INPUT ./problem4.tex INPUT ./problem4.tex
INPUT problem4.tex INPUT problem4.tex
INPUT /usr/share/texlive/texmf-dist/fonts/vf/adobe/times/ptmr7t.vf
INPUT ./problem5.tex INPUT ./problem5.tex
INPUT ./problem5.tex INPUT ./problem5.tex
INPUT problem5.tex INPUT problem5.tex

View File

@ -1,4 +1,4 @@
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex 2024.9.11) 9 NOV 2025 16:05 This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Debian) (preloaded format=pdflatex 2024.9.11) 10 NOV 2025 17:53
entering extended mode entering extended mode
restricted \write18 enabled. restricted \write18 enabled.
file:line:error style messages enabled. file:line:error style messages enabled.
@ -876,43 +876,457 @@ LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <8> not available
(Font) Font shape `OT1/ptm/b/n' tried instead on input line 15. (Font) Font shape `OT1/ptm/b/n' tried instead on input line 15.
[1 [1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}{/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc}] (./problem1.tex) (./problem2.tex (/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty {/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}{/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc}] (./problem1.tex
File: lstlang1.sty 2023/02/27 1.9 listings language file LaTeX Font Info: Trying to load font information for TS1+ptm on input line 7.
) [1]
LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <12> not available
(Font) Font shape `OT1/ptm/b/n' tried instead on input line 85.
LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <9> not available
(Font) Font shape `OT1/ptm/b/n' tried instead on input line 85.
LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <7> not available
(Font) Font shape `OT1/ptm/b/n' tried instead on input line 85.
LaTeX Font Info: Trying to load font information for TS1+ptm on input line 89.
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ts1ptm.fd (/usr/share/texlive/texmf-dist/tex/latex/psnfss/ts1ptm.fd
File: ts1ptm.fd 2001/06/04 font definitions for TS1/ptm. File: ts1ptm.fd 2001/06/04 font definitions for TS1/ptm.
) [2] [3] [4] [5] [6] [7]) (./problem3.tex [8] [9] [10]) (./problem4.tex) (./problem5.tex [11] )
<../python/problem5_xenon_transient.png, id=78, 858.5676pt x 713.7867pt> LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <12> not available
(Font) Font shape `OT1/ptm/b/n' tried instead on input line 7.
LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <9> not available
(Font) Font shape `OT1/ptm/b/n' tried instead on input line 7.
LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <7> not available
(Font) Font shape `OT1/ptm/b/n' tried instead on input line 7.
./problem1.tex:16: Undefined control sequence.
l.16 ...eat capacity: $C_0 = 33.33$ \%-sec/\degree
F
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem1.tex:18: Undefined control sequence.
l.18 ...ot} = T_{cold1} = T_{cold2} = 450$ \degree
F
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem1.tex:25: Undefined control sequence.
<argument> \%-sec/\degree
F
l.25 ...s 25.00} = 0.6667 \text{ \%-sec/\degree F}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem1.tex:25: Undefined control sequence.
<argument> \firstchoice@false \%-sec/\degree
F
l.25 ...s 25.00} = 0.6667 \text{ \%-sec/\degree F}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem1.tex:25: Undefined control sequence.
<argument> \firstchoice@false \%-sec/\degree
F
l.25 ...s 25.00} = 0.6667 \text{ \%-sec/\degree F}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem1.tex:25: Undefined control sequence.
<argument> \firstchoice@false \%-sec/\degree
F
l.25 ...s 25.00} = 0.6667 \text{ \%-sec/\degree F}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty
File: lstlang1.sty 2023/02/27 1.9 listings language file
) [1]
./problem1.tex:93: Undefined control sequence.
l.93 ...rac{C_0}{2\tau_0} = 0.6667$ \%-sec/\degree
F = flow heat capacity ra...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
[2]
./problem1.tex:121: Undefined control sequence.
l.121 ...$\mu = 0.5$: $C_r = 16.66$ \%-sec/\degree
F, $C_{sg} = 8.33$ \%-sec...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem1.tex:121: Undefined control sequence.
l.121 ...\degree F, $C_{sg} = 8.33$ \%-sec/\degree
F, $W = 0.6667$ \%-sec/\d...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem1.tex:121: Undefined control sequence.
l.121 ...ec/\degree F, $W = 0.6667$ \%-sec/\degree
F
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
[3] [4]
Overfull \hbox (25.26381pt too wide) in paragraph at lines 275--276
\OT1/ptm/m/n/12 Transient sim-u-la-tions were per-formed for four cases us-ing nu-mer-i-cal in-te-gra-tion (scipy.integrate.odeint):
[]
./problem1.tex:285: Undefined control sequence.
l.285 ...t} = T_{cold1} = T_{cold2} = 450$ \degree
F).
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
[5]
<../python/problem1_equal_loading.png, id=58, 1004.553pt x 711.8595pt>
File: ../python/problem1_equal_loading.png Graphic file (type png)
<use ../python/problem1_equal_loading.png>
Package pdftex.def Info: ../python/problem1_equal_loading.png used on input line 292.
(pdftex.def) Requested size: 446.26582pt x 316.2388pt.
<../python/problem1_unequal_loading.png, id=60, 1004.553pt x 711.8595pt>
File: ../python/problem1_unequal_loading.png Graphic file (type png)
<use ../python/problem1_unequal_loading.png>
Package pdftex.def Info: ../python/problem1_unequal_loading.png used on input line 298.
(pdftex.def) Requested size: 446.26582pt x 316.2388pt.
[6 <../python/problem1_equal_loading.png>]) (./problem2.tex [7 <../python/problem1_unequal_loading.png>] [8] [9] [10] [11] [12] [13]) (./problem3.tex [14] [15] [16]) (./problem4.tex
./problem4.tex:9: Undefined control sequence.
l.9 \item $T_{ave} = 500$ \degree
F
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
[17]
./problem4.tex:10: Undefined control sequence.
l.10 \item $T_h = 510$ \degree
F (hot leg)
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:11: Undefined control sequence.
l.11 \item $T_c = 490$ \degree
F (cold leg)
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
[18] [19]
./problem4.tex:155: Undefined control sequence.
l.155 ...al} = T_h - T_c = 510 - 490 = 20$ \degree
F
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:159: Undefined control sequence.
<argument> \degree
F
l.159 ...ac{50}{25} = \boxed{40 \text{ \degree F}}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:159: Undefined control sequence.
<argument> \firstchoice@false \degree
F
l.159 ...ac{50}{25} = \boxed{40 \text{ \degree F}}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:159: Undefined control sequence.
<argument> \firstchoice@false \degree
F
l.159 ...ac{50}{25} = \boxed{40 \text{ \degree F}}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:159: Undefined control sequence.
<argument> \firstchoice@false \degree
F
l.159 ...ac{50}{25} = \boxed{40 \text{ \degree F}}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:162: Undefined control sequence.
<argument> \degree
F
l.162 ...{ave,final} \approx 500 \text{ \degree F}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:162: Undefined control sequence.
<argument> \firstchoice@false \degree
F
l.162 ...{ave,final} \approx 500 \text{ \degree F}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:162: Undefined control sequence.
<argument> \firstchoice@false \degree
F
l.162 ...{ave,final} \approx 500 \text{ \degree F}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:162: Undefined control sequence.
<argument> \firstchoice@false \degree
F
l.162 ...{ave,final} \approx 500 \text{ \degree F}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:164: Undefined control sequence.
<argument> \degree
F
l.164 ... 500 + 20 = \boxed{520 \text{ \degree F}}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:164: Undefined control sequence.
<argument> \firstchoice@false \degree
F
l.164 ... 500 + 20 = \boxed{520 \text{ \degree F}}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:164: Undefined control sequence.
<argument> \firstchoice@false \degree
F
l.164 ... 500 + 20 = \boxed{520 \text{ \degree F}}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:164: Undefined control sequence.
<argument> \firstchoice@false \degree
F
l.164 ... 500 + 20 = \boxed{520 \text{ \degree F}}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:166: Undefined control sequence.
<argument> \degree
F
l.166 ... 500 - 20 = \boxed{480 \text{ \degree F}}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:166: Undefined control sequence.
<argument> \firstchoice@false \degree
F
l.166 ... 500 - 20 = \boxed{480 \text{ \degree F}}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:166: Undefined control sequence.
<argument> \firstchoice@false \degree
F
l.166 ... 500 - 20 = \boxed{480 \text{ \degree F}}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:166: Undefined control sequence.
<argument> \firstchoice@false \degree
F
l.166 ... 500 - 20 = \boxed{480 \text{ \degree F}}
\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:176: Undefined control sequence.
l.176 $T_h$ (\degree
F) & 510 & 520 & $+10$ \degree F \\
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:176: Undefined control sequence.
l.176 ...$ (\degree F) & 510 & 520 & $+10$ \degree
F \\
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:177: Undefined control sequence.
l.177 $T_c$ (\degree
F) & 490 & 480 & $-10$ \degree F \\
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:177: Undefined control sequence.
l.177 ...$ (\degree F) & 490 & 480 & $-10$ \degree
F \\
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:178: Undefined control sequence.
l.178 $T_{ave}$ (\degree
F) & 500 & $\sim$500 & $\sim$0 \degree F \\
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:178: Undefined control sequence.
l.178 ...ee F) & 500 & $\sim$500 & $\sim$0 \degree
F \\
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:179: Undefined control sequence.
l.179 $\Delta T$ (\degree
F) & 20 & 40 & $+20$ \degree F \\
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./problem4.tex:179: Undefined control sequence.
l.179 ... T$ (\degree F) & 20 & 40 & $+20$ \degree
F \\
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
[20]) (./problem5.tex [21]
<../python/problem5_xenon_transient.png, id=115, 858.5676pt x 713.7867pt>
File: ../python/problem5_xenon_transient.png Graphic file (type png) File: ../python/problem5_xenon_transient.png Graphic file (type png)
<use ../python/problem5_xenon_transient.png> <use ../python/problem5_xenon_transient.png>
Package pdftex.def Info: ../python/problem5_xenon_transient.png used on input line 71. Package pdftex.def Info: ../python/problem5_xenon_transient.png used on input line 72.
(pdftex.def) Requested size: 446.26582pt x 371.00784pt. (pdftex.def) Requested size: 446.26582pt x 371.00784pt.
[12] [13 <../python/problem5_xenon_transient.png>] [14]) (./problem6.tex) [15] (./main.aux) [22 <../python/problem5_xenon_transient.png>] [23]) (./problem6.tex) [24] (./main.aux)
*********** ***********
LaTeX2e <2023-11-01> patch level 1 LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-01-22> L3 programming layer <2024-01-22>
*********** ***********
) )
Here is how much of TeX's memory you used: Here is how much of TeX's memory you used:
25943 strings out of 476182 26002 strings out of 476182
532712 string characters out of 5795595 533925 string characters out of 5795595
2210975 words of memory out of 5000000 2145975 words of memory out of 5000000
47368 multiletter control sequences out of 15000+600000 47424 multiletter control sequences out of 15000+600000
598431 words of font info for 123 fonts, out of 8000000 for 9000 600139 words of font info for 126 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191 14 hyphenation exceptions out of 8191
110i,6n,107p,1008b,1778s stack positions out of 10000i,1000n,20000p,200000b,200000s 110i,9n,107p,1008b,1904s stack positions out of 10000i,1000n,20000p,200000b,200000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/symbols/msam10.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/symbol/usyr.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/symbol/usyr.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/times/utmb8a.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/times/utmr8a.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/times/utmri8a.pfb> </usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/symbols/msam10.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/symbol/usyr.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/symbol/usyr.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/times/utmb8a.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/times/utmr8a.pfb></usr/share/texlive/texmf-dist/fonts/type1/urw/times/utmri8a.pfb>
Output written on main.pdf (16 pages, 483552 bytes). Output written on main.pdf (25 pages, 1414522 bytes).
PDF statistics: PDF statistics:
142 PDF objects out of 1000 (max. 8388607) 176 PDF objects out of 1000 (max. 8388607)
83 compressed objects within 1 object stream 103 compressed objects within 2 object streams
0 named destinations out of 1000 (max. 500000) 0 named destinations out of 1000 (max. 500000)
114 words of extra memory for PDF output out of 10000 (max. 10000000) 124 words of extra memory for PDF output out of 10000 (max. 10000000)

View File

@ -0,0 +1,299 @@
\section*{Problem 1}
\subsection*{System Description}
A two-loop reactor system with:
\begin{itemize}
\item Reactor (lumped hot leg) at temperature $T_{hot}$
\item Steam Generator 1 with cold leg at $T_{cold1}$
\item Steam Generator 2 with cold leg at $T_{cold2}$
\item Equal mass flow rates and water masses in each loop
\item Reactor Water Mass Fraction (RWMF): $\mu$
\end{itemize}
\textbf{Given parameters:}
\begin{itemize}
\item Base heat capacity: $C_0 = 33.33$ \%-sec/\degree F
\item Base time constant: $\tau_0 = 0.75 \times C_0 = 25.00$ sec
\item Initial temperature: $T_{hot} = T_{cold1} = T_{cold2} = 450$ \degree F
\end{itemize}
\textbf{Derived parameter:}
The flow heat capacity rate per loop is \textit{not directly given} in the problem statement but can be derived from the relationship between time constants and heat capacities:
\[W = \frac{C_0}{2\tau_0} = \frac{33.33}{2 \times 25.00} = 0.6667 \text{ \%-sec/\degree F}\]
This represents the (mass flow rate $\times$ specific heat) for each loop.
\textbf{System parameters as functions of $\mu$:}
\begin{itemize}
\item Reactor time constant: $\tau_r = \mu \tau_0$
\item Reactor heat capacity: $C_r = \mu C_0$
\item Steam generator time constant (each): $\tau_{sg} = \frac{(1-\mu)\tau_r}{2}$
\item Steam generator heat capacity (each): $C_{sg} = \frac{(1-\mu)C_0}{2}$
\end{itemize}
\subsection*{Part A}
\subsubsection*{Python Code}
\begin{lstlisting}[language=Python,
basicstyle=\ttfamily\small,
keywordstyle=\color{blue},
commentstyle=\color{gray},
stringstyle=\color{red},
showstringspaces=false,
numbers=left,
numberstyle=\tiny,
frame=single,
breaklines=true]
import numpy as np
import sympy as sm
# Given parameters
C_0 = 33.33 # Base heat capacity [%-sec/degF]
tau_0 = 25.00 # Base time constant [sec]
W = C_0 / (2 * tau_0) # Flow heat capacity rate per loop
def calculate_system_parameters(mu):
C_r = mu * C_0 # Reactor heat capacity
C_sg = (1 - mu) * C_0 / 2 # Steam generator heat capacity (each)
return C_r, C_sg
# Matrix form: dT/dt = A*T + B
def get_matrix_A(C_r, C_sg, W):
A = np.array([
[-2*W/C_r, W/C_r, W/C_r],
[W/C_sg, -W/C_sg, 0],
[W/C_sg, 0, -W/C_sg]
])
return A
# Vector B (forcing terms):
# B = [P_r/C_r, -Qdot1/C_sg, -Qdot2/C_sg]^T
\end{lstlisting}
\subsubsection*{Solution}
The energy balance for each component yields differential equations:
\textbf{Reactor energy balance:}
\[C_r \frac{dT_{hot}}{dt} = P_r - W(T_{hot} - T_{cold1}) - W(T_{hot} - T_{cold2})\]
\textbf{Steam Generator 1 energy balance:}
\[C_{sg} \frac{dT_{cold1}}{dt} = W(T_{hot} - T_{cold1}) - \dot{Q}_1\]
\textbf{Steam Generator 2 energy balance:}
\[C_{sg} \frac{dT_{cold2}}{dt} = W(T_{hot} - T_{cold2}) - \dot{Q}_2\]
where:
\begin{itemize}
\item $P_r$ = reactor power (positive for heat generation)
\item $\dot{Q}_1, \dot{Q}_2$ = steam generator heat removal rates (positive for heat removal)
\item $W = \frac{C_0}{2\tau_0} = 0.6667$ \%-sec/\degree F = flow heat capacity rate per loop
\end{itemize}
\textbf{Matrix Form:}
Define the temperature vector: $\mathbf{T} = \begin{bmatrix} T_{hot} \\ T_{cold1} \\ T_{cold2} \end{bmatrix}$
The system can be written as:
\[\boxed{\frac{d\mathbf{T}}{dt} = \mathbf{A} \mathbf{T} + \mathbf{B}}\]
where the coefficient matrix $\mathbf{A}$ is:
\[\mathbf{A} = \begin{bmatrix}
-\frac{2W}{C_r} & \frac{W}{C_r} & \frac{W}{C_r} \\[0.3em]
\frac{W}{C_{sg}} & -\frac{W}{C_{sg}} & 0 \\[0.3em]
\frac{W}{C_{sg}} & 0 & -\frac{W}{C_{sg}}
\end{bmatrix}\]
and the forcing vector $\mathbf{B}$ is:
\[\mathbf{B} = \begin{bmatrix}
\frac{P_r}{C_r} \\[0.3em]
-\frac{\dot{Q}_1}{C_{sg}} \\[0.3em]
-\frac{\dot{Q}_2}{C_{sg}}
\end{bmatrix}\]
\textbf{Numerical example for $\mu = 0.5$:}
With $\mu = 0.5$: $C_r = 16.66$ \%-sec/\degree F, $C_{sg} = 8.33$ \%-sec/\degree F, $W = 0.6667$ \%-sec/\degree F
\[\boxed{\mathbf{A} = \begin{bmatrix}
-0.0800 & 0.0400 & 0.0400 \\
0.0800 & -0.0800 & 0 \\
0.0800 & 0 & -0.0800
\end{bmatrix}}\]
\subsection*{Part B}
\subsubsection*{Python Code}
\begin{lstlisting}[language=Python,
basicstyle=\ttfamily\small,
keywordstyle=\color{blue},
commentstyle=\color{gray},
stringstyle=\color{red},
showstringspaces=false,
numbers=left,
numberstyle=\tiny,
frame=single,
breaklines=true]
# At steady state, dT/dt = 0
# From SG1: 0 = W*(T_hot - T_cold1) - Qdot1
DeltaT1 = Qdot1 / W
# From SG2: 0 = W*(T_hot - T_cold2) - Qdot2
DeltaT2 = Qdot2 / W
# From reactor: P_r = W*DeltaT1 + W*DeltaT2
power_balance = Qdot1 + Qdot2
\end{lstlisting}
\subsubsection*{Solution}
At steady state, all time derivatives are zero ($\frac{dT}{dt} = 0$).
\textbf{From Steam Generator 1 equation:}
\[0 = W(T_{hot} - T_{cold1}) - \dot{Q}_1\]
\[\boxed{\Delta T_1 = T_{hot} - T_{cold1} = \frac{\dot{Q}_1}{W}}\]
\textbf{From Steam Generator 2 equation:}
\[0 = W(T_{hot} - T_{cold2}) - \dot{Q}_2\]
\[\boxed{\Delta T_2 = T_{hot} - T_{cold2} = \frac{\dot{Q}_2}{W}}\]
\textbf{From Reactor equation:}
\[0 = P_r - W\Delta T_1 - W\Delta T_2\]
\[P_r = W\Delta T_1 + W\Delta T_2 = \dot{Q}_1 + \dot{Q}_2\]
This confirms the power balance: reactor power equals total steam generator heat removal rates.
\subsection*{Part C}
\subsubsection*{Python Code}
\begin{lstlisting}[language=Python,
basicstyle=\ttfamily\small,
keywordstyle=\color{blue},
commentstyle=\color{gray},
stringstyle=\color{red},
showstringspaces=false,
numbers=left,
numberstyle=\tiny,
frame=single,
breaklines=true]
# Average reactor temperature (mass-weighted)
def calculate_T_ave(T_hot, T_cold1, T_cold2, mu, C_0):
C_r = mu * C_0
C_sg = (1 - mu) * C_0 / 2
# Mass-weighted average
T_ave = (C_r*T_hot + C_sg*T_cold1 + C_sg*T_cold2) / C_0
# Simplified form
T_ave_simplified = mu*T_hot + (1-mu)*(T_cold1 + T_cold2)/2
return T_ave_simplified
# For mu = 0.5:
T_ave_50 = 0.5*T_hot + 0.25*T_cold1 + 0.25*T_cold2
# For mu = 0.75:
T_ave_75 = 0.75*T_hot + 0.125*T_cold1 + 0.125*T_cold2
\end{lstlisting}
\subsubsection*{Solution}
The average reactor temperature must be calculated as a \textbf{mass-weighted average}:
\[T_{ave} = \frac{C_r T_{hot} + C_{sg} T_{cold1} + C_{sg} T_{cold2}}{C_r + 2C_{sg}}\]
Since $C_r + 2C_{sg} = \mu C_0 + 2 \cdot \frac{(1-\mu)C_0}{2} = C_0$, this simplifies to:
\[T_{ave} = \frac{C_r T_{hot} + C_{sg} T_{cold1} + C_{sg} T_{cold2}}{C_0}\]
Substituting $C_r = \mu C_0$ and $C_{sg} = \frac{(1-\mu)C_0}{2}$:
\[\boxed{T_{ave} = \mu T_{hot} + \frac{(1-\mu)}{2}(T_{cold1} + T_{cold2})}\]
\textbf{Important:} This formula \textit{depends on $\mu$}!
\textbf{For $\mu = 0.5$:}
\[T_{ave} = \frac{T_{hot}}{2} + \frac{T_{cold1} + T_{cold2}}{4}\]
\textbf{For $\mu = 0.75$:}
\[T_{ave} = \frac{3T_{hot}}{4} + \frac{T_{cold1} + T_{cold2}}{8}\]
\textbf{Note:} When the system is balanced ($P_r = \dot{Q}_1 + \dot{Q}_2$), the mass-weighted average temperature remains constant even during transients, since $\frac{d(C_0 \cdot T_{ave})}{dt} = P_r - \dot{Q}_1 - \dot{Q}_2 = 0$.
\subsection*{Part D}
\subsubsection*{Python Code}
\begin{lstlisting}[language=Python,
basicstyle=\ttfamily\small,
keywordstyle=\color{blue},
commentstyle=\color{gray},
stringstyle=\color{red},
showstringspaces=false,
numbers=left,
numberstyle=\tiny,
frame=single,
breaklines=true]
from scipy.integrate import odeint
def reactor_odes(y, t, W, C_r, C_sg, P_r, Qdot1, Qdot2):
"""
P_r: Reactor power (heat generation rate)
Qdot1, Qdot2: SG heat removal rates
"""
T_hot, T_cold1, T_cold2 = y
dT_hot_dt = (P_r - W*(T_hot - T_cold1) - W*(T_hot - T_cold2)) / C_r
dT_cold1_dt = (W*(T_hot - T_cold1) - Qdot1) / C_sg
dT_cold2_dt = (W*(T_hot - T_cold2) - Qdot2) / C_sg
return [dT_hot_dt, dT_cold1_dt, dT_cold2_dt]
# Initial conditions at equilibrium
y0 = [450, 450, 450]
# Time array: 0 to 30 seconds
t = np.linspace(0, 30, 500)
# Solve for different cases
solution = odeint(reactor_odes, y0, t, args=(W, C_r, C_sg, P_r, Qdot1, Qdot2))
T_hot = solution[:, 0]
T_cold1 = solution[:, 1]
T_cold2 = solution[:, 2]
# Calculate average temperature (mass-weighted, depends on mu)
T_ave = mu*T_hot + (1-mu)*(T_cold1 + T_cold2)/2
\end{lstlisting}
\subsubsection*{Solution}
Transient simulations were performed for four cases using numerical integration (scipy.integrate.odeint):
\textbf{Cases simulated:}
\begin{enumerate}
\item $\mu = 0.5$, equally loaded ($\dot{Q}_1 = 50\%$, $\dot{Q}_2 = 50\%$)
\item $\mu = 0.75$, equally loaded ($\dot{Q}_1 = 50\%$, $\dot{Q}_2 = 50\%$)
\item $\mu = 0.5$, unequally loaded ($\dot{Q}_1 = 60\%$, $\dot{Q}_2 = 40\%$)
\item $\mu = 0.75$, unequally loaded ($\dot{Q}_1 = 60\%$, $\dot{Q}_2 = 40\%$)
\end{enumerate}
All cases assume reactor power $P_r = 100\%$ and initial conditions at equilibrium ($T_{hot} = T_{cold1} = T_{cold2} = 450$ \degree F).
\textbf{Note:} Power percentages refer to fraction of total reactor power, not individual SG ratings.
\textbf{Equally Loaded Cases:}
\begin{center}
\includegraphics[width=0.95\textwidth]{../python/problem1_equal_loading.png}
\end{center}
\textbf{Unequally Loaded Cases:}
\begin{center}
\includegraphics[width=0.95\textwidth]{../python/problem1_unequal_loading.png}
\end{center}

View File

@ -368,21 +368,3 @@ If the neutron flux is not actually zero at the trough edges (as assumed in our
\textbf{Impact on critical height:} \textbf{Impact on critical height:}
\[\boxed{\text{Critical height would DECREASE}}\] \[\boxed{\text{Critical height would DECREASE}}\]
With people nearby acting as reflectors:
\begin{itemize}
\item The effective non-leakage probability increases
\item Less fissile material is needed to achieve $k_{eff} = 1$
\item Critical height would be \textbf{lower} than our calculated 31.72 cm
\end{itemize}
\textbf{Safety implications:}
This is a \textbf{serious criticality safety concern}. The presence of personnel near fissile liquid containers can:
\begin{itemize}
\item Make systems go critical at lower fill levels than predicted by bare reactor calculations
\item Create inadvertent criticality accidents
\item Necessitate larger safety margins and administrative controls
\end{itemize}
\textbf{Historical note:} Several criticality accidents have occurred due to personnel proximity acting as reflectors, including incidents during the Manhattan Project. This is why strict distance requirements and neutron shielding are mandated in facilities handling fissile materials.

View File

@ -77,7 +77,7 @@ import sympy as sm
D_POWER = 2.5 # % D_POWER = 2.5 # %
D_T_AVG = 4 # degrees D_T_AVG = 4 # degrees
HEAT_UP_RATE = 0.15 # F/s HEAT_UP_RATE = 0.15 # F/s
ALPHA_F = 10 # pcm/%power ALPHA_F = -10 # pcm/%power (negative feedback)
rho_rod = rho rho_rod = rho
@ -103,7 +103,7 @@ Given:
\item Power change at peak: $\Delta P$ = 2.5\% \item Power change at peak: $\Delta P$ = 2.5\%
\item Average temperature change at peak: $\Delta T_{avg}$ = 4$^\circ$F \item Average temperature change at peak: $\Delta T_{avg}$ = 4$^\circ$F
\item Heat-up rate: $\dot{T}$ = 0.15 $^\circ$F/s \item Heat-up rate: $\dot{T}$ = 0.15 $^\circ$F/s
\item Fuel temperature coefficient: $\alpha_f$ = 10 pcm/\%power \item Fuel temperature coefficient: $\alpha_f$ = -10 pcm/\%power (negative feedback)
\item Rod reactivity: $\rho_{rod}$ = 80 pcm (from Part A) \item Rod reactivity: $\rho_{rod}$ = 80 pcm (from Part A)
\item $\lambda_{eff}$ = 0.1 Hz \item $\lambda_{eff}$ = 0.1 Hz
\end{itemize} \end{itemize}
@ -116,16 +116,16 @@ The temperature rise creates a reactivity change rate:
\[\dot{\rho} = \alpha_w \times \dot{T} = \alpha_w \times 0.15\] \[\dot{\rho} = \alpha_w \times \dot{T} = \alpha_w \times 0.15\]
The net reactivity at the peak is: The net reactivity at the peak is:
\[\rho_{net} = \alpha_w \Delta T_{avg} + \rho_{rod} + \alpha_f \Delta P = \alpha_w \times 4 + 80 + 10 \times 2.5\] \[\rho_{net} = \alpha_w \Delta T_{avg} + \rho_{rod} + \alpha_f \Delta P = \alpha_w \times 4 + 80 + (-10) \times 2.5\]
Substituting into the SUR = 0 condition: Substituting into the SUR = 0 condition:
\[\alpha_w \times 0.15 + 0.1 \times (\alpha_w \times 4 + 80 + 25) = 0\] \[\alpha_w \times 0.15 + 0.1 \times (\alpha_w \times 4 + 80 - 25) = 0\]
\[0.15\alpha_w + 0.4\alpha_w + 10.5 = 0\] \[0.15\alpha_w + 0.4\alpha_w + 5.5 = 0\]
\[0.55\alpha_w = -10.5\] \[0.55\alpha_w = -5.5\]
\[\boxed{\alpha_w = -19.091 \text{ pcm/}^\circ\text{F}}\] \[\boxed{\alpha_w = -10.000 \text{ pcm/}^\circ\text{F}}\]
\subsection*{Part D} \subsection*{Part D}

View File

@ -0,0 +1,194 @@
\section*{Problem 4}
\subsection*{Problem Statement}
A pressurized water reactor (with highly enriched fuel) is initially at a steady state of 25\% steam load. The operators are directed to raise power (picking up electrical load) by increasing steam flow to 50\% in a single motion.
\textbf{Initial conditions:}
\begin{itemize}
\item $T_{ave} = 500$ \degree F
\item $T_h = 510$ \degree F (hot leg)
\item $T_c = 490$ \degree F (cold leg)
\item Power = 25\%
\item No automatic control forcing changes in average temperature
\end{itemize}
\subsection*{Part A}
\subsubsection*{Solution}
\textbf{Chronological list of physical impacts on the primary system and reactor:}
\textbf{Secondary Side (Given):}
\begin{enumerate}
\item Turbine throttle opened (operators pick up electrical load)
\item Steam flow increases from 25\% to 50\%
\item Pressure in steam generator drops
\item Aggressive boiling in steam generator begins
\item SG water cools (maintains saturation conditions)
\item Primary side cold leg ($T_c$) cooled by steam generator
\end{enumerate}
\textbf{Primary Side and Reactor:}
\begin{enumerate}
\setcounter{enumi}{6}
\item Cold leg temperature ($T_c$) decreases
\item Average temperature ($T_{ave}$) decreases (no automatic control)
\item \textbf{Moderator temperature reactivity feedback} ($\alpha_{mod} < 0$):
\begin{itemize}
\item Cooler moderator $\rightarrow$ increased water density
\item Better neutron moderation and thermalization
\item Positive reactivity insertion: $\rho = \alpha_{mod} \times \Delta T_{ave}$
\item Since $\alpha_{mod} < 0$ and $\Delta T_{ave} < 0$, then $\rho > 0$
\end{itemize}
\item Reactor power begins to increase
\item Fuel temperature increases $\rightarrow$ negative fuel feedback (Doppler effect)
\item Hot leg temperature ($T_h$) increases
\item Core $\Delta T$ increases: $\Delta T = \frac{\text{Power}}{\dot{m} \times c_p}$
\item Average temperature begins to rise back toward initial value
\item \textbf{Power levels off at 50\% when:}
\begin{itemize}
\item Heat removal rate matches heat generation rate
\item $\Delta T$ establishes new equilibrium: $\Delta T_{new} = \Delta T_{old} \times \frac{P_{new}}{P_{old}}$
\item $T_{ave}$ returns to approximately initial value
\item Net reactivity returns to zero (reactor critical)
\end{itemize}
\end{enumerate}
\textbf{Impacts on six factors in $k_{eff} = \varepsilon \times p \times f \times \eta \times P_{FNL} \times P_{TNL}$:}
\begin{enumerate}
\item \textbf{$\varepsilon$ (fast fission factor):} Negligible change
\begin{itemize}
\item Minimal U-238 present for fast fission
\item No significant change
\end{itemize}
\item \textbf{$p$ (resonance escape probability):} Slight increase
\begin{itemize}
\item Limited U-238 resonance absorption with high enrichment
\item Cooler moderator $\rightarrow$ higher density $\rightarrow$ more scattering
\item Faster neutron slowing down through resonance region
\item Less time spent at resonance energies $\rightarrow$ less absorption
\item $p$ increases slightly
\end{itemize}
\item \textbf{$f$ (thermal utilization factor):} Possible slight increase
\begin{itemize}
\item $f = \frac{\Sigma_{a,fuel}}{\Sigma_{a,fuel} + \Sigma_{a,mod}}$
\item Cooler moderator $\rightarrow$ better thermalization efficiency
\item More neutrons successfully reach thermal energies where fuel cross section dominates
\item Competing effect: higher moderator density increases $\Sigma_{a,mod}$
\item Net effect: likely small increase
\end{itemize}
\item \textbf{$\eta$ (reproduction factor):} Minimal change
\begin{itemize}
\item $\eta = \nu \frac{\sigma_f}{\sigma_a}$ for U-235
\item Temperature effects on U-235 cross sections are small
\item Essentially constant
\end{itemize}
\item \textbf{$P_{FNL}$ (fast non-leakage):} Minimal change
\begin{itemize}
\item Large reactor $\rightarrow$ already high fast non-leakage
\item Small temperature changes don't significantly affect
\end{itemize}
\item \textbf{$P_{TNL}$ (thermal non-leakage):} Slight increase
\begin{itemize}
\item Cooler moderator $\rightarrow$ higher density $\rightarrow$ shorter diffusion length
\item Reduced thermal neutron leakage
\item However, large reactor already has high $P_{TNL}$ (low leakage baseline)
\item Effect is present but modest in absolute terms
\end{itemize}
\end{enumerate}
\textbf{Overall mechanism:} Net positive reactivity from moderator cooling
results from the combined contributions of increased $p$ (faster slowing through
resonances), increased $f$ (better thermalization), and increased $P_{TNL}$
(reduced leakage). For a large reactor with high enrichment, multiple effects
contribute to the reactivity rather than a single dominant mechanism. The
cooler, denser moderator improves neutron economy across several factors,
causing power to increase until new equilibrium at 50\%.
\subsection*{Part B}
\subsubsection*{Python Code}
\begin{lstlisting}[language=Python,
basicstyle=\ttfamily\small,
keywordstyle=\color{blue},
commentstyle=\color{gray},
stringstyle=\color{red},
showstringspaces=false,
numbers=left,
numberstyle=\tiny,
frame=single,
breaklines=true]
# Initial conditions
T_ave_initial = 500 # F
T_h_initial = 510 # F
T_c_initial = 490 # F
P_initial = 25 # %
P_final = 50 # %
# Calculate DeltaT
DeltaT_initial = T_h_initial - T_c_initial # 20 F
DeltaT_final = DeltaT_initial * (P_final / P_initial) # 40 F
# Estimate final temperatures (assume T_ave approximately constant)
T_ave_final = T_ave_initial
T_h_final = T_ave_final + DeltaT_final / 2
T_c_final = T_ave_final - DeltaT_final / 2
\end{lstlisting}
\subsubsection*{Solution}
At steady state, reactor power is proportional to the temperature rise across the core:
\[P \propto \dot{m} \times c_p \times \Delta T\]
For constant flow rate (no pump speed change):
\[\frac{P_{new}}{P_{old}} = \frac{\Delta T_{new}}{\Delta T_{old}}\]
\textbf{Initial state (25\% power):}
\begin{itemize}
\item $\Delta T_{initial} = T_h - T_c = 510 - 490 = 20$ \degree F
\end{itemize}
\textbf{Final state (50\% power):}
\[\Delta T_{final} = \Delta T_{initial} \times \frac{P_{final}}{P_{initial}} = 20 \times \frac{50}{25} = \boxed{40 \text{ \degree F}}\]
Assuming strong moderator feedback returns $T_{ave}$ to approximately its initial value:
\[T_{ave,final} \approx 500 \text{ \degree F}\]
\[T_{h,final} = T_{ave} + \frac{\Delta T}{2} = 500 + 20 = \boxed{520 \text{ \degree F}}\]
\[T_{c,final} = T_{ave} - \frac{\Delta T}{2} = 500 - 20 = \boxed{480 \text{ \degree F}}\]
\textbf{Comparison table:}
\begin{center}
\begin{tabular}{lccc}
\hline
\textbf{Parameter} & \textbf{Initial (25\%)} & \textbf{Final (50\%)} & \textbf{Change} \\
\hline
Power & 25\% & 50\% & $+25\%$ \\
$T_h$ (\degree F) & 510 & 520 & $+10$ \degree F \\
$T_c$ (\degree F) & 490 & 480 & $-10$ \degree F \\
$T_{ave}$ (\degree F) & 500 & $\sim$500 & $\sim$0 \degree F \\
$\Delta T$ (\degree F) & 20 & 40 & $+20$ \degree F \\
\hline
\end{tabular}
\end{center}
\subsection*{Part C}
\subsubsection*{Solution}
For a reactor with low enrichment fuel (3-5\% U-235), the final condition will
be significantly different due to the large quantity of U-238 present. Low
enrichment fuel contains approximately 95\% U-238, compared to only about 7\% in the highly enriched case.
As power increases and fuel temperature rises, Doppler broadening of U-238 resonances creates a strong negative fuel temperature coefficient. This negative fuel feedback counteracts the positive moderator temperature feedback from the cooler water. The net reactivity insertion becomes much smaller than in the high enrichment case, and the power increase may be insufficient to reach 50\%.
To restore proper operation, operators must withdraw control rods to add positive reactivity and overcome the strong negative Doppler feedback. This allows the reactor to reach the desired 50\% power level matching the steam demand.

View File

@ -4,7 +4,8 @@
\subsubsection*{Solution} \subsubsection*{Solution}
The xenon-135 transient for the given power history is solved using the coupled differential equations for I-135 and Xe-135: The xenon-135 transient for the given power history is solved using the coupled
differential equations for I-135 and Xe-135:
\[\frac{dI}{dt} = -\lambda_I I + \rho \gamma_I P_0\] \[\frac{dI}{dt} = -\lambda_I I + \rho \gamma_I P_0\]
@ -149,19 +150,4 @@ At equilibrium with $\rho = 1.0$:
\[\boxed{\text{Peak xenon reactivity: } -5261 \text{ pcm}}\] \[\boxed{\text{Peak xenon reactivity: } -5261 \text{ pcm}}\]
\textbf{Interpretation:}
\begin{itemize}
\item The xenon reactivity becomes 2361 pcm more negative than equilibrium
\item Peak occurs approximately 8.4 hours after shutdown
\item This represents a significant reactivity penalty that must be overcome to restart
\item If reactivity worth is insufficient, the reactor cannot be restarted until xenon decays
\item At t = 15 hours, when power returns to 100\%, xenon has already started to decay from peak
\end{itemize}
\textbf{Physical insight:}
The time to peak can be estimated analytically. After shutdown, I-135 decays with time constant $1/\lambda_I \approx 10$ hours, while Xe-135 decays with $1/\lambda_{Xe} \approx 13$ hours. The peak occurs when:
\[\frac{dX}{dt} = \lambda_I I(t) - \lambda_{Xe} X(t) = 0\]
This typically occurs at $t \approx 8-12$ hours after shutdown for thermal reactors, consistent with our computed value of 8.36 hours. The reactor restarts at t = 15 hours, which is about 1.6 hours after the xenon peak, when xenon has already begun to decay.

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 KiB

View File

@ -0,0 +1,321 @@
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint
# Problem 1: Two-Loop Reactor System
print("=== Problem 1: Two-Loop Reactor with Steam Generators ===\n")
# Given Parameters
mu = None # Reactor Water Mass Fraction (RWMF) - to be determined or specified
# Base parameters
C_0 = 33.33 # Base Heat Capacity [%-sec/°F]
tau_0 = 0.75 * C_0 # Base Time Constant [sec/(%-sec/°F)] * C_0 = [sec]
# Initial steady state temperature
T_hot_initial = 450 # °F (reactor outlet / hot leg temperature)
T_cold_1_initial = 450 # °F (cold leg 1 temperature)
T_cold_2_initial = 450 # °F (cold leg 2 temperature)
print("Base Parameters:")
print(f"C_0 (Base Heat Capacity) = {C_0:.2f} %-sec/°F")
print(f"tau_0 (Base Time Constant) = {tau_0:.2f} sec")
print(f"\nInitial Steady State:")
print(f"T_hot = {T_hot_initial} °F")
print(f"T_cold_1 = {T_cold_1_initial} °F")
print(f"T_cold_2 = {T_cold_2_initial} °F")
# System parameters as functions of mu (RWMF)
def calculate_system_parameters(mu):
"""
Calculate system parameters based on Reactor Water Mass Fraction (mu)
Parameters:
mu: Reactor Water Mass Fraction (RWMF)
Returns:
dict: Dictionary containing all calculated parameters
"""
# Reactor parameters
tau_r = mu * tau_0 # Reactor time constant [sec]
C_r = mu * C_0 # Reactor heat capacity [%-sec/°F]
# Steam Generator parameters (each)
tau_sg = (1 - mu) * tau_r / 2 # Steam Generator water time constant [sec]
C_sg = (1 - mu) * C_0 / 2 # Steam Generator heat capacity [%-sec/°F]
params = {
"mu": mu,
"tau_r": tau_r,
"C_r": C_r,
"tau_sg": tau_sg,
"C_sg": C_sg,
"C_0": C_0,
"tau_0": tau_0,
}
return params
# Example: Calculate parameters for mu = 0.5 (50% of water in reactor)
if mu is None:
mu_example = 0.5
print(f"\n--- Example with mu = {mu_example} ---")
params = calculate_system_parameters(mu_example)
print(f"\nReactor Parameters:")
print(f" tau_r (Reactor time constant) = {params['tau_r']:.2f} sec")
print(f" C_r (Reactor heat capacity) = {params['C_r']:.2f} %-sec/°F")
print(f"\nSteam Generator Parameters (each):")
print(f" tau_sg (SG water time constant) = {params['tau_sg']:.2f} sec")
print(f" C_sg (SG heat capacity) = {params['C_sg']:.2f} %-sec/°F")
# System description
print(f"\n" + "=" * 60)
print("System Description:")
print("=" * 60)
print(
"""
Two-Loop Reactor System:
- Reactor (hot leg) at T_hot
- Steam Generator 1 with cold leg at T_cold_1
- Steam Generator 2 with cold leg at T_cold_2
- Each loop: pump reactor steam generator back to pump
- Lumped reactor volume with combined hot branches
- Equal mass flow rates in each loop
- Ignore loop transport times
Key Assumptions:
- Each SG + cold loop has same water mass and flow rate
- Reactor and hot branches lumped into single water volume
- System initially at equilibrium (100% power, balanced)
- Constant average temperature maintained
"""
)
# Part A: Differential Equations
print(f"\n" + "=" * 60)
print("Part A: Differential Equations")
print("=" * 60)
def get_differential_equations(mu):
"""
Develop differential equations for T_hot, T_cold1, T_cold2
Key insight: Flow heat capacity rate W = C_0 / (2 * tau_0)
This is the (mass flow rate * specific heat) for each loop
"""
params = calculate_system_parameters(mu)
# Flow heat capacity rate for each loop (same for both loops)
W = C_0 / (2 * tau_0)
print(f"\nFor mu = {mu}:")
print(f"Flow heat capacity rate (each loop): W = {W:.4f} %-sec/°F")
print(f"C_r = {params['C_r']:.2f}, C_sg = {params['C_sg']:.2f}")
print(f"\nDifferential Equations:")
print(f" C_r * dT_hot/dt = P_r - W*(T_hot - T_cold1) - W*(T_hot - T_cold2)")
print(f" C_sg * dT_cold1/dt = W*(T_hot - T_cold1) - Qdot1")
print(f" C_sg * dT_cold2/dt = W*(T_hot - T_cold2) - Qdot2")
print(f"\nwhere:")
print(f" P_r = reactor power (positive for heat generation)")
print(f" Qdot1, Qdot2 = SG heat removal rates (positive for heat removal)")
print(f" W = {W:.4f} %-sec/°F (flow heat capacity rate per loop)")
# Matrix form: dT/dt = A*T + B
print(f"\n--- Matrix Form: dT/dt = A*T + B ---")
# Coefficient matrix A
A = np.array(
[
[-2 * W / params["C_r"], W / params["C_r"], W / params["C_r"]],
[W / params["C_sg"], -W / params["C_sg"], 0],
[W / params["C_sg"], 0, -W / params["C_sg"]],
]
)
print(f"\nMatrix A (coefficients):")
print(f" [{A[0,0]:7.4f} {A[0,1]:7.4f} {A[0,2]:7.4f}]")
print(f" [{A[1,0]:7.4f} {A[1,1]:7.4f} {A[1,2]:7.4f}]")
print(f" [{A[2,0]:7.4f} {A[2,1]:7.4f} {A[2,2]:7.4f}]")
# For general case with P_r, Qdot1, Qdot2
print(f"\nVector B (forcing terms, depends on P_r, Qdot1, Qdot2):")
print(f" [P_r/C_r, -Qdot1/C_sg, -Qdot2/C_sg]^T")
print(
f" [P_r/{params['C_r']:.2f}, -Qdot1/{params['C_sg']:.2f}, -Qdot2/{params['C_sg']:.2f}]^T"
)
return W, params
# Part D: Transient Simulation Setup
print(f"\n" + "=" * 60)
print("Part D: Transient Simulation (0 to 30 seconds)")
print("=" * 60)
def reactor_odes(y, t, W, C_r, C_sg, P_r, Q1, Q2):
"""
ODE system for two-loop reactor
y = [T_hot, T_cold1, T_cold2]
Parameters:
P_r: Reactor power (heat generation rate)
Q1, Q2: Steam generator heat removal rates (Qdot_1, Qdot_2)
"""
T_hot, T_cold1, T_cold2 = y
# Reactor energy balance
dT_hot_dt = (P_r - W * (T_hot - T_cold1) - W * (T_hot - T_cold2)) / C_r
# Steam generator 1 energy balance (Q1 is heat removal rate)
dT_cold1_dt = (W * (T_hot - T_cold1) - Q1) / C_sg
# Steam generator 2 energy balance (Q2 is heat removal rate)
dT_cold2_dt = (W * (T_hot - T_cold2) - Q2) / C_sg
return [dT_hot_dt, dT_cold1_dt, dT_cold2_dt]
def simulate_transient(mu, Q1_percent, Q2_percent, t_max=30):
"""
Simulate reactor transient
Parameters:
mu: Reactor Water Mass Fraction
Q1_percent: Steam generator 1 heat removal rate (% of nominal)
Q2_percent: Steam generator 2 heat removal rate (% of nominal)
t_max: Simulation time (seconds)
"""
params = calculate_system_parameters(mu)
W = C_0 / (2 * tau_0)
# Initial conditions (steady state at 100% power balanced)
T_hot_0 = T_hot_initial
T_cold1_0 = T_cold_1_initial
T_cold2_0 = T_cold_2_initial
y0 = [T_hot_0, T_cold1_0, T_cold2_0]
# Power levels (normalized - 100% = 1.0 in appropriate units)
P_r = 100.0 # Reactor power (heat generation rate)
Q1 = Q1_percent # SG1 heat removal rate
Q2 = Q2_percent # SG2 heat removal rate
# Time array
t = np.linspace(0, t_max, 500)
# Solve ODE system
solution = odeint(
reactor_odes, y0, t, args=(W, params["C_r"], params["C_sg"], P_r, Q1, Q2)
)
T_hot = solution[:, 0]
T_cold1 = solution[:, 1]
T_cold2 = solution[:, 2]
# Calculate average temperature (mass-weighted, depends on mu)
T_ave = mu * T_hot + (1 - mu) * (T_cold1 + T_cold2) / 2
return t, T_hot, T_cold1, T_cold2, T_ave
# Example: Show how to set up simulations
print("\nSimulation cases to run:")
print("1. mu=0.5, Q1=50%, Q2=50% (equally loaded)")
print("2. mu=0.75, Q1=50%, Q2=50% (equally loaded)")
print("3. mu=0.5, Q1=60%, Q2=40% (unequally loaded)")
print("4. mu=0.75, Q1=60%, Q2=40% (unequally loaded)")
print("\nNote: Percentages are fractions of reactor power (P_r = 100%)")
# Run example simulation
print("\n--- Running Example: mu=0.5, Equal Loading ---")
W_example, params_example = get_differential_equations(0.5)
# Run all simulations and create plots
print("\n" + "=" * 60)
print("Running Simulations and Creating Plots")
print("=" * 60)
# Case 1 & 2: Equally loaded (Q1=50%, Q2=50%)
fig1, axes1 = plt.subplots(2, 2, figsize=(14, 10))
fig1.suptitle(
"Equally Loaded Steam Generators (Q1=50%, Q2=50%)", fontsize=14, fontweight="bold"
)
for idx, mu in enumerate([0.5, 0.75]):
print(f"\nSimulating mu={mu}, Q1=50%, Q2=50%")
t, T_hot, T_cold1, T_cold2, T_ave = simulate_transient(mu, 50.0, 50.0)
# Plot temperatures
ax = axes1[idx, 0]
ax.plot(t, T_hot, "r-", linewidth=2, label="T_hot")
ax.plot(t, T_cold1, "b-", linewidth=2, label="T_cold1")
ax.plot(t, T_cold2, "g-", linewidth=2, label="T_cold2")
ax.plot(t, T_ave, "k--", linewidth=2, label="T_ave")
ax.set_xlabel("Time (sec)", fontsize=10)
ax.set_ylabel("Temperature (°F)", fontsize=10)
ax.set_title(f"mu = {mu} (RWMF)", fontsize=11, fontweight="bold")
ax.grid(True, alpha=0.3)
ax.legend(loc="best")
# Plot temperature differences
ax = axes1[idx, 1]
ax.plot(t, T_hot - T_cold1, "b-", linewidth=2, label="ΔT1 = T_hot - T_cold1")
ax.plot(t, T_hot - T_cold2, "g-", linewidth=2, label="ΔT2 = T_hot - T_cold2")
ax.set_xlabel("Time (sec)", fontsize=10)
ax.set_ylabel("Temperature Difference (°F)", fontsize=10)
ax.set_title(f"Temperature Differences (mu = {mu})", fontsize=11, fontweight="bold")
ax.grid(True, alpha=0.3)
ax.legend(loc="best")
plt.tight_layout()
plt.savefig("problem1_equal_loading.png", dpi=300, bbox_inches="tight")
print("Plot saved: problem1_equal_loading.png")
plt.close()
# Case 3 & 4: Unequally loaded (Q1=60%, Q2=40%)
fig2, axes2 = plt.subplots(2, 2, figsize=(14, 10))
fig2.suptitle(
"Unequally Loaded Steam Generators (Q1=60%, Q2=40%)", fontsize=14, fontweight="bold"
)
for idx, mu in enumerate([0.5, 0.75]):
print(f"\nSimulating mu={mu}, Q1=60%, Q2=40%")
t, T_hot, T_cold1, T_cold2, T_ave = simulate_transient(mu, 60.0, 40.0)
# Plot temperatures
ax = axes2[idx, 0]
ax.plot(t, T_hot, "r-", linewidth=2, label="T_hot")
ax.plot(t, T_cold1, "b-", linewidth=2, label="T_cold1")
ax.plot(t, T_cold2, "g-", linewidth=2, label="T_cold2")
ax.plot(t, T_ave, "k--", linewidth=2, label="T_ave")
ax.set_xlabel("Time (sec)", fontsize=10)
ax.set_ylabel("Temperature (°F)", fontsize=10)
ax.set_title(f"mu = {mu} (RWMF)", fontsize=11, fontweight="bold")
ax.grid(True, alpha=0.3)
ax.legend(loc="best")
# Plot temperature differences
ax = axes2[idx, 1]
ax.plot(t, T_hot - T_cold1, "b-", linewidth=2, label="ΔT1 = T_hot - T_cold1")
ax.plot(t, T_hot - T_cold2, "g-", linewidth=2, label="ΔT2 = T_hot - T_cold2")
ax.set_xlabel("Time (sec)", fontsize=10)
ax.set_ylabel("Temperature Difference (°F)", fontsize=10)
ax.set_title(f"Temperature Differences (mu = {mu})", fontsize=11, fontweight="bold")
ax.grid(True, alpha=0.3)
ax.legend(loc="best")
plt.tight_layout()
plt.savefig("problem1_unequal_loading.png", dpi=300, bbox_inches="tight")
print("Plot saved: problem1_unequal_loading.png")
plt.close()
print("\n" + "=" * 60)
print("Simulation Complete!")
print("=" * 60)

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 KiB

View File

@ -0,0 +1,210 @@
import sympy as sm
import numpy as np
print("="*70)
print("Problem 1: SymPy Verification")
print("="*70)
# Define symbols
T_hot, T_cold1, T_cold2 = sm.symbols('T_hot T_cold1 T_cold2')
P_r, Qdot1, Qdot2 = sm.symbols('P_r Qdot_1 Qdot_2', positive=True)
C_r, C_sg, W = sm.symbols('C_r C_sg W', positive=True)
C_0, tau_0, mu = sm.symbols('C_0 tau_0 mu', positive=True)
t = sm.symbols('t', positive=True)
print("\n--- Part A: Derive Differential Equations ---")
# Energy balance equations
print("\nReactor energy balance:")
reactor_eq = sm.Eq(C_r * sm.Derivative(T_hot, t),
P_r - W*(T_hot - T_cold1) - W*(T_hot - T_cold2))
print(f"C_r * dT_hot/dt = P_r - W*(T_hot - T_cold1) - W*(T_hot - T_cold2)")
print(reactor_eq)
print("\nSteam Generator 1 energy balance:")
sg1_eq = sm.Eq(C_sg * sm.Derivative(T_cold1, t),
W*(T_hot - T_cold1) - Qdot1)
print(f"C_sg * dT_cold1/dt = W*(T_hot - T_cold1) - Qdot1")
print(sg1_eq)
print("\nSteam Generator 2 energy balance:")
sg2_eq = sm.Eq(C_sg * sm.Derivative(T_cold2, t),
W*(T_hot - T_cold2) - Qdot2)
print(f"C_sg * dT_cold2/dt = W*(T_hot - T_cold2) - Qdot2")
print(sg2_eq)
# Expand and simplify to get matrix form
print("\n--- Expanding to Matrix Form: dT/dt = A*T + B ---")
# Reactor equation expanded
reactor_rhs = P_r - W*T_hot + W*T_cold1 - W*T_hot + W*T_cold2
reactor_rhs_simplified = sm.expand(reactor_rhs)
print(f"\nReactor RHS expanded:")
print(f" = P_r - 2W*T_hot + W*T_cold1 + W*T_cold2")
print(f" = {reactor_rhs_simplified}")
dT_hot_dt = reactor_rhs_simplified / C_r
print(f"\ndT_hot/dt = {dT_hot_dt}")
# SG1 equation expanded
sg1_rhs = W*T_hot - W*T_cold1 - Qdot1
dT_cold1_dt = sg1_rhs / C_sg
print(f"\ndT_cold1/dt = {dT_cold1_dt}")
# SG2 equation expanded
sg2_rhs = W*T_hot - W*T_cold2 - Qdot2
dT_cold2_dt = sg2_rhs / C_sg
print(f"\ndT_cold2/dt = {dT_cold2_dt}")
# Extract coefficient matrix A
print("\n--- Constructing Matrix A ---")
A_symbolic = sm.Matrix([
[sm.diff(dT_hot_dt, T_hot), sm.diff(dT_hot_dt, T_cold1), sm.diff(dT_hot_dt, T_cold2)],
[sm.diff(dT_cold1_dt, T_hot), sm.diff(dT_cold1_dt, T_cold1), sm.diff(dT_cold1_dt, T_cold2)],
[sm.diff(dT_cold2_dt, T_hot), sm.diff(dT_cold2_dt, T_cold1), sm.diff(dT_cold2_dt, T_cold2)]
])
print("\nMatrix A (symbolic):")
sm.pprint(A_symbolic)
# Extract forcing vector B
print("\n--- Constructing Vector B ---")
# B contains the terms without T_hot, T_cold1, T_cold2
B_symbolic = sm.Matrix([
P_r/C_r,
-Qdot1/C_sg,
-Qdot2/C_sg
])
print("\nVector B (symbolic):")
sm.pprint(B_symbolic)
# Verify: dT/dt = A*T + B
T_vector = sm.Matrix([T_hot, T_cold1, T_cold2])
dT_dt_vector = sm.Matrix([dT_hot_dt, dT_cold1_dt, dT_cold2_dt])
reconstructed = A_symbolic * T_vector + B_symbolic
print("\n--- Verification: A*T + B = dT/dt ---")
print("Checking if A*T + B equals our derived dT/dt...")
for i in range(3):
diff = sm.simplify(reconstructed[i] - dT_dt_vector[i])
if diff == 0:
print(f" Row {i+1}: ✓ VERIFIED")
else:
print(f" Row {i+1}: ✗ ERROR - Difference: {diff}")
# Numerical example for mu = 0.5
print("\n" + "="*70)
print("Numerical Example: mu = 0.5")
print("="*70)
C_0_val = 33.33
tau_0_val = 25.00
W_val = C_0_val / (2 * tau_0_val)
mu_val = 0.5
C_r_val = mu_val * C_0_val
C_sg_val = (1 - mu_val) * C_0_val / 2
print(f"\nC_0 = {C_0_val:.2f} %-sec/°F")
print(f"tau_0 = {tau_0_val:.2f} sec")
print(f"W = {W_val:.4f} %-sec/°F")
print(f"C_r = {C_r_val:.2f} %-sec/°F")
print(f"C_sg = {C_sg_val:.2f} %-sec/°F")
# Substitute numerical values
A_numerical = A_symbolic.subs([(C_r, C_r_val), (C_sg, C_sg_val), (W, W_val)])
print("\nMatrix A (numerical for mu=0.5):")
sm.pprint(A_numerical)
print("\nAs float matrix:")
A_float = np.array(A_numerical).astype(float)
print(A_float)
print("\n--- Part B: Steady State Analysis ---")
# At steady state, dT/dt = 0, so A*T + B = 0
# This means A*T = -B
print("\nAt steady state: A*T_ss + B = 0")
print("Solving for temperature differences...")
# From SG1: 0 = W*T_hot - W*T_cold1 - Qdot1
# Rearranging: W*(T_hot - T_cold1) = Qdot1
DeltaT1 = Qdot1 / W
print(f"\nFrom SG1: W*(T_hot - T_cold1) = Qdot1")
print(f"ΔT1 = T_hot - T_cold1 = {DeltaT1}")
# From SG2: 0 = W*T_hot - W*T_cold2 - Qdot2
# Rearranging: W*(T_hot - T_cold2) = Qdot2
DeltaT2 = Qdot2 / W
print(f"\nFrom SG2: W*(T_hot - T_cold2) = Qdot2")
print(f"ΔT2 = T_hot - T_cold2 = {DeltaT2}")
# From reactor: 0 = P_r - W*DeltaT1 - W*DeltaT2
power_balance = sm.simplify(P_r - W*DeltaT1 - W*DeltaT2)
print(f"\nPower balance check:")
print(f"P_r - W*ΔT1 - W*ΔT2 = {power_balance}")
print(f"Therefore: P_r = Qdot1 + Qdot2 ✓")
print("\n--- Part C: Average Temperature ---")
# Given formula
T_ave_given = T_hot/2 + (T_cold1 + T_cold2)/4
print(f"\nGiven: T_ave = T_hot/2 + (T_cold1 + T_cold2)/4")
print(f"T_ave = {T_ave_given}")
# Mass-weighted average
T_ave_mass_weighted = (C_r*T_hot + C_sg*T_cold1 + C_sg*T_cold2) / (C_r + 2*C_sg)
print(f"\nMass-weighted: T_ave = (C_r*T_hot + C_sg*T_cold1 + C_sg*T_cold2)/(C_r + 2*C_sg)")
# Substitute C_r = mu*C_0 and C_sg = (1-mu)*C_0/2
T_ave_mass_weighted_sub = T_ave_mass_weighted.subs([
(C_r, mu*C_0),
(C_sg, (1-mu)*C_0/2)
])
T_ave_mass_weighted_simplified = sm.simplify(T_ave_mass_weighted_sub)
print(f"\nSubstituting C_r = mu*C_0, C_sg = (1-mu)*C_0/2:")
print(f"T_ave = {T_ave_mass_weighted_simplified}")
# Check if they're equal
print(f"\nChecking if given formula equals mass-weighted formula...")
difference = sm.simplify(T_ave_given - T_ave_mass_weighted_simplified)
print(f"Difference: {difference}")
if difference == 0:
print("✓ VERIFIED: Both formulas are equivalent!")
else:
print("✗ WARNING: Formulas differ!")
print(f"Given formula gives: {T_ave_given}")
print(f"Mass-weighted gives: {T_ave_mass_weighted_simplified}")
# Time derivative of total energy
print("\n--- Energy Conservation ---")
total_energy = C_r*T_hot + C_sg*T_cold1 + C_sg*T_cold2
dE_dt = sm.diff(total_energy, t)
print(f"\nTotal system energy: E = C_r*T_hot + C_sg*T_cold1 + C_sg*T_cold2")
print(f"dE/dt = {dE_dt}")
# Substitute the differential equations
dE_dt_expanded = (C_r*dT_hot_dt + C_sg*dT_cold1_dt + C_sg*dT_cold2_dt)
dE_dt_simplified = sm.simplify(dE_dt_expanded)
print(f"\nSubstituting the differential equations:")
print(f"dE/dt = {dE_dt_simplified}")
print(f"\nTherefore: dE/dt = P_r - Qdot1 - Qdot2")
print(f"When P_r = Qdot1 + Qdot2 (balanced), dE/dt = 0 ✓")
print("\n" + "="*70)
print("Verification Complete!")
print("="*70)
print("\nSummary:")
print("✓ Matrix form correctly derived")
print("✓ Steady-state equations verified")
print("✓ Average temperature formula needs clarification")
print("✓ Energy conservation verified")

View File

@ -2,45 +2,49 @@ import numpy as np
# Two-group cross-section data # Two-group cross-section data
cross_sections = { cross_sections = {
'fast': { "fast": {
'D': 1.4, # Diffusion constant [cm] "D": 1.4, # Diffusion constant [cm]
'Sigma_a': 0.010, # Absorption [cm^-1] "Sigma_a": 0.010, # Absorption [cm^-1]
'Sigma_s': 0.050, # Scattering from fast to thermal [cm^-1] "Sigma_s": 0.050, # Scattering from fast to thermal [cm^-1]
'nu_Sigma_f': 0.000, # Neutrons per fission times fission cross section [cm^-1] "nu_Sigma_f": 0.000, # Neutrons per fission times fission cross section [cm^-1]
'chi': 1, # Neutron group distribution (fission spectrum) "chi": 1, # Neutron group distribution (fission spectrum)
'v': 1.8e7, # Average group velocity [cm/sec] "v": 1.8e7, # Average group velocity [cm/sec]
}, },
'thermal': { "thermal": {
'D': 0.35, # Diffusion constant [cm] "D": 0.35, # Diffusion constant [cm]
'Sigma_a': 0.080, # Absorption [cm^-1] "Sigma_a": 0.080, # Absorption [cm^-1]
'Sigma_s': 0.0, # Scattering from thermal to fast [cm^-1] "Sigma_s": 0.0, # Scattering from thermal to fast [cm^-1]
'nu_Sigma_f': 0.125, # Neutrons per fission times fission cross section [cm^-1] "nu_Sigma_f": 0.125, # Neutrons per fission times fission cross section [cm^-1]
'chi': 0, # Neutron group distribution (fission spectrum) "chi": 0, # Neutron group distribution (fission spectrum)
'v': 2.2e5, # Average group velocity [cm/sec] "v": 2.2e5, # Average group velocity [cm/sec]
},
"scattering": {
"fast_to_thermal": 0.050, # Sigma_s^(1->2) [cm^-1]
"thermal_to_fast": 0.0, # Sigma_s^(2->1) [cm^-1]
}, },
'scattering': {
'fast_to_thermal': 0.050, # Sigma_s^(1->2) [cm^-1]
'thermal_to_fast': 0.0, # Sigma_s^(2->1) [cm^-1]
}
} }
# Easy access shortcuts # Easy access shortcuts
D_fast = cross_sections['fast']['D'] D_fast = cross_sections["fast"]["D"]
D_thermal = cross_sections['thermal']['D'] D_thermal = cross_sections["thermal"]["D"]
Sigma_a_fast = cross_sections['fast']['Sigma_a'] Sigma_a_fast = cross_sections["fast"]["Sigma_a"]
Sigma_a_thermal = cross_sections['thermal']['Sigma_a'] Sigma_a_thermal = cross_sections["thermal"]["Sigma_a"]
Sigma_s_fast = cross_sections['fast']['Sigma_s'] # Scattering from fast to thermal Sigma_s_fast = cross_sections["fast"]["Sigma_s"] # Scattering from fast to thermal
Sigma_s_thermal = cross_sections['thermal']['Sigma_s'] # Scattering from thermal to fast Sigma_s_thermal = cross_sections["thermal"][
nu_Sigma_f_fast = cross_sections['fast']['nu_Sigma_f'] "Sigma_s"
nu_Sigma_f_thermal = cross_sections['thermal']['nu_Sigma_f'] ] # Scattering from thermal to fast
chi_fast = cross_sections['fast']['chi'] nu_Sigma_f_fast = cross_sections["fast"]["nu_Sigma_f"]
chi_thermal = cross_sections['thermal']['chi'] nu_Sigma_f_thermal = cross_sections["thermal"]["nu_Sigma_f"]
v_fast = cross_sections['fast']['v'] chi_fast = cross_sections["fast"]["chi"]
v_thermal = cross_sections['thermal']['v'] chi_thermal = cross_sections["thermal"]["chi"]
v_fast = cross_sections["fast"]["v"]
v_thermal = cross_sections["thermal"]["v"]
print("Two-Group Cross-Section Data Loaded") print("Two-Group Cross-Section Data Loaded")
print(f"Fast Group: D={D_fast} cm, Sigma_a={Sigma_a_fast} cm^-1, v={v_fast:.2e} cm/s") print(f"Fast Group: D={D_fast} cm, Sigma_a={Sigma_a_fast} cm^-1, v={v_fast:.2e} cm/s")
print(f"Thermal Group: D={D_thermal} cm, Sigma_a={Sigma_a_thermal} cm^-1, v={v_thermal:.2e} cm/s") print(
f"Thermal Group: D={D_thermal} cm, Sigma_a={Sigma_a_thermal} cm^-1, v={v_thermal:.2e} cm/s"
)
# Problem 2A: Calculate k_inf using Four-Factor Formula # Problem 2A: Calculate k_inf using Four-Factor Formula
# k_inf = epsilon * p * f * eta # k_inf = epsilon * p * f * eta
@ -77,7 +81,7 @@ print(f"k_inf = epsilon * p * f * eta = {k_inf:.4f}")
import sympy as sm import sympy as sm
# Define buckling as a symbol # Define buckling as a symbol
B_squared = sm.Symbol('B^2', positive=True) B_squared = sm.Symbol("B^2", positive=True)
# Calculate diffusion lengths # Calculate diffusion lengths
# L^2_fast = D_fast / Sigma_total_fast # L^2_fast = D_fast / Sigma_total_fast
@ -101,7 +105,9 @@ k_eff_expr = k_inf / ((L_squared_fast * B_squared + 1) * (L_squared_th * B_squar
print(f"\nCriticality relation:") print(f"\nCriticality relation:")
print(f"k_eff = k_inf / [(L^2_fast * B^2 + 1)(L^2_thermal * B^2 + 1)]") print(f"k_eff = k_inf / [(L^2_fast * B^2 + 1)(L^2_thermal * B^2 + 1)]")
print(f"k_eff = {k_inf:.4f} / [({L_squared_fast:.3f}*B^2 + 1)({L_squared_th:.3f}*B^2 + 1)]") print(
f"k_eff = {k_inf:.4f} / [({L_squared_fast:.3f}*B^2 + 1)({L_squared_th:.3f}*B^2 + 1)]"
)
# Problem 2C: Geometric buckling for rectangular solid # Problem 2C: Geometric buckling for rectangular solid
print(f"\n=== Problem 2C: Geometric Buckling ===") print(f"\n=== Problem 2C: Geometric Buckling ===")
@ -111,7 +117,7 @@ print(f"\nB^2 = (pi/L_x)^2 + (pi/L_y)^2 + (pi/L_z)^2")
print(f"\nThis is the geometric buckling for the fundamental mode.") print(f"\nThis is the geometric buckling for the fundamental mode.")
# Example calculation with symbolic dimensions # Example calculation with symbolic dimensions
L_x, L_y, L_z = sm.symbols('L_x L_y L_z', positive=True) L_x, L_y, L_z = sm.symbols("L_x L_y L_z", positive=True)
B_squared_geometric = (sm.pi / L_x) ** 2 + (sm.pi / L_y) ** 2 + (sm.pi / L_z) ** 2 B_squared_geometric = (sm.pi / L_x) ** 2 + (sm.pi / L_y) ** 2 + (sm.pi / L_z) ** 2
print(f"\nSymbolic expression:") print(f"\nSymbolic expression:")
print(f"B^2 = {B_squared_geometric}") print(f"B^2 = {B_squared_geometric}")
@ -130,7 +136,7 @@ L_y_val = 200 # cm
# where: B² = (π/L_x)² + (π/L_y)² + (π/L_z)² # where: B² = (π/L_x)² + (π/L_y)² + (π/L_z)²
# Define L_z as unknown # Define L_z as unknown
L_z_sym = sm.Symbol('L_z', positive=True) L_z_sym = sm.Symbol("L_z", positive=True)
# Buckling with known dimensions and unknown height # Buckling with known dimensions and unknown height
B_sq = (sm.pi / L_x_val) ** 2 + (sm.pi / L_y_val) ** 2 + (sm.pi / L_z_sym) ** 2 B_sq = (sm.pi / L_x_val) ** 2 + (sm.pi / L_y_val) ** 2 + (sm.pi / L_z_sym) ** 2
@ -152,8 +158,12 @@ if L_z_critical:
print(f"\nCritical height L_z = {L_z_critical:.2f} cm") print(f"\nCritical height L_z = {L_z_critical:.2f} cm")
# Verify by calculating k_eff # Verify by calculating k_eff
B_sq_check = (np.pi / L_x_val)**2 + (np.pi / L_y_val)**2 + (np.pi / L_z_critical)**2 B_sq_check = (
k_eff_check = k_inf / ((L_squared_fast * B_sq_check + 1) * (L_squared_th * B_sq_check + 1)) (np.pi / L_x_val) ** 2 + (np.pi / L_y_val) ** 2 + (np.pi / L_z_critical) ** 2
)
k_eff_check = k_inf / (
(L_squared_fast * B_sq_check + 1) * (L_squared_th * B_sq_check + 1)
)
print(f"\nVerification: k_eff = {k_eff_check:.6f} (should be 1.0)") print(f"\nVerification: k_eff = {k_eff_check:.6f} (should be 1.0)")
print(f"Geometric buckling B^2 = {B_sq_check:.6f} cm^-2") print(f"Geometric buckling B^2 = {B_sq_check:.6f} cm^-2")
else: else:
@ -172,10 +182,14 @@ print(f"Prompt critical k_eff = 1/(1-beta) = {k_eff_prompt:.6f}")
# k_eff_prompt = k_inf / [(L²_fast * B² + 1)(L²_thermal * B² + 1)] # k_eff_prompt = k_inf / [(L²_fast * B² + 1)(L²_thermal * B² + 1)]
# Rearranging: (L²_fast * B² + 1)(L²_thermal * B² + 1) = k_inf / k_eff_prompt # Rearranging: (L²_fast * B² + 1)(L²_thermal * B² + 1) = k_inf / k_eff_prompt
L_z_prompt_sym = sm.Symbol('L_z_prompt', positive=True) L_z_prompt_sym = sm.Symbol("L_z_prompt", positive=True)
B_sq_prompt = (sm.pi / L_x_val)**2 + (sm.pi / L_y_val)**2 + (sm.pi / L_z_prompt_sym)**2 B_sq_prompt = (
(sm.pi / L_x_val) ** 2 + (sm.pi / L_y_val) ** 2 + (sm.pi / L_z_prompt_sym) ** 2
)
prompt_crit_eq = (L_squared_fast * B_sq_prompt + 1) * (L_squared_th * B_sq_prompt + 1) - k_inf / k_eff_prompt prompt_crit_eq = (L_squared_fast * B_sq_prompt + 1) * (
L_squared_th * B_sq_prompt + 1
) - k_inf / k_eff_prompt
L_z_prompt_solutions = sm.solve(prompt_crit_eq, L_z_prompt_sym) L_z_prompt_solutions = sm.solve(prompt_crit_eq, L_z_prompt_sym)
@ -190,21 +204,14 @@ if L_z_prompt:
print(f"\nPrompt critical height L_z = {L_z_prompt:.2f} cm") print(f"\nPrompt critical height L_z = {L_z_prompt:.2f} cm")
# Verify # Verify
B_sq_prompt_check = (np.pi / L_x_val)**2 + (np.pi / L_y_val)**2 + (np.pi / L_z_prompt)**2 B_sq_prompt_check = (
k_eff_prompt_check = k_inf / ((L_squared_fast * B_sq_prompt_check + 1) * (L_squared_th * B_sq_prompt_check + 1)) (np.pi / L_x_val) ** 2 + (np.pi / L_y_val) ** 2 + (np.pi / L_z_prompt) ** 2
)
k_eff_prompt_check = k_inf / (
(L_squared_fast * B_sq_prompt_check + 1)
* (L_squared_th * B_sq_prompt_check + 1)
)
print(f"\nVerification: k_eff = {k_eff_prompt_check:.6f}") print(f"\nVerification: k_eff = {k_eff_prompt_check:.6f}")
print(f"Difference from delayed critical: {L_z_prompt - L_z_critical:.2f} cm") print(f"Difference from delayed critical: {L_z_prompt - L_z_critical:.2f} cm")
else: else:
print("No positive real solution found!") print("No positive real solution found!")
# Problem 2F: Effect of people near trough
print(f"\n=== Problem 2F: Effect of People Near Trough ===")
print(f"If flux is not zero at edges and people are nearby:")
print(f" - People act as neutron reflectors/scatterers (water in human body)")
print(f" - This reduces neutron leakage from the trough")
print(f" - Reduced leakage → system becomes MORE reactive")
print(f" - To achieve criticality, LESS fissile material is needed")
print(f"\nConclusion: Critical height would DECREASE")
print(f" The actual critical height with people nearby < {L_z_critical:.2f} cm (bare reactor)")
print(f" This is a SAFETY CONCERN - human reflection can inadvertently make")
print(f" systems critical at lower liquid levels than calculated!")

View File

@ -25,7 +25,7 @@ print(f"The Start Up Rate is: {sur:.3f}")
D_POWER = 2.5 # % D_POWER = 2.5 # %
D_T_AVG = 4 # degrees D_T_AVG = 4 # degrees
HEAT_UP_RATE = 0.15 # F/s HEAT_UP_RATE = 0.15 # F/s
ALPHA_F = 10 # pcm/%power ALPHA_F = -10 # pcm/%power (negative feedback)
rho_rod = rho rho_rod = rho

View File

@ -0,0 +1,99 @@
import numpy as np
import matplotlib.pyplot as plt
# Problem 4: PWR Power Increase Transient (25% → 50% Steam Load)
print("=" * 70)
print("Problem 4: PWR Power Increase Transient")
print("=" * 70)
# Given Initial Conditions (25% power steady state)
T_ave_initial = 500 # °F - Average temperature
T_h_initial = 510 # °F - Hot leg temperature
T_c_initial = 490 # °F - Cold leg temperature
P_initial = 25 # % - Initial power level
P_final = 50 # % - Final power level
print("\n--- Initial Conditions (25% Power) ---")
print(f"T_ave = {T_ave_initial} °F")
print(f"T_h = {T_h_initial} °F")
print(f"T_c = {T_c_initial} °F")
print(f"Power = {P_initial}%")
# Calculate initial ΔT across core
DeltaT_initial = T_h_initial - T_c_initial
print(f"ΔT across core = {DeltaT_initial} °F")
print("\n" + "=" * 70)
print("Part A: Chronological Physical Impacts")
print("=" * 70)
print("\n" + "=" * 70)
print("Part B: Final State Comparison")
print("=" * 70)
# For a PWR at steady state:
# Power ∝ mass flow rate × Cp × ΔT
# If flow rate is constant (no pump speed change):
# P_new / P_old = ΔT_new / ΔT_old
# Calculate new ΔT
DeltaT_final = DeltaT_initial * (P_final / P_initial)
print(f"\nΔT calculation:")
print(f"ΔT_initial = {DeltaT_initial} °F at {P_initial}% power")
print(f"ΔT_final = ΔT_initial × (P_final/P_initial)")
print(f"ΔT_final = {DeltaT_initial} × ({P_final}/{P_initial}) = {DeltaT_final} °F")
# Estimate final temperatures
# Assume T_ave returns to approximately initial value (no automatic control,
# but moderator feedback will drive it back toward equilibrium)
# This is a simplification - in reality, T_ave might be slightly different
# Method 1: Assume T_ave = constant (strong moderator feedback)
T_ave_final_method1 = T_ave_initial
T_h_final_method1 = T_ave_final_method1 + DeltaT_final / 2
T_c_final_method1 = T_ave_final_method1 - DeltaT_final / 2
print(f"\n--- Method 1: Assume T_ave constant (strong moderator feedback) ---")
print(f"T_ave_final = {T_ave_final_method1} °F")
print(
f"T_h_final = T_ave + ΔT/2 = {T_ave_final_method1} + {DeltaT_final/2} = {T_h_final_method1} °F"
)
print(
f"T_c_final = T_ave - ΔT/2 = {T_ave_final_method1} - {DeltaT_final/2} = {T_c_final_method1} °F"
)
# Method 2: More realistic - Tc drops somewhat, Th rises more
# The SG cooling will lower Tc, but not back to initial Tc
# Let's estimate Tc drops by ~5-10°F, then Th rises to accommodate ΔT
T_c_drop = 5 # °F - estimated drop in Tc due to increased SG cooling
T_c_final_method2 = T_c_initial - T_c_drop
T_h_final_method2 = T_c_final_method2 + DeltaT_final
T_ave_final_method2 = (T_h_final_method2 + T_c_final_method2) / 2
print(f"\n--- Method 2: Estimate Tc drop due to SG cooling ---")
print(f"Assume Tc drops by ~{T_c_drop}°F due to increased steam flow")
print(f"T_c_final = {T_c_final_method2} °F")
print(
f"T_h_final = T_c + ΔT = {T_c_final_method2} + {DeltaT_final} = {T_h_final_method2} °F"
)
print(f"T_ave_final = {T_ave_final_method2} °F")
print(f"\n--- Comparison Table ---")
print(
f"{'Parameter':<20} {'Initial (25%)':<20} {'Final (50%) M1':<20} {'Final (50%) M2':<20}"
)
print(f"{'-'*80}")
print(f"{'Power':<20} {P_initial:<20} {P_final:<20} {P_final:<20}")
print(
f"{'T_h (°F)':<20} {T_h_initial:<20} {T_h_final_method1:<20.1f} {T_h_final_method2:<20.1f}"
)
print(
f"{'T_c (°F)':<20} {T_c_initial:<20} {T_c_final_method1:<20.1f} {T_c_final_method2:<20.1f}"
)
print(
f"{'T_ave (°F)':<20} {T_ave_initial:<20} {T_ave_final_method1:<20.1f} {T_ave_final_method2:<20.1f}"
)
print(
f"{'ΔT (°F)':<20} {DeltaT_initial:<20} {DeltaT_final:<20.1f} {DeltaT_final:<20.1f}"
)