Modeling, Simulation and Optimization for
Chemical Engineering
Part 1: Modeling
Lecture 2
Modeling Methodologies
Ho Chi Minh City University of Technology
Review of Fundamental Mathematics
Modeling Problems and Equations
Elements of Process Modeling
Solution Approaches
Software Tools for Modeling
Contents
• Review of
Fundamental
•
Mathematics
Modeling Problems
Role of Mathematics in Modeling
•
and Equations
Elements of Process
• Mathematics provides the language and tools necessary to develop, analyze, and solve
Modeling models.
• Solution Approaches
• Software Tools for • Essential for formulating the relationships between different process variables.
Modeling
Applications in Chemical Engineering
• Used to derive equations that describe physical, chemical, and biological processes.
• Helps in solving complex equations to predict process behavior and optimize performance.
Lecture 2: Modeling Methodologies
Contents
• Review of
Fundamental Branch of mathematics dealing with Solving linear and nonlinear equations.
•
Mathematics
Modeling Problems Algebra symbols and the rules for Matrix operations and systems of
and Equations manipulating those symbols equations.
• Elements of Process
Modeling
• Solution Approaches
• Software Tools for
Modeling
Determining rates of reaction and
Study of continuous change, involving [Link] areas and
Calculus derivatives and integrals. volumes related to process flows
Describing the change in process
Equations that involve derivatives of variables over [Link] dynamic
Differential Equations functions. systems such as reactors and separation
processes.
Solving systems of linear equations,
Study of vectors, vector spaces, and which are common in process
Linear Algebra linear equations. [Link] problems that
arise in stability and control analysis.
Lecture 2: Modeling Methodologies
Contents Algebra is a branch of mathematics dealing with symbols and the rules for
• Review of
Fundamental manipulating those symbols. These symbols (often letters) represent quantities
Mathematics
• Modeling Problems
and Equations
without fixed values, known as variables.
• Elements of Process
Modeling
General Form
• Solution Approaches
• Software Tools for
Modeling
Example
Lecture 2: Modeling Methodologies
Contents Calculus is the study of continuous change, involving derivatives (for measuring
• Review of
Fundamental rates of change) and integrals (for measuring the accumulation of quantities).
Mathematics
• Modeling Problems
and Equations
• Elements of Process
•
Modeling
Solution Approaches
General Form
• Software Tools for
Modeling
Example
Lecture 2: Modeling Methodologies
Contents Differential equations involve equations that contain one or more functions and
• Review of
Fundamental their derivatives. They describe various physical phenomena, such as heat,
Mathematics
• Modeling Problems
and Equations
sound, electricity, and motion.
• Elements of Process
Modeling
•
•
Solution Approaches
Software Tools for
General Form
Modeling
Example
Lecture 2: Modeling Methodologies
Contents Linear algebra is the study of vectors, vector spaces, and linear equations. It
• Review of
Fundamental provides methods for solving systems of linear equations, which are common in
Mathematics
• Modeling Problems
and Equations
many applications including process simulations and control analysis.
• Elements of Process
Modeling
•
•
Solution Approaches
Software Tools for General Form
Modeling
Example
Lecture 2: Modeling Methodologies
Contents Types of Modeling Problems
• Review of
Fundamental
Mathematics
• Modeling
Problems and
Equations
• Elements of Process
Modeling
•
•
Solution Approaches
Software Tools for
Rating Inputs are known
Modeling output variables are to be determined
Problem
Modelling
Problems
Design Outputs are the desired values
the input variables must be determine for
Problem desired output
Lecture 2: Modeling Methodologies
Contents Types of Modeling Equations
• Review of
Fundamental
Mathematics
• Modeling No derivatives involved
Problems and
Equations Algebraic
• Elements of Process
Modeling equations (AEs)
• Solution Approaches
• Software Tools for
Modeling
Depend on a single independent variable (e.g., time)
Modelling Ordinary
differential
Equations equations (ODEs)
Depend on more than one independent variable (e.g.,
Partial differential time + space)
equations (PDEs)
Lecture 2: Modeling Methodologies
Contents
• Review of
Fundamental
Mathematics
Algebraic Equations
• Modeling
Problems and
Equations
• Capture steady state relationships between process variables.
• Elements of Process
Modeling • Used in mass/energy balances, design calculations, and optimization (e.g.,
Solution Approaches
flowsheet simulation).
•
• Software Tools for
Modeling
Ordinary Differential Equations
• Describe time dependent changes in system variables.
• Enable dynamic simulation, process control design, and safety analysis
during transients.
Partial Differential Equations
• Represent systems with both time and spatial variations.
• Critical for transport phenomena, heat/mass transfer, and CFD in complex
equipment.
Lecture 2: Modeling Methodologies
•
Contents
Review of
(Mixing Salt and Water without Changing Volume
Fundamental
Mathematics
• Modeling
Problems and
A tank which is initially filled with 15kg of salt dissolved in 3000L of water. Brine, at a
•
Equations
Elements of Process
concentration of 20 grams per litre (0.02kg/L), is flowing into the tank at a rate of 10 litres per
Modeling minute. It is thoroughly mixed with the solution that's already in the tank. At the bottom of the
• Solution Approaches
• Software Tools for tank, there is a pipe which is draining the mixed solution at the same flow rate as the brine
Modeling
flowing in. How much salt is in the tank after 1 hour?
10 L/min
0.02 Kg/L
3000 L
y0=15 Kg 10 L/min
Rate out=?
Lecture 2: Modeling Methodologies
Contents let y(t) be the amount of salt in the tank at any given time, t. At any time, the rate of change
• Review of
Fundamental of salt dy/dt is the difference between the rate salt coming into the tank to the rate of salt
Mathematics
• Modeling leaving the tank.
Problems and
Equations
• Elements of Process
Modeling
• Solution Approaches
• Software Tools for
Modeling
Now the rate of salt coming into the tank is simply the concentration of the brine by the flow
rate of the solution
The rate of salt leaving the tank, after being thoroughly mixed is similarly, the concentration
of the solution by its flow rate
Lecture 2: Modeling Methodologies
Contents
Review of
we have a differential equation depicting the rate of change of salt in our
•
Fundamental
Mathematics
• Modeling
Problems and
tank
Equations
• Elements of Process
Modeling
• Solution Approaches
• Software Tools for
Modeling
Note that the above is a separable, first-order, linear differential equation.
Now to write it in differential form
Lecture 2: Modeling Methodologies
Contents
• Review of
Fundamental solve by integrating both sides
Mathematics
• Modeling
Problems and
Equations
• Elements of Process
Modeling
• Solution Approaches
• Software Tools for
Modeling
Lecture 2: Modeling Methodologies
Contents
• Review of
Fundamental
Mathematics
• Modeling
Problems and
Equations
• Elements of Process
Modeling
• Solution Approaches
• Software Tools for
Modeling
Now that we have the general solution, let's apply the initial condition where
we start with 15 kg in the 3000 L tank. So, at time 0
Lecture 2: Modeling Methodologies
Contents
• Review of
Fundamental
Mathematics
• Modeling
And thus, the particular solution for this initial value problem is
Problems and
Equations
• Elements of Process
Modeling
• Solution Approaches
• Software Tools for
Modeling
Now, to find the amount of salt mixed in the tank after 1
hour, at time t = 60min
Lecture 2: Modeling Methodologies
Contents
• Review of
Fundamental
Mathematics
• Modeling
Problems and
Equations
• Elements of Process
Modeling
• Solution Approaches
• Software Tools for
Modeling
Lecture 2: Modeling Methodologies
Contents
• Review of
Fundamental Simplify the process by
•
Mathematics
Modeling Problems Assumptions neglecting minor effects
and Equations
• Elements of
Process Modeling
• Solution Approaches
• Software Tools for
Modeling
Mathematical framework
Elements of Relations/Equation linking variables &
Process Modeling s parameters
Variables and Describe the system state
parameters and condition
Lecture 2: Modeling Methodologies
•
Contents
Review of
Assumptions
Fundamental A Reactor
Mathematics
• Modeling Problems B
and Equations
• Elements of • Reduce complexity and make the problem
Process Modeling
• Solution Approaches
• Software Tools for
Modeling solvable.
A+ B →C
• Steady-state, perfect mixing, negligible
heat loss. 1- is well-mixed
2- has constant volume
• Allows focus on dominant effects. 3- is at constant temperature
• Provides clarity on model scope and
limitations.
Lecture 2: Modeling Methodologies
•
Contents
Review of
Relations/Equations
Fundamental
Mathematics
• Modeling Problems
and Equations
• Elements of • Provide mathematical rules connecting variables and
•
Process Modeling
Solution Approaches parameters. Ensure physical
• Software Tools for
Modeling
feasibility and capture
Fundamental essential dynamics
relations
Types of Derived from conservation laws
Without these, the
fundamental equations
Relations remain incomplete or
Constitutive unsolvable.
relations
Closure equations linking
variables with material properties
Lecture 2: Modeling Methodologies
Contents Variables and Parameters
• Review of
Fundamental
Mathematics
• Modeling Problems
and Equations
• Elements of
•
Process Modeling
Solution Approaches
Variables
• Software Tools for Quantities that change with time, space, or operating conditions.
Modeling
State variables, Input variables, Output variables
Parameters
Quantities that are fixed for a given system or assumed constant.
Heat capacity, reaction rate constants, density, viscosity
Lecture 2: Modeling Methodologies
Contents
• Review of
Fundamental Quick recap
Mathematics
• Modeling Problems In Lecture 1, we classified models based on their origin (first-principles, empirical, hybrid).
and Equations
• Elements of Process
Modeling Now, we classify based on the solution approach.
• Solution
Approaches
• Software Tools for
Modeling Analytical Methods
Uses mathematical equations to derive exact solutions
Exact, closed-form results
Simple systems only
Numerical Methods
Uses computational techniques to approximate solutions.
Handles nonlinear & large-scale systems
Requires discretization, more time
Hybrid/Approximation Methods
Combination of analytical and numerical approaches.
Balances accuracy & flexibility
Complex but powerful for real systems
Lecture 2: Modeling Methodologies
•
Contents
Review of
Why we need them?
Fundamental
Mathematics
• Modeling Problems
•
and Equations
Elements of Process
• Solve complex equations quickly and accurately
Modeling
• Visualize process behavior and results
• Solution Approaches
• Software Tools for
Modeling
• Perform optimization, sensitivity, and scenario analysis
• Save time compared to manual/analytical methods
Lecture 2: Modeling Methodologies
•
Contents
Review of
General Mathematical Tools (For numerical computation & data analysis)
Fundamental
Mathematics
• Modeling Problems
and Equations
• Elements of Process
Modeling
• Solution Approaches
• Software Tools for
MATLAB
Modeling matrix computation, numerical methods, Simulink for simulation
Python
open-source, libraries like NumPy, SciPy, TensorFlow, Pyomo
R
strong in statistical modeling and data visualization
Excel
simple but useful for small-scale modeling and quick calculations
Lecture 2: Modeling Methodologies
•
Contents
Review of
Process Simulation Tools (For chemical & process systems)
Fundamental
Mathematics
• Modeling Problems
and Equations
• Elements of Process
Aspen Plus / Aspen HYSYS
Modeling
• Solution Approaches
• Software Tools for
Modeling steady-state and dynamic process simulation
CHEMCAD
chemical process modeling, flexible for small industries
gPROMS
advanced modeling and optimization
DWSIM
free/open-source process simulator
Lecture 2: Modeling Methodologies
Contents Specialized Modeling Tools (For physics, transport, and multi-domain simulations)
• Review of
Fundamental
Mathematics
• Modeling Problems
and Equations
• Elements of Process
Modeling
COMSOL Multiphysics
• Solution Approaches PDE-based modeling of chemical, thermal, electrical, and mechanical processes
• Software Tools for
Modeling
ANSYS Fluent / CFX
computational fluid dynamics (CFD)
OpenFOAM
open-source CFD package
Material Studio
molecular simulation and adsorption studies
Lecture 2: Modeling Methodologies
Contents Control-Oriented Tools (For process control and dynamic behavior)
• Review of
Fundamental
Mathematics
• Modeling Problems
and Equations
• Elements of Process
Modeling
Simulink (MATLAB)
• Solution Approaches dynamic systems, control design, real-time simulation
• Software Tools for
Modeling
Scilab/Xcos
free alternative to MATLAB/Simulink
LabVIEW
instrumentation, control, and automation
Modelica/Dymola
object-oriented modeling for dynamic systems
Lecture 2: Modeling Methodologies