3D_Meshin

Top  Previous  Next

3d_meshin02

{

This example shows the use of the TRANSFERMESH command to import a

3D Mesh.  The mesh file is created by running 3d_Meshout.pde.

 

Note that the domain structure must exactly match that of the exporting problem.

Periodicity condtions must also be the same, except that periodic and antiperiodic

may be exchanged.

 

(The framework of this problem is 3d_Antiperiodic.pde.)

}

 

title '3D MESH IMPORT  TEST'

 

coordinates cartesian3

 

Variables

    u

 

definitions

    k = 1

    an = pi/4          { this is the angular size of the repeated segment }

    crot = cos(an)     { the sine and cosine needed in the transformation }

    srot = sin(an)

    H = 0

    xc = 1.5

    yc = 0.2

    rc = 0.1

 

    transfermesh("mesh3.xfr")                ! << read the mesh file

 

equations

    div(K*grad(u)) + H = 0

 

extrusion z=0,0.4,0.6,1

 

boundaries

    Region 1

 

      start(1,0) line to (2,0)

 

      value(u) = 0  arc(center=0,0) to (2*crot,2*srot)

 

      antiperiodic(x*crot+y*srot, -x*srot+y*crot)

      line to (crot,srot)

 

!       value(u)=1

      natural(u)=x-2.4*y                ! BC changed from exporting problem

      arc(center= 0,0)  to close

 

    Limited Region 2

       layer 2 H = 1

       start(xc-rc,0) line to (xc+rc,0) to (xc+rc,rc) to (xc-rc,rc) to close

 

    Limited Region 3

       layer 2 H = -1

       start((xc-rc)*crot,(xc-rc)*srot)

       line to ((xc+rc)*crot,(xc+rc)*srot)

               to ((xc+rc)*crot+rc*srot,(xc+rc)*srot-rc*crot)

               to ((xc-rc)*crot+rc*srot,(xc-rc)*srot-rc*crot) to close

 

plots

    contour(u) on z=0.5 paint

    grid(x,y,z)

 

end