Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


6 Pages<12345>»
Options
Go to last post Go to first unread
Offline omorr  
#41 Posted : 28 October 2017 10:57:45(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
I agree with Jean. Well done Good

BTW, the posed problem gives the difference equations not differential (as this given solution imposed). Actually, I think it does not matter and it might be more complicated that way (errors, time steps, singularity etc.), not sure.

Regarda,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline hanskl  
#42 Posted : 28 October 2017 12:02:18(UTC)
hanskl


Rank: Advanced Member

Groups: Registered
Joined: 25/10/2017(UTC)
Posts: 158
Norway

Was thanked: 7 time(s) in 5 post(s)
Originally Posted by: omorr Go to Quoted Post
I agree with Jean. Well done Good

BTW, the posed problem gives the difference equations not differential (as this given solution imposed). Actually, I think it does not matter and it might be more complicated that way (errors, time steps, singularity etc.), not sure.

Regarda,
Radovan


Thank you Yes

Does that mean that you think the last approach i did is the best way to solve the problem? The trick i think is to establish boundry conditions for ODE2,3,4 which is done by iteration till t.xy in the input box matches t.xy in the calculation after all the constants is established.

Thanks again for your help Biggrin
thanks 2 users thanked hanskl for this useful post.
on 28/10/2017(UTC),  on 28/10/2017(UTC)
Offline Jean Giraud  
#43 Posted : 30 October 2017 01:45:31(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: hanskl Go to Quoted Post
Does that mean that you think the last approach i did is the best way to solve the problem? The trick i think is to establish boundry conditions for ODE2,3,4 which is done by iteration till t.xy in the input box matches t.xy in the calculation after all the constants is established


Radovan is right: the functional relationship is in term of finite differences,
i.e: for pre-computer age. In fact you just need to integrate the RHS member.
You could think of the integrator operator, that would be a great mistake
on two counts: the operator is horribly slow and may be unusable wrt accuracy.
The "RK" integrator is hyperfast [probably from borrowed code] and accurate.

The other question is if RK supports conditional ... answer is YES

The attached confirms, unfortunately a single conditional.
I don't understand the conditional of your project.
@ 735 °C, steel is pink, visible in the dark, soft, not black smith works.
@ 900 °C, red hot for forging. Why is the conditional infinity @ 735 ?

Just observation(S) ...

Sorry, can't upload the work sheet at the moment

thanks 1 user thanked Jean Giraud for this useful post.
on 30/10/2017(UTC)
Offline Jean Giraud  
#44 Posted : 30 October 2017 03:04:05(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Sorry, can't upload the work sheet at the moment


ODE Aminohippuric MCD.sm (45kb) downloaded 34 time(s).

thanks 1 user thanked Jean Giraud for this useful post.
on 30/10/2017(UTC)
Offline Jean Giraud  
#45 Posted : 30 October 2017 17:23:34(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... finally, your project is completely correct as it looks.
Observe few modifications to get equally spaced data result,
1. re-arranged the number of points
2. submatrix to get rid of duplicates
3. spline "global"
4. discretise 1,2,3 ... or at will as you wish.

Saved in my personal file, thanks ... Jean

ODE Multiconditional [Steel fire].sm (38kb) downloaded 32 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 30/10/2017(UTC)
Offline Jean Giraud  
#46 Posted : 30 October 2017 20:15:47(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... two pages of Engineer's stuff has been added [page: 3, 4]
The two solvers are fully automated, i.e: given Y on the red curve
they both solve for their respective values on the X axis.
The function 'θ(t)' does not have an explicit "inverse". No problem
for solving with the Smath solve bloc. We can solve both iteratively,
not offered ... just ask for ... will be pleased to provide.

Conserve preciously the "root" technique ... sometimes more involved.
This project could not have been done so neatly Mathcad 11.
Title, X, Y axes need some identifier(s).

ODE Multiconditional [Steel fire].sm (54kb) downloaded 32 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 30/10/2017(UTC)
Offline hanskl  
#47 Posted : 31 October 2017 00:26:21(UTC)
hanskl


Rank: Advanced Member

Groups: Registered
Joined: 25/10/2017(UTC)
Posts: 158
Norway

Was thanked: 7 time(s) in 5 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
... two pages of Engineer's stuff has been added [page: 3, 4]
The two solvers are fully automated, i.e: given Y on the red curve
they both solve for their respective values on the X axis.
The function 'θ(t)' does not have an explicit "inverse". No problem
for solving with the Smath solve bloc. We can solve both iteratively,
not offered ... just ask for ... will be pleased to provide.

Conserve preciously the "root" technique ... sometimes more involved.
This project could not have been done so neatly Mathcad 11.
Title, X, Y axes need some identifier(s).

ODE Multiconditional [Steel fire].sm (54kb) downloaded 32 time(s).


Hi Jean!

Thanks for still working on this project. Interessering things you have done with it. I will have to study it to better understand it. Good

Just wanted to let you know (you probably already know) your approach still aquires the user to iterate the set of DE's to establish the correct initial conditions for DE2/3/4. If you change the input (ratio.Am_V and ratio.Am.b_V is the ones you will likely change), the DE's gets disconnected.

Regards,

Hans Kristian
Offline CBG  
#48 Posted : 31 October 2017 00:56:24(UTC)
CBG


Rank: Advanced Member

Groups: Registered
Joined: 14/10/2015(UTC)
Posts: 308

Was thanked: 77 time(s) in 58 post(s)
A more compact calculation.

Testin4odeCompact.png

Testing4odeCompacto.sm (16kb) downloaded 24 time(s).

Best Regards

Carlos
Offline hanskl  
#49 Posted : 31 October 2017 01:11:57(UTC)
hanskl


Rank: Advanced Member

Groups: Registered
Joined: 25/10/2017(UTC)
Posts: 158
Norway

Was thanked: 7 time(s) in 5 post(s)
Originally Posted by: CBG Go to Quoted Post
A more compact calculation.

Testin4odeCompact.png

Testing4odeCompacto.sm (16kb) downloaded 24 time(s).

Best Regards

Carlos


Interessting Smile How do you "calibrate" the T-matrix when the input changes?

It's great to see all the attention this project has gotten, seeing as it is a highly relevant problem for engineers.

Yahoo
Offline Jean Giraud  
#50 Posted : 31 October 2017 02:00:42(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: hanskl Go to Quoted Post
If you change the input (ratio.Am_V and ratio.Am.b_V is the ones you will likely change), the DE's gets disconnected.


You are right there ! The system is not homogeneous, it depends upon
those parameters you mention ... like a monkey business. You must recast
the system like you did wrt critical temperature ... Oh ! that's your
competence. That stuff is Chinese to me.
BTW: attached the discrete solvers. All in all a huge/interesting project.

Cheers, Jean

ODE Multiconditional [Steel fire].sm (64kb) downloaded 22 time(s).

thanks 1 user thanked Jean Giraud for this useful post.
on 31/10/2017(UTC)
Offline Jean Giraud  
#51 Posted : 31 October 2017 02:54:03(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: hanskl Go to Quoted Post
Interessting How do you "calibrate" the T-matrix when the input changes?


Yes, but you don't get the same DE shape, not looking like the Excel snippet.
You can join the segments "bing/bang" technique. You still have to submatrix
to get rid of duplicates at junctions.
Good question: can we plug a vector of the start/end/number of points per segment
just to imitate my previous attachment ?

ODE Multiconditional [Carlos Compactum].sm (28kb) downloaded 15 time(s).
Offline Jean Giraud  
#52 Posted : 31 October 2017 03:43:56(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... the ODE compactum has just been doctored.
The suite will be same as my previous attachment,
submatrix to remove duplicates, discretize for
regular spacing tabulation ... solvers.

Jean

ODE Multiconditional [Carlos Compactum].sm (20kb) downloaded 16 time(s).
Offline Jean Giraud  
#53 Posted : 31 October 2017 05:02:43(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... all done up to the two solve/inverse.

ODE Multiconditional [Carlos Compactum].sm (26kb) downloaded 27 time(s).
Offline hanskl  
#54 Posted : 31 October 2017 10:54:21(UTC)
hanskl


Rank: Advanced Member

Groups: Registered
Joined: 25/10/2017(UTC)
Posts: 158
Norway

Was thanked: 7 time(s) in 5 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: hanskl Go to Quoted Post
Interessting How do you "calibrate" the T-matrix when the input changes?


Yes, but you don't get the same DE shape, not looking like the Excel snippet.
You can join the segments "bing/bang" technique. You still have to submatrix
to get rid of duplicates at junctions.
Good question: can we plug a vector of the start/end/number of points per segment
just to imitate my previous attachment ?

ODE Multiconditional [Carlos Compactum].sm (28kb) downloaded 15 time(s).


I haven't had much time to progress on this project during the weekend. I will work more on it this week (for instance stack all the solutions and submatrix the junctions like you showed us Good )

Is this what your were looking for regarding automating equal steps?

Best regards,
Hans Kristian

steps.PNG


Edit: Upon closer inspection, computational times using your method of stacking all the DE's increases dramcatically. To calculate temperature at a given time takes ~1,3sec using your method.

Using my method (granted much more primitive, and it does give some unatural results in the crossover between the DE's, the computational times are ~0.15sec.

time_temp.PNG

Edited by user 31 October 2017 12:36:22(UTC)  | Reason: Not specified

Offline Jean Giraud  
#55 Posted : 31 October 2017 16:24:53(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: hanskl Go to Quoted Post
Upon closer inspection, computational times using your method of stacking all the DE's increases dramcatically. To calculate temperature at a given time takes ~1,3sec using your method.

Using my method (granted much more primitive, and it does give some unatural results in the crossover between the DE's, the computational times are ~0.15sec.


You have several points in one remark:

1. The compactum method is not shorter in work sheet space. It is slower
because of the counter cumulative in "for loop" ... just interesting.

2. Your "steps*(,-,) computes more points 603 vs mine 491
thus slower up to the result. No interest as it produces the duplicates.

3. unatural results in the crossover between the DE's
You have put the finger in the wound !!!
There are very many more "splines" than Smath "ainterp [Akima], cinterp"
Of all the splines [lot] I'm familiar, NONE will accept duplicate
points ... worse: in this work, the duplicates are zombies , Ah !
So, you must strip for duplicates [submatrix does it well]. By same token,
once striped and stacked, the piecewise "ainterp" is completely useless.
As a remark, Smath "ainterp, cinterp" are hyperfast ... they spit 1000 data points
before it seems to have digested .
"cinterp" looks 1/1 universal vs others [Mathcad ...]
"Akima ainterp", I have not seen under the hood of it. From using, it reveals
very excellent in some works, but also pure scrap in other type applications.

4. After stripping, the f(x):=ainterp(X,Y,x) is passed in the reconstruct
discretiser to re-tabulate for equal points spacing as an export. For
interpolation, just spline over this data table.

Thanks Collab for this most interesting DE application.

Jean

ODE Multiconditional [Carlos Compactum] Copy.sm (27kb) downloaded 19 time(s).

ODE Multiconditional [Steel fire] Copy.sm (65kb) downloaded 19 time(s).

Offline hanskl  
#56 Posted : 31 October 2017 22:43:52(UTC)
hanskl


Rank: Advanced Member

Groups: Registered
Joined: 25/10/2017(UTC)
Posts: 158
Norway

Was thanked: 7 time(s) in 5 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
... last version for my projects file.
Number of points is ~ immaterial wrt computation timing.
The offered is + than enough for spline

ODE Multiconditional [Steel fire] Copy.sm (54kb) downloaded 25 time(s).


Cool stuff. The "discrete solver/inverser" takes approx 12 seconds to solve on my computer. None of the graphs start out at 20degC though, why is that?

Edit: Stupid question; what is the purpose of the "root" expression in your workbook? Couldn't the original theta.g expression be used in the solver instead?

Best regards,

solver.PNG

Edited by user 31 October 2017 22:51:54(UTC)  | Reason: Not specified

Offline Jean Giraud  
#57 Posted : 01 November 2017 13:47:09(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: hanskl Go to Quoted Post
Cool stuff. The "discrete solver/inverser" takes approx 12 seconds to solve on my computer. None of the graphs start out at 20degC though, why is that?

Edit: Stupid question; what is the purpose of the "root" expression in your workbook? Couldn't the original theta.g expression be used in the solver instead?


1. Copy/paste the last collapsed area in new sheet.
Both methods start plotting @ 20 °C as specified from "if/otherwise".

2. Often, "maple/solve" returns the inverse function.
This one though it looks simple does not, alternately "root" does.
and by same token result is the simplified expansion.

This refreshed version looks like nearly the "last brick in the wall".

Please: don't hesitate for more questions ... Jean

ODE Multiconditional [Steel fire].sm (65kb) downloaded 31 time(s).
Offline Jean Giraud  
#58 Posted : 02 November 2017 12:42:52(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
This project has been re-organised a bit for publishing.
Few things are missing: an abstract, identify the X,Y plot arguments.
The discrete solver/collector can be set incremental for finer tabulation.

Jean

Eurocode 1993.PNG

ODE Multiconditional [Steel fire] Copy.sm (68kb) downloaded 29 time(s).
Offline hanskl  
#59 Posted : 02 November 2017 23:41:43(UTC)
hanskl


Rank: Advanced Member

Groups: Registered
Joined: 25/10/2017(UTC)
Posts: 158
Norway

Was thanked: 7 time(s) in 5 post(s)
I have organized my worksheet somewhat now, and collected only the relevant parts for my specific problem at the top. The other stuff that although it displays the power of SMath - it's not relevant for this workbook, is gathered at the bottom.


I really appreciate all the help you have given med Jean!

Best regards,

Staltemperaturer ved brann.sm (287kb) downloaded 63 time(s).
Offline Jean Giraud  
#60 Posted : 03 November 2017 05:26:54(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
I have organized my worksheet somewhat now, and collected only the relevant parts for my specific problem at the top. The other stuff that although it displays the power of SMath - it's not relevant for this workbook, is gathered at the bottom.

Something mysterious, it does not download *.sm, only some sort of "Chrome" document.
Nothing to see, that's OK unless I can help more.

Cheers, Jean
Users browsing this topic
Guest
6 Pages<12345>»
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.