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

Notification

Icon
Error

Login


6 Pages123>»
Options
Go to last post Go to first unread
Offline hanskl  
#1 Posted : 25 October 2017 15:52:26(UTC)
hanskl


Rank: Advanced Member

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

Was thanked: 7 time(s) in 5 post(s)
Hi all,

This is my first post on this forum. I recently begun using Smath this fall. Previously I have never used software for doing math. I am blown away by the power of Smath, and how fast it allows me to do basic math stuff.

Now I have come across some problems that are somewhat beyond the basic math I have used Smath for until now.

My first problem is solving a differential equation to be able to calculate steel temperature development according to EN 1993-1-2. I simply have to idea how to move forward with this in Smath, and I am completely lost here. I have spent the last week trying to search for solutions, but I have come up short.. I am sure some of the more advanced users on this forum will make easy work of this one.

My second problem is (I think) far less advanced. It is simply a matter of symbolically reversing a equation with respect to a variable.


I hope you guys can help me along to solve my problems, so I can move on with my work situation.

Thanks Biggrin 4.2.5 Steel temperature development.sm (22kb) downloaded 61 time(s).

Edited by user 28 October 2017 01:35:14(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline omorr  
#2 Posted : 25 October 2017 17:09:49(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)
Hello,

There are plenty of ode solvers in SMath. You should consult the appropriate plugins end examples for that in order to figure it out.

Moreover, the advice is that you should get rid of the units when try to solve ode.

I just guessed what did you want to accomplish (not quite sure what the ODE was). It might be quite wrong.

(see the bottom of the worksheet please)
4.2.5Steeltemperaturedevelopment-corr.sm (34kb) downloaded 61 time(s).

Edited by user 25 October 2017 17:11:42(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline hanskl  
#3 Posted : 25 October 2017 18:01:37(UTC)
hanskl


Rank: Advanced Member

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

Was thanked: 7 time(s) in 5 post(s)
Thank you for your fast answer!

You have correctly identified the DE I need to solve. I tried to answer your questions inside the Smath file. 4.2.5Steeltemperaturedevelopment-reply.sm (71kb) downloaded 34 time(s).
Offline omorr  
#4 Posted : 25 October 2017 20:02:25(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)
Just to repeat. If you go to some more complex numerical calculation (beyond simple four algebraic calculations), try to avoid units or at least make the expressions dimensionless. Otherwise, you might deal with the expressions having non-consistent units and get into the troubles.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline hanskl  
#5 Posted : 25 October 2017 20:07:50(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
Just to repeat. If you go to some more complex numerical calculation (beyond simple four algebraic calculations), try to avoid units or at least make the expressions dimensionless. Otherwise, you might deal with the expressions having non-consistent units and get into the troubles.

Regards,
Radovan


By the bolded part in the quote, do you mean the expression D should return no units when evaluated?

In your expression for D, you made it with two arguments (t;θ.a). I can't see where the argument θ.a comes into play?

To clarify a question you raised earlier, the initial value of θ.a=20°C.


Thanks again for your help
Offline omorr  
#6 Posted : 25 October 2017 20:33:43(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)
Originally Posted by: hanskl Go to Quoted Post
Originally Posted by: omorr Go to Quoted Post
Just to repeat. If you go to some more complex numerical calculation (beyond simple four algebraic calculations), try to avoid units or at least make the expressions dimensionless. Otherwise, you might deal with the expressions having non-consistent units and get into the troubles.


hanskl wrote:
By the bolded part in the quote, do you mean the expression D should return no units when evaluated?

Yes
hanskl wrote:
In your expression for D, you made it with two arguments (t;θ.a). I can't see where the argument θ.a comes into play?

For the details of Rkadapt() see the ODE Solvers plugin


Regards,
Radovan

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline hanskl  
#7 Posted : 25 October 2017 21:43:36(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
Originally Posted by: hanskl Go to Quoted Post
Originally Posted by: omorr Go to Quoted Post
Just to repeat. If you go to some more complex numerical calculation (beyond simple four algebraic calculations), try to avoid units or at least make the expressions dimensionless. Otherwise, you might deal with the expressions having non-consistent units and get into the troubles.


hanskl wrote:
By the bolded part in the quote, do you mean the expression D should return no units when evaluated?

Yes
hanskl wrote:
In your expression for D, you made it with two arguments (t;θ.a). I can't see where the argument θ.a comes into play?

For the details of Rkadapt() see the ODE Solvers plugin


Regards,
Radovan



I have realized a pretty crucial mistake in my equation. The definition of Θ.m was completely wrong. I mistaked it for initial value/temperature, but it turns out it is actually θ.a.

I would really appreciate if you could help me rewrite all the expression in the correct format (hopefully the definition of Θ.m is the only missing puzzle)

Thanks a lot 4.2.5Steeltemperaturedevelopment-reply-2.sm (66kb) downloaded 31 time(s).

Help
Offline omorr  
#8 Posted : 26 October 2017 10:00:12(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)
See the bottom of the worksheet. I do not know if this is correct (you should recheck your variables and equations).
As you could see, there were two solvers used because the problem appeared to be stiff.

4.2.5Steeltemperaturedevelopment-reply-2-1-corr.sm (71kb) downloaded 31 time(s).
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 2 users thanked omorr for this useful post.
on 26/10/2017(UTC),  on 26/10/2017(UTC)
Offline hanskl  
#9 Posted : 26 October 2017 10:40:44(UTC)
hanskl


Rank: Advanced Member

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

Was thanked: 7 time(s) in 5 post(s)
4.2.5Steeltemperaturedevelopment-reply-3.sm (81kb) downloaded 28 time(s).

The plots are finally starting to resemble that of Robot!Clap

I have made pointed out the one variable I am uncertain of in the bottom of this file.

It seems the time is still in minutes, but is the temperature in Celsius?

Is there a way to return the temperature after t minutes? In the snapshot from Robot you can see Oa,max=940,96°C after treg=60,00min.

Ultimately, the goal is to have the equation return the temperature after a given time θ.a(t).

Offline hanskl  
#10 Posted : 26 October 2017 10:53:40(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 think I found a solution to return the temperature after a given time.

There might be better solutions for this though?


425.PNG

Offline omorr  
#11 Posted : 26 October 2017 11:14:39(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)
As you have points from the solution you could make a function from them by spline interpolation (for example).
See the attached file. By the way, you do not need to many steps for these ode solvers.

4.2.5Steeltemperaturedevelopment-reply-3-corr.sm (90kb) downloaded 43 time(s).
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline hanskl  
#12 Posted : 26 October 2017 11:38: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)
Thank you very much for your help. You have helped me solve my initial problem (problem 1). I really appreciate it.

1. What at the streghts/weaknesses of the different solvers? why go for one or the other? Is it correct that this DE is stiff?

2. What difference does it make if I have 1 step/minute (Δt=60sec) or 12 steps/minute (Δt=5 sec, which is the highest allowed Δt according to EN 1993-1-2)?

3. What is the difference between ainterp() for returning temperature at a given time, and my approach in my previous post?



If you could please help me understand if it is possible to solve my second problem in Smath (problem 2 ref. my initial post).

Many thanks Biggrinrinks:
Offline omorr  
#13 Posted : 26 October 2017 12:14:52(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)
Originally Posted by: hanskl Go to Quoted Post

1. What at the streghts/weaknesses of the different solvers? why go for one or the other? Is it correct that this DE is stiff?

There are stiff and non-stif ode. There are also many numerical algorithms for ode (SMath have lots of them) and therefore many solvers. It is all right to try few of them (fortunately SMath has lots of them) .
Quote:

2. What difference does it make if I have 1 step/minute (Δt=60sec) or 12 steps/minute (Δt=5 sec, which is the highest allowed Δt according to EN 1993-1-2)?

I think you missed the point. The steps in the solver gives you the result at the distinct equidistant points and it does not have to much connection with your mentioned rules for Δt.
Quote:

3. What is the difference between ainterp() for returning temperature at a given time, and my approach in my previous post?

ainterp() will give you the function (was that you were looking for) and your approach will give you the points. For instance, how would you get the result for, say, after 12.3462 min by using your approach?


Quote:

If you could please help me understand if it is possible to solve my second problem in Smath (problem 2 ref. my initial post).

In your second problem, I think you have two variables (theta.a.cr, mu.zero) and only one equation. This might be solved only symbolically for mu.zero (or manually) . Moreover, the equation seems to by highly nonlinear and symbolical engines will probably fail here.

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline hanskl  
#14 Posted : 26 October 2017 12:38:06(UTC)
hanskl


Rank: Advanced Member

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

Was thanked: 7 time(s) in 5 post(s)
2. OK, I think I understand. The fourth argument in the solver only affects how the result is presented, but it does not affect the calculation. Do you know what the steps in the calculation is?

3. θ.a(t):=res,t*12+1,2 seems to work just like θ.a(t):=ainterp(time,O,t), or am I missing something?

4. θ.a.cr:=(39.19*ln(1/{0.9674*μ.0^3.833}-1)+482)
This is the equation given in EN 1993-1-2 to calculate θ.a.cr when μ.0 is known.

I wondered if Smath was able to reverse this equation symbolically so it would calculate μ.0 when θ.a.cr was known.

μ.0:=3.833root({1/{e^{{θ.a.cr-482}/39.19}+1}}/0.9674,3.833) is my work, by manually reversing the equation, because i couldn't figure out how to make Smath do that for me.

But it seems it might not be possible to have Smath do things like that?
Offline omorr  
#15 Posted : 26 October 2017 14:02:13(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)
Originally Posted by: hanskl Go to Quoted Post

3. θ.a(t):=res,t*12+1,2 seems to work just like θ.a(t):=ainterp(time,O,t), or am I missing something?

Yes you are. Inform yourself what the term "interpolation" means.

Quote:
4. θ.a.cr:=(39.19*ln(1/{0.9674*μ.0^3.833}-1)+482)
This is the equation given in EN 1993-1-2 to calculate θ.a.cr when μ.0 is known.

I wondered if Smath was able to reverse this equation symbolically so it would calculate μ.0 when θ.a.cr was known.

μ.0:=3.833root({1/{e^{{θ.a.cr-482}/39.19}+1}}/0.9674,3.833) is my work, by manually reversing the equation, because i couldn't figure out how to make Smath do that for me.

But it seems it might not be possible to have Smath do things like that?

See the attached file. This is an example of using solve() function for single nonlinear equation. Search the forum for nonlinear equations please.
problem2.sm (9kb) downloaded 37 time(s).

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 26/10/2017(UTC)
Offline hanskl  
#16 Posted : 26 October 2017 14:13: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)
Thank you for all your help!

Cheers Good
Offline omorr  
#17 Posted : 26 October 2017 14:42:27(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)
You are welcome Good

I would suggest you also to spend some time and read the Interactive SMath Handbook by Martin Kraska (install it under Interactive books via Extension manager)

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline hanskl  
#18 Posted : 26 October 2017 14:53:38(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
You are welcome Good

I would suggest you also to spend some time and read the Interactive SMath Handbook by Martin Kraska (install it under Interactive books via Extension manager)

Regards,
Radovan


Will do!

Any chance I can trick you into making a list of "must-have" plugins for me? Biggrin
Offline hanskl  
#19 Posted : 26 October 2017 19:05: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 been testing the ODE quite a bit now..

And it seems the equation is still not correct. The value of c.a is dependant on θ.a.

Because c.a varies with θ.a, and quite a bit at that as well, it would be wrong to set c.a as a constant (like i have done previously).

Now I am stuck trying to get D(t;θ.a) to take into account c.a(θ.a). I just get the error that θ.a is not defined.. Umnik

Offline omorr  
#20 Posted : 26 October 2017 20:01:17(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)
Attach the file with the comments you mentioned. I hope we will figure out what was wrong Good

Regards,
Radovan

P.S. By the way, Martin Kraska prepared the Portable version with quite a lot of plugins included.
Try it if you find this way more appropriate for you/

Edited by user 26 October 2017 20:09:18(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Users browsing this topic
6 Pages123>»
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.