nasa / cape

Computational Aerosciences Productivity & Execution
Other
21 stars 9 forks source link

ability to export CD and CL directly to Databook #16

Closed khalilsb closed 7 months ago

khalilsb commented 1 year ago

additional is it possible to track pressure and viscous components of your coefficients in fun3d, basically being able to include anything from the *.dat files databooks

nasa-ddalle commented 7 months ago

Ok, so it turns out this is possible, at least in the newest versions of CAPE. Suppose you would like to add CL and CD to your databook for a component called "mycomp". Then add the following to the "DataBook" section to customize which quantities get recorded in the DataBook.

"DataBook": {
    "Components": [
        "mycomp"
    ],
    "mycomp": {
        "Type": "FM",
        "Cols": [
            "CA",
            "CY",
            "CN",
            "CLL",
            "CLM",
            "CLN",
            "CL",
            "CD"
        ]
    }
}

Now you should get 8 quantities written for each case to aero_mycomp.csv instead of the usual 6. You could also just have it only write CL and CD by just setting "Cols": ["CL", "CD"].

As for the second part, yes this is also possible, although the definition might get a bit lengthy. You can include terms like

Incidentally, you can also ask for "mdot", the mass flow rate for flow-through surfaces.