Hi,
I am new to solving PDEs in mathcad. I was wondering if someone could take a look at my file and tell me where I am going wrong. This is a 1-D heat transfer PDE, and I looked online to see what I was doing wrong. But it seems that the other people's examples are also not opening on my computer. Here's the file
Thank you!
Solved! Go to Solution.
Thats strange, I get the same error if I open my attachment but not if I open if from my HD. The problem is easily corrected by simply letting the sheet recalculate (Ctrl-F9).
For whatever its worth I resaved the file and attach it here,
In any case you should see something like this:
OK, a lot of errors, so lets begin:
1) Your functions and derivatives in the solve block are missing the arguments (T.x --> T.x(x,t))
2) In the last two BC you have a multiplication dot between the function name (T.x) and the parameter parenthesis
3) the call of Pdesolve is completely wrong. Look it up in the help! The boundaries have to be given as a 2-element vector, separated (as every other parameter, too) from the variable name by a comma.
4) The result of Pdesolve is a function in two parameters itself. You must assign it a simple function name only (without the parameters)
You may be interested in this thread, too: http://communities.ptc.com/message/210873#210873
Werner,
Thank you for all the feedback! I assume that your screen shows the solution? In my case, I have the Pdesolve in red and an error saying that this value must be an integer. Is there anyway I can correct this issue? I already looked at the thread, and the thread has the same error as the file you attached...and its aggravating that none of the help files in the mathcad worksheet load as most of them seem to have the same error too...
Thats strange, I get the same error if I open my attachment but not if I open if from my HD. The problem is easily corrected by simply letting the sheet recalculate (Ctrl-F9).
For whatever its worth I resaved the file and attach it here,
In any case you should see something like this:
werner,
Thank you very much. It seems that I can not fix this problem. I tried recalculate, but I am still having it. Any other ideas? Is there anything I need to enable or disable by chance? I am using Mathcad 15!
Ashwin S wrote:
werner,
Thank you very much. It seems that I can not fix this problem. I tried recalculate, but I am still having it. Any other ideas?
Can you post a screenshot including the errormessage?
Did you try to trace the error (rightclick on the red error, then chose Trace error) to see what variable or constant Mathcad thinks is no integer.
So what could be the difference - the version of Mathcad, I guess.
I am working with Mathcad 15, M020 - thats the current release.
OS is good old Win XP SP3 😉
I already looked at the thread, and the thread has the same error as the file you attached...and its aggravating that none of the help files in the mathcad worksheet load as most of them seem to have the same error too...
I had no errors in calculation the sheet in the thread I referenced.
Thats crazy! I just tried the new file I upload and it worked OK. Then I tried my first attachment and it also calculated as it should.
Do you still encountering problems? Does recalculate the worksheet cure the problem?
no, it does not work on my system for some reason...I have the same windows xp Mathcad 15 M020 as well...and I am not able to post a screen shot for some reason. I attached it as a PDF...here you go!
Thats really strange - I have no clue. I guess retyping part of the last expression, the call of pdesolve will not solve the problem either.
The errormessage itself is odd, too. The only parameters which have to be integers are the last two. These parameters are optional, so you could try omitting them and see if the error still is thrown.
I have now tried a few times but I am not able to reproduce that error again, but i experienced it twice by opening my first attachment. I must confess that I didn't pay attention as to what the error message was, so I can't confirm it was the "integer" one. The first time I deleted the 0.33 and retyped it and all was OK. The second time I simply recalculated the sheet and the error was gone. Since then I was unable to reproduce that error by downloading my first file.
If nothing helps and if nobody else comes up with any good idea, I would suggest - silly as is it may sound because this suggestion usually indicates the advisor has no clue what to do (as is the case here, too) - to reinstall Mathcad.
Is Pdesolve() the only command you encounter problems?
I haven't really tried the others commands...but so far it is the only command that is giving me error. Actually, no, i tried opening other files online, and they all had the same error too...its either this or the variable not defined or something of the sort. I'll try to do it, if that doesn't work...I guess I will reinstall Mathcad! Thank you very much for all your help!
If you do it, let us know if a reinstall cured the problem. May be benefitial to others in a similar situation.
Good luck!
So, I have reinstalled it. This is strange! So when I open after resinstalling it, it works fine! The equation solves and I can see the graph. However, a reboot warning came and I hit restart. After restarting, it reverts back to the old where it does not solve. Its absolute rubbish! I am guessing some software compatability issues may be? So I reinstalled it again, and this time did not reboot!
After restarting, it reverts back to the old where it does not solve.
Thats absolutely enigmatic and mysterious. I can't think of what piece of software could cause this behaviour!?
So I reinstalled it again, and this time did not reboot!
Hmmm, guess this can't be a permanent solution. So you have a fine puzzle to solve.
I don't clearly remember so I am not absolutely sure, but I think that the installation of MC15 did not require a reboot. So the reboot message you got could be because of an automatic OS update. After all we just had Microsoft patch day (every second tuesday of the month).
Possibly so...on a different note, is there any way I can extract the graph I plotted into a table? I will uninstall the microsoft update probably...and see if it works!
Cheers!
The graph itself could only be "exported" as a picture (screenshot)
But you can of course create vectors with x- and T-values of your choice which you can write into a file (CSV, Excel or whatever).
Don't think that the current or a past Win update causes the problem, though.
Wait, how would I do that? Do you have a link by chance or what should I look for in the help section?
You could use the excel component or one of the various READxxx and WRITExxx commands (WRITEPRN, WRITEBIN, WRITEEXCEL).
See attached the file using READ/WRITEEXCEL as I thought it might bw useful for you to manipulate/graph the data in Excel, too.
The values for a selectable number of t-values (equally spaced from 0 to 500) are written to an Excel file and immedeatly read in again and plotted.
The idea is that if your solve block failed, the matrix which should be written is undefined and so no file is written. That way the file from the last successful run is read in and displayed. I attach the Excel sheet from my run, too. The file is setup so that it writes and reads the Excel file to/from the same directory as the Mathcadsheet is in. Thats the reason I deactivated automatic calculation so you can change the location the file is saved to first.
But working with that kind of tricks and reinstalling Mathcad after every reboot can't be a permanent solution, You may consider contacting PTC support (even though it looks to me that the problem is not Mathcad itself).
EDIT: corrected typo in file and added 3D. Thought it would be appropriate
Also enabled autocalc again but disabled the WRITEEXCEL command for the same reasons as explained above.
Thanks a tonne man! I contacted my server's tech support and waiting on them to give me permission to contact the PTC support! I really appreciate all your help!
You are welcome.
I hope you get your strange installation problem solved.
it resolved...so it seems that some software on my system is having a compatability issue...I reverted to an older version of Mathcad, and everything is fixed...
Hello Ashwin,
I have a similar /equal problem. The sheet you or werner respetivly gave showed an error on the "pdesolve-part" like "this variable is not defined".
Hence which version could you revert to? Unfortunately I have no older one only MC15_M020 . Whre did you get it from?
Volker
Volker Pawlik wrote:
Hello Ashwin,
I have a similar /equal problem. The sheet you or werner respetivly gave showed an error on the "pdesolve-part" like "this variable is not defined".
Hence which version could you revert to? Unfortunately I have no older one only MC15_M020 . Whre did you get it from?
Volker
If you are still under maintainance you can download older releases in the download section on the PTC site.
But I don't believe that its a problem with newer version of MC15 as I am using the current M030 without those problems (Win XP and Win 7). Maybe a reinstallation can help.
Mathcad worksheet "Problem_4.xmcd" works fine in Mathcad 15 M030, so I recommend that you upgrade to this latest service release by using the following link: http://www.ptc.com/product/mathcad/free-trial/thank-you
I do not know need we the pdesolve function in Prime. With units. What do you think about it?
Yeah, but I do not know how to do that...do you?