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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

1-Newbie

Can you store multiple solutions of a Find function which has a vector as a constant?

I have a program that uses the Find(x) function to solve for the allowable length of a beam whose design is based on a series of moments and shears.  The file attached is a very simplified version of what I am trying to do in the actual program.  One of the constants (in this case y) is a vector of fixed values.  I want to solve the system of equations for x using the three different values of y and store each of the results for x in a new vector.  Can someone assist me in developing the correct notation to get the desired solution?

Thanks,

Derek

4 REPLIES 4
21-Topaz II
(To:dhanson-2)

at first glance, it seems to me that this is the solution:

24-Ruby V
(To:dhanson-2)

At first it has to be said that this is NOT a system of equations! Its just one equation in one variable which you defined using some helper functions m and n.

I guess that you posted a simplificated version of your real problem and so I was not sure, if the guess value for x should be the same for any y or if you really want to provide a different guess for every value of y - so I provided both versions.

If you want to evaluate a solve block for different input values its always the best solution to write the solve block for a single scalar input variable (in your case y), turn it into a function (!!) and then call that function with a vector of inputs. That function call should be vectorized to be on the safe side.

Here is the solution using the same guess x=0 for every value of y:

And here is the modification which allows you to provide the guess value as additional function argument. In your example there are always two solutions and it depends on the guess value which one you get:

Of course your simplified equation could easily be solve symbolically which gets you both solutions for every value of y at once:

Regards Werner

1-Newbie
(To:Werner_E)

This was helpful but we are still not getting exactly what we are looking for.  I have attached two files. The 1 Zone file is the calculations that we are currently running.  The All 3 Zones calculation turns wx7 into a vector to run the analysis for three separate values.  Can you take a look at the attached and let me know if there is a way to get the vector analysis to work?

9-Granite
(To:dhanson-2)

Hi Derek.

The problem is in the abs function: with a vector it is the norm.

In the attached, a workaround.

Best regards.

Alvaro.

Announcements
Top Tags