• No results found

Classification by Initial and Boundary Conditions

2.8 PARTIAL DIFFERENTIAL EQUATIONS

2.8.1.4 Classification by Initial and Boundary Conditions

The initial and boundary conditions associated with the partial differential equations must be speci-fied in order to obtain unique solutions to these equations. In general, the boundary conditions for partial differential equations can be divided into three categories. Let’s consider the one-dimensional unsteady-state heat conduction equation

a ¶¶ =¶

Dirichlet conditions (1st kind): The values of the dependent variable are given at fixed values of the independent variable. Examples of Dirichlet conditions for the heat conduction equation are

T = f x

( ) (

t=0 0, £ £x 1

)

or

T =T0

(

t=0 0, £ £x 1

)

Boundary conditions of the 1st kind are represented as

T = f x

( ) (

x=0,t>0

)

, T =T1

(

x=1,t>0

)

Neumann conditions (2nd kind): The derivative of the dependent variable is given as a constant or as a function of the independent variable. For example,

Tx =0

(

x=1,t³0

)

Cauchy conditions: These conditions are combinations of Dirichlet and Neumann conditions.

Robbins conditions (3rd kind): The derivative of the dependent variable is given as a function of the dependent variable itself. For example,

k T

x h T Tf x t

¶ =

(

-

) (

=0, ³0

)

where h is the heat transfer coefficient of the fluid being considered.

2.8.2 solutionof 1st-ordEr Parabolic/ElliPtic Partial

diffErEntial Equations usinG pdepe

The MATLAB® built-in function pdepe solves initial-boundary-value problems for parabolic/elliptic partial differential equations of the form8

g x t u u

where

f(x, t, u, (∂u/∂x)) is a flux term r(x, t, u, (∂u/∂x)) is a source term g(x, t, u, (∂u/∂x)) is a diagonal matrix

The diagonal elements of this matrix are either identically zero or positive. An element that is identi-cally zero corresponds to an elliptic equation and otherwise to a parabolic equation. m can be 0, 1, or 2, corresponding to slab, cylindrical, or spherical symmetry, respectively. If m > 0, then a must be greater than zero. The partial differential equations hold for t0≤ t ≤ tf and a ≤ x ≤ b. The interval [a, b] must be finite.

The initial condition at t = t0 is represented as

u x t

( )

,0 =u x0

( )

and the boundary condition at x = a or x = b is given by p x t u q x t f x t u u

, , , , , , x

( )

+

( )

æ

èç ö

ø÷ = 0 A simple expression of the syntax for pdepe is

sol = pdepe(m,pdefun,icfun,bcfun,xmesh,tspan)

where m is a parameter corresponding to the symmetry of the problem, pdefun is a handle to a func-tion that defines the components of the partial differential equafunc-tion, icfun is a handle to a funcfunc-tion that defines the initial conditions, bcfun is a handle to a function that defines the boundary condi-tions, and xmesh is a vector specifying the points at which a numerical solution is requested for every value in tspan. tspan is a vector specifying the points at which a solution is requested for every value in xmesh. pdepe returns values of the solution (sol) on a mesh provided in xmesh.

The procedure to use pdepe consists of four steps:

Step 1: Specify the system of partial differential equations. Define m, g, f, and r using the given data and conditions, and create a function to hold these functions (let’s call it pdeeq.m).

Step 2: Specify initial conditions. Define u(x, t0) = u0(x) at t = t0 and create a function to hold it (let’s call it pdeic.m).

Step 3: Set boundary conditions. At x = a or x = b, specify p, q, and f in the equation p(x, t, u) + q(x, t)f(x, t, u, (∂u/∂x)) = 0 and create a function to hold these functions (let’s call it pdebc.m).

Step 4: Solve the partial differential equation using pdepe:

sol = pdepe(m, @pdeeq, @pdeic, @pdebc, x ,t)

Example 2.39: One-Dimensional Parabolic PDE

The temperature u(x, t) in a wall of unit length can be described by the one-dimensional heat equation

=

u

t u a x22

The thickness of the wall is 1 m and the initial profile of the temperature in the wall at t = 0 sec is uniform at T = 90°C. At time t = 0, the ambient temperature is suddenly changed to 15°C and

held there. If we assume that there is no convection resistance, the temperature of both sides of the wall is also held constant at 15°C. Determine the temperature distribution graphically within the wall from t = 0 to t = 21,600 sec. The wall property can be assumed as α = 4.8 × 10−7 m/sec2. Solution

Step 1: From the heat equation, we have ((1/α)(∂u/∂t)) = (∂2u/∂x2). Thus, we can see that m = 0, g = 1/α, f = ∂u/∂x, and r = 0. Create a function that holds g, f, and r:

function [g,f,r] = pdeTde(x,t,u,DuDx) alpha = 4.8e-7;

g = 1/alpha;

f = DuDx;

r = 0;

end

Step 2: Set the initial conditions. At t = 0, u(x, t0) = u(x, 0) = u0(x) = 90. We can write a func-tion that defines initial condifunc-tions as

function u0 = pdeTic(x) u0 = 90;

end

Step 3: Specify the boundary conditions p(x, t, u) + q(x, t)f(x, t, u, (∂u/∂x)) = 0. Since the temper-ature at both sides of the wall is 15°C, p = pl = ul − 15 and q = ql = 0 at x = 0, and p = pr = ur − 15 and q = qr = 0 at x = 1. Create a function that holds these boundary conditions.

function [pl,ql,pr,qr] = pdeTbc(xl,ul,xr,ur,t) pl = ul-15;

ql = 0;

pr = ur-15;

qr = 0;

end

Step 4: Set the intervals for x and t, and call the function pdepe to solve the equation.

Suppose that the range of x is divided into 20 subintervals and the time span is divided into 180 subintervals. The following script generates the temperature profile in the wall as shown in Figure 2.21:

>> m = 0; x = linspace(0,1,20);

>> t = linspace(0,21600,54);

100 80 60 40 20 30

2 1 t (sec)

T (°C)

×104

0 0 0.2 0.4 x0.6 0.8 1 FIGURE 2.21 One-dimensional temperature profile.

>> sol = pdepe(m,@pdeTde,@pdeTic,@pdeTbc,x,t);

>> T = sol(:,:,1); surf(x,t,T)

>> xlabel('x'), ylabel('t(sec)'), zlabel('T(deg C)')

2.9 HISTORICAL DEVELOPMENT OF PROCESS ENGINEERING SOFTWARE The early development of chemical process engineering as a discipline was largely experimental and empirical. In typical process operations, the interaction of process variables with one another, and their effect on the performance of the operation, was not fully understood. Therefore, the approach adopted was to perform a number of experiments with the variables covering a wide operation range and to correlate the data using certain statistical methods and dimensional analyses. The resulting empirical model could be used for the design and analysis of chemical process systems.

Alongside the development of chemical process engineering, the use of computer power has been exploited by many process engineers. The history of simulations using computers started in 1946 with the first general-purpose computer (ENIAC). The first deployment of this computer was managed by John von Neumann to model the process of nuclear detonation during the Manhattan project.9 Initial attempts toward computer simulation of chemical process engineering systems were made in the early 1950s, and one of the most significant advances in digital simulation took place in the late 1950s with the development of the FORTRAN programming language. The earliest process engineering programs were mostly automated versions of standard chemical engineering textbook modeling procedures for the common unit operations including reactor, distillation, heat exchanger, etc., using the empirical correlations. Derivation of chemical process models took considerable skill and time to develop into computer programs.

By the end of the 1950s, computer science was emerging as a promising field providing new simulation tools. However, up to the 1960s, most chemical engineers lacked the tools to design and simulate a complete process. In 1964, the digital computer program PACER, one of the ancestors of today’s chemical process simulators, received its first practical test. It was written in FORTRAN for an IBM 7090 computer and consists of more than 1000 statements. Also in 1964, Imperial College in London released SPEEDUP (Simulation Program for the Economic Evaluation and Design of Unsteady-State Processes), the first process simulator based on the equation-oriented approach. For most chemical process engineers, these programs remained a “black box” model, and the continued use of manual calculations persisted even toward the end of the 1960s. In fact, early generation com-puters were not adequate to solve some large and sophisticated chemical engineering problems both by virtue of their limited memory and slow speed. In some cases, drastic simplifying assumptions had to be made in order to reduce the complexity of the problem, and this tended to give a distorted picture of the system behavior.10 In 1966, Simulation Sciences commercialized a computer program for simulating distillation columns, which was the core of the flowsheeting package PROCESS. In 1969, ChemShare released DESIGN, which is a flowsheeting program for gas and oil applications.

During the 1970s, large high-speed digital computers became available for solving complex chemical engineering problems with a considerable increase in the scope and usability of many computer programs. In the early 1970s, integrated process flowsheet package programs like PACER, Monsanto’s FLOWTRAN, Kellogg’s Flexible Flowsheet, and ICI’s FLOWPACK appeared. With these programs, chemical engineers were able to model complex flowsheets on the computer and simulate the effect of interactions between various unit operations at different stages of the process.

The traditional concept of designing a string of unit operations for a chemical process gave way to a new generation of computer-aided design techniques, where processes are designed as integrated units using the process flowsheeting approach. In 1976, the U.S. Department of Energy and the MIT launched jointly the Aspen project, which eventually wound up with Aspen Plus, one of the most widely used simulators in the world.

In the 1980s, various specialized packages became available, such as DESIGN II, ASPEN, SIMSCI (PROII), HYSYS, and CHEMCAD, which started appearing on chemical engineering desktops.

The improvement of computer technology allowed better data analysis and understanding of the processes and provided solutions to more complex problems. In 1985, AspenTech released Aspen Plus. During the late 1980s, PRO II was upgraded from PROCESS by Simulation Sciences, and major packages migrated to PCs.9

In the early 1990s, all major software packages underwent periodic upgrades, and advanced applications such as pinch analysis were released. In the mid-1990s, major vendors converted the graphical user interface into a central part in the software development, and HYSIM became NYSYS. During this period of time, the process simulation market underwent severe transforma-tions. The few systems that survived include CHEMCAD, Aspen Plus, Aspen HYSYS, PRO/II, ProSimPlus, SuperPro Designer, and gPROMS. Nowadays, most of the object-oriented chemical process simulators are developed based on combination of sequential modular and equation-ori-ented approaches using languages like C++, C#, MATLAB®, or Java. Table 2.24 summarizes the evolution of commercial process simulators.

For both the chemical engineering student at the university and the chemical process engineer in the chemical industry, increasing emphasis has been placed both on understanding basic physi-cal and chemiphysi-cal principles and on process modeling, and the development of process engineering software has not entirely replaced the early approach of calculating individual unit operations. The practicing chemical engineer will notice that, to some degree, the operation and optimization of chemical plants and the design of minor plant modifications are still largely empirical, backed by operating experience. By the skillful combination of the analytical aspect and experimental empiri-cism, a framework can be developed for an economical, quantitative, and scientific approach to tech-nical problems in the process industry. In this context, computer-aided design, process modeling, TABLE 2.24

Process System Engineering Software

Software Year Developer Applications Type

PACER 1963 Paul T. Shannon Sequential modular

PROCESS 1966 Simulation Sciences Steady-state simulation Sequential modular DESIGN 1969 ChemShare Gas and oil applications Sequential modular CHESS 1969 Univ. of Houston Flowsheeting, sizing, and costing Sequential modular FLOWTRAN 1970 Monsanto Flowsheeting, sizing, and costing Sequential modular

FLOWPACK II 1972 ICI Flowsheeting Sequential modular

DYSCO 1981 Institute of Paper Chemistry

Dynamic simulation Dynamic modular simulation ASCEND 1970–1980 Carnegie Mellon Univ. Dynamic simulation Equation oriented Aspen Plus 1976 DOE, MIT All-purpose flowsheeting

TISFLO 1970–1980 DSM Equation oriented

FLOWSIM Early 1980s Univ. of Connecticut Equation oriented

HYSIM HYSYS Mid-1990s Hyprotech Steady-state/dynamic simulation

SpeedUp 1986 Imperial College Dynamic simulation Equation oriented ProSimPlus 1989 ProSim Steady-state simulation Sequential modular

Design II WinSim Flowsheeting

Quasilin Late 1980s CADCentre Simulation/optimization Equation oriented gPROMS Imperial College, PSE Ltd. Steady-state/dynamic modeling Equation oriented BatchPro Designer Intelligen Batch scheduling and design

COCO simulator AmsterCHEM Flowsheeting Sequential modular

Sources: https://en.wikipedia.org/wiki/List_of_chemical_process_simulators; Martin, M.M., Introduction to Software for Chemical Engineers, CRC Press, pp. 291–293, 2015.

and simulation become essential tools for the chemical process engineer. One of the most important requirements of a process engineer is not only the ability to use the library of process engineering programs but also the capacity to develop one’s own program either as a stand-alone program or appended to an existing software to share some of the library programs. A process engineer with this ability may understand and appropriately respond to error or warning messages that appear in using process engineering programs or in performing computer-aided plant operation.

PROBLEMS

Related documents