globalmax

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Functions >

globalmax

Previous pageReturn to chapter overviewNext page

{ GLOBALMAX.PDE

 

 This sample demonstrates the use of the GLOBALMAX function and its variants in 2D.

 It is a copy of the example THERMAL_CONTACT_RESISTANCE.PDE.

}

 

title "Thermal Contact Resistance"

 

variables

   Temp

 

definitions

   K                           { thermal conductivity - values given in regions }

   Heat                       { Heat source }

   Flux = -K*grad(Temp)

   Rc = 1/2         { contact resistance }

 

initial values

   Temp = 0

 

equations

   Temp: div(Flux) = Heat

 

boundaries

  Region 1   "Outer"       { the outer boundary }

       K=5

       Heat=0

      start "Outer" (0,0)

      value(Temp)=0           { cold boundary }

      line to (3,0) to (3,3) to (0,3) to close

 

  Region 2   "Inner"       { an imbedded diamond }

       K=1

       Heat=1       { heat source in the inner diamond }

      start "Inner" (1.5,0.5)

      contact(Temp) = -JUMP(Temp)/Rc { the contact flux }

      line to (2.5,1.5) to (1.5,2.5) to (0.5,1.5) to close

 

monitors

  contour(Temp)

 

plots

  grid(x,y)

  contour(Temp) as "Temperature"

  contour(magnitude(grad(temp))) points=5 as "Flux"

  contour(Temp) zoom(2,1,1,1) as "Temperature Zoom"

  elevation(Temp) from (0,0) to (3,3)

  surface(Temp)

  surface(Temp) zoom(2,1,1,1)

  vector(-dx(Temp),-dy(Temp)) as "Heat Flow"

  elevation(normal(flux)) on "Outer"

  elevation(normal(flux)) on "Inner"

 

summary

report(globalmax(Temp),globalmax_x(Temp),globalmax_y(Temp)) as "Global Maximum"

report(" ")

report(globalmax(Temp,"Inner"),globalmax_x(Temp,"Inner"),globalmax_y(Temp,"Inner")) as "Inner Maximum"

report(globalmax(Temp,"Outer"),globalmax_x(Temp,"Outer"),globalmax_y(Temp,"Outer")) as "Outer Maximum"

report(" ")

report(globalmax(Temp,1),globalmax_x(Temp,1),globalmax_y(Temp,1)) as "Region 1 Maximum"

report(globalmax(Temp,2),globalmax_x(Temp,2),globalmax_y(Temp,2)) as "Region 2 Maximum"

 

end