off_axis_disks_2

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > 3D_domains >

off_axis_disks_2

Previous pageReturn to chapter overviewNext page

{ OFF_AXIS_DISKS_2.PDE

 This example demonstrates how to declare REGIONS properly in a 3D

 extrusion model when the desired device has overlapping components.

}

Coordinates cartesian3

 

Definitions

! material data

 rho

 

! Circle data, C1 and C2

 r1 = 5

 r2 = 4.5

 x1 = 0    y1 = 0

 x2 = 1    y2 = 1

 

{ INTERSECTION OF TWO CIRCLES, A and B :

  d = sqrt((xB-xA)^2+(yB-yA)^2)

  K = (1/4)sqrt(((rA+rB)^2-d^2)(d^2-(rA-rB)^2))

  x = (1/2)(xB+xA) + (1/2)(xB-xA)(rA^2-rB^2)/d^2 ± 2(yB-yA)K/d^2

  y = (1/2)(yB+yA) + (1/2)(yB-yA)(rA^2-rB^2)/d^2 ± -2(xB-xA)K/d^2

 }

! intersection between C1 and C2

 d12 = sqrt((x2-x1)^2 + (y2-y1)^2)

 k12 = sqrt(((r1+r2)^2-d12^2)*(d12^2-(r1-r2)^2))/4

 x12a = (x2+x1)/2 + (x2-x1)*(r1^2-r2^2)/2/d12^2 + 2*(y2-y1)*K12/d12^2

 x12b = (x2+x1)/2 + (x2-x1)*(r1^2-r2^2)/2/d12^2 - 2*(y2-y1)*K12/d12^2

 y12a = (y2+y1)/2 + (y2-y1)*(r1^2-r2^2)/2/d12^2 - 2*(x2-x1)*K12/d12^2

 y12b = (y2+y1)/2 + (y2-y1)*(r1^2-r2^2)/2/d12^2 + 2*(x2-x1)*K12/d12^2

 

Extrusion z = 0,1,2

 

Boundaries

{ definine the regions based on XY projection }

limited region 'C1 only'

layer 1 rho = 1

  start(x12a,y12a)

  arc(center=x1,y1) to (x1,y1-r1) to (x12b,y12b)

  arc(center=x2,y2) to (x2,y2-r2) to close

 

region "C1+C2 overlap"

layer 1 rho = 1

layer 2 rho = 2

  start(x12a,y12a)

  arc(center=x2,y2) to (x2,y2-r2) to (x12b,y12b)

  arc(center=x1,y1) to (x1,y1+r1) to close

   

limited region 'C2 only'

layer 2 rho = 2

  start(x12a,y12a)

  arc(center=x2,y2) to (x2,y2+r2) to (x12b,y12b)

  arc(center=x1,y1) to (x1,y1+r1) to close

 

Plots

grid(x,y,z) as "Full device by material" paintmaterials viewpoint(20,-20,10)

grid(x,y,z) as "Full device by region" paintregions viewpoint(20,-20,10)

 

grid(x,y,z) on layer 1 as "Solenoid 1 by material" paintmaterials

grid(x,y,z) on layer 1 as "Solenoid 1 by region" paintregions

 

grid(x,y,z) on layer 2 as "Solenoid 2 by material" paintmaterials

grid(x,y,z) on layer 2 as "Solenoid 2 by region" paintregions

 

End