lecture of freefem++ › ~summerschool2018 › no1_lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t);...
TRANSCRIPT
![Page 1: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/1.jpg)
Lecture of FreeFEM++
Update:2017/11/30
![Page 2: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/2.jpg)
![Page 3: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/3.jpg)
Running Sample files
サンプルファイルの実行
Laplace.edp
diffusion.edp
convection.edp
tunnel.edp
LapComplexEigenValue.edp
Mesh_square.edp
Mesh_circle.edp
Mesh_circle_in_square.edp
![Page 4: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/4.jpg)
Mesh generation (Mesh_square.edp)メッシュ生成border a0(t=1,0){ x=0; y=t; label=1;}
border a1(t=0,1){ x=t; y=0; label=2;}
border a2(t=0,1){ x=1; y=t; label=3;}
border a3(t=1,0){ x=t; y=1; label=4;}
int n=5;
Mesh Th
=buildmesh( a0(10*n)+a1(10*n)+a2(10*n)+a3(10*n));
![Page 5: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/5.jpg)
Mesh generation (Mesh_square.edp)メッシュ生成border a0(t=1,0){ x=0; y=t; label=1;}
border a1(t=0,1){ x=t; y=0; label=2;}
border a2(t=0,1){ x=1; y=t; label=3;}
border a3(t=1,0){ x=t; y=1; label=4;}
int n=5;
Mesh Th
=buildmesh( a0(10*n)+a1(10*n)+a2(10*n)+a3(10*n));
![Page 6: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/6.jpg)
border a0(t=1,0){ x=0; y=t; label=1;}
Command for definitions of borders
境界を定義する際のコマンド
![Page 7: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/7.jpg)
border a0(t=1,0){ x=0; y=t; label=1;}
The name of borders, and you can use any words
任意に決めることが可能な境界の名前
![Page 8: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/8.jpg)
border a0(t=1,0){ x=0; y=t; label=1;}
A parameter range from 1 to 0, you can use any numbers.
任意に決めることが可能な1から0に変化するパラメーター
![Page 9: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/9.jpg)
border a0(t=1,0){ x=0; y=t; label=1;}
positions of borders
境界の位置座標
x
y
o
(0,0)
(0,1)
![Page 10: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/10.jpg)
border a0(t=0,1){ x=0; y=t; label=1;}
x
y
o
(0,0)
(0,1)
positions of borders
境界の位置座標
![Page 11: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/11.jpg)
x
y
border a0(t=1,0){ x=0; y=t; label=1;}
(0,0) (1,0)
(1,1)(0,1)
border a1(t=0,1){ x=t; y=0; label=2;}
border a2(t=0,1){ x=1; y=t; label=3;}
border a3(t=1,0){ x=t; y=1; label=4;}
![Page 12: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/12.jpg)
x
y
border a0(t=1,0){ x=0; y=t; label=1;}
(0,0) (1,0)
(1,1)(0,1)
border a1(t=0,1){ x=t; y=0; label=2;}
border a2(t=0,1){ x=1; y=t; label=3;}
border a3(t=1,0){ x=t; y=1; label=4;}
Notations: All the borders should be defined in the anti-clockwise direction.
注意:全ての境界は反時計回りに定義する必要がある.
![Page 13: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/13.jpg)
Mesh generation (Mesh_square.edp)メッシュ生成border a0(t=1,0){ x=0; y=t; label=1;}
border a1(t=0,1){ x=t; y=0; label=2;}
border a2(t=0,1){ x=1; y=t; label=3;}
border a3(t=1,0){ x=t; y=1; label=4;}
int n=5;
Mesh Th
=buildmesh( a0(10*n)+a1(10*n)+a2(10*n)+a3(10*n));
![Page 14: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/14.jpg)
Mesh Th=buildmesh( a0(10*n)+a1(10*n)+a2(10*n)+a3(10*n));
Command for definitions of meshes
メッシュを定義する際のコマンド
![Page 15: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/15.jpg)
Mesh Th=buildmesh( a0(10*n)+a1(10*n)+a2(10*n)+a3(10*n));
The name of meshes. You can use any words.
任意に決めることが可能なメッシュの名前
![Page 16: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/16.jpg)
Mesh Th=buildmesh( a0(10*n)+a1(10*n)+a2(10*n)+a3(10*n));
Fineness of meshes should be defined by integer numbers.メッシュの細かさ・粗さは整数で定義する必要がある.
![Page 17: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/17.jpg)
Mesh generation (Mesh_square.edp)メッシュ生成border a0(t=1,0){ x=0; y=t; label=1;}
border a1(t=0,1){ x=t; y=0; label=2;}
border a2(t=0,1){ x=1; y=t; label=3;}
border a3(t=1,0){ x=t; y=1; label=4;}
int n=5;
Mesh Th
=buildmesh( a0(10*n)+a1(10*n)+a2(10*n)+a3(10*n));
Definitions of boundaries境界の定義
Mesh Generating メッシュ生成
![Page 18: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/18.jpg)
To define inside boundary (Mesh_circle_in_square.edp)領域内に境界がある場合
border a0(t=1,0){ x=0; y=t; label=1;}
border a1(t=0,1){ x=t; y=0; label=2;}
border a2(t=0,1){ x=1; y=t; label=3;}
border a3(t=1,0){ x=t; y=1; label=4;}
border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;}
int n=5;
mesh Th= buildmesh( a0(10*n)+a1(10*n)+a2(10*n)+a3(10*n)+a4(10*n));
![Page 19: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/19.jpg)
x
y
border a0(t=1,0){ x=0; y=t; label=1;}
(0,0) (1,0)
(1,1)(0,1)
border a1(t=0,1){ x=t; y=0; label=2;}
border a2(t=0,1){ x=1; y=t; label=3;}
border a3(t=1,0){ x=t; y=1; label=4;}
Notations: borders should be defined in the anti-clockwise direction.
注意:境界は反時計回りに定義する必要がある.
![Page 20: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/20.jpg)
x
y
(0,0) (1,0)
(1,1)(0,1)
border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;}
Notations: definitions of inside borders should be defined in the clockwise direction.
注意:領域内の境界は時計回りに定義する必要がある.
![Page 21: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/21.jpg)
Problem1
o
10
5
5
2.5
1
x
y
![Page 22: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/22.jpg)
Problem2
o 1
1
-1
-1 2
1
x
y
![Page 23: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/23.jpg)
Special Problem
1. Plot the mesh of “aerofoil.edp”“aerofoil.edp”のメッシュを生成せよ
2. Change Angle of Attack using ??回転行列を使って迎え角を変化させよ
![Page 24: Lecture of FreeFEM++ › ~summerschool2018 › No1_Lecture...border a4(t=0,-2*pi){ x=0.5+0.1*cos(t); y=0.5+0.1*sin(t); label=1;} Notations: definitions of inside borders should be](https://reader034.vdocuments.site/reader034/viewer/2022042311/5ed909be6714ca7f476907cd/html5/thumbnails/24.jpg)
o
1
𝐽𝑎𝑐𝑜𝑏𝑖𝑎𝑛: 𝐽
𝑿 = 𝐽𝒙
𝑿: Position Vector in a domain circulated by 𝐽𝒙: Position Vectorin an initial domain