Оптимизация

Оптимизация - Долгое время расчета - 消息

#1 已发布: 2021/2/27 17:04:03
genf

genf

6个赞,共72个帖子。

组: User

Добрый день.
Помогите (или подскажите) пожалуйста с оптимизацией. Довольно долгий расчет (около 30 сек). Если уменьшить параметр m, то время расчета уменьшается, но хотелось бы как то оптимизировать.Gidrodinamika.sm (105.86 KiB)已下载 1282 次。
#2 已发布: 2021/2/27 19:33:13
Fridel Selitsky

Fridel Selitsky

520个赞,共451个帖子。

组: User

If you shorten the code, then the calculation is performed
an order of magnitude faster

Gidrodinamika1.sm (111.05 KiB)已下载 1285 次。
1位用户喜欢此帖子
Serg 2021/2/28 04:17:00
#3 已发布: 2021/2/28 16:05:02
genf

genf

6个赞,共72个帖子。

组: User

Финальный расчет во вложении.
Большое спасибо Ber7 за помощь в оптимизации
Opredelenie gidrodinamicheskogo davlenija_v001.sm (128.74 KiB)已下载 1354 次。
#4 已发布: 2021/3/1 05:18:30
genf

genf

6个赞,共72个帖子。

组: User

Эх, по поводу "финальной" это я погорячился.
Как оказалось есть недочет в 1 формуле.
Formula.png

Как это реализовать можно?
Т.е. именно в сумму входят только нечетные номера.
#5 已发布: 2021/3/1 07:16:06
Fridel Selitsky

Fridel Selitsky

520个赞,共451个帖子。

组: User

I don't understand this formula, but Try to substitute 2n -1 instead of n

2n-1.sm (134.68 KiB)已下载 1239 次。
1位用户喜欢此帖子
Serg 2021/3/1 07:39:00
#6 已发布: 2021/3/1 07:40:11
genf

genf

6个赞,共72个帖子。

组: User

Wrote

I don't understand this formula, but Try to substitute 2n -1 instead of n

2n-1.sm (134.68 KiB)已下载 1239 次。



Да это то, что нужно. Спасибо.
Opredelenie gidrodinamicheskogo davlenija_v001.sm (187.99 KiB)已下载 1332 次。
#7 已发布: 2021/3/1 11:37:12
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

I don't understand this formula


I don't understand much in there either.
We can get the shape of the upper right image.

2n-1.sm (142.77 KiB)已下载 1229 次。
#8 已发布: 2021/3/1 14:32:53
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Interesting shape but can't discretize ???

2n-1 [Polylog].sm (8.42 KiB)已下载 1017 次。
#9 已发布: 2021/3/1 16:51:45
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

What's your comment on that ?

Unknown.PNG
1位用户喜欢此帖子
Serg 2021/3/1 17:51:00
#10 已发布: 2021/3/1 17:55:59
genf

genf

6个赞,共72个帖子。

组: User

Wrote

What's your comment on that ?



Визуально очень похоже... нужно потестировать по ряду значений ... есть графики в книге Бирбраера (рис. 9.9). Я его оцифровывал с помощью GetData Graph Digitizer (примерно конечно).Birbraer_ris.9.9.xlsx (103.48 KiB)已下载 893 次。
Именно эта формула и графики одно и тоже.

В Smath у меня эта эпюра ломается внизу ... пока не разобрался почему.
#11 已发布: 2021/3/1 20:51:55
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

GetData Graph Digitizer


We can do it in Smath providing the image is cleaned manually
and the coordinates [Xmax, Xmin ...Ymax, Ymin] are given or
otherwise guesstimated. Freeware Tracer can do as well but
again cleaned image and coordinates.
Your approximation sounds OK ... many more can be envisaged.
My little Russian is dead for over 50 years .
Cheers ... Jean

1位用户喜欢此帖子
Serg 2021/3/2 10:33:00
#12 已发布: 2021/3/1 22:57:15
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

... smoothed data from Tracer.

Page15 Tracer.sm (18.87 KiB)已下载 1504 次。
#13 已发布: 2021/3/2 02:38:47
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

Wrote

... smoothed data from Tracer.


... it can be improved a bit. But, what a dirty image to digitize !

Page15 Tracer.sm (71.66 KiB)已下载 1518 次。
#14 已发布: 2021/3/2 14:23:15
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

This document resumes and compares your fitting model
vs the digitized image, from improved session.
You may attempt to adapt your model to the digitized data.
Maybe there is a Thiele fit to your blue/red data points.
I will try that soon ... Jean.

2n-1 [Jean].sm (188.23 KiB)已下载 1025 次。
1位用户喜欢此帖子
Serg 2021/3/2 15:16:00
#15 已发布: 2021/3/2 15:20:35
genf

genf

6个赞,共72个帖子。

组: User

В книге Бирбраера рис. 9.8 несет в себе только информацию касаемо куда какая нагрузка прикладывается и форма приведена условно, т.е. схема. Сам рис. 9.8 не претендует на оцифровку - это не график, а картинка.
А вот рис. 9.9 - это набор графиков уже и именно их я и оцифровывал еще когда не разобрался с формулой 9.51.
Т.е. именно этот набор графиков определяет форму эпюры гидродинамического давления.
#16 已发布: 2021/3/2 16:58:13
Jean Giraud

Jean Giraud

983个赞,共6,866个帖子。

组: User

In Birbraer's book, fig. 9.8 carries only information with regards to where what load is applied and the form is given conditionally, i.e. scheme. The rice itself. 9.8 does not pretend to be digitized - it is not a graph, but a picture.
And here is rice. 9.9 is a set of graphs already, and it was them that I digitized even when I had not figured out the formula 9.51.
Thus, it is this set of plots that determines the shape of the hydrodynamic pressure plot.
...................
So, my understanding is that the formula 9.51 is the one that determines,
the hydrodynamic pressure. It looks damned close parent to Eiffel Tower shape.
Then, it is not needed to be discretized, simply plot scalar.
However, I don't think you can plot opposite reverse, wish I'm wrong.
Very interesting project, thanks ... Jean

2n-1 [Jean].sm (243.28 KiB)已下载 1009 次。
  • 有新帖
  • 无新帖