Skip to content

XML Input Scheme Explanations

This is just a summary of the most important and common xml commands and structure, for a more detailled explanation, visit the PDE specific descriptions, look at the provided examples or use the documentation of the xml scheme itself, e.g. via oxygen or eclipse

XML Schema

The structure of the openCFS input (and material file) is defined in an XML scheme. It is available direclty in the source code at share/xml as CFS-Simulation/CFS.xsd for the simulation, and CFS-Material/CFS_Material.xsd for the material data base, respectively.

In order to use the auto-complete and validation features of XML editors they need to know the scheme. This is acomplished by adding the attribute xsi:schemaLocation=" ...some location..." to the header tag <cfsSimulation ...>. Note that defining the attriute is optional for cfs simulation runs.

The location can be:

  • any local file path: as file:/path/to/CFS-Simulation/CFS.xsd
  • an online location: as http://... or https://...

You can find the XML schema in several locations:

e.g. to use the latest XML scheme from the master branch use

<cfsSimulation xmlns="" xmlns:xsi="" xsi:schemaLocation="">

The XML scheme is subject to changes, e.g. for new features. Make sure the XML scheme you use to create your input corresponds the the cersion od CFS you are running in order to avoid errors.

Skeleton of an openCFS xml input file

The underlying structure of our xml files is defined via a so-called xml-scheme. The path to this scheme is defined in the header of every xml file and per default it points to our default public scheme, provided on our gitlab server:

<?xml version="1.0"?>
<cfsSimulation xmlns="" 

In general, an OpenCFS xml file consists of three main parts:

  • fileFormats: definition of input-/output- and material-files
  • domain: region definitions (assign material to different regions)
  • sequenceStep: contains the definition of the analysis type and the PDE. Several sequenceSteps can be concatenated and results from previous sequenceSteps can be processed in order to produce the desired result.
<!-- define which files are needed for simulation input & output-->
        <!-- read mesh -->
        <!-- define output -->
    <materialData file="../material/mat.xml" format="xml"/>

<domain geometryType="3d">
        <!-- region definition -->

<sequenceStep index="1">
        <!-- analysis type: static, transient, harmonic, multiharmonic, eigenfrequency -->
        <!--for example consider the electric conduction PDE-->
                <!--define on which regions the PDE is solved-->
                <!--define appropriate BC's-->
                <!--define the results to be stored-->

Detailed Description

In the following the most important, PDE-independent, tags are described. For a more detailled explanation, visit the PDE specific descriptions, look at the provided examples or use the documentation of the xml scheme itself, e.g. via oxygen or eclipse

fileFormats Section

  • <input> (mandatory) defines which files are read as input (either data and/or mesh)
  • Different inputs are possible gmsh, cdb, ensight, hdf5. Several more are available in the xml scheme but they are not maintained
  • When reading more than one file, unique id's have to be provided
  • scaleFac= (optional) scales the provided mesh with a prescribed factor, e.g. conversion from mm to m
  • <scatteredData> (optional) can read some pointwise data, for example from a csv file
  • <output> (mandatory) defines the output format, most of the time you want to export the results in h5 format, sometimes also in text format, e.g. global integrated quantities
  • <materialData> (mandatory) defines the location of the material file
      <gmsh fileName="../meshes/model_indwat.msh2" id="i1" scaleFac="1e-3"/>
      <gmsh fileName="../meshes/model_air.msh2" id="i2"/>
      <gmsh fileName="../meshes/model_sheet.msh2" id="i4"/>
        <csv fileName="testinput.csv" id="inCSV">
                <comp dof="x" col="1"/>
                <comp dof="y" col="2"/>
                <comp dof="z" col="3"/>
            <quantity name="heatSourceDensity" id="hsd1">
                <comp dof="x" col="0"/>
      <text id="txt"/>
   <materialData file="../material/mat.xml" format="xml"/>

domain Section

  • <regionList> (mandatory) define the material of every region in the mesh file(s)
  <domain geometryType="plane">
      <region material="air" name="region_1"/>
      <region material="iron" name="region_2"/>
      <region material="air" name="region_3"/>