cube2_validate

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > CAD_Import >

cube2_validate

Previous pageReturn to chapter overviewNext page

{ CUBE2_VALIDATE.PDE

 

 This sample validates the OBJ import script IMPORT_OBJ_CUBE2.PDE

 by showing that the same answer is obtained when constructing the

 domain within FlexPDE instead of importing the OBJ mesh.

}

title 'Validate Import OBJ Cube2'

 

coordinates cartesian3

 

variables u

 

select ngrid = 2

 

materials

'cube1' : k = 1

'cube2' : k = 5

 

boundary conditions

'left' : value(u) = 1

'right': value(u) = 10

 

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

 

extrusion z = 0,1

 

boundaries

 

region 1

use material 'cube1'

start(0,0)

line to (1,0) to (1,1) to (0,1) use bc 'left'

line to close

 

region 2

use material 'cube2'

start(2,1)

line to (1,1) to (1,0) to (2,0) use bc 'right'

line to close

 

plots

grid(x,y,z)

grid(x,y) on z = 0.5

contour(u) on z = 0.5

elevation(u) from (0,0.5,0.5) to (2,0.5,0.5)

 

end