Thomas Richard

Mr. Thomas Richard

3255 Reputation

13 Badges

15 years, 61 days
Maplesoft Europe GmbH
Technical professional in industry or government
Aachen, North Rhine-Westphalia, Germany

MaplePrimes Activity


These are replies submitted by Thomas Richard

DeterminingPDE has lots of options you can try. We could probably help if you posted the textbook answer and/or your manual calculation, ideally in Maple syntax. Since I don't have that textbook available, I cannot cross-check otherwise - sorry.

@digerdiga Actually, it IS very cluttered. That you cannot reproduce the original error is a strong indicator.

On MaplePrimes, I have no time to debug a worksheet like that - sorry. Instead, I have some generic advice:

  • Restructure it into smaller execution groups or document blocks.
  • Better use Worksheet Mode for programming tasks like this. Document Mode was designed for publishing documents, with all programming aspects hidden.
  • Make sure you add more comments to help your readers.
  • Avoid using ditto operators in programming. They are fine for interactive usage and in the exploratory stage of developing a program. But not in any readable program.

  • Load only those packages you really need.

  •  Start debugging with the very first error message. (Which justifies my first tip.)

I have seen that error message before, but I don't have any example available ad hoc. So you'll need to post your complete input - either as plain text, or (if it's too long), upload your worksheet using the green up-arrow button in the message editor.

@PeterB Terms like "radical of a negative/zero value" suggest (to me) that an abs block was missing somewhere. Hence the reason could be a modeling error, and that seems to be confirmed by your observation on changing the input. Keep in mind that Modelica is working with real numbers (although MapleSim 2015 added a Complex domain).

I see two problems here:

1. The multiplication operator is displayed by a different character (fat asterisk) than usual (a small centered dot in 2D math). Not sure where that came from, but I've edited it, and also converted all input to 2D math input. Hope this improves readability of greek letters. Furthermore, I replaced vartheta by theta.

2. There seems to be a mismatch between your equations and your expected solution for S and V. At least plugging S and V into the equations doesn't work.

Please check the attached worksheet, and compare your solution with the second solution returned by solve: Coding_Equilibria_corr.mw

@Carl Love With the default setting of extended typesetting level, the first character on the second output line (which is indented in the actual session but not in the image seen here on MaplePrimes) is overwritten by a parenthesis, it seems. Naturally, that character depends on window width and zoom factor etc., but it is reproducible via

interface(typesetting=extended);
Elements(lc);
interface(typesetting=standard); # correct display
Elements(lc);

 

@Volker Lehner AFAIK, this can be fixed by Intel and/or Microsoft only. We have no further details at the moment, sorry.

Side note: while it creates no problem in the 'local' declaration here, I would not use denom as a variable name. There is a denom command built into Maple, for extracting the denominator of a fraction.

@ab_dutt I haven't received any such e-mail, but I wouldn't reply anyway - sorry. Please understand that the idea of this forum is to share knowledge. If you specify here what problem you encountered, people might be able to help you here.


Did you execute any of the examples provided in the help pages? Try to adjust them to your plot first.

This is the Korteweg-de Vries equation, which should be tackled by PDEtools:-TWSolutions (which can also be called from pdsolve via HINT=TWS; see the docs).

Sorry, I don't have time to give more details now; I'm also traveling for the rest of the day. ;-)

Excuse me, I have accidentally converted your reply to a post. I should have a coffee before going online...

I've asked the admin to revert that change.

Are you sure there are no typos in the equation?

You say that y is the dependent variable, but the equation is then an implicit one. Did you perhaps mean x^3, as opposed to y^3?

And, as tomleslie observes, the fit is rather bad with that model.

If you can live with a quadratic one (including a constant term) instead: it is straight-forward, and results look fairly good:

restart:
Xvals := [.53993447, .5599647, .57995479, .59995566, .61996118, .63994512, .65994136, .6799731, .69996782, .71997949, .73997422, .75995044, .77994976, .7999707, .81995146, .83995244, .85996729, .87994951, .8999458]:
Yvals := [-.79625455, -.75585259, -.67800183, -.47955884, -.25493698, -0.65747361e-1, .10114507, .26994542, .41484068, .50621122, .60363251, .65510417, .7251356, .75804148, .76002419, .8030069, .82774732, .8429559, .8692888]:
numelems(Xvals) = numelems(Yvals);
xmin := min(Xvals): xmax := max(Xvals):
with(Statistics):
points := ScatterPlot(Xvals, Yvals):
fit := Fit(a*x^2+b*x+c, Xvals, Yvals, x, output=[leastsquaresfunction,parametervalues]);
func := fit[1]:
curve := plot(func, x=xmin..xmax):
plots:-display(points,curve);
assign(fit[2]);
a, b, c;

 

@sand15 Kitonum's answer will cover your modified eq as well:

ief:=indets(eq,function(name));

Could you upload your msim file, please? Without the model, it's impossible to tell why the error is arising.

Also, MapleSim 6 is quite old by now, and chances are that the problem cannot be reproduced in current versions.

@jamunoz The help page path is correct. I'm sorry, but I overlooked that you are specifically looking for examples of systems.

First 15 16 17 18 19 20 21 Last Page 17 of 40