PeterQ
(Peter Q)
1
Hello guys.I am trying to solve a pde on a sphere3.
And now I want to describe the surface of a sphere3.
Here are some parts of the code.
solve lame([u1, u2, u3], [v1, v2, v3])
= int3d(Th3)(
lambda * div(u1, u2, u3) * div(v1, v2, v3)
+ 2.*mu * epsilon(u1, u2, u3)' * epsilon(v1, v2, v3)
)
- int3d(Th3)(omega*omega*(u1*v1+u2*v2+u3*v3))
+ on(_________, u1=0, u2=0, u3=0)
;
Th3 is the sphere I constructed,then the underscore part should fill in the surface of that sphere,but I do not know how to describe it .
They are some exemple to build a mesh of a sphere
PeterQ
(Peter Q)
3
thank you for replying me and maybe I didn’t make it clear enough.
Actually I’ve built a sphere3.
// sphere3
real R = 1;
mesh Th=square(10,20,[x*pi-pi/2,2*y*pi]);
// a parametrization of a sphere
func f1 =cos(x)*cos(y);
func f2 =cos(x)*sin(y);
func f3 = sin(x);
func f1x=sin(x)*cos(y);
func f1y=-cos(x)*sin(y);
func f2x=-sin(x)*sin(y);
func f2y=cos(x)*cos(y);
func f3x=cos(x);
func f3y=0;
// $ M = DF^t DF $
func m11=f1x^2+f2x^2+f3x^2;
func m21=f1x*f1y+f2x*f2y+f3x*f3y;
func m22=f1y^2+f2y^2+f3y^2;
func perio=[[4,y],[2,y],[1,x],[3,x]];
real hh=0.05;
real vv= 1/square(hh);
verbosity=2;
Th=adaptmesh(Th,m11*vv,m21*vv,m22*vv,IsMetric=1,periodic=perio);
Th=adaptmesh(Th,m11*vv,m21*vv,m22*vv,IsMetric=1,periodic=perio);
verbosity=2;
real[int] domain =[0.,0.,0.,1,0.01];
mesh3 Th3=tetgtransfo(Th,transfo=[R*f1,R*f2,R*f3],nbofregions=1,regionlist=domain);
Th3=buildBdMesh(Th3);
Th3 is the omega and now how can I describe the sphere surface with the above code ,namely
Just use the meshS Thb of my script or the meshS Th of your script