﻿ Sample Problems > Usage > Import_Export > 3d_mesh_export

3d_mesh_export

Navigation:  Sample Problems > Usage > Import_Export >

3d_mesh_export   { 3D_MESH_EXPORT.PDE

This example shows the use of the TRANSFER command to export problem data

and mesh structure in 3D problems.

The accompanying test 3D_MESH_IMPORT.PDE reads the transfer file produced here.

(The framework of the problem is a version of 3D_ANTIPERIODIC.PDE.)

}

title '3D MESH TRANSFER 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

equations

U: 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)=0

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)

transfer(u) file="mesh3u.xfr" ! Export mesh and data

transfer()   file="mesh3.xfr" ! Export mesh only

end