MATLAB PARTIAL DIFFERENTIAL EQUATION TOOLBOX 1 Manual de usuario Pagina 7

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 18
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 6
7
Use each of these at least once to manipulate and visualize the data.
Nonlinear Solver
We will now consider how to handle variable properties which makes the governing PDE
nonlinear. First, return to PDE on the menu bar and select PDE mode. Then double-click on your
square domain. Change the thermal conductivity (referred to in the PDE Specification window as
Coeff. of heat conduction) of the medium to the following in W/mK:
1.0+0.01*u+0.001*u.^2 (5)
where u is the solution vector for temperature in ˚C (thus, the coefficients in this equation must
have units). Do NOT put spaces into this equation. The “.^” is required for the last term because
u is a vector and this will allow each term in the vector to be squared separately. Second, return
to Solve on the menu bar and select Parameters. Check Use nonlinear solver, enter 100 for
Initial solution, full for the Jacobian, and keep the remaining default values. Finally, go to Solve
on the menu bar and select Solve PDE to again obtain a solution and note the significant changes.
Transient Problems
Now that you have completed the steady state solution, we will go back and solve a transient
problem. From the PDE toolbox and your original steady state problem go back to PDE on the
menu bar and select PDE mode. Then double-click on the domain for which you wish to specify
the PDE. Specify a Parabolic equation,
ρ
(or rho) = 1 kg/m
3
, C = 1 J/kgK, k = 1 W/mK, Q = 0,
h = 0, and T
ext
= 0 ˚C. Next, go to the Solve menu and choose Parameters. Here, you can specify
the time domain (duration and increments for the solution) and the variable u(t
0
) which
represents the temperature on the entire geometry at the initial time, t = 0, or the initial condition.
Note that the PDE toolbox uses an implicit method for time and is unconditionally stable. Select
0:0.1:1 s for the time domain (which sets the duration to 1 s and the increment to 0.1 s) and
u(t
0
) = 0 ˚C. Again, to solve the problem, go to the Solve menu and select Solve PDE. The
temperature distribution at the final time will be displayed. To see the temperature distribution at
other times go to the Plot menu and select Parameters. In the Plot Selection dialog box select
another Time for plot and again select Plot to redisplay. Finally, to see a movie of the transient
results select Animation for the Plot type. You can change the number of times the movie will
play and its speed in the Options dialog box. Select Plot to view the movie.
If you now export the solution into the MATLAB environment note that the solution u will now
be a matrix. The first index indicates node number and the second index indicates time step.
Thus, u(:, 1) will give the solution at the initial time step. To plot the data at the n
th
time step use
the following:
pdeplot(p, e, t, ’xydata’, u(:, n))
where n = 1 for the initial time step, n = 2 for the second time step, and so on.
Vista de pagina 6
1 2 3 4 5 6 7 8 9 10 11 12 ... 17 18

Comentarios a estos manuales

Sin comentarios