Professional Documents
Culture Documents
Dynamic simulation
Sven Wegerhoff
Room: G2-3.28
Phone: 5142
Prof. Engell
Katja Pelz
Room: G2-5.10 a
Phone: 5165
On
nly for private us
se in the context of this course
Dynamic Simulation
Dynamic Simulation
Part V:
PDEs in gPROMS
Examples
T(t,z=0)
(
)
T(t,z=L)
(
)
T
T
k z 2T
u
t
z F cP z 2
W
Wave
equation
ti
Diffusion
Initial conditions (t = 0)
Heat transfer
On
nly for private us
se in the context of this course
Motivation
Recap PDEs
Backward, forward
Backward
forward, centered difference
methods
x xi 1 (t ) xi (t )
Backward dif
ference method: t
h
x3 (t , z )
x 4 (t , z )
x1 (t , z )
Idea:
x(t , z )
x2 (t , z )
x(t , z )
x0 (t , z )
z0
z1
z2
z3
z4
Example:
x
x
, x( z 0, t ) 2, x( z , t 0) 0
t
z
x1
1 1 0 x1 1 2
h 1 1 x2 h 0
t x2
D
On
nly for private us
se in the context of this course
T(t,z=0)
T(t,z=L)
T
T
2T
F cP
u
kz 2
t
z
z
T (t , z 0) Tin
PARAMETER
c_p
AS
k_z
AS
Rho_F
AS
TubeLength AS
TubeRadius AS
REAL
REAL
REAL
REAL
REAL
kz
T
z
0
z L
T (t 0, z ) T0
On
nly for private us
se in the context of this course
First task
D
Y
N
On
nly for private us
se in the context of this course
Distribution domain
General syntax
DISTRIBUTION_DOMAIN
Domain AS [xmin : xmax]
T(t,z=0)
T(t,z=L)
T
T
k z 2T
u
t
z F cP z 2
T (t , z 0) Tin
T
z
0,
T (t 0, z ) T0
z L
In our example
DISTRIBUTION_DOMAIN
Axial AS [0 : TubeLength]
On
nly for private us
se in the context of this course
T f (t , z )
D
Y
N
On
nly for private us
se in the context of this course
T(t,z=0)
T
T
k z 2T
u
t
z F cP z 2
In our example
T_in AS Temperature
T(t,z=L)
Task
Define all variables and implement
these variables in gPROMS
On
nly for private us
se in the context of this course
Variable
D
Y
N
On
nly for private us
se in the context of this course
Interval
Mathematical
notation
Interpretation
gPROMS
notation
Closed
[0,L]
z [0, L] 0 z L
0:L
Left-open/Right-closed
(0,L]
z (0, L] 0 z L
0|+ : L
[0 L)
[0,L)
z [0, L) 0 z L
0 : L|L|
Open
(0,L)
z (0, L) 0 z L
0|+ : L|-
z=L
Open
z=0
z=L
Right-open/
Left-closed
Left
closed
z=0
z=L
z=0
Left-open/
Right-closed
Right
closed
z=L
Closed
On
nly for private us
se in the context of this course
dT
T
or
t
dt
$T
On
nly for private us
se in the context of this course
PARTIAL(T,Axial)
( ,
)
(uc)
z
T
kr
z z
PARTIAL(u*c,Axial)
PARTIAL(u
c,Axial)
PARTIAL(k_r*PARTIAL(T,Axial),Axial)
On
nly for private us
se in the context of this course
PARTIAL(T,Axial,Axial)
PARTIAL(T,Axial,Axial,Axial)
PARTIAL(u*c,Axial,Axial)
(u c, a , a )
PARTIAL(T,Axial,Radial)
Boundary
To solve a PDE, initial conditions and
boundary conditions are needed
TWall
z
T(t,z=0)
L
Syntax:
T
T
k z 2T
u
t
z F cP z 2
T (t , z 0) Tin
Variable(index) = BoundaryCondition;
In our example:
BOUNDARY
#z=0
T(0) = T_in;
T i
#z=L
-k_z*PARTIAL(T(RopeLength),Axial) = 0;
T(t,z=L)
k z T
T
F cP z
0
z L
T (t 0, z ) T0
On
nly for private us
se in the context of this course
D
Y
N
On
nly for private us
se in the context of this course
x3 (t , z )
Syntax:
FOR z:=z_min TO z_max DO
x 4 (t , z )
x1 (t , z )
x 2 (t , z )
FOR
Equation
END
END
x(t , z )
x0 (t , z )
END
In our example
T
T
k z 2T
u
t
z F cP z 2
z0
z1
z2
z3
z4
EQUATION
FOR z:=0|+ TO RopeLength|- DO
$T(z) = -u*PARTIAL(T(z),Axial)+k_z/(Rho_F*c_p)*PARTIAL(T(z),Axial,Axial);
END
On
nly for private us
se in the context of this course
Equation
D
Y
N
On
nly for private us
se in the context of this course
Task:
Create a new
process
Set the unit
On
nly for private us
se in the context of this course
PROCESS
D
Y
N
SET
Additionally to the numerical values of the parameters, the discretization method
has to be defined in the SET section
Syntax:
y
Domain := [[Numerical method , Order,, Elements];
];
Types of discretization methods
Numerical method
gPROMS
Order
CDFM
2,4,6
BDFM
1,2
FFDM
1,2
,
OCFEM
2,3,4
p with using
g the backward finite difference method with order 1 and 20 elements
In our example
SET
Axial
a := [[BDFM , 1,, 20];
0];
On
nly for private us
se in the context of this course
Parameter values
Parameter
Value
1000 kg/m3
5m
kz
0 58 W/(mK)
0.58
cp,F
4200 J/mol
Discretization method:
Backward finite difference method with order 1 and 15 elements (=N)
On
nly for private us
se in the context of this course
D
Y
N
On
nly for private us
se in the context of this course
Variable
Value
TIn
25C
25
C
u
0.5 m/s
On
nly for private us
se in the context of this course
Assign
D
Y
N
D
Y
N
On
nly for private us
se in the context of this course
INITIAL
The initial condition, the
condition at t = t0, has to be
defined for the whole domain
domain,
i.e. in our example
TWall
z
T(t,z=0)
T(t,z=L)
INITIAL
WITHIN HT DO
FOR z:= 0|+ TO TubeLength|- DO
T(z) = 10;
END
END
T
T
k z 2T
u
t
z F cP z 2
T (t , z 0) Tin
k z T
T
F cP z
0
z L
T (t 0, z ) 10C
On
nly for private us
se in the context of this course
D
Y
N
On
nly for private us
se in the context of this course