Foam::WhiteMetznerCross::WhiteMetznerCross ( const word& name, const volVectorField& U, const surfaceScalarField& phi, const dictionary& dict ) : viscoelasticLaw(name, U, phi), tau_ ( IOobject ( "tau" + name, U.time().timeName(), U.mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), U.mesh() ), rho_(dict.lookup("rho")), etaS_(dict.lookup("etaS")), etaP_(dict.lookup("etaP")), lambda_(dict.lookup("lambda")), K_(dict.lookup("K")), L_(dict.lookup("L")), m_(dict.lookup("m")), n_(dict.lookup("n")) {}
Foam::FENE_P::FENE_P ( const word& name, const volVectorField& U, const surfaceScalarField& phi, const dictionary& dict ) : viscoelasticLaw(name, U, phi), tau_ ( IOobject ( "tau" + name, U.time().timeName(), U.mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), U.mesh() ), rho_(dict.lookup("rho")), etaS_(dict.lookup("etaS")), etaP_(dict.lookup("etaP")), L2_(dict.lookup("L2")), lambda_(dict.lookup("lambda")) {}
// from components Giesekus_Cross::Giesekus_Cross ( const word& name, const volScalarField& alpha, const volVectorField& U, const surfaceScalarField& phi, const dictionary& dict ) : twoPhaseMixture(U, phi, "alpha"), viscoelasticLaw(name, alpha, U, phi), tau_ ( IOobject ( "tau" + name, U.time().timeName(), U.mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), U.mesh() ), etaS1_(dict.subDict("phase1").lookup("etaS")), etaS2_(dict.subDict("phase2").lookup("etaS")), etaP1_(dict.subDict("phase1").lookup("etaP")), etaP2_(dict.subDict("phase2").lookup("etaP")), lambda1_(dict.subDict("phase1").lookup("lambda")), lambda2_(dict.subDict("phase2").lookup("lambda")), alpha1_(dict.subDict("phase1").lookup("alpha")), alpha2_(dict.subDict("phase2").lookup("alpha")) {}
// from components FENE_P::FENE_P ( const word& name, const volScalarField& alpha, const volVectorField& U, const surfaceScalarField& phi, const dictionary& dict ) : viscoelasticLaw(name, alpha, U, phi), tau_ ( IOobject ( "tau" + name, U.time().timeName(), U.mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), U.mesh() ), etaS1_(dict.subDict("phase1").lookup("etaS")), etaS2_(dict.subDict("phase2").lookup("etaS")), etaP1_(dict.subDict("phase1").lookup("etaP")), etaP2_(dict.subDict("phase2").lookup("etaP")), lambda1_(dict.subDict("phase1").lookup("lambda")), lambda2_(dict.subDict("phase2").lookup("lambda")), Lquad1_(dict.subDict("phase1").lookup("Lquad")), Lquad2_(dict.subDict("phase2").lookup("Lquad")) {}
Foam::phase::phase ( const word& name, const dictionary& phaseDict, const volVectorField& U, const surfaceScalarField& phi ) : volScalarField ( IOobject ( "alpha" + name, U.mesh().time().timeName(), U.mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), U.mesh() ), name_(name), phaseDict_(phaseDict), nuModel_(viscosityModel::New("nu" + name, phaseDict_, U, phi)), rho_(phaseDict_.lookup("rho")) {}
Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo ( const volVectorField& U, const surfaceScalarField& phi ) : psiThermo(U.mesh(), word::null), twoPhaseMixture(U.mesh(), *this), interfaceProperties(alpha1(), U, *this), thermo1_(nullptr), thermo2_(nullptr) { { volScalarField T1(IOobject::groupName("T", phase1Name()), T_); T1.write(); } { volScalarField T2(IOobject::groupName("T", phase2Name()), T_); T2.write(); } thermo1_ = rhoThermo::New(U.mesh(), phase1Name()); thermo2_ = rhoThermo::New(U.mesh(), phase2Name()); // thermo1_->validate(phase1Name(), "e"); // thermo2_->validate(phase2Name(), "e"); correct(); }
Foam::EPTT::EPTT ( const word& name, const volScalarField& alpha, const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, const dictionary& dict ) : viscoelasticLaw(name, alpha, rho, U, phi), tau_ ( IOobject ( "tau" + name, U.time().timeName(), U.mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), U.mesh() ), etaS1_(dict.subDict("phase1").lookup("etaS")), etaS2_(dict.subDict("phase2").lookup("etaS")), etaP1_(dict.subDict("phase1").lookup("etaP")), etaP2_(dict.subDict("phase2").lookup("etaP")), lambda1_(dict.subDict("phase1").lookup("lambda")), lambda2_(dict.subDict("phase2").lookup("lambda")), epsilon1_(dict.subDict("phase1").lookup("epsilon")), epsilon2_(dict.subDict("phase2").lookup("epsilon")), zeta1_(dict.subDict("phase1").lookup("zeta")), zeta2_(dict.subDict("phase2").lookup("zeta")) {}
locDynOneEqEddy::locDynOneEqEddy ( const volVectorField& U, const surfaceScalarField& phi, transportModel& transport ) : LESModel(typeName, U, phi, transport), GenEddyVisc(U, phi, transport), k_ ( IOobject ( "k", runTime_.timeName(), U_.db(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh_ ), simpleFilter_(U.mesh()), filterPtr_(LESfilter::New(U.mesh(), coeffDict())), filter_(filterPtr_()) { volScalarField KK = 0.5*(filter_(magSqr(U)) - magSqr(filter_(U))); updateSubGridScaleFields(symm(fvc::grad(U)), KK); printCoeffs(); }
XPP_SE::XPP_SE ( const word& name, const volScalarField& alpha, const volVectorField& U, const surfaceScalarField& phi, const dictionary& dict ) : viscoelasticLaw(name, alpha, U, phi), tau_ ( IOobject ( "tau" + name, U.time().timeName(), U.mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), U.mesh() ), I_ ( dimensionedSymmTensor ( "I", dimensionSet(0, 0, 0, 0, 0, 0, 0), symmTensor ( 1, 0, 0, 1, 0, 1 ) ) ), etaS1_(dict.subDict("phase1").lookup("etaS")), etaS2_(dict.subDict("phase2").lookup("etaS")), etaP1_(dict.subDict("phase1").lookup("etaP")), etaP2_(dict.subDict("phase2").lookup("etaP")), alpha1_(dict.subDict("phase1").lookup("alpha")), alpha2_(dict.subDict("phase2").lookup("alpha")), lambdaOb1_(dict.subDict("phase1").lookup("lambdaOb")), lambdaOb2_(dict.subDict("phase2").lookup("lambdaOb")), lambdaOs1_(dict.subDict("phase1").lookup("lambdaOs")), lambdaOs2_(dict.subDict("phase2").lookup("lambdaOs")), q1_(dict.subDict("phase1").lookup("q")), q2_(dict.subDict("phase2").lookup("q")), pt_ ( dimensionedScalar ( "zero", lambdaOb1_.dimensions(), scalar( SMALL ) ) ) {}
void Foam::cfdemCloudIB::calcVelocityCorrection ( volScalarField& p, volVectorField& U, volScalarField& phiIB, volScalarField& voidfraction ) { label cellI=0; vector uParticle(0,0,0); vector rVec(0,0,0); vector velRot(0,0,0); vector angVel(0,0,0); for(int index=0; index< numberOfParticles(); index++) { //if(regionM().inRegion()[index][0]) //{ for(int subCell=0;subCell<voidFractionM().cellsPerParticle()[index][0];subCell++) { //Info << "subCell=" << subCell << endl; cellI = cellIDs()[index][subCell]; if (cellI >= 0) { // calc particle velocity for(int i=0;i<3;i++) rVec[i]=U.mesh().C()[cellI][i]-position(index)[i]; for(int i=0;i<3;i++) angVel[i]=angularVelocities()[index][i]; velRot=angVel^rVec; for(int i=0;i<3;i++) uParticle[i] = velocities()[index][i]+velRot[i]; // impose field velocity U[cellI]=(1-voidfractions_[index][subCell])*uParticle+voidfractions_[index][subCell]*U[cellI]; } } //} } // make field divergence free - set reference value in case it is needed fvScalarMatrix phiIBEqn ( fvm::laplacian(phiIB) == fvc::div(U) + fvc::ddt(voidfraction) ); if(phiIB.needReference()) { phiIBEqn.setReference(pRefCell_, pRefValue_); } phiIBEqn.solve(); U=U-fvc::grad(phiIB); U.correctBoundaryConditions(); // correct the pressure as well p=p+phiIB/U.mesh().time().deltaT(); // do we have to account for rho here? p.correctBoundaryConditions(); }
Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi ( const volVectorField& vf ) { return fv::ddtScheme<vector>::New ( vf.mesh(), vf.mesh().ddtScheme("ddt(" + vf.name() + ')') )().meshPhi(vf); }
Foam::tmp<Foam::surfaceScalarField> Foam::fvc::meshPhi ( const dimensionedScalar& rho, const volVectorField& vf ) { return fv::ddtScheme<vector>::New ( vf.mesh(), vf.mesh().ddtScheme("ddt(" + rho.name() + ',' + vf.name() + ')') ).ref().meshPhi(vf); }
// Construct from components IncompressibleCloud::IncompressibleCloud( const volPointInterpolation& vpi, const volVectorField& U ) : Cloud<HardBallParticle>(U.mesh()), runTime_(U.time()), time0_(runTime_.value()), mesh_(U.mesh()), volPointInterpolation_(vpi), U_(U), smoment_(mesh_.nCells(), vector::zero), random(666), cloudProperties_ ( IOobject ( "cloudProperties", U.time().constant(), U.db(), IOobject::MUST_READ, IOobject::NO_WRITE ) ), interpolationSchemes_(cloudProperties_.subDict("interpolationSchemes")) { g_=cloudProperties_.lookup("g"); HardBallParticle::density=readScalar(cloudProperties_.lookup("density")); dragCoefficient_=readScalar(cloudProperties_.lookup("drag")); subCycles_=readScalar(cloudProperties_.lookup("subCycles")); useSourceMoment=readBool(cloudProperties_.lookup("useMomentumSource")); dictionary injection(cloudProperties_.subDict("injection")); thres=readScalar(injection.lookup("thres")); center=injection.lookup("center"); r0=readScalar(injection.lookup("r0")); vel0=readScalar(injection.lookup("vel0")); vel1=injection.lookup("vel1"); d0=readScalar(injection.lookup("d0")); d1=readScalar(injection.lookup("d1")); tStart=readScalar(injection.lookup("tStart")); tEnd=readScalar(injection.lookup("tEnd")); dictionary wall(cloudProperties_.subDict("wall")); wallReflect_=readBool(wall.lookup("reflect")); if(wallReflect_) { wallElasticity_=readScalar(wall.lookup("elasticity")); } }
LESModel::LESModel ( const word& type, const volVectorField& U, const surfaceScalarField& phi, transportModel& transport, const word& turbulenceModelName ) : turbulenceModel(U, phi, transport, turbulenceModelName), IOdictionary ( IOobject ( "LESProperties", U.time().constant(), U.db(), IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)), coeffDict_(subOrEmptyDict(type + "Coeffs")), kMin_("kMin", sqr(dimVelocity), SMALL), delta_(LESdelta::New("delta", U.mesh(), *this)) { kMin_.readIfPresent(*this); // Force the construction of the mesh deltaCoeffs which may be needed // for the construction of the derived models and BCs mesh_.nonOrthDeltaCoeffs(); }
Foam::turbulenceModel::turbulenceModel ( const volVectorField& U, const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const word& propertiesName ) : IOdictionary ( IOobject ( IOobject::groupName(propertiesName, U.group()), U.time().constant(), U.db(), IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ), runTime_(U.time()), mesh_(U.mesh()), U_(U), alphaRhoPhi_(alphaRhoPhi), phi_(phi), y_(mesh_) {}
turbulenceModel::turbulenceModel ( const volVectorField& U, const surfaceScalarField& phi, transportModel& transport, const word& turbulenceModelName ) : regIOobject ( IOobject ( turbulenceModelName, U.time().constant(), U.db(), IOobject::NO_READ, IOobject::NO_WRITE ) ), runTime_(U.time()), mesh_(U.mesh()), U_(U), phi_(phi), transportModel_(transport), y_(mesh_) {}
Foam::S_MDCPP::S_MDCPP ( const word& name, const volVectorField& U, const surfaceScalarField& phi, const dictionary& dict ) : viscoelasticLaw(name, U, phi), tau_ ( IOobject ( "tau" + name, U.time().timeName(), U.mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), U.mesh() ), I_ ( dimensionedSymmTensor ( "I", dimensionSet(0, 0, 0, 0, 0, 0, 0), symmTensor ( 1, 0, 0, 1, 0, 1 ) ) ), rho_(dict.lookup("rho")), etaS_(dict.lookup("etaS")), etaP_(dict.lookup("etaP")), zeta_(dict.lookup("zeta")), lambdaOb_(dict.lookup("lambdaOb")), lambdaOs_(dict.lookup("lambdaOs")), q_(dict.lookup("q")) {}
wallModel::wallModel ( const dictionary& dict, const volVectorField& U, spray& sm ) : dict_(dict), mesh_(U.mesh()), spray_(sm) {}
scaleSimilarity::scaleSimilarity ( const volVectorField& U, const surfaceScalarField& phi, transportModel& transport ) : LESModel(typeName, U, phi, transport), filterPtr_(LESfilter::New(U.mesh(), coeffDict())), filter_(filterPtr_()) { printCoeffs(); }
dynOneEqEddy::dynOneEqEddy ( const volVectorField& U, const surfaceScalarField& phi, transportModel& transport, const word& turbulenceModelName, const word& modelName ) : LESModel(modelName, U, phi, transport, turbulenceModelName), GenEddyVisc(U, phi, transport), k_ ( IOobject ( "k", runTime_.timeName(), mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh_ ), simpleFilter_(U.mesh()), filterPtr_(LESfilter::New(U.mesh(), coeffDict())), filter_(filterPtr_()) { bound(k_, kMin_); const volScalarField KK(0.5*(filter_(magSqr(U)) - magSqr(filter_(U)))); updateSubGridScaleFields(symm(fvc::grad(U)), KK); printCoeffs(); }
dynOneEqEddy::dynOneEqEddy ( const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, const basicThermo& thermoPhysicalModel ) : LESModel(typeName, rho, U, phi, thermoPhysicalModel), GenEddyVisc(rho, U, phi, thermoPhysicalModel), filterPtr_(LESfilter::New(U.mesh(), coeffDict())), filter_(filterPtr_()) { updateSubGridScaleFields(dev(symm(fvc::grad(U)))); printCoeffs(); }
Foam::mixtureViscosityModels::slurry::slurry ( const word& name, const dictionary& viscosityProperties, const volVectorField& U, const surfaceScalarField& phi, const word modelName ) : mixtureViscosityModel(name, viscosityProperties, U, phi), alpha_ ( U.mesh().lookupObject<volScalarField> ( IOobject::groupName ( viscosityProperties.lookupOrDefault<word>("alpha", "alpha"), viscosityProperties.dictName() ) ) ) {}
// from components Feta_PTT::Feta_PTT ( const word& name, const volScalarField& alpha, const volVectorField& U, const surfaceScalarField& phi, const dictionary& dict ) : viscoelasticLaw(name, alpha, U, phi), tau_ ( IOobject ( "tau" + name, U.time().timeName(), U.mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), U.mesh() ), etaS1_(dict.subDict("phase1").lookup("etaS")), etaS2_(dict.subDict("phase2").lookup("etaS")), etaP1_(dict.subDict("phase1").lookup("etaP")), etaP2_(dict.subDict("phase2").lookup("etaP")), lambda1_(dict.subDict("phase1").lookup("lambda")), lambda2_(dict.subDict("phase2").lookup("lambda")), epsilon1_(dict.subDict("phase1").lookup("epsilon")), epsilon2_(dict.subDict("phase2").lookup("epsilon")), zeta1_(dict.subDict("phase1").lookup("zeta")), zeta2_(dict.subDict("phase2").lookup("zeta")), A1_(dict.subDict("phase1").lookup("A")), A2_(dict.subDict("phase2").lookup("A")), a1_(dict.subDict("phase1").lookup("a")), a2_(dict.subDict("phase2").lookup("a")), b1_(dict.subDict("phase1").lookup("b")), b2_(dict.subDict("phase2").lookup("b")), alpha1f_ ( IOobject ( "alpha1f" + name, U.time().timeName(), U.mesh(), IOobject::NO_READ, IOobject::NO_WRITE ), min(max(alpha, scalar(0)), scalar(1)) ), etaPEff_ ( IOobject ( "etaPEff" + name, U.time().timeName(), U.mesh(), IOobject::NO_READ, IOobject::AUTO_WRITE ), (etaP1_/( Foam::pow(scalar(1) + A1_*Foam::pow(0.5*( Foam::sqr(tr(tau_)) - tr(tau_ & tau_) ) * Foam::sqr(lambda1_) / Foam::sqr(etaP1_), a1_), b1_) ) )*alpha1f_ + (etaP2_/( Foam::pow(scalar(1) + A2_*Foam::pow(0.5*( Foam::sqr(tr(tau_)) - tr(tau_ & tau_) ) * Foam::sqr(lambda2_) / Foam::sqr(etaP2_), a2_), b2_) ) )*(scalar(1) - alpha1f_) ), lambdaEff_ ( IOobject ( "lambdaEff" + name, U.time().timeName(), U.mesh(), IOobject::NO_READ, IOobject::AUTO_WRITE ), (lambda1_ / (scalar(1) + epsilon1_*lambda1_*tr(tau_) / etaP1_) )*alpha1f_ + (lambda2_ / (scalar(1) + epsilon2_*lambda2_*tr(tau_) / etaP2_) )*(scalar(1) - alpha1f_) ) {}
Foam::Leonov::Leonov ( const word& name, const volScalarField& alpha, const volVectorField& U, const surfaceScalarField& phi, const dictionary& dict ) : viscoelasticLaw(name, alpha, U, phi), sigma_ ( IOobject ( "sigma" + name, U.time().timeName(), U.mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), U.mesh() ), tau_ ( IOobject ( "tau" + name, U.time().timeName(), U.mesh(), IOobject::NO_READ, IOobject::AUTO_WRITE ), U.mesh(), dimensionedSymmTensor ( "zero", dimensionSet(1, -1, -2, 0, 0, 0, 0), symmTensor::zero ) ), I_ ( dimensionedSymmTensor ( "I", dimensionSet(0, 0, 0, 0, 0, 0, 0), symmTensor ( 1, 0, 0, 1, 0, 1 ) ) ), rho1_(dict.subDict("phase1").lookup("rho")), rho2_(dict.subDict("phase2").lookup("rho")), etaS1_(dict.subDict("phase1").lookup("etaS")), etaS2_(dict.subDict("phase2").lookup("etaS")), etaP1_(dict.subDict("phase1").lookup("etaP")), etaP2_(dict.subDict("phase2").lookup("etaP")), lambda1_(dict.subDict("phase1").lookup("lambda")), lambda2_(dict.subDict("phase2").lookup("lambda")) {}
dynLagrangianCsBound::dynLagrangianCsBound ( const volVectorField& U, const surfaceScalarField& phi, transportModel& transport, const word& turbulenceModelName, const word& modelName ) : LESModel(modelName, U, phi, transport, turbulenceModelName), GenEddyVisc(U, phi, transport), CsMin(0.07), CsMax(0.14), flm_ ( IOobject ( "flm", runTime_.timeName(), mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh_ ), fmm_ ( IOobject ( "fmm", runTime_.timeName(), mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh_ ), Cs_ ( IOobject ( "Cs", runTime_.timeName(), mesh_, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), Foam::sqrt(flm_/fmm_) ), theta_ ( dimensioned<scalar>::lookupOrAddToDict ( "theta", coeffDict_, 1.5 ) ), simpleFilter_(U.mesh()), filterPtr_(LESfilter::New(U.mesh(), coeffDict())), filter_(filterPtr_()), flm0_("flm0", flm_.dimensions(), 0.0), fmm0_("fmm0", fmm_.dimensions(), VSMALL) { updateSubGridScaleFields(fvc::grad(U)); printCoeffs(); }
// Construct from components Foam::spray::spray ( const volVectorField& U, const volScalarField& rho, const volScalarField& p, const volScalarField& T, const basicMultiComponentMixture& composition, const PtrList<gasThermoPhysics>& gasProperties, const dictionary&, const dimensionedVector& g, bool readFields ) : Cloud<parcel>(U.mesh(), false), // suppress className checking on positions runTime_(U.time()), time0_(runTime_.value()), mesh_(U.mesh()), rndGen_(label(0)), g_(g.value()), U_(U), rho_(rho), p_(p), T_(T), sprayProperties_ ( IOobject ( "sprayProperties", U.time().constant(), U.db(), IOobject::MUST_READ, IOobject::NO_WRITE ) ), ambientPressure_(p_.average().value()), ambientTemperature_(T_.average().value()), injectors_ ( IOobject ( "injectorProperties", U.time().constant(), U.db(), IOobject::MUST_READ, IOobject::NO_WRITE ), injector::iNew(U.time()) ), atomization_ ( atomizationModel::New ( sprayProperties_, *this ) ), drag_ ( dragModel::New ( sprayProperties_ ) ), evaporation_ ( evaporationModel::New ( sprayProperties_ ) ), heatTransfer_ ( heatTransferModel::New ( sprayProperties_ ) ), wall_ ( wallModel::New ( sprayProperties_, U, *this ) ), breakupModel_ ( breakupModel::New ( sprayProperties_, *this ) ), collisionModel_ ( collisionModel::New ( sprayProperties_, *this, rndGen_ ) ), dispersionModel_ ( dispersionModel::New ( sprayProperties_, *this ) ), fuels_ ( liquidMixture::New ( mesh_.lookupObject<dictionary>("thermophysicalProperties") ) ), injectorModel_ ( injectorModel::New ( sprayProperties_, *this ) ), sprayIteration_(sprayProperties_.subDict("sprayIteration")), sprayIterate_(readLabel(sprayIteration_.lookup("sprayIterate"))), sprayRelaxFactor_(readScalar(sprayIteration_.lookup("sprayRelaxFactor"))), minimumParcelMass_ ( readScalar(sprayIteration_.lookup("minimumParcelMass")) ), subCycles_(readLabel(sprayProperties_.lookup("subCycles"))), gasProperties_(gasProperties), composition_(composition), liquidToGasIndex_(fuels_->components().size(), -1), gasToLiquidIndex_(composition.Y().size(), -1), isLiquidFuel_(composition.Y().size(), false), twoD_(0), axisOfSymmetry_(vector::zero), axisOfWedge_(vector(0,0,0)), axisOfWedgeNormal_(vector(0,0,0)), angleOfWedge_(0.0), interpolationSchemes_(sprayProperties_.subDict("interpolationSchemes")), UInterpolator_(NULL), rhoInterpolator_(NULL), pInterpolator_(NULL), TInterpolator_(NULL), sms_(mesh_.nCells(), vector::zero), shs_(mesh_.nCells(), 0.0), srhos_(fuels_->components().size()), totalInjectedLiquidMass_(0.0), injectedLiquidKE_(0.0) { // create the evaporation source fields forAll(srhos_, i) { srhos_.set(i, new scalarField(mesh_.nCells(), 0.0)); }
freeSurface::freeSurface ( dynamicFvMesh& m, const volScalarField& rho, volVectorField& Ub, volScalarField& Pb, const surfaceScalarField& sfPhi ) : IOdictionary ( IOobject ( "freeSurfaceProperties", Ub.mesh().time().constant(), Ub.mesh(), IOobject::MUST_READ, IOobject::NO_WRITE ) ), mesh_(m), rho_(rho), U_(Ub), p_(Pb), phi_(sfPhi), curTimeIndex_(Ub.mesh().time().timeIndex()), twoFluids_ ( this->lookup("twoFluids") ), normalMotionDir_ ( this->lookup("normalMotionDir") ), motionDir_(0, 0, 0), cleanInterface_ ( this->lookup("cleanInterface") ), aPatchID_(-1), bPatchID_(-1), muFluidA_ ( this->lookup("muFluidA") ), muFluidB_ ( this->lookup("muFluidB") ), rhoFluidA_ ( this->lookup("rhoFluidA") ), rhoFluidB_ ( this->lookup("rhoFluidB") ), g_(this->lookup("g")), cleanInterfaceSurfTension_ ( this->lookup("surfaceTension") ), fixedFreeSurfacePatches_ ( this->lookup("fixedFreeSurfacePatches") ), pointNormalsCorrectionPatches_ ( this->lookup("pointNormalsCorrectionPatches") ), nFreeSurfCorr_ ( readInt(this->lookup("nFreeSurfaceCorrectors")) ), smoothing_(false), interpolatorABPtr_(NULL), interpolatorBAPtr_(NULL), controlPointsPtr_(NULL), motionPointsMaskPtr_(NULL), pointsDisplacementDirPtr_(NULL), facesDisplacementDirPtr_(NULL), totalDisplacementPtr_(NULL), aMeshPtr_(NULL), UsPtr_(NULL), phisPtr_(NULL), surfactConcPtr_(NULL), surfaceTensionPtr_(NULL), surfactantPtr_(NULL), fluidIndicatorPtr_(NULL) { //Read motion direction if (!normalMotionDir_) { motionDir_ = vector(this->lookup("motionDir")); motionDir_ /= mag(motionDir_) + SMALL; } // Set point normal correction patches boolList& correction = aMesh().correctPatchPointNormals(); forAll(pointNormalsCorrectionPatches_, patchI) { word patchName = pointNormalsCorrectionPatches_[patchI]; label patchID = aMesh().boundary().findPatchID(patchName); if(patchID == -1) { FatalErrorIn ( "freeSurface::freeSurface(...)" ) << "Patch name for point normals correction does not exist" << abort(FatalError); } correction[patchID] = true; }
Foam::XPP_DE::XPP_DE ( const word& name, const volVectorField& U, const surfaceScalarField& phi, const dictionary& dict ) : viscoelasticLaw(name, U, phi), S_ ( IOobject ( "S" + name, U.time().timeName(), U.mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), U.mesh() ), Lambda_ ( IOobject ( "Lambda" + name, U.time().timeName(), U.mesh(), IOobject::MUST_READ, IOobject::AUTO_WRITE ), U.mesh() ), tau_ ( IOobject ( "tau" + name, U.time().timeName(), U.mesh(), IOobject::NO_READ, IOobject::AUTO_WRITE ), U.mesh(), dimensionedSymmTensor ( "zero", dimensionSet(1, -1, -2, 0, 0, 0, 0), symmTensor::zero ) ), I_ ( dimensionedSymmTensor ( "I", dimensionSet(0, 0, 0, 0, 0, 0, 0), symmTensor ( 1, 0, 0, 1, 0, 1 ) ) ), rho_(dict.lookup("rho")), etaS_(dict.lookup("etaS")), etaP_(dict.lookup("etaP")), alpha_(dict.lookup("alpha")), lambdaOb_(dict.lookup("lambdaOb")), lambdaOs_(dict.lookup("lambdaOs")), q_(dict.lookup("q")) {}
dynamicLagrangian<BasicTurbulenceModel>::dynamicLagrangian ( const alphaField& alpha, const rhoField& rho, const volVectorField& U, const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName, const word& type ) : LESeddyViscosity<BasicTurbulenceModel> ( type, alpha, rho, U, alphaRhoPhi, phi, transport, propertiesName ), flm_ ( IOobject ( IOobject::groupName("flm", this->U_.group()), this->runTime_.timeName(), this->mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), this->mesh_ ), fmm_ ( IOobject ( IOobject::groupName("fmm", this->U_.group()), this->runTime_.timeName(), this->mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), this->mesh_ ), theta_ ( dimensioned<scalar>::lookupOrAddToDict ( "theta", this->coeffDict_, 1.5 ) ), simpleFilter_(U.mesh()), filterPtr_(LESfilter::New(U.mesh(), this->coeffDict())), filter_(filterPtr_()), flm0_("flm0", flm_.dimensions(), 0.0), fmm0_("fmm0", fmm_.dimensions(), VSMALL) { if (type == typeName) { this->printCoeffs(type); // Correct nut for single-phase solvers only. // For multiphase solvers the phase construction is not complete // at this point. if (isType<geometricOneField>(alpha)) { correctNut(); } } }
kEpsilonSources::kEpsilonSources ( const volVectorField& U, const surfaceScalarField& phi, transportModel& transport, const word& turbulenceModelName, const word& modelName ) : RASModel(modelName, U, phi, transport, turbulenceModelName), Cmu_ ( dimensioned<scalar>::lookupOrAddToDict ( "Cmu", coeffDict_, 0.09 ) ), C1_ ( dimensioned<scalar>::lookupOrAddToDict ( "C1", coeffDict_, 1.44 ) ), C2_ ( dimensioned<scalar>::lookupOrAddToDict ( "C2", coeffDict_, 1.92 ) ), sigmaEps_ ( dimensioned<scalar>::lookupOrAddToDict ( "sigmaEps", coeffDict_, 1.3 ) ), k_ ( IOobject ( "k", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::AUTO_WRITE ), autoCreateK("k", mesh_) ), epsilon_ ( IOobject ( "epsilon", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::AUTO_WRITE ), autoCreateEpsilon("epsilon", mesh_) ), nut_ ( IOobject ( "nut", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::AUTO_WRITE ), autoCreateNut("nut", mesh_) ), fvOptions(U.mesh()) { bound(k_, kMin_); bound(epsilon_, epsilonMin_); nut_ = Cmu_*sqr(k_)/epsilon_; nut_.correctBoundaryConditions(); printCoeffs(); }