示例#1
0
void pressureDirectedInletOutletVelocityFvPatchVectorField::
write(Ostream& os) const
{
    fvPatchVectorField::write(os);
    if (phiName_ != "phi")
    {
        os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
    }
    if (rhoName_ != "rho")
    {
        os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
    }
    inletDir_.writeEntry("inletDirection", os);
    writeEntry("value", os);
}
void Foam::timeVaryingMappedFixedValuePointPatchField<Type>::write
(
    Ostream& os
) const
{
    fixedValuePointPatchField<Type>::write(os);
    os.writeKeyword("setAverage") << setAverage_ << token::END_STATEMENT << nl;
    os.writeKeyword("perturb") << perturb_ << token::END_STATEMENT << nl;

    if (fieldTableName_ != this->dimensionedInternalField().name())
    {
        os.writeKeyword("fieldTableName") << fieldTableName_
            << token::END_STATEMENT << nl;
    }
}
void atmBoundaryLayerInletEpsilonFvPatchScalarField::write(Ostream& os) const
{
    fvPatchScalarField::write(os);
    os.writeKeyword("z")
        << z_ << token::END_STATEMENT << nl;
    os.writeKeyword("kappa")
        << kappa_ << token::END_STATEMENT << nl;
    os.writeKeyword("Uref")
        << Uref_ << token::END_STATEMENT << nl;
    os.writeKeyword("Href")
        << Href_ << token::END_STATEMENT << nl;
    z0_.writeEntry("z0", os);
    zGround_.writeEntry("zGround", os);
    writeEntry("value", os);
}
void Foam::codedFixedValuePointPatchField<Type>::write(Ostream& os) const
{
    fixedValuePointPatchField<Type>::write(os);
    os.writeKeyword("name") << name_ << token::END_STATEMENT << nl;

    context_.write(os, dict_);
}
void Foam::MarshakRadiationFixedTMixedFvPatchScalarField::write(Ostream& os) const
{
    fvPatchScalarField::write(os);
    Trad_.writeEntry("Trad", os);
    os.writeKeyword("emissivity") << emissivity_ << token::END_STATEMENT << nl;
    writeEntry("value", os);
}
void Foam::codedFixedValueFvPatchField<Type>::write(Ostream& os) const
{
    fixedValueFvPatchField<Type>::write(os);
    os.writeKeyword("redirectType") << redirectType_
        << token::END_STATEMENT << nl;

    if (dict_.found("code"))
    {
        os.writeKeyword("code")
            << token::HASH << token::BEGIN_BLOCK;

        os.writeQuoted(string(dict_["code"]), false)
            << token::HASH << token::END_BLOCK
            << token::END_STATEMENT << nl;
    }
}
void Foam::fanPressureFvPatchScalarField::write(Ostream& os) const
{
    totalPressureFvPatchScalarField::write(os);
    fanCurve_.write(os);
    os.writeKeyword("direction")
        << fanFlowDirectionNames_[direction_] << token::END_STATEMENT << nl;
}
bool Foam::volFieldStreamReconstructor<Type>::decompose
(
    const parUnallocatedFvFieldReconstructor& reconstructor,
    const unallocatedFvMesh& baseMesh,
    const IOobject& baseIO,

    const unallocatedFvMesh& thisMesh,
    const IOobject& thisIO,
    const bool,
    Ostream& os
) const
{
    typedef GeometricField<Type, unallocatedFvPatchField, unallocatedVolMesh>
        GeoField;

    // Read base field
    Info<< "Reading " << baseIO.objectPath() << endl;
    const GeoField baseFld(baseIO, baseMesh);

    // Decompose
    tmp<GeoField> tfld(reconstructor.decomposeFvVolumeField(baseFld));

    // Stream
    Pout<< incrIndent;
    os << tfld();
    Pout<< decrIndent;

    return os.good();
}
void uniformFixedValuePointPatchField<Type>::
write(Ostream& os) const
{
    pointPatchField<Type>::write(os);
    os.writeKeyword("uniformValue")
        << uniformValue_ << token::END_STATEMENT << nl;
}
void inviscidWallPFvPatchScalarField::write(Ostream& os) const
{
    fixedGradientFvPatchScalarField::write(os);
    os.writeKeyword("fluxFraction")
        << fluxFraction_ << token::END_STATEMENT << nl;
    writeEntry("value", os);
}
void regionCouplingFvsPatchField<Type>::write(Ostream& os) const
{
    fvsPatchField<Type>::write(os);
    os.writeKeyword("remoteField")
        << remoteFieldName_ << token::END_STATEMENT << nl;
    this->writeEntry("value", os);
}
void Foam::SRFVelocityFvPatchVectorField::write(Ostream& os) const
{
    fvPatchVectorField::write(os);
    os.writeKeyword("relative") << relative_ << token::END_STATEMENT << nl;
    inletValue_.writeEntry("inletValue", os);
    writeEntry("value", os);
}
// Write
void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
{
    fvPatchScalarField::write(os);

    writeEntryIfDifferent<word>(os, "U", "U", UName_);
    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
    writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
    writeEntryIfDifferent<word>(os, "mu", "thermo:mu", muName_);

    os.writeKeyword("accommodationCoeff")
        << accommodationCoeff_ << token::END_STATEMENT << nl;
    Twall_.writeEntry("Twall", os);
    os.writeKeyword("gamma")
        << gamma_ << token::END_STATEMENT << nl;
    writeEntry("value", os);
}
void fixedIncidentRadiationCoupledMixedFvPatchScalarField::write
(
    Ostream& os
) const
{
    mixedFvPatchScalarField::write(os);
    os.writeKeyword("neighbourFieldName")<< neighbourFieldName_
        << token::END_STATEMENT << nl;
    os.writeKeyword("neighbourFieldRadiativeName")<<
        neighbourFieldRadiativeName_ << token::END_STATEMENT << nl;
    os.writeKeyword("fieldRadiativeName")<< fieldRadiativeName_
        << token::END_STATEMENT << nl;
    os.writeKeyword("QrIncident")<< QrIncident_
        << token::END_STATEMENT << nl;
    os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl;
}
void surfaceChargeCoupledFvPatchScalarField::write
(
    Ostream& os
) const
{
    mixedFvPatchScalarField::write(os);
    os.writeKeyword("neighbourFieldName")<< neighbourFieldName_
        << token::END_STATEMENT << nl;
    os.writeKeyword("surfaceCharge")<< surfCharge_
	<< token::END_STATEMENT << nl;
    os.writeKeyword("myEpr")<< myEpr_
	<< token::END_STATEMENT << nl;
    os.writeKeyword("nbrEpr")<< nbrEpr_
	<< token::END_STATEMENT << nl;
    temperatureCoupledBase::write(os);
}
void Foam::coupleGroupIdentifier::write(Ostream& os) const
{
    if (valid())
    {
        os.writeKeyword("coupleGroup") << name() << token::END_STATEMENT << nl;
    }
}
void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const
{
    fvPatchField<scalar>::write(os);
    writeEntryIfDifferent<word>(os, "mut", "mut", mutName_);
    os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl;
    writeEntry("value", os);
}
void Foam::timeVaryingMappedPressureDirectedInletVelocityFvPatchVectorField::
write
(
    Ostream& os
) const
{
    if (phiName_ != "phi")
    {
        os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
    }
    if (rhoName_ != "rho")
    {
        os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
    }
    timeVaryingMappedFixedValueFvPatchVectorField::write(os);
}
void
GenericPointPatchField<PatchField, Mesh, PointPatch, MatrixType, Type>::
write
(
    Ostream& os
) const
{
    os.writeKeyword("type") << actualTypeName_ << token::END_STATEMENT << nl;

    for
    (
        dictionary::const_iterator iter = dict_.begin();
        iter != dict_.end();
        ++iter
    )
    {
        if (iter().keyword() != "type")
        {
            if
            (
                iter().isStream()
             && iter().stream().size()
             && iter().stream()[0].isWord()
             && iter().stream()[0].wordToken() == "nonuniform"
            )
            {
                if (scalarFields_.found(iter().keyword()))
                {
                    scalarFields_.find(iter().keyword())()
                        ->writeEntry(iter().keyword(), os);
                }
                else if (vectorFields_.found(iter().keyword()))
                {
                    vectorFields_.find(iter().keyword())()
                        ->writeEntry(iter().keyword(), os);
                }
                else if (sphericalTensorFields_.found(iter().keyword()))
                {
                    sphericalTensorFields_.find(iter().keyword())()
                        ->writeEntry(iter().keyword(), os);
                }
                else if (symmTensorFields_.found(iter().keyword()))
                {
                    symmTensorFields_.find(iter().keyword())()
                        ->writeEntry(iter().keyword(), os);
                }
                else if (tensorFields_.found(iter().keyword()))
                {
                    tensorFields_.find(iter().keyword())()
                        ->writeEntry(iter().keyword(), os);
                }
            }
            else
            {
               iter().write(os);
            }
        }
    }
}
示例#20
0
void Foam::patchIdentifier::write(Ostream& os) const
{
    if (physicalType_.size())
    {
        os.writeKeyword("physicalType") << physicalType_
            << token::END_STATEMENT << nl;
    }
}
void Foam::fixedShearStressFvPatchVectorField::write(Ostream& os) const
{
    fixedValueFvPatchVectorField::write(os);
    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
    os.writeKeyword("tau") << tau0_ << token::END_STATEMENT << nl;
    writeEntry("value", os);
}
void syringePressureFvPatchScalarField::write(Ostream& os) const
{
    fvPatchScalarField::write(os);

    os.writeKeyword("Ap") << Ap_ << token::END_STATEMENT << nl;
    os.writeKeyword("Sp") << Sp_ << token::END_STATEMENT << nl;
    os.writeKeyword("VsI") << VsI_ << token::END_STATEMENT << nl;
    os.writeKeyword("tas") << tas_ << token::END_STATEMENT << nl;
    os.writeKeyword("tae") << tae_ << token::END_STATEMENT << nl;
    os.writeKeyword("tds") << tds_ << token::END_STATEMENT << nl;
    os.writeKeyword("tde") << tde_ << token::END_STATEMENT << nl;
    os.writeKeyword("psI") << psI_ << token::END_STATEMENT << nl;
    os.writeKeyword("psi") << psi_ << token::END_STATEMENT << nl;
    os.writeKeyword("ams") << ams_ << token::END_STATEMENT << nl;

    writeEntry("value", os);
}
void Foam::surfZoneIdentifier::write(Ostream& os) const
{
    if (geometricType_.size())
    {
        os.writeKeyword("geometricType") << geometricType_
            << token::END_STATEMENT << nl;
    }
}
void pressureNormalInletOutletVelocityFvPatchVectorField::
write(Ostream& os) const
{
    fvPatchVectorField::write(os);
    os.writeKeyword("phi") << phiName_ << token::END_STATEMENT << nl;
    os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl;
    writeEntry("value", os);
}
void Foam::flowRateInletVelocityFvPatchVectorField::write(Ostream& os) const
{
    fvPatchField<vector>::write(os);
    os.writeKeyword("flowRate") << flowRate_ << token::END_STATEMENT << nl;
    writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
    writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
    writeEntry("value", os);
}
void
UniformFixedValuePointPatchField
<PatchField, Mesh, PointPatch, MatrixType, Type>::write(Ostream& os) const
{
    PatchField<Type>::write(os);
    os.writeKeyword("uniformValue")
        << uniformValue_ << token::END_STATEMENT << nl;
}
void Foam::actuationDiskSource::writeData(Ostream& os) const
{
    os  << indent << token::BEGIN_BLOCK << incrIndent << nl;
    os.writeKeyword("name") << this->name() << token::END_STATEMENT << nl;

    if (dict_.found("note"))
    {
        os.writeKeyword("note") << string(dict_.lookup("note"))
            << token::END_STATEMENT << nl;
    }

    os << indent << "actuationDisk";

    dict_.write(os);

    os << decrIndent << indent << token::END_BLOCK << endl;
}
示例#28
0
void Foam::tableReader<Type>::write(Ostream& os) const
{
    if (this->type() != "openFoam")
    {
        os.writeKeyword("readerType")
            << this->type() << token::END_STATEMENT << nl;
    }
}
示例#29
0
void Foam::TableBase<Type>::writeEntries(Ostream& os) const
{
    if (boundsHandling_ != CLAMP)
    {
        os.writeKeyword("outOfBounds") << boundsHandlingToWord(boundsHandling_)
            << token::END_STATEMENT << nl;
    }
}
void Foam::sixDoFRigidBodyMotionConstraints::point::write
(
    Ostream& os
) const
{
    os.writeKeyword("centreOfRotation")
        << centreOfRotation_ << token::END_STATEMENT << nl;
}