torus_OBJimport

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > CAD_Import >

torus_OBJimport

Previous pageReturn to chapter overviewNext page

{ TORUS_OBJIMPORT.PDE

 

 This sample demonstrates the import of a bounding mesh in OBJ file format.

 It uses the MATERIALS and BOUNDARY CONDITIONS sections to tie names stated

 in the OBJ file to FlexPDE properties.

 

 The OBJ file contains :

   one object named 'torus' that will be bound to a material property set.

   two groups named 'patch1' and 'patch2' that will be bound to BC sets.

}

title 'Import OBJ Torus'

 

coordinates cartesian3

 

select regrid=off

 

variables u

 

boundary conditions

'patch1' : value(u) = 1

'patch2' : value(u) = 10

 

materials 'torus' : k=1

 

equations u: div(k*grad(u))=0

 

boundaries import OBJ 'torus.obj'

 

plots

grid(x,y,z)

grid(x,z) on y = 0

contour(u) on x = -y

contour(u) on z = 0

 

end