TecML PDE

  • V1.0
    1. overview
      Different from the ODE TecML, PDE TecML can only describe single step discretization schemes. Consider you have a set of partial differential equation as follows.
      dv/dt = a d^2v/dx^2;
      In the FTCS (forward in time center in space) scheme of one dimensional case, we discretize above equation as follows.
      dv/dt -> (v(n+1, x) – v(n, x)) / dt
      d^2v/dx^2 -> (v(n, x+1) + v(n, x-1) – 2 v(n, x))/(dx)^2
      We also have to add indices to each variable as follows.
      v -> v(n, x)
      Another important information to discretize PDE’s is boundary condition.
    2. format
      A TecML PDE file has three components: 1) variable definition part, 2) boundary condition and 3) differential term discretization equations.

      <tecml>
      	<!-- variable definition        -->
      	<variable name="x" type="recurvar"/>
      	...
      	<!--     equations       -->
      	<math>
      	    <!--     boundary condition equations       -->
                  <apply type = "boundary-cond" boundary-id = "1" location = "left">    
                    ... 
                  </apply> 
      	    <!--     differential term equations       -->
                  <apply>
                    <eq/>
                    <apply>
                      <partialdiff/>
                      <bvar>
                       <ci>x</ci>
                      </bvar>
                      <ci> v </ci>
                    </apply>    
                    ... 
                  </apply>
                  ... 
              </math> 
      </tecml>
    3.          description of each part
      1. variable definition part
        One TecML variable correspond to one or more variables of a model file. Thus a TecML variable can be considered as a vector variable, however, in a TecML file, variables are denoted as scalar variables. In the variable definition part, every variable appears in the equation part are defined by “variable” tag with their “name” and “type” attributes. “name” attribute defines the variable name which must be unique in the file. “type” attribute defines the variable type where one of the following five types is specified for each variable.

        type meanings
        recurvar variables whose values are calculated by recurrence relation equations
        arithvar temporal variables (which can be mathematically eliminated)
        constvar constants
        stepvar variables for time step
      2. equation part
        • First, for all the terms which represent temporal or spatial differentials, original continuous and the corresponding discretized equations are defined.
        • Next, the variables are described with corresponding discretized form. Usually, this part describes how the indices are supplied to each variable..
        • All the equations are provided by MathML format.
    4. XMLschema
    5. examples
      Many PDE calculation schemes are provided as TecML PDE files.

      1. FTCS forward time center space
      2. BTCS
      3. Crank-Nicolson
    6. Notes

Comments are closed.