0% found this document useful (0 votes)
159 views

PMS Experiment 1-Gravity Flow Tank

Process modeling and simulation involves creating a mathematical model to represent a physical or chemical process. A model is a simplified representation of the key aspects of a process. Simulation involves computing the output of the process by solving the mathematical model over time. This document discusses modeling a gravity flow tank process using fundamental equations for mass and momentum balance. The model equations describe how the liquid level and flow rate change over time based on the inlet and outlet flow rates. The model is simulated numerically using Euler's method to solve the equations with different initial flow rate conditions.

Uploaded by

815 PAVAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
159 views

PMS Experiment 1-Gravity Flow Tank

Process modeling and simulation involves creating a mathematical model to represent a physical or chemical process. A model is a simplified representation of the key aspects of a process. Simulation involves computing the output of the process by solving the mathematical model over time. This document discusses modeling a gravity flow tank process using fundamental equations for mass and momentum balance. The model equations describe how the liquid level and flow rate change over time based on the inlet and outlet flow rates. The model is simulated numerically using Euler's method to solve the equations with different initial flow rate conditions.

Uploaded by

815 PAVAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Process Modeling and Simulation

Process:

If a system experiences any changes in state (either physical or


chemical), then it is called as process Eg reaction, distillation etc.

Model:

It is a simplified representation of those aspects of an actual process


that are being investigated.

It is a simplified representation of an object, a system, or an idea in


some form other than the entity itself.

Different types: eg Physical models, mathematical models, empirical


models, drawings and maps etc

Modeling:

Describing the process in terms of mathematical representation


based on theoretical or empirical Knowledge.

Simulation:

Computing the output of the process using the input information and
the operation of the mathematical model, which is the
representation of the system.

Digital simulation is a powerful tool for solving the equations


describing chemical engineering systems.
Uses of Mathematical Models:

 Research and Development-determining chemical kinetic


mechanisms and parameters from laboratory or pilot-plant
reaction data; exploring the effects of different operating
conditions for optimization and control studies; aiding in scale-
up calculations.
 Design- exploring the sizing and arrangement of processing
equipment for dynamic performance etc
 Plant Operation- troubleshooting control and processing
problems etc. It is usually much cheaper, safer, and faster to
conduct the kinds of studies listed above on a mathematical
model than experimentally on an operating unit.

Principles of Formulation of a model:

 Basis- The bases for mathematical models are the fundamental


physical and chemical laws, such as the laws of conservation of
mass, energy, and momentum.
 Assumptions-
An engineering compromise between a rigorous description
and getting an answer that is good enough is always required.
This has been called “optimum sloppiness.”
 Mathematical Consistency of a model-make sure that the
number of variables equals the number of equations. The
“degrees of freedom” of the system must be zero in order to
obtain a solution. If this is not true, the system is
underspecified or overspecified and something is wrong with
the formulation of the problem.
 Solution Of The Model Equations
 Verification-proving that the model describes the real-world
situation.

Fundamental Laws:

 Total Continuity Equation (Mass Balance)- Law of conservation


of mass

The units of this equation are mass per time. Only one total
continuity equation can be written for one system.

 Component Continuity Equations (Component Balances)-


Unlike mass, chemical components are not conserved.
Therefore the component continuity equation of the jth
chemical species of the system says

The units of the equation are moles A per volume per time.
 Energy Equation- Law of Conservation of energy
For open systems

The units of the Energy equation is energy per time.

 Equation of Motion:
Newton’s second law of motion says that force is equal to mass
times acceleration for a system with constant mass M.

In a slightly more general form, where mass can vary with time,

Where νi = velocity in the i direction, ft/s.

Fji= jth force acting in the i direction

Equation says that the time rate of change of momentum in the i


direction (mass times velocity in the i direction) is equal to the net
sum of the forces pushing in the i direction. It can be thought of as a
dynamic force balance. Or more eloquently it is called the
conservation of momentum.

Digital simulation is a powerful tool for solving the equations


describing chemical engineering systems. The principal difficulties
are two:

(1) solution of simultaneous nonlinear algebraic equations (usually


done by some iterative method), and

(2) numerical integration of ordinary differential equations (using


discrete finite difference equations to approximate continuous
differential equations).

The accuracy and the numerical stability of these approximating


equations must be kept in mind.

 solution of simultaneous nonlinear algebraic


equations
1) Iterative Convergence Methods - an iterative trial-and-error
procedure
a) Interval Halving
b) Newton-Raphson Method
c) False Position
d) Explicit Convergence method
e) Wegstein method
f) Muller Method
 Numerical integration of ordinary differential
equations – Accuracy, Numerical stability and speed of
any numerical integration method should be kept in
mind.

We need to study the numerical integration of I order


ODEs. Any higher order equations, say with Nth order
derivatives, can be reduced to N first order ODEs. For
example, if we have a third order ODE:

------(1)

If we define the new variables

Equation (1) becomes

Thus we have three I order ODEs to solve


1) Explicit Numerical Integration Algorithms
a) Euler’s Method –
b) Runge Kutta Method
2) Implicit Numerical Integration Algorithms
a) Euler’s method

Euler’s Method –

Suppose we have a first order ODE

Where f(x,t) is, in general, a nonlinear function. We need to


know the initial condition i.e at time t equal to Zero.

The new value of x can be calculated as

Where Δt is the new step in time, t1= to + Δt


Generalizing to the (n+1)st step in time
If we have two simultaneous I order ODEs

The Euler’s integration algorithm would be

Runge Kutta fourth order Method –

Suppose we have a first order ODE

The Runge Kutta algorithm is


Suppose we have a two first order ODEs

With fourth order Runge Kutta method, 4 k’s are evaluated for each
ODE

Then the new values of x1 and x2 are evaluated

 Runge Kutta is more accurate than Euler’s method


 Euler’s method is faster than Runge Kutta method
1. GRAVITY FLOW TANK.

AIM: To simulate the gravity flow tank and to study the change in liquid
level in the tank and velocity with respect to change in the initial flow rate.

THEORY:

Gravity-flow tank.

Consider a tank into which an incompressible (constant


density)liquid is pumped at a variable rate F 0 (ft3/s). This inflow rate
can vary with time because of changes in operations upstream. The
height of liquid in the vertical cylindrical tank is h (ft). The flow rate
out of the tank is F (ft3/s). Now F0, h, and F will all vary with time
and are therefore functions of time t.

The gravity-flow tank provides a simple example of the application


of the equations of motion to a macroscopic system.

Let the length of the exit line be L (ft) and its cross-sectional area be
Ap (ft2). The vertical, cylindrical tank has a cross-sectional area of
A(ft2).

The part of this process that is described by a force balance is the


liquid flowing through the pipe. It will have a mass equal to the
volume of the pipe (APL) times the density of the liquid ρ.

This mass of liquid will have a velocity v (ft/s) equal to the


volumetric flow divided by the cross-sectional area of the pipe.
Remember we have assumed plug-flow conditions and
incompressible liquid, and therefore all the liquid is moving at the
same velocity, more or less like a solid rod. If the flow is turbulent,
this is not a bad assumption.

M = AP L ρ

F
v=
AP

The amount of liquid in the pipe will not change with time, but if we
want to change the rate of outflow, the velocity of the liquid must be
changed. And to change the velocity or the momentum of the liquid
we must exert a force on the liquid.

The direction of interest in this problem is the horizontal, since the


pipe is assumed to be horizontal. The force pushing on the liquid at
the left end of the pipe is the hydraulic pressure force of the liquid in
the tank.

where g is the acceleration due to gravity and is 32.2 ft/s 2 if the


tank is at sea level.The static pressures in the tank and at the end of
the pipe are the same, so we do not have to include them.

The only force pushing in the opposite direction from right to left
and opposing the flow is the frictional force due to the viscosity of
the liquid. If the flow is turbulent, the frictional force will be
proportional to the square of the velocity and the length of the pipe.
Substituting in Momentum balance equation

To describe the system completely total continuity equation is also


needed.

Physical dimensions, parameter values, steady state flow rate and


liquid height are given in table below.

Substituting in the equations


-------------(1)

--------------(2)

These equations reduces to

Two different initial conditions are used

1) When the initial flow rate is 50% of design rate.


2) When the initial flow rate is 67% of design flow rate
Max design flow rate is 35.1 ft3/s

1) 0.5x35.1 = 17.55 ft3/s


F=vAP =>v=17.55/7.06 = 2.48 ft/s

i.e at t=0, v0 = 2.48ft/s, h0 = 1.2 ft

For (n+1) step in time

2
v n+1=v n+ Δt (0.0107 h n−0.00205 v n)

h n+1=h n+ Δt (0.311−0.0624 v n)

Gravity Euler
% using Eulers method
clear;
clc;
% 50% of max flow, v=2.48, h=1.2;
% 67% of max flow, v=3.40, h= 2.05
clear; v = 2.48;
h = 1.2; t = 0.0;
F = 35.1; Ap = 7.05; At = 113; Dp = 3; Dt = 12;
L = 3000; Kf = 2.81*(10^-2);
g = 32.2; gc = 32.2;
dh = 0.0; delta = 20.0;
n = 1; v1(n)= v; h1(n)= h; t1(n)= t;

fprintf('TIME------v------h\n');

for t = 0:20:1200
dv=0.0107*h - 0.00205*v*v;
v = v+ (delta*dv);
dh=0.311-0.0624*v;
h= h+(delta*dh);
n = n+1;
fprintf('%d/t %d/t %d/n',t ,h ,v);
v1(n)=v;
h1(n)=h;
t1(n)=t;
fprintf('%d %d %d\n', t1(n),v1(n),h1(n));
end

plot(t1,v1,'r',t1,h1,'k');
legend('Velocity','Tank Height');
xlabel('Time');
ylabel('Height and Velocity');
title('Gravity tank')

Type 2: gravity tank using ODE


Function uprime=gravity(t,u)
uprime = zeros(2,1);
uprime(1)=0.311-0.0624*u(2);
uprime(2)=0.0107*u(1)-0.00205*u(2)^2;

main Script
% using ODE
%intial = [1.2 2.5] % 50 max flow
%initial = [2.05 3.4] % 67 max flow
initial = [1.2 2.5]
tspan = [0:20:800];

[t,hu] = ode45(@gravity , tspan, initial);


plot(t,hu(:,1),'*', t,hu(:,2),'+');
legend('Tank Height','Velocity');
xlabel('Time');
ylabel('Height and velocity');
title ('Gravity Tank')

You might also like