Foam::activeBaffleVelocityFvPatchVectorField:: activeBaffleVelocityFvPatchVectorField ( const fvPatch& p, const DimensionedField<vector, volMesh>& iF, const dictionary& dict ) : fixedValueFvPatchVectorField(p, iF), pName_("p"), cyclicPatchName_(dict.lookup("cyclicPatch")), cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)), orientation_(readLabel(dict.lookup("orientation"))), initWallSf_(p.Sf()), initCyclicSf_(p.boundaryMesh()[cyclicPatchLabel_].Sf()), openFraction_(readScalar(dict.lookup("openFraction"))), openingTime_(readScalar(dict.lookup("openingTime"))), maxOpenFractionDelta_(readScalar(dict.lookup("maxOpenFractionDelta"))), curTimeIndex_(-1) { fvPatchVectorField::operator=(vector::zero); if (dict.found("p")) { dict.lookup("p") >> pName_; }
ersPointSource::ersPointSource ( const word& name, const dictionary& dict, const fvPatch& p ) : ersConstantFlux(name), qmax_(readScalar(dict.lookup("qmax"))), alpha_(readScalar(dict.lookup("alpha"))), direction_(dict.lookup("direction")) { q() = -alpha_*qmax_*min(direction_ & p.Sf()/p.magSf(), 0.0); }
Foam::activePressureForceBaffleVelocityFvPatchVectorField:: activePressureForceBaffleVelocityFvPatchVectorField ( const fvPatch& p, const DimensionedField<vector, volMesh>& iF, const dictionary& dict ) : fixedValueFvPatchVectorField(p, iF), pName_(dict.lookupOrDefault<word>("p", "p")), cyclicPatchName_(dict.lookup("cyclicPatch")), cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)), orientation_(readLabel(dict.lookup("orientation"))), initWallSf_(0), initCyclicSf_(0), nbrCyclicSf_(0), openFraction_(readScalar(dict.lookup("openFraction"))), openingTime_(readScalar(dict.lookup("openingTime"))), maxOpenFractionDelta_(readScalar(dict.lookup("maxOpenFractionDelta"))), curTimeIndex_(-1), minThresholdValue_(readScalar(dict.lookup("minThresholdValue"))), fBased_(readBool(dict.lookup("forceBased"))), baffleActivated_(0) { fvPatchVectorField::operator=(vector::zero); if (p.size() > 0) { initWallSf_ = p.Sf(); initCyclicSf_ = p.boundaryMesh()[cyclicPatchLabel_].Sf(); nbrCyclicSf_ = refCast<const cyclicFvPatch> ( p.boundaryMesh()[cyclicPatchLabel_] ).neighbFvPatch().Sf(); } if (dict.found("p")) { dict.lookup("p") >> pName_; }