Get Help

Turn on suggestions

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

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- VARIABLE ALPHA EFFECT in ODEs

Options

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

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

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-05-2013
07:22 PM

05-05-2013
07:22 PM

Hello,

Please see the attached worksheet. At the bottom of it (2- Variable alpha effect), I have explained what I am trying to obtain.

I would like to find an approximate function which defines alpha to be VARIABLE depending on x, and then substitute this NEW function into all definitions involved in solving the ODEs.

Thank you so much for your time and help,

Anousheh

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-08-2013
11:09 PM

05-08-2013
11:09 PM

How do you change the color?

Menu Format/Equation, then choose the style you want to change (I used "User1" and changed it name to "Variables_violet"), click "modify".

To change the style of an elelemnt in a region, select it and then either use format/Equation as above or choose the style from the drop down list left to the font selector in the menu line.

These styles can be convenient, e.g. many people have created a style "complex" which is the same as "Variables" but underlined. Applying styles can be a bit cumbersome, one would wish it could be done using ricght click menu.

OK. I understand. But, why inverse?

original function f: x --> y (f(x) = y)

inverse function f^-1: y --> x

In your case:

X1: (alpha, x0) --> x

alpha: (x,x0) --> alpha

so alpha is the inverse of X1 for constant x0

Is it possible to construct a polynomial to fit the whole curve (particularly the section that quickly drops down)?

Did you play with my Version09-sheet with the degree of the polynomial fit? Number of points for x seems to have nearly no effect.

Maybe you could achieve better results with a 2-dimensional approximation for a specific constant value of x0. We have done that type of fit in recent postings of yours.

Or you may split the function in parts and doing a polyfit foreach part separetly.

I have played around with the polynomial fit and came up with versions which generate more datapoints with smaller values of x. As I suspected in an earlier post a polynomial fit doesn't seem to be appropriate for that type of function, especially it can't cope with the rapid drop at the beginning (small x values).

Find below screenshots of the four versions, all are from polynomial surfaces of fifth order and for each value of x0 there are 200 (better said 201) datatpoints for x generated. Screenshots were taken for x0=100.

Version 09 (posted earlier): datapoints for x are evenly distributed over the whole range

Version 10: range is split in two. 50% of all point are generated within the first 2% of the whole range. Datapoints for x are evenly distributed in each range

Version 11: The Datapoints for x are logarithmically distributed over the whole range in the hope to put more weight on the samller x

Version 12: range is split in two. 50% of all point are generated within the first 2% of the whole range. Datapoints for x are logarithmically distributed in each range

And here is a Version12 fit of order 15:

So you see that all those efforts were nearly in vain.

So you may play around with the various versions, change the order, number of points or the percentages in V10 and V12, but I doubt you will find a good fit.

24 REPLIES 24

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-06-2013
05:05 AM

05-06-2013
05:05 AM

Re: VARIABLE ALPHA EFFECT in ODEs

I'm not entirely clear what you want, but perhaps the attached will help. There's no need to look for an approximation to alpha as a function of rho, as Mathcad can invert the relationship for you.

Alan

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-06-2013
09:56 AM

05-06-2013
09:56 AM

Re: VARIABLE ALPHA EFFECT in ODEs

Hello Alan,

Thank you so much for your reply.

I shall try to explain more clearly regarding what I really desire to obtain by posting another reply.

Thank you again,

Anousheh

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-06-2013
03:55 PM

05-06-2013
03:55 PM

Re: VARIABLE ALPHA EFFECT in ODEs

Its not clear to me what function you are after and how you would like to feed it back in your DEs.

I wondered why you have three almost identical DEs just for three different values of alpha, so I tried to consolidate the sheet and make the solve block parameterized to accomodate for alpha. Don't know if this would help for implementing that "variable alpha effect".

I also squeezed the sheet to four pages, one sheet wide, as I got confused with all those regions spread over to the right of the margin 😉

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-06-2013
06:36 PM

05-06-2013
06:36 PM

Re: VARIABLE ALPHA EFFECT in ODEs

Hello Werner,

Thank you so much for the input.

As you can see in Section 1 (which you have nicely organized it), α is a single value and I only produced some results for 3 values of α .

Please see Equation 1 highlighted in green. This is a function in which α is now a variable depending on x0. I am investigating the effect of this condition i.e. α is now a variable. The range I would like to focus is 0.3 to 0.5.

I would like to substitute this NEW function into all the appropriate equations in Section 1 and hence compare the results.

So, could you please help me find a matching function that can be substituted in Section 1 for α?

Thanks again and regards,

Anousheh

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-06-2013
06:51 PM

05-06-2013
06:51 PM

Re: VARIABLE ALPHA EFFECT in ODEs

Anousheh Rouzbehani wrote:

Please see Equation 1 highlighted in green. This is a function in which α is now a variable depending on x0.

No, I don't see a depandency between alpha and x0! What I see here is a 2-dimensional function X1 which is dependent on two independent variables alpha and x0. You plotted a slice of this 2-dimensional surface for a constant value of x0 (100).

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-06-2013
07:31 PM

05-06-2013
07:31 PM

Re: VARIABLE ALPHA EFFECT in ODEs

Hello again Werner,

Thanks.

I am sorry for this confusion. I am trying to find a polynomial that fits this curve (alpha vs. X1) and I want this polynomial to be a function of x. i.e. alpha(x,x0)=some function of x. (of course, x0=100 in our case).

Then, we should be able to fit this into equations in Section 1.

I hope you could help me now.

Anousheh

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-06-2013
07:40 PM

05-06-2013
07:40 PM

Re: VARIABLE ALPHA EFFECT in ODEs

1) X1 should be x??

2) And why has it to be a polynomial? Wouldn't Alan's approach (solve block) do the job?

3) Then - in the solve block we have f(100)=1. Should it be f(x0)=1??

4) rho is now a constant (chosen from a vector). Will it be in the new approach dependent from alpha, which in turn is dependent of x=X1??

EDITED:

ad 2) see attached

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-06-2013
08:17 PM

05-06-2013
08:17 PM

Re: VARIABLE ALPHA EFFECT in ODEs

Hello,

x is crack size and x0 is initial crack size.

I am sure Alan's approach works. However, I prefer to have a polynomial for this study.

rho will remain constant in the new approach. It will be 10.

In Section 1, I have 3 different values for alpha. In our new approach, alpha is a function of x. for each x0. In this case, x0=100.

alph(x,x0)={some function of x} - x0 in the LHS will allow for different initial crack size to be investigated. But, we start with 100.

Thank you very much,

Anousheh

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

05-06-2013
08:30 PM

05-06-2013
08:30 PM

Re: VARIABLE ALPHA EFFECT in ODEs

Hello Werner,

Thank you,

This is nice. Can I transfer everything to the top of the page and substitute alpha with alpha(x,x0)?

And also, is it still possible to derive a polynomial for alpha as function of x? {alpha(x,x0)= ...}

Thank you,

Anousheh

Top Tags