Ejemplo n.º 1
0
void Foam::InjectionModel<CloudType>::writeProps()
{
    if (owner_.db().time().outputTime())
    {
        IOdictionary propsDict
        (
            IOobject
            (
                "injectionProperties",
                owner_.db().time().timeName(),
                "uniform"/cloud::prefix/owner_.name(),
                owner_.db(),
                IOobject::NO_READ,
                IOobject::NO_WRITE,
                false
            )
        );

        propsDict.add("massInjected", massInjected_);
        propsDict.add("nInjections", nInjections_);
        propsDict.add("parcelsAddedTotal", parcelsAddedTotal_);
        propsDict.add("timeStep0", timeStep0_);

        propsDict.regIOobject::write();
    }
}
void postProcessingWaves::writeXYZDict
(
    const scalar& dt,
    const scalarField& x,
    const scalarField& y,
    const scalarField& z
)
{
    // Open a dictionary used for outputting data
    IOdictionary xyz
    (
        IOobject
        (
            callName_ + "_dict",
            rT_.constant(),
            addDir_,
            rT_,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        )
    );

    // Adding deltaT information to the dictionary
    xyz.add("deltaT", dt, true);

    // Adding indexing to the dictionary
    labelList index( x.size(), 0 );

    forAll (index, indexi)
    {
        index[indexi] = indexi;
    }

    xyz.add("index", index, true);

    // Adding the point locations to the dictionary
    xyz.add("x", x, true);

    xyz.add("y", y, true);

    xyz.add("z", z, true);

    // Write the dictionary
    xyz.regIOobject::write();
}
void Foam::StandardWallInteraction<CloudType>::writeProps
(
    const label nEscape,
    const scalar massEscape,
    const label nStick,
    const scalar massStick
) const
{
    if (!this->owner().solution().transient())
    {
        return;
    }

    if (this->owner().db().time().outputTime())
    {
        IOdictionary propsDict
        (
            IOobject
            (
                "standardWallInteractionProperties",
                this->owner().db().time().timeName(),
                "uniform"/cloud::prefix/this->owner().name(),
                this->owner().db(),
                IOobject::NO_READ,
                IOobject::NO_WRITE,
                false
            )
        );

        propsDict.add("nEscape", nEscape);
        propsDict.add("massEscape", massEscape);
        propsDict.add("nStick", nStick);
        propsDict.add("massStick", massStick);

        propsDict.writeObject
        (
            IOstream::ASCII,
            IOstream::currentVersion,
            this->owner().db().time().writeCompression()
        );
    }
}
void postProcessingWaves::writeNameDict
(
    const scalar& dt,
    const wordList& names
)
{
    IOdictionary xyz
    (
        IOobject
        (
            callName_ + "_dict",
            rT_.constant(),
            addDir_,
            rT_,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        )
    );

    // Adding deltaT information to the dictionary
    xyz.add("deltaT", dt, true);

    // Adding indexing to the dictionary
    labelList index( names.size(), 0 );

    forAll (index, indexi)
    {
        index[indexi] = indexi;
    }

    xyz.add("index", index, true);

    // Adding the names
    xyz.add("names", names, true);

    // Write the dictionary
    xyz.regIOobject::write();
}