1 Pages (6 items)
Momentum Balance across Ejector - Solve command ambiguity - Messages
#1 Posted: 6/23/2018 2:34:35 AM
In the attached problem I am having x2 issues. The first thing is that if I assign Mhp to 17 elements & then try to solve (built in command) the array of 100 elements is returned? Secondly using Solve (Maxima) I get the required answer (17 element array) but only the last element has the answer (rest are zero)?
Objective is to plot D1 values for given set of Mhp values
File not found.File not found.
Objective is to plot D1 values for given set of Mhp values
File not found.File not found.
#2 Posted: 6/23/2018 6:21:33 AM
There were some issues in your file.
1. your expression MomentumBalance... isn't ready for vector arguments. V[2*Mhp evaluates to the scalar product between two vectors. This probably isn't what you want.
2. The last loop iterates over just one element.
3. Data is constantly overwritten by the last entry.
4. In the first iteration of the loop you overwrite your range of value with the first element.
5. Solve() returns a boolean equation. In order to convert this into an assignent, you can use the substitution function at()
The solution is to provide a separate variable holding the range of values and then iterate Mhp over this range.
If you just want the plot, you can use the Maxima Draw function implicit().
![2018-06-23 10_58_44-SMath Studio - [Page1.sm_].png](/en-US/file/uvyrKD/2018-06-23-10_58_44-SMath-Studio---_Page1_sm___png)
implicit.sm (136 KiB) downloaded 32 time(s).
1. your expression MomentumBalance... isn't ready for vector arguments. V[2*Mhp evaluates to the scalar product between two vectors. This probably isn't what you want.
2. The last loop iterates over just one element.
3. Data is constantly overwritten by the last entry.
4. In the first iteration of the loop you overwrite your range of value with the first element.
5. Solve() returns a boolean equation. In order to convert this into an assignent, you can use the substitution function at()
The solution is to provide a separate variable holding the range of values and then iterate Mhp over this range.
If you just want the plot, you can use the Maxima Draw function implicit().
implicit.sm (136 KiB) downloaded 32 time(s).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
frapuano 6/23/2018 2:29:00 PM
#3 Posted: 6/23/2018 9:21:58 AM
MomentumBalance.sm (4 KiB) downloaded 30 time(s).
MomentumBalance.pdf (16 KiB) downloaded 37 time(s).
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
frapuano 6/23/2018 2:29:00 PM
#4 Posted: 6/23/2018 1:37:01 PM
Wrote5. Solve() returns a boolean equation. In order to convert this into an assignent, you can use the substitution function at()
:d thanks for this marvelous explanation. However I failed to comprehend why the built in solve command returns 100 elements array? Doesn't it work similarly to Maxima Solve?
uni, thanks but how do I dynamically convert the expression MomentumBalance to the one you have used to plot. I mean I cannot find something like this which will result in the right construct to be used by XYPlot
f(x,y):= RHS(expr) - LHS(expr)
#5 Posted: 6/23/2018 2:11:58 PM
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
frapuano 6/23/2018 2:29:00 PM
#6 Posted: 6/24/2018 10:18:11 AM
Wrotethanks for this marvelous explanation. However I failed to comprehend why the built in solve command returns 100 elements array? Doesn't it work similarly to Maxima Solve?
uni, thanks but how do I dynamically convert the expression MomentumBalance to the one you have used to plot. I mean I cannot find something like this which will result in the right construct to be used by XYPlot
f(x,y):= RHS(expr) - LHS(expr)
1. Once you have Ejector in the two variables, recast as Uni did
2. Solve for an analytical solution ... via Maple
3. Recast/export
Project Solve Ejector [Maple].sm (8 KiB) downloaded 33 time(s).
1 Pages (6 items)
-
New Posts
-
No New Posts