Пример #1
0
// Construct from components
GidaspowDrag::GidaspowDrag
(
    const dictionary& dict,
    cfdemCloud& sm
)
:
    forceModel(dict,sm),
    propsDict_(dict.subDict(typeName + "Props")),
    verbose_(false),
    velFieldName_(propsDict_.lookup("velFieldName")),
    U_(sm.mesh().lookupObject<volVectorField> (velFieldName_)),
    densityFieldName_(propsDict_.lookup("densityFieldName")),
    rho_(sm.mesh().lookupObject<volScalarField> (densityFieldName_)),
    voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
    voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)),
    phi_(readScalar(propsDict_.lookup("phi"))),
    interpolation_(false),
    scaleDia_(1.),
    scaleDrag_(1.)
{
    //Append the field names to be probed
    particleCloud_.probeM().initialize(typeName, "gidaspowDrag.logDat");
    particleCloud_.probeM().vectorFields_.append("dragForce"); //first entry must  be the force
    particleCloud_.probeM().vectorFields_.append("Urel");
    particleCloud_.probeM().scalarFields_.append("Rep");
    particleCloud_.probeM().scalarFields_.append("betaP");
    particleCloud_.probeM().scalarFields_.append("voidfraction");
    particleCloud_.probeM().writeHeader();

    if (propsDict_.found("verbose")) verbose_=true;
    if (propsDict_.found("treatExplicit")) treatExplicit_=true;
    if (propsDict_.found("interpolation")) interpolation_=true;
    if (propsDict_.found("implDEM"))
    {
        treatExplicit_=false;
        implDEM_=true;
        setImpDEMdrag();
        Info << "Using implicit DEM drag formulation." << endl;
    }
    particleCloud_.checkCG(true);
    if (propsDict_.found("scale"))
        scaleDia_=scalar(readScalar(propsDict_.lookup("scale")));
    if (propsDict_.found("scaleDrag"))
        scaleDrag_=scalar(readScalar(propsDict_.lookup("scaleDrag")));

    Info << "Gidaspow - interpolation switch: " << interpolation_ << endl;
    
    if(particleCloud_.dispersionM().isActive())
    {
        Info << "Turbulent dispersion enabled."<< endl;
    }
    
}
// Construct from components
KochHillDrag::KochHillDrag
(
    const dictionary& dict,
    cfdemCloud& sm
)
:
    forceModel(dict,sm),
    propsDict_(dict.subDict(typeName + "Props")),
    verbose_(false),
    velFieldName_(propsDict_.lookup("velFieldName")),
    U_(sm.mesh().lookupObject<volVectorField> (velFieldName_)),
    densityFieldName_(propsDict_.lookup("densityFieldName")),
    rho_(sm.mesh().lookupObject<volScalarField> (densityFieldName_)),
    voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
    voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)),
    interpolation_(false),
    scale_(1.)
{
    //Append the field names to be probed
    particleCloud_.probeM().initialize(typeName, "kochHillDrag.logDat");
    particleCloud_.probeM().vectorFields_.append("dragForce"); //first entry must the be the force
    particleCloud_.probeM().vectorFields_.append("Urel");        //other are debug
    particleCloud_.probeM().scalarFields_.append("Rep");          //other are debug
    particleCloud_.probeM().scalarFields_.append("beta");                 //other are debug
    particleCloud_.probeM().scalarFields_.append("voidfraction");       //other are debug
    particleCloud_.probeM().writeHeader();

    if (propsDict_.found("verbose")) verbose_=true;
    if (propsDict_.found("treatExplicit")) treatExplicit_=true;
    if (propsDict_.found("interpolation")) interpolation_=true;
    if (propsDict_.found("implDEM"))
    {
        treatExplicit_=false;
        implDEM_=true;
        setImpDEMdrag();
        Info << "Using implicit DEM drag formulation." << endl;
    }
    particleCloud_.checkCG(true);

    if (propsDict_.found("scale"))
        scale_=scalar(readScalar(propsDict_.lookup("scale")));
}
// Construct from components
BeetstraDrag::BeetstraDrag
(
    const dictionary& dict,
    cfdemCloud& sm
)
:
    forceModel(dict,sm),
    propsDict_(dict.subDict(typeName + "Props")),
    verbose_(false),
    velFieldName_(propsDict_.lookup("velFieldName")),
    U_(sm.mesh().lookupObject<volVectorField> (velFieldName_)),
    densityFieldName_(propsDict_.lookup("densityFieldName")),
    rho_(sm.mesh().lookupObject<volScalarField> (densityFieldName_)),
    voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
    voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)),
    gravityFieldName_(propsDict_.lookup("gravityFieldName")),
    #if defined(version21) || defined(version16ext)
        g_(sm.mesh().lookupObject<uniformDimensionedVectorField> (gravityFieldName_)),
    #elif defined(version15)
        g_(dimensionedVector(sm.mesh().lookupObject<IOdictionary>("environmentalProperties").lookup(gravityFieldName_)).value()),
    #endif
    dPrim_(1.0),
    rhoParticle_(0.0),
    interpolation_(false),
    scale_(1.),
    useFilteredDragModel_(false),
    useParcelSizeDependentFilteredDrag_(false),
    filtDragParamsK_(0.), 
    filtDragParamsALimit_(0.),
    filtDragParamsAExponent_(1.0),
    filtDragParamsLChar2_(0.0),
    basicCalculator_()
{
    if (propsDict_.found("verbose")) verbose_=true;
    basicCalculator_.verbose_=verbose_;
    if (propsDict_.found("treatExplicit")) treatExplicit_=true;
    if (propsDict_.found("interpolation")) interpolation_=true;
    if (propsDict_.found("implDEM"))
    {
        treatExplicit_=false;
        implDEM_=true;
        setImpDEMdrag();
        Info << "Using implicit DEM drag formulation." << endl;
    }
    if (propsDict_.found("useFilteredDragModel")) 
    {
        useFilteredDragModel_ = true;
        rhoParticle_= readScalar(propsDict_.lookup("rhoParticle"));
    }
    if (propsDict_.found("useParcelSizeDependentFilteredDrag")) 
    {
        useParcelSizeDependentFilteredDrag_=true;
        filtDragParamsK_ = readScalar(propsDict_.lookup("k")); 
        filtDragParamsALimit_ = readScalar(propsDict_.lookup("aLimit"));
        filtDragParamsAExponent_ = readScalar(propsDict_.lookup("aExponent"));
    }
         
    if(useParcelSizeDependentFilteredDrag_)   
    { 
        useFilteredDragModel_ = true;
        Info << "Beetstra drag model: forced the use of the filtered drag model\n";
    }
    particleCloud_.checkCG(true);

    //Set the reference length scale from particle information
    // get viscosity field
    #ifdef comp
        const volScalarField nufField = particleCloud_.turbulence().mu()/rho_;
    #else
        const volScalarField& nufField = particleCloud_.turbulence().nu();
    #endif
    scalar nuf(0);
    scalar rho(0);

    if (useFilteredDragModel_) 
    {
                //select viscosity and density
                //based on first value in the field
                nuf = nufField[0];
                rho = rho_[0];
                dPrim_ = readScalar(propsDict_.lookup("dPrim"));
                basicCalculator_.setupSettling
                (
                        dPrim_, 
                        rhoParticle_,
                        mag(g_).value(),
                        nuf*rho,
                        rho,
                        1 //drag law: 1...Beetstra
                );
                filtDragParamsLChar2_ = basicCalculator_.settling.Lchar2;
                {
                        Info << "dPrim_: " 
                             << dPrim_ << tab << "[m]" << endl;
                        Info << "Reference length for filtered drag computations: " 
                             << filtDragParamsLChar2_ << tab << "[m]" << endl;
                }
    }

    //Append the field names to be probed
    particleCloud_.probeM().initialize(typeName, "beetstraDrag.logDat");
    particleCloud_.probeM().vectorFields_.append("dragForce"); //first entry must the be the force
    particleCloud_.probeM().vectorFields_.append("Urel");        //other are debug
    particleCloud_.probeM().scalarFields_.append("Rep");          //other are debug
    particleCloud_.probeM().scalarFields_.append("beta");                 //other are debug
    particleCloud_.probeM().scalarFields_.append("voidfraction");       //other are debug
    particleCloud_.probeM().scalarFields_.append("filterDragPrefactor");          //other are debug
    particleCloud_.probeM().writeHeader();

}