📄 convect_dervieux.edp
字号:
load "mat_dervieux"; // external module in C++ must be loadedborder a(t=0, 2*pi){ x = cos(t); y = sin(t); }mesh th = buildmesh(a(100));fespace Vh(th,P1);Vh vh,vold,u1 = y, u2 = -x;Vh v = exp(-10*((x-0.3)^2 +(y-0.3)^2)), vWall=0, rhs =0;real dt = 0.025;// qf1pTlump means mass lumping is usedproblem FVM(v,vh) = int2d(th,qft=qf1pTlump)(v*vh/dt) - int2d(th,qft=qf1pTlump)(vold*vh/dt) + int1d(th,a)(((u1*N.x+u2*N.y)<0)*(u1*N.x+u2*N.y)*vWall*vh)+ rhs[] ;matrix A;MatUpWind1(A,th,vold,[u1,u2]);for ( int t=0; t< 2*pi ; t+=dt){ vold=v; rhs[] = A * vold[] ; FVM; plot(v,wait=0);};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -