I was working with 3 or 4 arrays of symbolic variables that were each 1 col X 19 rows in size, and I was multiplying them together via the Vectorize funciton to get another array of fuctions that was just their products. I eventually want to expand this array of products of functions to be very large (~1 X 1400), but for now I was expanding it from 1 X 19 to 1 X 38 so that I could work up the size of the list gradually. Once these products are computed, I'm feeding the resulting equations into a differential equation solver, which is why I'm working with symbolics. I ran into a troubling problem when I went from 1 X 19 to 1 X 38 however. Mathcad stopped computing the product of the arrays, and gave me the message "The symbolic result returned is too large to display, but it can be used in subsequent calcuations if assigned to a function or variable."
The differential equation solver is now no longer conducting the symbolic evaluation of the product of the arrays like it was before, even though the error message claims that subsequent calculations can be done. Why is this?
Karl,
Apparently (because the message is different from the one in MathCad 11) you're working with a more recent version.
Refer to http://communities.ptc.com/message/154264#154264 for further information.
You may want to try this:
The good 'old' version 11 suggests that you use the submatrix function to view the result in parts. Try that with your 19 and 38 element arrays, to see if you can still view a single element of each array ... and compare the corresponding results.
Success!
Luc
I've used the symbolic results that are "too large to display" in Rkadapt successfully so that should not be your problem. I had the symbolic results defined as a function and then used that function as the derivative function. I presume that is what you are doing, but you haven't uploaded a worksheet so it's hard to know. Are you asking for the ODE solver to perform some matrix operations in the derivative? If yes, try moving those prior to the derivative definition.
The ODE solver should be giving you an error message. What does it say?
Harvey
Thank you very much for the tips. I think I have things working again now, the problem wasn't what it appeared to be. In the equations leading up to the diff equ solver, I was using the vectorize command to multiply corresponding elements of a few arrays together which were all of size 1X38, except one of them was 1X19, which is what was causing all the trouble. I can't remember what error message the diff equ solver was giving me, but it was suggesting at the time that its only hangup was related to the "too large to display" issue. Apparently that wasn't the real problem, because once I fixed the matrix size issue, the solver started working.
I have a couple of followup questions:
1.) Is Mathcad still going to be able to handle this as I expand it from 38 equations up to as many as 1400 equations? What things might limit the # of equations that I can handle? What strategies might I be able to employ to make this computationally cheaper?
2.) If I'm performing computations of symbolic variables in Matrices in order to make the equations for the solver, and I show the results of the computations with the Evaluate Symbolically (rightward pointing arrow), and then I want to hide the results again, what is the best way to delete the arrow and hide the results again?
The reason why I'm handling such a large number of equations is that I'm trying to model a combustion reaction network, and these networks typically have on the order of 200 to 2000 reactions in them. Although each individual diff equ isn't very complicated (first order, ordinary, containing 1-3 variables), there are a lot of them, and there are a lot of variables (like 30 up to 100).
Karl,
I haven't found the limits to the various ODE solvers, but I asked the support people in the past. The limits vary with the solver as I recall. You may be able to find the answer somewhere in the discussions in the PlanetPTC, but if you have maintenance contract, just submit a question. If they give you an answer, please post here, it would help me and others.
I'm a little concerned about how you are doing the model. I do reactor modeling and there are basically two ways to model: (1) extents of reaction or (2) by species. It looks like you have more reactions than species (2000 vs 100), so I would recommend you make you model on species material balances, one for each. I think all of the ODE solvers should handle that many. From your last post, it appears that you are modeling the reactions (i.e. extents of reaction).
Harvey
Harvey:
Glad to hear that you've never found a limit. I will contact PlanetPTC as you described. We'll see what they say. I already talked to them about array size, and arrays that are as large as I need are allowed, although it won't display them as matrices (as we both know).
Perhaps the way that I described my work was misleading - I am conducting my work by species. The differential equation solver will be handling about 80 differential equations which will be assembled from referencing about 1400 rate equations. The rate equations will be created automatically by Mathcad by sourcing a stoichimetric matrix in Excel, along with the rate constants of each rate equation. I'm following the method described by Rawlings and Ekerdt.
Harvey,
I contacted PTC, and they say that there is no theoretical limit to their differential equation solvers, or maybe at least to the Radau solver that I am using. I found a few errors in the diff equ's that I was feeding the solver, and once I fixed these, it started working quite smoothly. I'm still working to expand my model however, so the solver will work much harder later. We'll see how things go in a few weeks when I have a huge model to feed to the solver.
They also offered to inspect my code if I come to a point to where the solver can't solve it, so that's nice of them.
Karl
Karl,
You can hide results using the insert>area from the toolbar. Put the cursor above the area to be hidden first. Then insert the area, and then grab the bottom line and move it below the area to be hidden. Double clicking on one of the lines opens and closes the area.
Harvey
Harvey,
Do you know of any way that you can make it just not Symbolically Evaluate anymore? Like if I define a symbolic variable as a combination of some other symbolic variables, via the := sign and then tell it to Symbolically Evaluate because I want to see the result, and it displays the results to the right of the right pointing arrow, is there any way that I can undo that, and just only have the := part without rewriting the whole line of code? If I try to simply click just after the right pointing arrow, and then hit delete, it tries to delete the entire line of code.
Thanks for all of your help by the way!
Karl
Karl,
No, I don't know how to do what you are asking. However, here's a workaround. Don't do the symbolic evaluation in the same equation as the definition. Once you have the result, then display it symbolically. You can then delete the latter when you are satisfied with the result. This will save you on typing.
I saw your other note. Glad to hear that you are using a stoichiometric matrix. When you said you were building the ODE functions symbolically, I thought you might have been doing everything with individually named variables for each specie.
This is a good work-around, I should have thought of it before. Thanks!
Hello friend,
I am member of micro-freelancer site, already i have earned. cashout instantly cashout via libertyreserve . when you achieve .03$ then you can cashout instantly.
so, create your account and earn more dollar without click.available micro jobs here. per jobs up to 5 dollar.
http://www.micro-freelancer.com/?ref=ratan
Thanks