CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Parcel angular velocity and Magnus Force (https://www.cfd-online.com/Forums/openfoam/196665-parcel-angular-velocity-magnus-force.html)

cojua8 December 11, 2017 11:08

Parcel angular velocity and Magnus Force
 
Hello,

I am trying to create a new Magnus force for particles.

for this purpose I need to access the angular velocity in CollidingParcelI.H:


Code:

template<class ParcelType>
inline Foam::vector Foam::CollidingParcel<ParcelType>::omega() const
{
    return angularMomentum_/this->momentOfInertia();
}

And the code of the force is this:

Code:

template<class CloudType>
Foam::forceSuSp Foam::MagnusForce<CloudType>::calcCoupled
(
    const typename CloudType::parcelType& p,
    const scalar dt,
    const scalar mass,
    const scalar Re,
    const scalar muc
  const vector omega
) const
{
    forceSuSp value(Zero, 0.0);

    vector curlUc =
        curlUcInterp().interpolate(p.coordinates(), p.currentTetIndices());

    scalar Cl = this->Cl(p, curlUc, Re, muc);

    value.Su() =  Cl*0.75*mass*(omega^(p.U()-p.Uc()));
   
    Info << "Calculate Lift force" << endl;

    return value;
}

the compiler compiles the new force, but when running the solver there ir no "Calculate Lift Force" output, which means the solver doesn't get into the force code.

When I delete all the "omega's" the code works correctly (but obviously it doesnt work as needed), so I guess the omega call is not okay


All times are GMT -4. The time now is 07:12.