﻿ Sample Problems > Usage > 3D_domains > 3d_pipes

# 3d_pipes

Navigation:  Sample Problems > Usage > 3D_domains >

# 3d_pipes

{ 3D_PIPES.PDE

This problem constructs a lattice of interconnected pipes.

It is the geometric construction only, there are no variables or equations.

LIMITED regions are used to remove parts of the extruded shape.

Click "Controls->Domain Review" to watch the mesh construction process.

}

TITLE '3D_PIPES'

COORDINATES cartesian3

DEFINITIONS

box = 10                 ! size of pipe 'box'

pipe = 6                   ! length of in/out pipes

ars = rads*sin(pi/4) ! intersection point for horizontal and vertical bars

! horizontal pipe surface functions

leftbar = cylinder ((-box,0,0), (-box,1,0), rad)

rightbar = cylinder ((box,0,0), (box,1,0), rad)

frontbar = cylinder ((0,-box,0), (1,-box,0), rad)

backbar = cylinder ((0,box,0), (1,box,0), rad)

pipebar = cylinder ((0,0,0), (1,0,0), rad)

! default extrusion surface definitions - some will be regionally redefined

zb1 = -box

zb2 = box

EXTRUSION

SURFACE 'Bottom of Bottom Pipe' z = z1

LAYER 'botbar'

SURFACE 'Top of Bottom Pipe' z = z2

LAYER 'middle'

SURFACE 'Bottom of Top Pipe' z = z3

LAYER 'topbar'

SURFACE 'Top of Top Pipe' z = z4

BOUNDARIES

REGION 'leftbars'

z1 = zb1 - leftbar

z2 = zb1 + leftbar

z3 = zb2 - leftbar

z4 = zb2 + leftbar

layer 'middle' void

TO CLOSE

LIMITED REGION 'leftcornerbars'

z2 = zb1 + leftbar

z3 = zb2 - leftbar

layer 'middle'

START (-box-ars,box+ars)

ARC (center = -box,box) angle 180

LINE TO CLOSE

START (-box-ars,-box-ars)

ARC (center = -box,-box) angle = -180

LINE TO CLOSE

REGION 'rightbars'

z1 = zb1 - rightbar

z2 = zb1 + rightbar

z3 = zb2 - rightbar

z4 = zb2 + rightbar

layer 'middle' void

TO CLOSE

LIMITED REGION 'rightcornerbars'

z2 = zb1 + rightbar

z3 = zb2 - rightbar

layer 'middle'

START (box+ars,box+ars)

ARC (center = box,box) angle -180

LINE TO CLOSE

START (box+ars,-box-ars)

ARC (center = box,-box) angle = 180

LINE TO CLOSE

REGION 'frontbars'

z1 = zb1 - frontbar

z2 = zb1 + frontbar

z3 = zb2 - frontbar

z4 = zb2 + frontbar

layer 'middle' void

TO CLOSE

LIMITED REGION 'frontcornerbars'

z2 = zb1 + frontbar

z3 = zb2 - frontbar

layer 'middle'

START (-box-ars,-box-ars)

ARC (center = -box,-box) angle = 180

LINE TO CLOSE

START (box+ars,-box-ars)

ARC (center = box,-box) angle = -180

LINE TO CLOSE

REGION 'backbars'

z1 = zb1 - backbar

z2 = zb1 + backbar

z3 = zb2 - backbar

z4 = zb2 + backbar

layer 'middle' void

TO CLOSE

LIMITED REGION 'backcornerbars'

z2 = zb1 + backbar

z3 = zb2 - backbar

layer 'middle'

START (-box-ars,box+ars)

ARC (center = -box,box) angle = -180

LINE TO CLOSE

START (box+ars,box+ars)

ARC (center = box,box) angle = 180

LINE TO CLOSE

REGION 'inlet'

z1 = zb1 - pipebar

z2 = zb1 + pipebar

z3 = zb2 - pipebar

z4 = zb2 + pipebar

layer 'middle' void

LINE TO CLOSE

REGION 'outlet'

z1 = zb1 - pipebar

z2 = zb1 + pipebar

z3 = zb2 - pipebar

z4 = zb2 + pipebar

layer 'middle' void

LINE TO CLOSE

PLOTS

!grid (x,y,z) paintmaterials

glgrid (x,y,z) paintregions

glcontour(x+y+z)

END