astroverted

13 Reputation

3 Badges

14 years, 227 days

A childhood interest in telescopes and astronomy started me on a somewhat non-Euclidean path towards a career in optical engineering and lens design.  Eventual completion of a master of science revealed both gaps and uncharted waters in mathematical understanding  that I (am still) continuing to develop by  a process of self-education. 

While I am still very much in the "learning curve" with MAPLE, I can already sense that the core emphasis on symbolic solving and rich heritage in mathematical education will mesh quite well with my desire to expand my mathematical modeling skills through self-study.  I look forward to integrating the MAPLE toolset into my daily work designing and analyzing optical imaging systems.

MaplePrimes Activity


These are replies submitted by astroverted

@dharr 

Many thanks for the work you have put into this, your responses have boosted my learning curve significantly in both Maple usage and obtaining solutions to DE's that don't directly match well with forms presented in introductory texts on the subject.  After reviewing your work statement by statement, I realized I had several questions regarding Maple syntax that limit my full understanding of how you set up your solutions.  Rather than ask these here, I have attached your latest worksheet with a few minor revisions & with my questions asked as comments, which I shaded in red.

DQ6.mw

@dharr 

Dr. Harrington,

Many thanks for your provided solution and reference to Zwillinger, of which I have procured a copy.  After substituting actual measured values for the parameters A, B, C, & d, I found that your worksheet was slow to converge on a solution and encountered numeric instabilities; however these obstacles were easily overcome by specifying a change of solution method from "rosenbroack_DAE" to "mebdfi", as the attached worksheet shows.  My problem now is (I think) mainly on of understanding Maple syntax, as I have been unable (despite having spent many hours at it) to coerce Maple into plotting all discretized solution curves within a single plot frame, coloring each by its own distinctive color.  It seems like this should be a simple task, yet the odeplot command has rejected all of my attempts to supply its 2nd argument as a list, set, or sequence.  By enclosing the odeplot statement in a for...do loop, I can plot the solution curves sequentially (each on its own graph), but nothing I've tried puts these curves onto a single graph.  Can you help me with this?

Eventually, I also want to plot the solution surface in a 3D plot; I'm thinking this should be doable since your work has already calculated the necessary data, however, my experience with the 2D task has proven quite discouraging.

Any insight you can provide would be sincerely appreciated.

DQ4.mw

@Rouben Rostamian  

 

Thank you, Rouben for your informative reply; your attached worksheet presents another way of thinking about the problem that I had not considered. 

One oddity does, however, present itself in that when I first open it, the solution plots are properly displayed;

dataplot(xvals, tvals, U, labels=[x,t,'u'], orientation=[-60,55,0]);

dataplot(xvals, tvals, V, labels=[x,t,'v'], orientation=[-60,55,0]);

yet when I attempt to evaluate the entire sheet again I get the following error messages;

dataplot(xvals, tvals, U, labels=[x,t,'u'], orientation=[-60,55,0]);
Error, (in Plot:-DataPlot) incorrect number of elements in labelrange
dataplot(xvals, tvals, V, labels=[x,t,'v'], orientation=[-60,55,0]);
Error, (in Plot:-DataPlot) incorrect number of elements in labelrange

I am running your sheet using Maple 2019; do you think that fact may have something to do with this behavior, or could something else be going on?

Scott

@dharr Thanks for responding.  I'm not sure I understand your rationale for reducing the number of initial & boundary conditions from 4 down to 2, as my system has one PDE with time dependence and another with only spatial dependence.  If both PDE had time dependence, then I could see how 2 conditions might suffice.  Are you saying that Maple cannot deal with "mixed" systems of partial PDE's even when requesting a numeric solution?  The attached paper (published in 1975) implies that a numeric solution should be "straightforwards" (bottom of page three, RHS column), however, declines to give further details as to what methods the author might have used to obtain their numeric solution.

Scott

(pdf file removed by moderator for copyright reasons - paper at https://doi.org/10.1109/T-ED.1975.18159)

Thanks for taking the time to  respond at length.  I've attached my Maple file and the entire Matlab file that my worksheet attempts to translate; hopefully, that will eliminate the issues of characters lost in cut & paste and command syntax taken out of context.

I should also point out that i did not write the Matlab file, nor do I have any experience working with Matlab code.  The purpose of the translation excercise is mainly to explore the capabilities and limitations of the Maple Matlab translation functions; I picked this example because the Zernike polynomials are of practical interest in my daily activities as a practicing optical designer and analyst.

From your response, i think i understood that Maple does not necessarily know how to translate all matlab function calls, but also that I can expand its knowledge base via the Addtranslator function.  Although I've not yet found time to look deeper, I imagine that an online matlab function reference could be found, digested, and then matched with one or more Maple functions that do the same thing. 

I think that your idea of building a sparse array is either moving in the right direction or else perhaps right on target, as the Zernike terms are generated and referenced by a two dimensional index of integers, n,m, where n signifies the maximum order of terms having radial symmetry over a unit circle, and m can assume only values -n, -n+2, -n+4,...n.

I am scheduled to undergo a colonoscopy in a couple of days and so probably won't be able to pick this up until after the fun stops.  Meanwhile, any additional insights you might glean from the attachments would be sincerely appreciated.

 

Scott

View 10820_Zernike_Failed_Trans_Matlab.mw on MapleNet or Download 10820_Zernike_Failed_Trans_Matlab.mw
View file details

Download 10820_zernfun.m
View file details

Thanks for taking the time to  respond at length.  I've attached my Maple file and the entire Matlab file that my worksheet attempts to translate; hopefully, that will eliminate the issues of characters lost in cut & paste and command syntax taken out of context.

I should also point out that i did not write the Matlab file, nor do I have any experience working with Matlab code.  The purpose of the translation excercise is mainly to explore the capabilities and limitations of the Maple Matlab translation functions; I picked this example because the Zernike polynomials are of practical interest in my daily activities as a practicing optical designer and analyst.

From your response, i think i understood that Maple does not necessarily know how to translate all matlab function calls, but also that I can expand its knowledge base via the Addtranslator function.  Although I've not yet found time to look deeper, I imagine that an online matlab function reference could be found, digested, and then matched with one or more Maple functions that do the same thing. 

I think that your idea of building a sparse array is either moving in the right direction or else perhaps right on target, as the Zernike terms are generated and referenced by a two dimensional index of integers, n,m, where n signifies the maximum order of terms having radial symmetry over a unit circle, and m can assume only values -n, -n+2, -n+4,...n.

I am scheduled to undergo a colonoscopy in a couple of days and so probably won't be able to pick this up until after the fun stops.  Meanwhile, any additional insights you might glean from the attachments would be sincerely appreciated.

 

Scott

View 10820_Zernike_Failed_Trans_Matlab.mw on MapleNet or Download 10820_Zernike_Failed_Trans_Matlab.mw
View file details

Download 10820_zernfun.m
View file details

Thank you, Alec.  I had not realized the meaning of that link (usually it is something like "attachments" or "upload file(s)".

 

Scott

Thank you, Alec.  I had not realized the meaning of that link (usually it is something like "attachments" or "upload file(s)".

 

Scott

Page 1 of 1