Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with undefined variable

Status
Not open for further replies.

gatron2

Mechanical
Jun 3, 2024
3
I cannot figure out what am I doing wrong here. I write the index with the point K.2; Ks are definied and "guessed" as so is everything else.

problem110capture_t9xuhh.png


That's the part that is giving me nightmares, but I attached the whole doc in case I missed anything earlier
 
Replies continue below

Recommended for you

No attachment found.

Unfortunately, you actually have three unknowns (K_1, K_2, and V_0) and only two equations. Or, because V_0 is defined as K_1, this problem simplifies to two unknowns (K_1 and K_2) and only one equation. Therefore, there is no single solution. The red K_2 may be Mathcad's way of telling you that you don't have enough equations. I no longer have a version of classic Mathcad, so I can't duplicate your work exactly, but I did set up the Mathcad Prime 9.0 equivalent.

For my worksheet, I made up numbers for i_L, R, α, ω_a, and C. I set up the Solve Block two ways: (1) using your two equations and adding a guess for V_0 and (2) combining the two equations into one and getting rid of V_0. Then I fiddled around with the five variables that I had made up. In the first case, K_1 always equaled the guess value for V_0 (the K_1 guess was irrelevant). In the second case, K_1 always equaled its guess value; I renamed variables and rearranged the longer equation, but K_1 always equaled its guess value. However, I made a second solve block with the K_2 term before the two K_1 terms and now K_2 matched its guess and it was K_1 that changed when I fiddled with i_L, R, α, ω_a, and C.

I think Prime should have returned an error due to insufficient equations, but it appears to be programmed to hold the first variable constant and solve only for the second variable.

============
"Is it the only lesson of history that mankind is unteachable?"
--Winston S. Churchill
 
The attachment is there. The file name is "problema110.xmcd"
 
You need to pay attention to your units; for whatever reason, R and C are not being treated as regular variables, but are instead treated as rankines and coulombs. You can assign a literal subscript to both and fix that part and the track down the rest of the inconsistencies in the unit system.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
Thanks you for your responses

@IRstuff unfortunately, defining C as C.1 and R as R.1 does not seem to work.
 
I don’t know if this will help, but it has helped me in some Mathcad versions. Always apply units to each side of the equation, so units equate, even if one side is zero. In some cases, I’ve had to make the unknown variables that are being solved for dimensionless. If they have dimensions, apply the dimensions to the unknown variables within the solve block, so the results are still dimensionless. Then just apply the dimensions to the solved variables afterwards. It just looks like Mathcad can be vary particular when dimensions are involved! One other thing, if you right mouse click on the Find, you get a choice of solving methods, or you do in older versions. Try them out and see if that helps.
 
@IRstuff unfortunately, defining C as C.1 and R as R.1 does not seem to work.

As I said, you need to track down the rest of the issues with the sheet; your constraint equation has 3 basic terms that are supposed to be in units of amps, the last term still needs fixing, since it has units of inverse ohms instead of amps.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
Two errors:

1) When you defined R you used "R." as variable name (note the dot), so you have to use this name also in your equation.

2) Your guess values for K1 and K2 are missing the unit volt

B_f54hfh.png
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor