Directory structure

From Figure 2(a), the left panel of Figure 2, we see that the openfuelcell/ directory has two main subdirectories, run/ and src/. The run/ directory contains examples of cases that can be simulated with the model, while the src/ directory contains the model source code.

openfuelcell/run/
The run directory contains case directories, or cases. The cases coFlow, counterFlow, and crossFlow exercise the model on co-flow, counter-flow, and cross-flow configurations, respectively. The case quickTest is similar to the coFlow case, but reduced from twelve to three channels.  The case quickTestStack is similar to quickTest but for a stack of three cells with external fuel and air manifolds. In each configuration, the fuel velocity is in the +x direction, while the air velocity is in the direction of +x, -x, and +y for co-flow, counter-flow and cross-flow, respectively.

openfuelcell/src/
The src/ directory contains the major subdirectories libSrc/ and appSrc/. In libSrc/, we find C++ classes that have been specifically developed or modified for sofcFoam and are used in the sofcFoam model. The appSrc/ directory contains the sofcFoam model source files, which instantiate objects from both libSrc/ and OpenFoam/src as needed, to implement the sofcFoam algorithm. As is typical for OpenFoam applications, the sofcFoam application is built by including blocks of code (*.H files) into a main program (*.C file).

 

Figure 2
run/
    coFlow/
        0/
            air/
            fuel/
        system/
            air/
            electrolyte/
            fuel/
            interconnect0/
            interconnect1/
        config/
        constant/
            polyMesh/
            air/
            electrolyte/
            fuel/
            interconnect0/
            interconnect1/
    counterFlow/
        <...like coFlow...>
    crossFlow/
        <...like coFlow...>
    quickTest/
        <...like coFlow...>
src/
    appSrc/
        Make/
    libSrc/
        continuityErrs/
        diffusivityModels/
            diffusivityModel/
            binaryFSG
            fixedDiffusivity/
            fsgDiffusionVolumes/
            fsgMolecularWeights/
            knudsen/
            porousFSG/
        Make/
        MeshWave/
        polyToddYoung/
        regionProperties/
        smearPatchToMesh/
        sofcSpecie/
0/
k
T
air/
p
U
YN2
YO2
fuel/
p
U
YH2
YH2O
Allclean
config/
make.faceAir
make.faceFuel
make.faceSet
make.setAir
make.setFuel
make.setSet
constant/
cellProperties
rxnProerties
air/
airProperties
porousZones
sofcSpeciesProperties
electrolyte/
electrolyteProperties
fuel/
fuelProperties
porousZones
sofcSpeciesProperties
interconnect0/
interconnectProperties
interconnect1/
interconnectProperties
polyMesh/
blockMeshDict
Makefile
runscript
system/
controlDict.mesh
controlDict.run
controlDict
fvSchemes
fvSolution
decomposeParDict
createPatchDict
air/
fvSchemes
fvSolution
fuel/
fvSchemes
fvSolution
electrolyte/
fvSchemes
fvSolution
interconnect0/
fvSchemes
fvSolution
interconnect1/
fvSchemes
fvSolution

(a)
Directory structure from git check out.

(b)
Files in a case directory after checkout
and before meshing


Like any other OpenFoam case directory, the four cases here contain major subdirectories 0/, constant/, and system/.  With only a single mesh, these 0/, constant/ and system/ directories would be populated by files only, but with multiple meshes they have a subdirectory for each region, and the files for each domain are placed in the appropriate directory or subdirectory. Thus initial global temperature T is found in 0/T, initial air velocity U in 0/air/U, initial fuel pressure p in 0/fuel/p, etc. Similarly, global cell properties are found in constant/cellProperties, whereas air properties are found in constant/air/airProperties. See Figure 2(b) for more complete listings.