how to use (PDE version)

  1. Installation of PDE version
    1. Download cellcompiler zip file ( from the download page.
    2. Do the same as ODE version explained above.
  2. two modes of the PDE version
      There are two modes for generating PDE version program codes.

    1. Full Expansion mode:
      In this mode, the input cellml file has spatial derivatives in the model equation. By providing the PDE version TecML file with PDE version RelML file, the equations for all the mesh points in the geometry file are generated and corresponding program code will be generated. Since all the model equations for every mesh points are first generated, the size of the geometry is limited to around 1000 mesh points, depending on the cell model size.
    2. Template based mode:
      In this mode, the input cellml file and the PDE TecML file are same with the Full Expansion mode, but the code generation process is different. In this mode, the dependency analysis of the model equations and the boundary conditions are partly skipped, thus in some special case, the generated program code may have error.
  3. Installation
    1. Download the latest version of the CellCompiler in the Files section of the download page and then download <latest_version>.zip (latest file is CellCompiler
    2. After downloading the source code, unzip it in your local directory.
    3.  To open the project:
      In Eclipse (Eclipse Java SDK 4.2):

      1.  Go to File -> Import… -> General -> Existing Projects into Workspace
      2. In the ‘Select root directory’ field, browse in the directory where you unzipped the source code. The name of the latest version of CellCompiler project should appear under the ‘Projects’ check list.
      3. Check the box indicating the latest version and click ‘Finish’.
  4. PDE version Example usages (Version 0.4)
    To run the code generation:
    In Eclipse (Eclipse Java SDK 4.2):

    1. Go to Run -> Run Configurations…. A pop-up window will appear where you need to put the run arguments.
    2. In the ‘Name’ field of the ‘Run Configurations’ window, supply the name of the main class, which is CellCompilerMain.
    3.  In the arguments tab under the ‘Name’ field, put the run arguments for the code that you want to generate.
      A sample run argument is:
      -C RelMLPDE ./model/RelMLPDE/FHN_FTCS_Diffusion_2DV5_5x5.relml ./output fhn_ftcs_5x5
      -C = generate C code
      RelMLPDE = use the RelMLPDE parser
      ./model/… = directory of the input RelML file
      ./output = directory where you want to save the generated code (should should be created first)
      fhn_ftcs_… = file name you want to assign to the generated code
    4.  Press ‘Run’ to run the code generator and create the program code.
    5.  The generated code should appear in the output directory specified in the run arguments. For the C program generator, one source file should be created if you use explicit FDM schemes like FTCS, while two source files plus a header file should be created if you use implicit schemes like Crank-Nicolson method. The extra source and header files are for the Newton solver for implicit methods.
    6.  To run the generated code, compile it in any general-purpose compiler.
  5. files
    1. CellML
      The CellML files can be downloaded from the CellML repository in For generating codes for simulations with only ODE, CellML files from the repository can be used as is. However, you need to insert the necessary PDE part (e.g. diffusion term) in MathML format if you want to simulate in 1D, 2D or 3D. You can use tools like MathML Weaver to create the PDE term in MathML format.
    2. TecML
      The TecML files specify the PDE numerical methods. Details of the TecML format is explained in the TecML webpage. The TecML files are already included in the source code folder. These are included under ./model folder in the main project directory. For generating simulations with PDEs, the FDM numerical methods that you can use are in the ./model/TecMLPDE folder.
    3. RelML
      The main input that you need in order to generate a program code is the RelML file. This file contains the name of the biological function model and PDE numerical scheme that you want to use. Part of the RelML file for PDE looks like the following:

      <!-- FHN_FTCS_Diffusion_2D_v5.relml -->
      <!-- Finite Difference solution in 2D for the FitzHugh-Nagumo model -->
      <!-- with diffusion PDE and Forward-Time Central Space Scheme (FTCS) -->
        <cellml name="cellml0" filename="model/CellML/fhn_diffusion_2D.cellml"/>
        <tecml name="tecml0" filename="model/TecMLPDE/FTCS_Diffusion_2D_v5.tecml" />
        <tecmlvariable name="t">
          <correspondcellml file="cellml0" component="Main" name="time" init="0"/>
        <tecmlvariable name="x1">
          <correspondcellml file="cellml0" component="Main" name="x1" />
        . . .

      The name of the CellML file and its directory is supplied in the ‘name’ attribute of the <cellml> element and the name and directory of the FDM numerical solution method is in the ‘name’ attribute of the <tecml> element. The variables in the CellML model are then sorted according to the different variables types indicated in the TecML file. In the example above, the ‘time’ variable in the ‘Main’ component of the FHN cellml file is sorted into the TecML variable ‘t’. The listing and sorting of the variables in the RelML file is time-consuming and prone to errors if done manually, thus, we are creating a RelML file creator GUI to partially automate this step. The RelML generator should come together with the next version of CellCompiler.

Comments are closed.