<< Click to Display Table of Contents >> regional_equations |
{ REGIONAL_EQUATIONS.PDE
This sample shows how to apply different equations in different regions.
In this sample, the equations are essentially the same and the differing
conductivities could be dealt with by regionally defined parameters, but
this methodology can be used to apply different equations in the regions.
FlexPDE will assume flux continuity at the material boundary.
Care should be taken that this is correct for the application.
}
Title 'Regional Equations'
Variables Temp
Definitions
A = 0
B = 0
kA = 1
kB = 10
eqnA = div(kA*grad(Temp))
eqnB = div(kB*grad(Temp))
Equations
Temp: A*eqnA + B*eqnB = 0
Boundaries
Region 'A'
A = 1
start(0,0) line to (1,0) to (1,1) to (0,1)
value(Temp) = 100
line to close
Region 'B'
B = 1
start(2,0) line to (1,0) to (1,1) to (2,1)
value(Temp) = 0
line to close
Plots
Contour(Temp) painted
End