void Foam::DESModelRegions::writeFileHeader(const label i)
{
    writeHeader(file(), "DES model region coverage (% volume)");

    writeCommented(file(), "Time");
    writeTabbed(file(), "LES");
    writeTabbed(file(), "RAS");
}
void Foam::functionObjects::cloudInfo::writeFileHeader(const label i)
{
    writeHeader(file(), "Cloud information");
    writeCommented(file(), "Time");
    writeTabbed(file(), "nParcels");
    writeTabbed(file(), "mass");
    file() << endl;
}
void Foam::functionObjects::forceCoeffs::writeFileHeader(const label i)
{
    switch (fileID(i))
    {
        case MAIN_FILE:
        {
            // force coeff data

            writeHeader(file(i), "Force coefficients");
            writeHeaderValue(file(i), "liftDir", liftDir_);
            writeHeaderValue(file(i), "dragDir", dragDir_);
            writeHeaderValue(file(i), "pitchAxis", pitchAxis_);
            writeHeaderValue(file(i), "magUInf", magUInf_);
            writeHeaderValue(file(i), "lRef", lRef_);
            writeHeaderValue(file(i), "Aref", Aref_);
            writeHeaderValue(file(i), "CofR", coordSys_.origin());
            writeCommented(file(i), "Time");
            writeTabbed(file(i), "Cm");
            writeTabbed(file(i), "Cd");
            writeTabbed(file(i), "Cl");
            writeTabbed(file(i), "Cl(f)");
            writeTabbed(file(i), "Cl(r)");

            break;
        }
        case BINS_FILE:
        {
            // bin coeff data

            writeHeader(file(i), "Force coefficient bins");
            writeHeaderValue(file(i), "bins", nBin_);
            writeHeaderValue(file(i), "start", binMin_);
            writeHeaderValue(file(i), "delta", binDx_);
            writeHeaderValue(file(i), "direction", binDir_);

            vectorField binPoints(nBin_);
            writeCommented(file(i), "x co-ords  :");
            forAll(binPoints, pointi)
            {
                binPoints[pointi] = (binMin_ + (pointi + 1)*binDx_)*binDir_;
                file(i) << tab << binPoints[pointi].x();
            }
            file(i) << nl;

            writeCommented(file(i), "y co-ords  :");
            forAll(binPoints, pointi)
            {
                file(i) << tab << binPoints[pointi].y();
            }
            file(i) << nl;

            writeCommented(file(i), "z co-ords  :");
            forAll(binPoints, pointi)
            {
                file(i) << tab << binPoints[pointi].z();
            }
void Foam::functionObjects::wallShearStress::writeFileHeader(const label i)
{
    // Add headers to output data
    writeHeader(file(), "Wall shear stress");
    writeCommented(file(), "Time");
    writeTabbed(file(), "patch");
    writeTabbed(file(), "min");
    writeTabbed(file(), "max");
    file() << endl;
}
Exemple #5
0
void Foam::functionObjects::yPlus::writeFileHeader(const label i)
{
    writeHeader(file(), "y+ ()");

    writeCommented(file(), "Time");
    writeTabbed(file(), "patch");
    writeTabbed(file(), "min");
    writeTabbed(file(), "max");
    writeTabbed(file(), "average");
    file() << endl;
}
Exemple #6
0
void pfPrcHelper::closeTag() {
    char buf[256];
    iLvl--;
    snprintf(buf, 256, "</%s>\n", openTags.top());
    openTags.pop();
    writeTabbed(buf);
}
Exemple #7
0
void pfPrcHelper::startTag(const char* name) {
    if (inTag)
        endTag();
    char buf[256];
    snprintf(buf, 256, "<%s", name);
    writeTabbed(buf);
    openTags.push(name);
    inTag = true;
}
void Foam::forceCoeffs::writeFileHeader(const label i)
{
    if (i == 0)
    {
        // force coeff data

        writeHeader(file(i), "Force coefficients");
        writeHeaderValue(file(i), "liftDir", liftDir_);
        writeHeaderValue(file(i), "dragDir", dragDir_);
        writeHeaderValue(file(i), "pitchAxis", pitchAxis_);
        writeHeaderValue(file(i), "magUInf", magUInf_);
        writeHeaderValue(file(i), "lRef", lRef_);
        writeHeaderValue(file(i), "Aref", Aref_);
        writeHeaderValue(file(i), "CofR", coordSys_.origin());
        writeCommented(file(i), "Time");
        writeTabbed(file(i), "Cm");
        writeTabbed(file(i), "Cd");
        writeTabbed(file(i), "Cl");
        writeTabbed(file(i), "Cl(f)");
        writeTabbed(file(i), "Cl(r)");
        file(i)
            << tab << "Cm" << tab << "Cd" << tab << "Cl" << tab << "Cl(f)"
            << tab << "Cl(r)";
    }
    else if (i == 1)
    {
        // bin coeff data

        writeHeader(file(i), "Force coefficient bins");
        writeHeaderValue(file(i), "bins", nBin_);
        writeHeaderValue(file(i), "start", binMin_);
        writeHeaderValue(file(i), "delta", binDx_);
        writeHeaderValue(file(i), "direction", binDir_);

        vectorField binPoints(nBin_);
        writeCommented(file(i), "x co-ords  :");
        forAll(binPoints, pointI)
        {
            binPoints[pointI] = (binMin_ + (pointI + 1)*binDx_)*binDir_;
            file(i) << tab << binPoints[pointI].x();
        }
void Foam::functionObjects::specieReactionRates<ChemistryModelType>::
writeFileHeader
(
    const label i
)
{
    writeHeader(file(), "Specie reaction rates");
    volRegion::writeFileHeader(*this, file());
    writeHeaderValue(file(), "nSpecie", chemistryModel_.nSpecie());
    writeHeaderValue(file(), "nReaction", chemistryModel_.nReaction());

    writeCommented(file(), "Time");
    writeTabbed(file(), "Reaction");

    const wordList& speciesNames =
        chemistryModel_.thermo().composition().species();

    forAll (speciesNames, si)
    {
        writeTabbed(file(), speciesNames[si]);
    }
void Foam::fieldMinMax::output
(
    const word& fieldName,
    const word& outputName,
    const vector& minC,
    const vector& maxC,
    const label minProcI,
    const label maxProcI,
    const Type& minValue,
    const Type& maxValue
)
{
    OFstream& file = this->file();

    if (location_)
    {
        file<< obr_.time().value();

        writeTabbed(file, fieldName);

        file<< token::TAB << minValue
            << token::TAB << minC;

        if (Pstream::parRun())
        {
            file<< token::TAB << minProcI;
        }

        file<< token::TAB << maxValue
            << token::TAB << maxC;

        if (Pstream::parRun())
        {
            file<< token::TAB << maxProcI;
        }

        file<< endl;

        if (log_) Info
            << "    min(" << outputName << ") = " << minValue
            << " at location " << minC;

        if (Pstream::parRun())
        {
            if (log_) Info<< " on processor " << minProcI;
        }

        if (log_) Info
            << nl << "    max(" << outputName << ") = " << maxValue
            << " at location " << maxC;

        if (Pstream::parRun())
        {
            if (log_) Info<< " on processor " << maxProcI;
        }
    }
    else
    {
        file<< token::TAB << minValue << token::TAB << maxValue;

        if (log_) Info
            << "    min/max(" << outputName << ") = "
            << minValue << ' ' << maxValue;
    }

    if (log_) Info<< endl;
}
Exemple #11
0
void pfPrcHelper::writeComment(const char* comment) {
    writeTabbed("<!-- ");
    file->writeStr(comment);
    file->writeStr(" -->\n");
}