step1¶
- Purpose:
Compute the dynamic solution to a set of first order differential equations.
- Syntax:
[a,da] = step1(K, C, f, a0, bc, ip) [a,da] = step1(K, C, f, a0, bc, ip, times) [a,da, ahist, dahist] = step1(K, C, f, a0, bc, ip, times, dofs)- Description:
step1computes at equal time steps the solution to a set of first order differential equations of the form:\[\begin{split}\mathbf{C} \dot{\mathbf{a}} + \mathbf{K}\mathbf{a} = \mathbf{f}(x, t), \\ \mathbf{a}(0) = \mathbf{a}_0\end{split}\]The command solves transient field problems. In the case of heat conduction,
KandCrepresent the \(n \times n\) conductivity and capacity matrices, respectively.ais the temperature andda(i.e., \(\dot{\mathbf{a}}\)) is the time derivative of the temperature.The matrix
fcontains the time-dependent load vectors. If no external loads are active, use[]forf. The matrixfis organized as follows:f = [ time history of the load at dof_1 time history of the load at dof_2 ... time history of the load at dof_n ]The dimension of
fis:(number of degrees-of-freedom) × (number of timesteps + 1)
The initial conditions are given by the vector
a0containing initial values ofa.The matrix
bccontains the time-dependent prescribed values of the field variablea. If no field variables are prescribed, use[]forbc. The matrixbcis organized as follows:bc = [ dof_1 time history of the field variable dof_2 time history of the field variable ... dof_m2 time history of the field variable ]The dimension of
bcis:(number of dofs with prescribed field values) × (number of timesteps + 2)
The time integration procedure is governed by the parameters given in the vector
ipdefined as:ip = [dt, T, alpha]where
dtspecifies the length of the time increment,Tis the total time, andalphais the time integration constant. Frequently used values ofalphaare:alpha
Method
0
Forward difference; forward Euler
0.5
Trapezoidal rule; Crank-Nicholson
1
Backward difference; backward Euler
The computed values of
aanddaare stored inaandda, respectively. The first column contains the initial values, and the following columns contain the values for each time step. The dimension is:(number of degrees-of-freedom) × (number of time steps + 1)
If the values are to be stored only for specific times, the parameter
timesspecifies at which times the solution will be stored. The values are stored inaandda, one column for each requested time according totimes. The dimension is then:(number of degrees-of-freedom) × (number of requested times + 1)
If the history is to be stored in
ahistanddahistfor some degrees of freedom, the parameterdofsspecifies for which degrees of freedom the history is to be stored. The computed time histories are stored inahistanddahist, respectively, with one row for each requested degree of freedom. The dimension is:(number of specified degrees of freedom) × (number of timesteps + 1)
The time history functions can be generated using the command
gfunc. If all the values of the time histories offorbcare kept constant, these values need to be stated only once. In this case, the number of columns infis one and inbctwo.In most cases, only a few degrees-of-freedom are affected by the exterior load, and hence the matrix contains only a few non-zero entries. In such cases, it is possible to save space by defining
fassparse(a MATLAB built-in function).Note
Reference: Bathe, K.J.: Finite Element Procedures in Engineering Analysis, Prentice-Hall, Englewood Cliffs, New Jersey, pp. 511-514, 1982.