-
Notifications
You must be signed in to change notification settings - Fork 1
/
index_ru.html
109 lines (98 loc) · 5.29 KB
/
index_ru.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">
<!--enable MathJax $ for inline formulae-->
<!--$$ is used for display as well-->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true
}
});
</script>
<!--enable MathJax-->
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<title>Персональная страница imitrichev</title>
</head>
<body>
<!--header-->
<header>
<div class="inner">
<h1>Страница imitrichev'а</h1>
<h2>:)   <a href="index.html" style="font-family:'Times New Roman'; color:magenta">English version <img src="https://upload.wikimedia.org/wikipedia/en/a/ae/Flag_of_the_United_Kingdom.svg" width="50" vspace="10px"></img></a></h2>
<a href="https://github.com/imitrichev" class="button"><small>Вперед на</small> GitHub</a>
</div>
</header>
<!--main content-->
<div id="content-wrapper">
<div class="inner clearfix">
<section id="main-content">
<h3> <a id="info" class="anchor" href="#info" aria-hidden="true"><span class="octicon octicon-link"></span></a>C++ код для расчета величины первой ячейки
</h3>
<p>
<a href="docs/grid.cpp">Этот простой код</a> может рассчитать величину первой ячейки $h_1$ на основе трех вводимых параметров:
<ul>
<li>$N$, числа ячеек</li>
<li>$L$, длины ребра, на котором строится сетка</li>
<li>$k$, скорости роста</li>
</ul>
Скорость роста показывает, во сколько раз следующая ячейка больше предыдущей (в направлении роста):
$$k = h_2 / h_1 = {}... = h_{i+1} / h_i = h_N / h_{N-1}$$</p>
<p style="text-align:center; color: red; font-style: italic">
<img src="images/grid_growth2.png" alt="Biased grid" vspace="10px">Рисунок 1. Сетка со смещением</img></p>
<p>Коэффициент смещения $r$, который используется в качестве входного параметра в ANSYS Meshing, определяется как:
$$r = h_N / h_1 $$
Тогда, поскольку $h_N = h_1 k^{N-1}$,
$$r = k^{N-1}$$
Наконец, длина ребра, на котором строится сетка, равна:
$$L = \sum_{n=0}^{N-1}h_1 k^n$$
Код выполняет подбор $h_1$ методом половинного деления, чтобы получить $L$ при заданных $N$ и $k$.
<ol>
<li>Компиляция: <code>g++ grid.cpp -o grid</code></li>
<li>Запуск: <code>./grid</code></li>
<li> Введите последовательно свои $N$, $L$, $k$.</li>
<li> $h_1$ и $r$ выводятся в конце результатов.</li>
</ol>
<a href="docs/grid.cpp"><p style="font-family: 'Helvetica Neue'; color:#0162ee; font-size:2em; text-align:center; font-style: italic">Скачать исходный код (.cpp)</p><img src="images/download1.png" alt="no image"></img></a>
</p>
</section>
<!--end main content-->
<!--sidebar-->
<aside id="sidebar">
<p>Основан на теме Architect автора <a href="https://twitter.com/jasonlong">Jason Long</a>. Часть рисунков любезно предоставлена <a href="http://by-anna.ucoz.ru">danjuta</a></p>
<table>
<tr>
<td>
<script type="text/javascript">
window._idl = {};
_idl.variant = "modal";
(function() {
var idl = document.createElement('script');
idl.async = true;
idl.src = 'https://members.internetdefenseleague.org/include/?url=' + (_idl.url || '') + '&campaign=' + (_idl.campaign || '') + '&variant=' + (_idl.variant || 'modal');
document.getElementsByTagName('body')[0].appendChild(idl);
})();
</script>
</td>
<a href="https://internetdefenseleague.org"><img src="https://internetdefenseleague.org/images/badges/final/side_bar_badge.png" alt="Member of The Internet Defense League"/></a>
</tr>
<tr>
<a href="mech_optimiz/main_ru.html"><h2>Домашняя страница проекта mech_optimiz</h2></a>
</tr>
</table>
</aside>
</div>
</div>
</body>
</html>