Method of Weighted Residual on the HP 28S

03112017, 03:18 AM
(This post was last modified: 03172017 11:01 PM by mbrethen.)
Post: #1




Method of Weighted Residual on the HP 28S
Prior to development of the Finite Element Method, there existed an approximation technique for solving differential equations called the Method of Weighted Residuals (MWR). In order to explain the method, consider the example problem in the attached pdf. A trial function, u = ax(1x), is selected as an approximate solution to the differential equation. The trial function is chosen such that it satisfies the boundary conditions and it has one unknown coefficient to be determined. Once a trial function is selected, the residual R is computed by substituting the trial function into the differential equation. Because u is different from the exact solution, the residual does not vanish for all values of x within the boundary values. The next step is to determine the unknown constant a such that the chosen test function best approximates the exact solution. For Galerkin's method, the test function w comes from the chosen trial function, i.e. w = du/da and the weighted average of the residual over the problem domain is set to zero.
GALERKN ( Galerkin method of weighted residuals ) Program Code: << The most straightforward method of defining R is to store the program DEQ: Code: << > u x << u x ∂ x ∂ u  x + >> >> Execute GALERKN with three arguments, as follows:
The program returns the trial function with a = 0.22727 (runtime ~1 min 48 sec). It is shown plotted with the exact solution for 0<x<1. In order to improve the approximation another term is added to the trial function, u = a1x(1x) + a2x^2(1x). This solution took about 31 min. RPL calculators never had a simultaneous equation solver until the MSLV function on the 49 series. Mike Ingle wrote the code TMSLV for the 48GX and HP28C&S. It can be found elsewhere on the web. Edit: I have included Matlab output in the pdf comparing the second solution for 2 unknown coefficients in the trial function. 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)