Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

** Community Tip** - New to the community? Learn how to post a question and get help from PTC and industry experts!
X

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Dec 01, 2020
06:06 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 01, 2020
06:06 AM

The command "if" in 3D solutions and graphs

I have problem with the command "if" in 3D solutions and graphs. In the sample you can find my mistake and please help what we can do with it.

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

Dec 01, 2020
06:26 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 01, 2020
06:26 AM

You can't have a variable/constant and a function using the same name. Actually you can use the same name if you use different styles, but i would suggest that you use different names.

If you had in mind to just cut off negative values and replace them for zero, you may end the solve block with

and use something like

You could also use

but thats inefficient because the solve block is called twice that way.

14 REPLIES 14

Dec 01, 2020
06:26 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 01, 2020
06:26 AM

You can't have a variable/constant and a function using the same name. Actually you can use the same name if you use different styles, but i would suggest that you use different names.

If you had in mind to just cut off negative values and replace them for zero, you may end the solve block with

and use something like

You could also use

but thats inefficient because the solve block is called twice that way.

Dec 01, 2020
07:46 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 01, 2020
07:46 AM

Is possibility to solve equation with precision 1*10-6 or higher?Now is 1*10-2 if we use F and G new guidelines in sample.

Dec 01, 2020
08:41 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 01, 2020
08:41 AM

@ptc-3682623 wrote:

Not sure what you mean?

What you do does not make much sense to me as you set up a solve block to calculate a specific value but at the end you assign the value manually with just three valied digits (

How do you know that the precision isn't high enough and what do F and G have to do with the precision?

Mathcad like many other numeric math programs work by storing its number in IEEE format. So most programs suffer from the very same precision lack. Symbolic math usually is done with much higher precision but has its own drawbacks.

Dec 01, 2020
09:16 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 01, 2020
09:16 AM

This means we have solution only one of 3 equations in sample, one is solved by find and the otders are F and G. All must to be solved with higher precision. We looking for lambda of 3 eqantions. We have to 3 equantions where we looking for only one lambda. In otrer words we have plastic eqantion and equilibrium equations. All of it must be satisfy. This solusion what I have is in GPa (GigaPascal) and my mistake is in GPa. The load I have q = 72MPa and therefore I need to reset them. Now my solusion is not stable. We can do it with newton-raphson method but how??Look at sample.

Dec 01, 2020
09:35 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 01, 2020
09:35 AM

Three equations for just one variable usually have no solution at all. But you may try putting all three equations in the solveblock and use "MinErr" instead of "Find". Mathcad so will not try to find a perfect solution but kind of a best fit, trying to minimize the overall errors. Not sure if this would make the error much smaller in your case, but it may be worth a try.

As Mathcad works with the absolute values you provide and they are rather small as they mean GPa to you, it could also help to set up all the relevant numbers to represent MPa or even kPa. Working with larger numbers means that Mathcad also considers an error to be larger and its numeric algorithms may try harder to compensate. Mathcad sees the errors as absolute value and NOT relative to the other values in use.

Dec 03, 2020
07:57 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 03, 2020
07:57 AM

Thanks for it that's it:)

Dec 07, 2020
02:36 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 07, 2020
05:34 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 07, 2020
05:34 PM

The function you define is dependent on THREE arguments (lambda, x and y). You can only plot functions dependent on TWO arguments with the 3D plot. Thats exactly what the error message is telling you.

Its still confusing that you use the very same name for a function and soon after for a variable.

Dec 13, 2020
07:34 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 13, 2020
07:34 AM

Now is ok, but I'm returning to my question how can I plot 3D graphs only for lambda >0. This means graphs of sigmaxx must to be similar to lambda where we plot only lambda>O. We need plot strees only in this parts where lambda >0. If this is not clear what I want to do ask me.

- Tags:
- is

Dec 13, 2020
09:02 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 13, 2020
09:02 AM

@ptc-3682623 wrote:

You would have to define an auxiliary function which returns the function value of sigma if lambda is positive and a dummy value otherwise. Unfortunately unlike 2D-plots we cannot use "NaN" as value in a 3D plot in Mathcad. So I guess you will have to settle with a dummy value which fits best. Note that the coloring will change if you use a dummy value outside the normal range of function values of sigma. So in the picture below I tried to use the maximum value of sigma for this dummy. You may experiment with other values.

MC15 sheet attached

Dec 13, 2020
11:40 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 13, 2020
11:40 AM

Thanks for it, but how present min max on the same graphs? Must be the same on the top as on the bottom but with the sign -

Dec 13, 2020
10:32 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 13, 2020
10:32 PM

@ptc-3682623 wrote:

Its not clear what you mean!?? Your question was to avoid the plotting where lambda is negative or zero and I suggested to replace the values with negative lambda by the max of the sigma values.

What do you mean with "present min max on the same graphs" and how does it relate to your question?

Dec 17, 2020
05:05 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 17, 2020
05:05 AM

Thanks for it:) Now I do not know what is wrong with it. I promise you it will be the last one question if all be ok. Look at attachment

- Tags:
- n

Dec 17, 2020
10:35 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 17, 2020
10:35 AM

I stopped at the first error shown-up in your sheet.

You didn't made your function unitless!