<< Click to Display Table of Contents >> Defining Material Parameters |
Much of the complexity of real problems comes in the fact that the coefficients that enter into the partial differential equation system take on different values in the various materials of which a structure is composed.
This is handled in FlexPDE by two facilities. First, the material parameters are given names and default values in the DEFINITIONS section. Second, the material parameters are given regional values within the domain REGIONS.
So far, it has been of little consequence whether our test problem was heat flow or electrostatics or something else entirely. However, for concreteness in what follows, let us assume it is a heat equation, describing an insulator imbedded in a conductor between to heat reservoirs. We will give the circular insulator a conductivity of 0.001 and the surrounding conductor a conductivity of 1.
First, we define the name of the constant and give it a default value in the definitions section:
DEFINITIONS
k = 1
This default value will be used as the value of "k" in every REGION of the problem, unless specifically redefined in a region.
Now we introduce the constant into the equation:
EQUATIONS
Div(-k*grad(phi)) = 0
Then we specify the regional value in region 2:
...
REGION 2 'blob' { the embedded blob }
k = 0.001
START(1/2,0)
ARC(CENTER=0,0) ANGLE=360
We could also define the parameter k=1 for the conductor in REGION 1, if it seemed useful for clarity.
See also MATERIALS section.