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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Translate the entire conversation x

Another SOLVE Block Question

thodij
5-Regular Member

Another SOLVE Block Question

Good morning, PTC Community:

 

Objective:

Given circle ID, and fixed value "a" for the equivalent in area & perimeter ellipse, goal seek the value of b.

I am encountering a "These units are not compatible" error. See attached.

Using Mathcad 10.0.1.0.

Your assistance will be appreciated.

JT

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:thodij)

I see that you found your error (a+b) instead of (a*b).

By specifying the values for the circumference and the area of an ellipse, the dimensions of the half axes a and b are clearly defined (except for the order of a>b or a<b).
And if the specifications correspond to those of a circle, then the solution is precisely this circle.
However, this has nothing to do with your original question about the unit mismatch error 😉

 

Here a demonstration using the 'exact' formula with the elliptic integral.

Input of the function "getAxis" are area and perimeter of the ellipse, output are the lengths of the two half axis a and b.

If the input corresponds to the values of a circle, the result is exactly that circle (a=b).

Werner_E_3-1752342111618.png

 

A circle is the ellipse with the least perimeter by a given area. So if you demand a perimeter too small, the solutions will be non-real.

In the example below the perimeter would have to be at least 35.449 inches to get real solutions.

Werner_E_2-1752342055018.png

 

A solve block does not return non-real solutions if the guess values are real.

To get the non-real solutions you would have to provide non-real guesses:

Werner_E_4-1752342263208.png

As you see we also get tiny imaginary parts in the real solutions as well. This is because of numerical inaccuracies, presumable because of the numerical evaluation of the integral, I guess.

 

View solution in original post

5 REPLIES 5
thodij
5-Regular Member
(To:thodij)

Perhaps, it is not possible to have a circle and a unique ellipse that both have the same area and perimeter.

thodij
5-Regular Member
(To:thodij)

Yes, it is impossible to have a circle and ellipse that are both equal in area and perimeter, unless they are both circles!

Correction in the constraints block is attached.

Werner_E
25-Diamond I
(To:thodij)

I see that you found your error (a+b) instead of (a*b).

By specifying the values for the circumference and the area of an ellipse, the dimensions of the half axes a and b are clearly defined (except for the order of a>b or a<b).
And if the specifications correspond to those of a circle, then the solution is precisely this circle.
However, this has nothing to do with your original question about the unit mismatch error 😉

 

Here a demonstration using the 'exact' formula with the elliptic integral.

Input of the function "getAxis" are area and perimeter of the ellipse, output are the lengths of the two half axis a and b.

If the input corresponds to the values of a circle, the result is exactly that circle (a=b).

Werner_E_3-1752342111618.png

 

A circle is the ellipse with the least perimeter by a given area. So if you demand a perimeter too small, the solutions will be non-real.

In the example below the perimeter would have to be at least 35.449 inches to get real solutions.

Werner_E_2-1752342055018.png

 

A solve block does not return non-real solutions if the guess values are real.

To get the non-real solutions you would have to provide non-real guesses:

Werner_E_4-1752342263208.png

As you see we also get tiny imaginary parts in the real solutions as well. This is because of numerical inaccuracies, presumable because of the numerical evaluation of the integral, I guess.

 

thodij
5-Regular Member
(To:Werner_E)

Perfect. Thank you, Werner.

It all makes sense.

 

Regards,

Joseph T.

Werner_E
25-Diamond I
(To:thodij)


@thodij wrote:

Good morning, PTC Community:

 

Objective:

Given circle ID, and fixed value "a" for the equivalent in area & perimeter ellipse, goal seek the value of b.

I am encountering a "These units are not compatible" error. See attached.

Using Mathcad 10.0.1.0.

Your assistance will be appreciated.

JT


Werner_E_0-1752340451450.png

You cannot add or subtract a length and an area, hence the unit mismatch error.

In the approximation formula for the perimeter of an ellipse you made an error. It should read (a+b), NOT (a*b).

 

Announcements

Top Tags