Page 176 - Process Modelling and Simulation With Finite Element Methods
P. 176
Extended Multiphysics 163
x~=[O:O.05:5]
;
[is,pel =postinterp(fem,xx) ;
[u,v,w,us,vs,ws]=postinterp(fem, 'U', 'V', 'wl, 'US', 'VS', 'ws',is);
save sheetdata.mat xx u v w us vs ws;
Next build six m-file functions along the lines of sheetu.m below:
function U=sheetu (x)
%SHEETU Interpolates u from the FEM solution for flowsheet.mat
% U = SHEETU(X)
% is interpolated on the interval [0,51.
% Get the data
load sheetdata.mat xx u v w us vs ws
% Interpolate from rectangular grid to unstructured point.
U=interpl (xx,u,x, 'spline')
;
Everything is in place, so now let's start building the linked model, using the
tank model as a template.
Pull down the Multiphysics menu and Select Add/Edit modes.
Model Navigator
Select add geometry name: geom2
Check 1-D dimension. Give the independent variable as z.
Select PDE modes -+ general -+ time-dependent
Element: Lagrange - quadratic
Name mode bulk. Specify 3 dependent variables: U V W
Add across >>
Select PDE modes -+ general - the-dependent
Name mode surface. Specify 3 dependent variables: US VS WS
OK
Pull down the Draw menu and select Specify Geometry.
Draw Mode
Name: reactor
Start: 0
stop: 5
Now for the boundary conditions. Pull down the Boundary menu and
select Boundary Settings. Setup the boundary conditions as in the table
below.