cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Translate the entire conversation x

Symbolic solver unit conversion with further substitution

Ivan_Pat
12-Amethyst

Symbolic solver unit conversion with further substitution

Dear PTC Mathcad Community,

I want to ask for clarification on the behaviour of units and symbolic substitution in Mathcad Prime (similar topics have already been raised, but I still haven't found an appropriate answer for my issue).

 So I try to find a symbolic expression for epsilon_c2, which is a parameter of the equation N.

Solver succeeded with the issue, but with incompatible units (see picture)

Ivan_Pat_0-1765875279227.png

So, I have tried to find out the solution in the community, but the advice of @Werner_E  with calculation options didn't resolve the issue (see the picture)

Ivan_Pat_1-1765875431392.png

So my issues are: 

1. How to make the symbolic solving more "seamless" with appropriate units' manipulation in the solutions?

2. Why does Mathcad not see the assigned values of the  epsilon_c2 obtained in the previous solution?

Ivan_Pat_2-1765875677338.png

 

After some time, when the file has been refreshed, some magic happened, and now I can use the roots of epsilon c1 and c2 in a "normal" manner.

Ivan_Pat_1-1765882285970.png

But the next issue is that it doesn't let me substitute the obtained symbolic solution into the following step calculation for the moment M calculation.

Ivan_Pat_0-1765882122108.png

As it can be seen, the factual equation is real, with proper units,

Nevertheless, Mathcad is still not satisfied with...

 

I am still convinced of Mathcad's power, but each time I get stuck with such a misunderstanding of Mathcad logic, I feel broken, exhausted and unable to continue to the next step - automation of my manual solution.

 

Any clarification, examples, or references to documentation would be greatly appreciated.
I am trying to align my workflow with my Mathcad Prime 10.0.0.0 internal logic rather than fight against it.

Thank you very much for your time and support.

 

The file with the manual calculation of M is attached.

 

62 REPLIES 62
Ivan_Pat
12-Amethyst
(To:Werner_E)

@Werner_E 


@Werner_E wrote:

I want to choose only the minimal real root, otherwise to assign, let it be ec2=0.

I understand that you want to use zero if all values are non-real.

Do you also want to use the minimum of all real values if it is positive? 

 



I want to assign ec2 the minimum root value if the root  is a real number, otherwise ec2 will be zero.

Werner_E
25-Diamond I
(To:Ivan_Pat)

 


@Ivan_Pat wrote:

@Werner_E 


@Werner_E wrote:

I want to choose only the minimal real root, otherwise to assign, let it be ec2=0.

I understand that you want to use zero if all values are non-real.

Do you also want to use the minimum of all real values if it is positive? 

 



I want to assign ec2 the minimum root value if the root  is a real number, otherwise ec2 will be zero.



OK, so the minimum could be positive as well.

 

Here is a special "Min" function which should do the job.

First all non-reals are replaced by NaN's.

Then we try to delete these NaN's using "filterNaN". This functions fails if either no NaN was found or if all values are NaN's. In this case the vector remains unchanged.

Fortunately "min" returns a zero if the vectors contains only NaN's which is exactly what you want to see if all values are non-real.

Werner_E_2-1766951359300.png

 

Prime 10 sheet attached

 

Ivan_Pat
12-Amethyst
(To:Werner_E)

It seems exactly what I need, Werner!

Thank you very much for your patience.

I'll try it and share my feedback.

 

Announcements

Top Tags