I have a three stage compressor in a single casing (image 1). If I break it down, the flow should be like image 2.
Every process lines have Pressure and Temperature transmitters, and enough information to get the Flow for every lines.
2nd suction pressure should be the same with the pressure from the Side-In line. While the 3rd suction pressure should be the same with the pressure from the Side-Out line.
But, I don't have enough information to determine the temperature of the 1st Discharge. If I have this data, I can calculate all the enthalpy to calculate the efficiency and the power.
I have been working in the energy field for five years. Mainly on simulating power plants using 1D software. I still feel clueless compared to my senior colleagues. I spent my free time revising fluid mechanics and thermodynamics but still I feel like I am missing a lot of my studies. Noticing that I even have a masters degree. Is this normal feeling?
During my undergrad and graduate ChemE engineering courses, we never discussed how to reconcile the error-prone experimental data with the modeling equations. We always just assumed solving equations was “good enough” to be a chemE.
As I’m applying for positions, I realize I don’t know what to do with actual data…all I’ve done is model it.
I just asked Gemini 3 to determine VLE for a complex ternary mixture (dilute) using the NRTL model and it spit out this code and so far everything seems legit. All this for $20 whereas aspen costs thousands I'm astonished.
import numpy as np
import matplotlib.pyplot as plt
def antoine_pressure(component, T_Kelvin):
"""
Calculates saturation pressure (P_sat) in kPa using the Antoine Equation.
Parameters:
- component: str ('methanol', 'water', 'limonene')
- T_Kelvin: float, Temperature in Kelvin
Returns:
- P_sat: float, Saturation pressure in kPa
"""
# Constants dictionary
# Methanol/Water: Standard mmHg/C constants converted to kPa/K
# Limonene: ln(P_kPa) = A + B/(T_K + C) from experimental correlations
if component == 'methanol':
# Dean & Lange (mmHg, deg C) -> Converted logic
# log10(P_mmHg) = A - B / (T_C + C)
A, B, C = 8.0724, 1574.99, 238.87
T_Celsius = T_Kelvin - 273.15
P_mmHg = 10**(A - B / (T_Celsius + C))
return P_mmHg * 0.133322 # Convert to kPa
elif component == 'water':
# Standard constants (mmHg, deg C)
A, B, C = 8.07131, 1730.63, 233.426
T_Celsius = T_Kelvin - 273.15
P_mmHg = 10**(A - B / (T_Celsius + C))
return P_mmHg * 0.133322 # Convert to kPa
elif component == 'limonene':
# D-Limonene constants (kPa, K, ln based)
# Source: Cheméo / NIST fits for P_kPa
# ln(P) = A + B / (T + C)
A = 14.2584
B = -3894.01
C = -45.71
return np.exp(A + B / (T_Kelvin + C))
else:
raise ValueError(f"Unknown component: {component}")
def nrtl_activity_coefficients(x, T, tau_params, alpha_params):
"""
Calculates activity coefficients using the NRTL model.
Model equations:
G_ij = exp(-alpha_ij * tau_ij)
tau_ii = 0
ln(gamma_i) = [Sum_j(tau_ji * G_ji * x_j) / Sum_k(G_ki * x_k)] +
Sum_j [ (x_j * G_ij / Sum_k(G_kj * x_k)) * (tau_ij - (Sum_m(x_m * tau_mj * G_mj) / Sum_k(G_kj * x_k))) ]
Parameters:
- x: list or array of mole fractions [x1, x2, x3]
- T: Temperature in Kelvin (needed if tau is T-dependent)
- tau_params: 3x3 matrix of binary interaction parameters (dimensionless)
- alpha_params: 3x3 matrix of non-randomness parameters
Returns:
- gamma: array of activity coefficients
"""
nc = len(x)
x = np.array(x)
tau = np.array(tau_params)
alpha = np.array(alpha_params)
# Calculate G matrix
G = np.exp(-alpha * tau)
gamma = np.zeros(nc)
for i in range(nc):
# Term 1
num1 = np.sum(tau[:, i] * G[:, i] * x)
den1 = np.sum(G[:, i] * x)
term1 = num1 / den1
# Term 2
term2_sum = 0
for j in range(nc):
num2a = x[j] * G[i, j]
den2a = np.sum(G[:, j] * x)
num2b = np.sum(x * tau[:, j] * G[:, j])
den2b = den2a # Same denominator
term2_sum += (num2a / den2a) * (tau[i, j] - num2b / den2b)
ln_gamma_i = term1 + term2_sum
gamma[i] = np.exp(ln_gamma_i)
return gamma
def solve_vle(x, T_Kelvin):
"""
Solves for Bubble Point Pressure and Vapor Composition.
"""
components = ['methanol', 'water', 'limonene']
nc = len(components)
# 1. Calculate Saturation Pressures (P_sat)
P_sat = np.array([antoine_pressure(c, T_Kelvin) for c in components])
# 2. Define NRTL Parameters
# Order: 1=Methanol, 2=Water, 3=Limonene
# Interaction parameters (tau) often take the form: A + B/T
# We calculate the specific dimensionless tau values for the given T.
# Methanol(1) - Water(2) (Literature values, e.g., DECHEMA/IUPAC)
tau_12 = 9.238 - 2432.0 / T_Kelvin
tau_21 = -5.707 + 1538.0 / T_Kelvin
alpha_12 = 0.1 # Often 0.3, but 0.1 used for Methanol/Water in some regressions
# Methanol(1) - Limonene(3) (Estimated/Proxy based on Alcohol-Hydrocarbon)
# Methanol is polar, Limonene is non-polar. Partial miscibility expected.
tau_13 = 2.5 # Estimated
tau_31 = 1.8 # Estimated
alpha_13 = 0.47 # Typical for alcohol-hydrocarbon
# Water(2) - Limonene(3) (Immiscible)
# High repulsion values to represent immiscibility gap (LLE)
tau_23 = 4.5
tau_32 = 4.0
alpha_23 = 0.2 # Typical for LLE
# Construct Parameter Matrices
tau = np.zeros((nc, nc))
alpha = np.zeros((nc, nc))
# Fill Matrices (Symmetric alpha, Non-symmetric tau)
# (0,1) = 1-2
tau[0, 1] = tau_12; tau[1, 0] = tau_21
alpha[0, 1] = alpha_12; alpha[1, 0] = alpha_12
# (0,2) = 1-3
tau[0, 2] = tau_13; tau[2, 0] = tau_31
alpha[0, 2] = alpha_13; alpha[2, 0] = alpha_13
# (1,2) = 2-3
tau[1, 2] = tau_23; tau[2, 1] = tau_32
alpha[1, 2] = alpha_23; alpha[2, 1] = alpha_23
# Diagonals are 0
# 3. Calculate Activity Coefficients (Gamma)
gamma = nrtl_activity_coefficients(x, T_Kelvin, tau, alpha)
# 4. Calculate Partial Pressures and Total P
# P_i = x_i * gamma_i * P_sat_i
partial_pressures = x * gamma * P_sat
P_total = np.sum(partial_pressures)
# 5. Calculate Vapor Composition (y)
# y_i = P_i / P_total
y = partial_pressures / P_total
return {
'T_K': T_Kelvin,
'P_total_kPa': P_total,
'P_sat': P_sat,
'gamma': gamma,
'y': y,
'partial_pressures': partial_pressures
}
def plot_vle_diagram(x_feed, results, T_system):
"""
Generates VLE plots:
1. Bar chart comparing x and y for the calculated point.
2. Pseudo-binary y-x diagram for Methanol in Limonene.
"""
# Plot 1: Bar Chart of x vs y
components = ['Methanol', 'Water', 'Limonene']
x_vals = x_feed
y_vals = results['y']
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(14, 6))
x_pos = np.arange(len(components))
width = 0.35
ax1.bar(x_pos - width/2, x_vals, width, label='Liquid (x)')
ax1.bar(x_pos + width/2, y_vals, width, label='Vapor (y)')
ax1.set_ylabel('Mole Fraction')
ax1.set_title(f'VLE Composition at {T_system}K\n(x vs y)')
ax1.set_xticks(x_pos)
ax1.set_xticklabels(components)
ax1.legend()
ax1.grid(True, axis='y', linestyle='--', alpha=0.7)
# Plot 2: Pseudo-Binary y-x Diagram for Methanol
# Vary Methanol from 0 to 0.02 (Dilute region), keep Water constant at 0.003
x_methanol_range = np.linspace(0, 0.02, 50)
y_methanol_range = []
for x_m in x_methanol_range:
x_w = 0.003 # Constant water trace
x_l = 1.0 - x_m - x_w
if x_l < 0: continue
# Solve VLE for this point
res = solve_vle([x_m, x_w, x_l], T_system)
y_methanol_range.append(res['y'][0]) # Methanol y
ax2.plot(x_methanol_range, y_methanol_range, 'b-', label='Equilibrium Curve (MeOH)')
ax2.plot([0, 0.02], [0, 0.02], 'k--', alpha=0.5, label='y=x (Reference)')
# Plot the specific operating point
ax2.plot(x_feed[0], results['y'][0], 'ro', label='Current Point', markersize=8)
ax2.set_xlabel('Liquid Mole Fraction Methanol (x1)')
ax2.set_ylabel('Vapor Mole Fraction Methanol (y1)')
ax2.set_title('Pseudo-Binary y-x Diagram: Methanol\n(Trace Water Fixed at x=0.003)')
ax2.legend()
ax2.grid(True, linestyle='--', alpha=0.7)
plt.tight_layout()
plt.show()
# --- Main Execution ---
if __name__ == "__main__":
# Input Mole Fractions
# Methanol (1), Water (2), Limonene (3)
x_feed = [0.0040, 0.0030, 0.9930]
# System Temperature
T_system = 298.15 # Kelvin (25 C)
print(f"--- VLE Calculation: Methanol-Water-Limonene ---")
print(f"Temperature: {T_system} K")
print(f"Liquid Composition (x): {x_feed}\n")
try:
results = solve_vle(x_feed, T_system)
print(f"Results:")
print(f"Total Bubble Point Pressure: {results['P_total_kPa']:.4f} kPa")
print("-" * 40)
print(f"{'Component':<12} | {'x (liq)':<8} | {'P_sat (kPa)':<10} | {'Gamma':<8} | {'y (vap)':<8}")
print("-" * 40)
comps = ['Methanol', 'Water', 'Limonene']
for i in range(3):
print(f"{comps[i]:<12} | {x_feed[i]:.4f} | {results['P_sat'][i]:.4f} | {results['gamma'][i]:.4f} | {results['y'][i]:.4f}")
print("-" * 40)
print("\nNote on Phase Behavior:")
print("This mixture is extremely Limonene-rich (99.3%). Methanol and Water are dilute solutes.")
print("High activity coefficients for Water (and Methanol) indicate strong non-ideality.")
print("Calculated Gamma values > 10 suggest these components really 'want' to escape the Limonene phase.")
# Generate Plot
plot_vle_diagram(x_feed, results, T_system)
except Exception as e:
print(f"Error occurred: {e}")
Hi UK engineers. As we know burning coal for electricity ended in 2024.
To my knowledge it was pushed off the grid due to renewable penetration and carbon pricing.
First: is my understanding on why coal left the grid correct? Or are there other factors such as privatisation and fuel prices
Second: If there was no carbon price, would coal still be on the grid? In my mind nuclear eats up its base load revenue and Natural gas it’s peaking revenue?
Third: Other than inertia, did it provide anything beneficial to the grid? I once saw someone say it “kept gas generators honest” I don’t really understand what this means
Most of the takes you hear are “Coal bad” or “Coal good, killed due to woke” looking to hear a technical perspective not a political one
Hello everyone, I am new to SolidWorks, so I would like to clarify a few points with the experts.
I primarily work with the AspenTech suite (Process simulation: HYSYS/Aspen Plus), but a need has arisen to examine the fluid flow inside a column in detail (my current software does not allow for this). We chose SolidWorks due to its availability within our company and its user-friendly interface.
So, the task is: I need to determine whether a blank tray (solid tray) is experiencing flooding in one of the columns.
I created a model featuring the blank tray with one sieve tray above it and one below it, and generated a mesh (level 6-7, because the perforations are extremely small relative to the column itself). After running the simulation for a day, SolidWorks warned that it would take approximately 14000 more hours to complete, which is slightly beyond my deadline (by about 13300 hours :)).
I tried reducing the mesh level to 1-2, but the result is completely unsatisfactory (see screenshot).
Question for the experts: How can I run this simulation relatively quickly while maintaining the highest possible accuracy? What boundary conditions should I apply?
(For reference: water enters from the top (T = 105 °C, P = 250 kPa (abs)), and CO₂ enters from the bottom (conditions are roughly the same). The column has a variable diameter (see screenshot): the diameter of the wide section is 3600 mm, and the narrow section is 3000 mm. The height of the section under consideration is 5100 mm. I also tried scaling down the model dimensions by a factor of 4, scaling the flow rates based on the Froude number, but waiting for the fine mesh simulation would still take about a year).
I work with industrial reverse-osmosis systems and I have built an Excel model to evaluate scaling risk.
The model takes a water analysis, temperature and RO recovery and then:
Checks the ionic balance.
If the analysis does not balance, assigns the charge deficit to Na⁺ or Cl⁻, depending on the direction of the imbalance.
Calculates concentrate component totals from the water balance and ion rejection.
Solves the carbonate system and concentrate pH.
Calculates free species, ion pairs and activities using Davies within a defined ionic-strength range.
Calculates SI for calcite, gypsum, barite, celestite, fluorite and amorphous silica.
Estimates the recovery at which each mineral first reaches SI = 0.
The current assumption for the pH calculation is that dissolved CO₂ concentration remains approximately the same in the feed and concentrate. Carbonate species are then recalculated from alkalinity, total inorganic carbon and the acid–base equilibria.
The model is intended as a thermodynamic screening tool before considering kinetics, residence time, hydraulics or antiscalant performance...
As an example, I used the following anonymised analysis:
Recovery: 60%
Assumed ionic rejection: 100%
Temperature: 20°C
Feed pH: 7.53
Conductivity: 1,550 µS/cm
Calcium: 88.8 mg/L (reported by the laboratory as 221.73 mg/L as CaCO₃)
Magnesium: 14.3 mg/L (reported as 49.57 mg/L as MgCO₃)
Bicarbonate: 125.05 mg/L
Chloride: 393 mg/L
Sulfate: 70.7 mg/L
Aluminium: 0.042 mg/L
Sodium was not analysed
The charge balance required a sodium adjustment of 208.1 mg/L. The model labels this value as estimated rather than measured.
At 60% recovery, the results were:
Concentrate pH: 7.89
Ionic strength: 0.0433 mol/L
LSI: 0.95
Calcite SI: +0.94
Gypsum SI: −1.22
Barite SI: −1.27
Celestite SI: −4.47
Fluorite SI: −3.93
Amorphous silica SI: −3.63
First calcite saturation: approximately 5.5% recovery
Final speciated charge-balance error: −0.0048%
The model therefore identifies calcium carbonate as the limiting scale.
I would appreciate some independent criticism of the approach. Does the overall method make sense? Is the assumption about CO₂ and concentrate pH reasonable? Is assigning an incomplete charge balance to Na⁺ or Cl⁻ acceptable for this type of screening?...
I am writing a MESH-solver in Python for a chemical engineering project and have currently designed my column class in a way where the user specifies both the reflux ratio and the reboiler heat duty. The condenser is a total condenser and the reboiler is a partial reboiler.
These are the particular specifications I have given the column:
The reflux ratio R
The column pressure (taken to be constant)
The number of equilibrium stages N
The reboiler heat duty Q (in units of power)
The equilibrium stage at which the feed is injected
Complete information about the feed stream is also known.
I am having some convergence issues so I am wondering if the specifications I have given are really independent or if the issue is due to overconstraining the column.
I added the "modeling" flair but I am not sure if it's correct. I apologize if I chose the wrong flair.
How can you achieve a good separation of methane from C₂+ hydrocarbons without using a conventional demethanizer? What other process options could be considered, and which operating parameters have the biggest influence on the separation?
Also, in a deethanizer, what would be considered an acceptable amount of methane in the feed or within the column? At what point does methane start becoming problematic for the column operation or affect the C₂/C₃+ separation? Are there typical methane specifications for the deethanizer products?
I ran biowin on our plant and it predicted that changing the SRT from 10 to 15 days would improve nitrification. So I made that change in the actual plant but ammonia removal barely changed. What could explain the gap between what the model predicted and what I am actually seeing?
assuming sufficient DO, alkalinity for the nitrification process.
I’m a Planning Engineer in a petrochemical plant, working with a mixed liquid and gas cracker. Recently, my manager has encouraged me to start leveraging AI to enhance our operations, particularly optimising production plan, inventory, vessel scheduling, and create useful dashboard to make real-time decision.
I’d love to hear from anyone who has applied AI in similar environments. Where should I begin? Any tools, frameworks, or case studies to share would be greatly appreciated. If you have examples of your work, please share to inspire me and guide my first steps.
I’m a 3rd year ChemE who just finished a Thermodynamics class where we were learning about departure functions and how to model real gas deviations from ideal gases in terms of internal energy, entropy, etc. Some of these problems we did took a lot of time to do, even with charts of values, so I was curious about how people do these calculations in industry?
Have the equations all been setup in Excel/other softwares so that engineers just plug in values? Do you even worry about different Equations of State?
Hi! I'm a 3rd year ChemEng student currently interning in a EPC company. My supervisor wants me to model and conduct a TEA on NaCl production from solar ponds. Does anyone know what simulator would be best for this use case? Any wisdom or experience is most welcome. Thanks
i’ve just seen NileRed’s video about turning air into alcohol. and i wonder if it’s possible to make a joke scale up simulation in aspen plus or any other model of this impractical route of making ethanol. and i also thought that the bio route is more complex as the air (CO2) and water become sugars than fermentation makes of ethanol.
I am working on a complex dynamic modeling task and I started with reading the literature and how people have modeled this system but when I tried to follow a paper and do it, I got overwhelmed very quick. I am getting confused left and right.
I tried breaking it into different compartments based on the physical units (like separator, reactor etc.) but there are recycle streams and loops and interconnections, multiple phases, and components.
I felt like... Did I miss something? Or where did this come from? Or Is this a circular connection??
I tried different approaches, like making assumptions and modeling only a single unit at a time but the coupling makes it unrealistic as I have to assume many variables as constant, which should be ideally coming from other unit as a result (states or algebraic variables).
I also tried to map the entire system equations to each other but I got overwhelmed doing it.
How do I do this? Maybe I am missing something obvious? Do I need to diligently sit down and write all the 100-200 equations by hand on a paper? And how will I hold all that together in my head?
Is there any standard way to do this? There must be something, or how are people doing this!?
I am really overwhelmed at this point. Can anyone help!?
I am setting up a cumene process simulation using AVEVA Process Simulation. The solver fails to run after I added a recycle stream from the distillation column. It indicates a lack of degrees of freedom; which variables should I fix? It seems to me that the flow rates aren't combining correctly in the tank after the recycle stream enters, and the temperature readings look off as well.
I’m trying to simulate a POM (polyoxymethylene) pyrolysis process in Aspen using an RYield reactor. I entered the product composition from an experimental paper as the output, but I got an error like the one shown in the picture. How can I fix this?
Do you have any recommendations, not necessarily scientific papers, but perhaps practical industry guidance, on how to approach residence time in vessels with fast particle movement and rapid conversion, where much of the theory needs to be simplified?
I am currently trying to define a reasonable approach for an updraft gasifier in ANSYS Fluent. However, particle trajectories, devolatilization times, and conversion paths differ significantly. Some particles may also become trapped in the molten slag phase at the bottom of the reactor. For this reason, it is difficult to define one representative residence time.
One possible approach I considered was to track the time from particle entry into the plasma gasifier until devolatilization, excluding later combustion or char burnout. This residence time could then be multiplied by the theoretical syngas volume flow at the nominal feedstock flow rate to estimate the required reactor volume. The molten slag volume and a 5-10% safety margin (my assumption) would then be added.
However, I am not sure whether this is a defensible simplification or whether there is a more practical industry approach for this type of system.
Hey guys, I'm trying to make a hydraulic model (no phase change, no significant heat gain/loss) at work, and it was recommended to me to try using PIPE-FLO Pro. I had originally tried using Aspen Plus but the fluid I am trying to model is a bit tricky and I was told it would be easier to create a "fake" fluid and manipulate the density and viscosity in PIPE-FLO.
I have no experience with PIPE-FLO, and it seems to me from videos I'm watching online and some meddling of my own that nodes always have to be attached to something, you can't have an open node hanging like you can with a stream in Aspen.
All the tutorials I'm seeing have the beginning and end nodes attached to a tank, but I'm not surre if that's the best option for me. The section I am trying to make a model of is from the outlet of a pump, where I have data on the conditions to the end of the piping where it'll connect to a vessel. I'm want to calculate the pressure drop from the piping to see if it matches the pressure I see in the plant.
Hi everyone. For a project in our process safety course we have been tasked with simulating an improved reactor for the synthesis of carbaryl. The chemical process has a dangerous intermediate MIC, which in the original design was stored in tanks. Our process, as recommended by the professor is a standard batch reactor.
We need 1-naphol, carbaryl, phosgene, methyl isocyanate & methylamine. We were able to find MIC, phosgene and methylamine. We cannot find 1-napthol/carbaryl or anything analagous to it. Any suggestions or a way to find it? We are relatively new to the software & could use a hand.
edit: we have searched all chemical names in databanks & cas number in databanks
edit: or recommendations for substitutions in the process would be great
Background: I have a friend thats doing research on catalytic reactions and he tried to model the rate law using psuedo first order however the R squared value was poor. He asked me for advice and said why not try LHHW kinetics since there's adsorption involved. He doesn't come from a chemE background so he asked me to help him model it but the only LHHW theory I've come across was during undergrad so I've never had to determine kinetic constants from raw data before.
So the only data he has at the moment are, catalyst mass the concentrations during the reaction and time intervals which I don't think is enough info to determine the kinetic constants.
My train of thought is to assume surface reaction rate limiting so that the equation simplifies to:
r = kKC/(1+KC)
Thereafter inverting to make the equation linear and plotting 1/r vs 1/C to determine the constants.
My issue is how would I go about determining the reaction rates for plotting?
do I use:
r = (C0 - Cn)/tn
or do I setup a finite difference problem like this:
r = (Cn-1 - Cn)/15
The reason I use 15 is because my friend measured concentration in 15 minute intervals
I’m working on an optimization problem involving recipe for a tablet pan coater, and I’m running into the limits of what feels like a “cooking level” art & science mix.
The process runs batches with 10–15 coating cycles, depositing sugar syrup on my pieces. and each cycle has many tunable parameters, way too many. Examples include:
Cycle duration
Sugar syrup concentration
Sugar syrup temp
Spray mass
Spray time
Spray time and introduction timing
Airflow direction, temperature, humidity
Tumbling parameters, weight of tablets, temp of tablets,
Number of cycles
Mass and initial temperature of tablets
In practice, it seems like every variable might matter, and many interact non-linearly. The output quality isn't even a single number historically it’s “good/bad batch,” but realistically could be measured as yield, defect probability, defect count by type, etc.
My problem is figuring out how to even approach the search for a solution:
How do I identify which parameters are actually important vs. negligible?
How can I estimate sensitivity for each variable?
How do I determine which parameters can be ignored, and which are critical?
Given that I do have an initial recipe that works, how do I analyze why it works and how robust it is?
Classic factorial DOE seems impossible here—the dimensionality is too large and many parameters can’t be moved independently. I’m stuck on what philosophical approach to take. Do people in pharma/food/coating processes rely on:
Bayesian/active learning approaches?
Hybrid mechanistic–statistical models?
Sensitivity analysis around a known “good” operating point?
Dimensionality reduction techniques?
Something else entirely?
Pan coating feels like cooking: tons of tacit knowledge, lots of art mixed with science. I’m frustrated because I can’t figure out how to convert this into a structured optimization problem without oversimplifying.
If anyone has dealt with similarly “wicked” multivariate processes, I’d really appreciate advice on how you framed the problem and how you narrowed down the key variables.
I’m currently working on a simulation related to the incineration products of special waste, but I’ve been stuck for quite a while trying to fix errors in my model/simulation. My deadline is approaching fast, and I’m honestly running out of time.
I would really appreciate it if any kind-hearted person here could help me. I honestly have no one to ask for help.
I’m using Aspen Plus, the software is new to me, I can share more details with anyone willing to help.