/
index.tsx
361 lines (342 loc) · 10.5 KB
/
index.tsx
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
/** @module Components.Blog.Posts.1Poisson */
import { Typography } from 'antd'
import MathJax from '@/components/assets/mathjax'
import Carousel from '@/components/assets/carousel'
import PostLayout from '../layout'
const key = '1-poisson'
const title = "Poisson's problem"
const description = "First example, the Poisson's problem"
const date = '2023-01-30'
const image = '/images/Poisson.png'
const keywords = ['Tutorial', 'Academic']
const author = {
name: 'Simon Garnotel',
url: 'https://github.com/sgarnotel'
}
/**
* Post
* @returns Post
*/
const Post = () => {
return (
<PostLayout
title={title}
date={date}
image={image}
keywords={keywords}
author={author}
version={'1.2.6'}
>
<section>
<p>
Here we will solve a really simple equation, the{' '}
<strong>Poisson's equation</strong>:
<MathJax.Formula text={'\\Delta u = f'} />
Where <MathJax.Inline text={'u'} /> is our unknow function and{' '}
<MathJax.Inline text={'f'} /> is an external force
</p>
<p>
<a
href="https://en.wikipedia.org/wiki/Poisson%27s_equation"
target="_blank"
rel="noreferrer"
>
Wikipedia
</a>
</p>
</section>
<section>
<p>
We will solve our problem on a cube geometry{' '}
<MathJax.Inline
text={'[-0.16, 0.14]\\times[-0.14, 0.16]\\times[0, 0.3]'}
/>
</p>
</section>
<section>
<Typography.Title level={3}>Workspace Creation</Typography.Title>
<p>So, let's start a new workspace</p>
<Carousel
items={[
{
key: 'workspace1',
src: '/blog/1-poisson/workspace1.jpg',
alt: 'Workspace creation'
},
{
key: 'workspace2',
src: '/blog/1-poisson/workspace2.jpg',
alt: 'Workspace creation'
},
{
key: 'workspace3',
src: '/blog/1-poisson/workspace3.jpg',
alt: 'Workspace creation'
}
]}
/>
</section>
<section>
<Typography.Title level={3}>Project Creation</Typography.Title>
<p>Now, we will create the Poisson's problem project</p>
<Carousel
items={[
{
key: 'project1',
src: '/blog/1-poisson/project1.jpg',
alt: 'Project creation'
},
{
key: 'project2',
src: '/blog/1-poisson/project2.jpg',
alt: 'Project creation'
}
]}
/>
</section>
<section>
<Typography.Title level={3}>Geometry Import</Typography.Title>
<p>We can now import our geometry</p>
<p>
As we want to solve a 3D problem, we will load a STEP file:{' '}
<Typography.Text code>
<a href="/blog/1-poisson/cube.stp" download>
cube.step
</a>
</Typography.Text>
</p>
<p>
Just drag and drop a STEP file in the uploader, or directly choose a
file in your file manager
</p>
<p>
We can display some informations about the geometry: file name, unit,
number of solids (for 3D objects), number of faces, number of edges
(for 2D objects)
</p>
<Carousel
items={[
{
key: 'project2',
src: '/blog/1-poisson/project2.jpg',
alt: 'Geometry import'
},
{
key: 'geometry1',
src: '/blog/1-poisson/geometry1.jpg',
alt: 'Geometry import'
},
{
key: 'geometry2',
src: '/blog/1-poisson/geometry2.jpg',
alt: 'Geometry import'
}
]}
/>
</section>
<section>
<Typography.Title level={3}>Create Simulation</Typography.Title>
<p>
We click on "New Simulation", select Poisson's equation
and create it
</p>
<Carousel
items={[
{
key: 'simulation1',
src: '/blog/1-poisson/simulation1.jpg',
alt: 'Simulation creation'
},
{
key: 'simulation2',
src: '/blog/1-poisson/simulation2.jpg',
alt: 'Simulation creation'
}
]}
/>
</section>
<section>
<Typography.Title level={3}>
Simulation Parameterization
</Typography.Title>
<Typography.Title level={5}>Geometry</Typography.Title>
<p>In the Poisson's equation simulation menu, click on Geometry</p>
<p>
As we have only one geometry, it is automatically selected. We will
keep the mesh refinement automatic and with a normal size.
</p>
<Carousel
items={[
{
key: 'geometry',
src: '/blog/1-poisson/simulation_param_geometry.jpg',
alt: 'Simulation parametrization geometry'
}
]}
/>
<Typography.Title level={5}>Parameters</Typography.Title>
<p>Click on Parameters</p>
<p>
We will set external force <MathJax.Inline text={'f'} /> to 10
</p>
<p>
In advanced parameters, we will set finite element space to{' '}
<MathJax.Inline text={'P2'} />
</p>
<Carousel
items={[
{
key: 'parameters1',
src: '/blog/1-poisson/simulation_param_parameters1.jpg',
alt: 'Simulation parametrization parameters'
},
{
key: 'parameters2',
src: '/blog/1-poisson/simulation_param_parameters2.jpg',
alt: 'Simulation parametrization parameters'
}
]}
/>
<Typography.Title level={5}>Boundary Conditions</Typography.Title>
<p>Click on Boundary conditions</p>
<p>
We will add a Dirichlet boundary condition:
<MathJax.Formula text={'u = 1\\text{ on }\\{2\\}'} />
</p>
<Carousel
items={[
{
key: 'boundaryConditions1',
src: '/blog/1-poisson/simulation_param_boundaryconditions1.jpg',
alt: 'Simulation parametrization boundary conditions'
},
{
key: 'boundaryConditions2',
src: '/blog/1-poisson/simulation_param_boundaryconditions2.jpg',
alt: 'Simulation parametrization boundary conditions'
},
{
key: 'boundaryConditions3',
src: '/blog/1-poisson/simulation_param_boundaryconditions3.jpg',
alt: 'Simulation parametrization boundary conditions'
},
{
key: 'boudnaryConditions4',
src: '/blog/1-poisson/simulation_param_boundaryconditions4.jpg',
alt: 'Simulation parametrization boundary conditions'
}
]}
/>
<Typography.Title level={5}>Run</Typography.Title>
<p>Click on Run</p>
<p>
We will add a sensor on point{' '}
<MathJax.Inline text={'(0, 0, 0.015)'} /> to get the value of{' '}
<MathJax.Inline text={'u'} />
</p>
<p>We will choose the "Local Computing" ressource</p>
<p>
Finally, we will click on run to start the mesh process and simulation
</p>
<Carousel
items={[
{
key: 'run1',
src: '/blog/1-poisson/simulation_param_run1.jpg',
alt: 'Simulation parametrization run'
},
{
key: 'run2',
src: '/blog/1-poisson/simulation_param_run2.jpg',
alt: 'Simulation parametrization run'
},
{
key: 'run3',
src: '/blog/1-poisson/simulation_param_run3.jpg',
alt: 'Simulation parametrization run'
},
{
key: 'run4',
src: '/blog/1-poisson/simulation_param_run4.jpg',
alt: 'Simulation parametrization run'
},
{
key: 'run5',
src: '/blog/1-poisson/simulation_param_run5.jpg',
alt: 'Simulation parametrization run'
}
]}
/>
<Typography.Title level={5}>Run - Mesh visualization</Typography.Title>
<p>
We will click on the closed eye near the Mesh result to display the
mesh
</p>
<Carousel
items={[
{
key: 'mesh',
src: '/blog/1-poisson/simulation_param_run_mesh.jpg',
alt: 'Simulation parametrization run mesh'
}
]}
/>
<Typography.Title level={5}>
Run - Result visualization
</Typography.Title>
<p>
We will click on the closed eye near the <MathJax.Inline text={'u'} />{' '}
result to display the result
</p>
<p>
We can disable result mesh visualization using the switch on the right
</p>
<Carousel
items={[
{
key: 'result1',
src: '/blog/1-poisson/simulation_param_run_result1.jpg',
alt: 'Simulation parametrization run result'
},
{
key: 'result2',
src: '/blog/1-poisson/simulation_param_run_result2.jpg',
alt: 'Simulation parametrization run result'
}
]}
/>
<Typography.Title level={5}>
Run - Sensor visualization
</Typography.Title>
<p>
We can see the sensor output in the data visualization, using the
round button on the bottom right.
</p>
<p>
There is only one point because this algorithm is nor iterative, nor
in time, so there is only one matrix resolution.
</p>
<Carousel
items={[
{
key: 'sensor',
src: '/blog/1-poisson/simulation_param_run_sensor.jpg',
alt: 'Simulation parametrization run sensor'
}
]}
/>
</section>
</PostLayout>
)
}
const Poisson = {
default: Post,
key,
title,
description,
date,
image,
keywords,
author
}
export default Poisson