Solving differential equation Eurocode 1993-1-2 4.2.5 Steel temperature development

Solving differential equation Eurocode 1993-1-2 4.2.5 Steel temperature development - Сообщения

#1 Опубликовано: 25.10.2017 09:52:26
hanskl

hanskl

7 сообщений из 158 понравились пользователям.

Группа: User

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 :d 4.2.5 Steel temperature development.sm (21 КиБ) скачан 90 раз(а).
#2 Опубликовано: 25.10.2017 11:09:49
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

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 (33 КиБ) скачан 88 раз(а).
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Опубликовано: 25.10.2017 12:01:37
hanskl

hanskl

7 сообщений из 158 понравились пользователям.

Группа: User

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 (70 КиБ) скачан 55 раз(а).
#4 Опубликовано: 25.10.2017 14:02:25
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

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!"
#5 Опубликовано: 25.10.2017 14:07:50
hanskl

hanskl

7 сообщений из 158 понравились пользователям.

Группа: User

Wrote

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
#6 Опубликовано: 25.10.2017 14:33:43
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Wrote

Wrote

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.



Wrote

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


Yes
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!"
#7 Опубликовано: 25.10.2017 15:43:36
hanskl

hanskl

7 сообщений из 158 понравились пользователям.

Группа: User

Wrote

Wrote

Wrote

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.



Wrote

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


Yes
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 lot4.2.5Steeltemperaturedevelopment-reply-2.sm (65 КиБ) скачан 54 раз(а).

#8 Опубликовано: 26.10.2017 04:00:12
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

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 (70 КиБ) скачан 53 раз(а).
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
2 пользователям понравился этот пост
hanskl 26.10.2017 05:32:00, frapuano 26.10.2017 08:14:00
#9 Опубликовано: 26.10.2017 04:40:44
hanskl

hanskl

7 сообщений из 158 понравились пользователям.

Группа: User

4.2.5Steeltemperaturedevelopment-reply-3.sm (80 КиБ) скачан 49 раз(а).

The plots are finally starting to resemble that of Robot!

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).

#10 Опубликовано: 26.10.2017 04:53:40
hanskl

hanskl

7 сообщений из 158 понравились пользователям.

Группа: User

I think I found a solution to return the temperature after a given time.

There might be better solutions for this though?


425.PNG

#11 Опубликовано: 26.10.2017 05:14:39
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

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 (89 КиБ) скачан 64 раз(а).
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#12 Опубликовано: 26.10.2017 05:38:21
hanskl

hanskl

7 сообщений из 158 понравились пользователям.

Группа: User

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
#13 Опубликовано: 26.10.2017 06:14:52
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Wrote


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) .
Цитата


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.
Цитата


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?


Цитата


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!"
#14 Опубликовано: 26.10.2017 06:38:06
hanskl

hanskl

7 сообщений из 158 понравились пользователям.

Группа: User

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?
#15 Опубликовано: 26.10.2017 08:02:13
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Wrote


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.

Цитата

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 (8 КиБ) скачан 52 раз(а).

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 пользователям понравился этот пост
hanskl 26.10.2017 08:12:00
#16 Опубликовано: 26.10.2017 08:13:43
hanskl

hanskl

7 сообщений из 158 понравились пользователям.

Группа: User

Thank you for all your help!

Cheers
#17 Опубликовано: 26.10.2017 08:42:27
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

You are welcome

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!"
#18 Опубликовано: 26.10.2017 08:53:38
hanskl

hanskl

7 сообщений из 158 понравились пользователям.

Группа: User

Wrote

You are welcome

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? :d
#19 Опубликовано: 26.10.2017 13:05:43
hanskl

hanskl

7 сообщений из 158 понравились пользователям.

Группа: User

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..

#20 Опубликовано: 26.10.2017 14:01:17
Radovan Omorjan

Radovan Omorjan

325 сообщений из 2052 понравились пользователям.

Группа: Moderator

Attach the file with the comments you mentioned. I hope we will figure out what was wrong

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/
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений