CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Urea (CH4N2O) Surface Tension (and other liquidProperties) (https://www.cfd-online.com/Forums/openfoam-solving/140777-urea-ch4n2o-surface-tension-other-liquidproperties.html)

mturcios777 August 22, 2014 19:06

Urea (CH4N2O) Surface Tension (and other liquidProperties)
 
Has anyone had any success with the default implementation of urea (CH4N2O in the liquidProperties library). I am trying to inject a urea/water mix as a lagrangian spray and the ReitzDiwakar breakupmodel crashes with a floating point error when trying to update.

I have tracked it down with gdb to the calculation of the Weber number, and the passing 0 for the value of surface tension. If I turn the breakup model off, the simulation does not crash.

I also saw the note where a lot of the properties are taken from water. Surface tension is assumed to be constant, so I'm not sure why that would give me zero when mixed with water. I am using the stock sprayFoam solver. You can have a look at the case, which I've hosted at Dropbox: https://www.dropbox.com/s/1jemfe4s00...up.tar.gz?dl=0

mturcios777 August 26, 2014 12:07

Some further discussion. I think the problems comes from the calculation of surface tension sigma from the liquidMixtureProperties object:

Code:

Foam::scalar Foam::liquidMixtureProperties::sigma
(
    const scalar p,
    const scalar T,
    const scalarField& x
) const
{
    // sigma is based on surface mole fractions
    // which is estimated from Raoult's Law
    scalar sigma = 0.0;
    scalarField Xs(x.size(), 0.0);
    scalar XsSum = 0.0;
    forAll(properties_, i)
    {
        scalar Ti = min(TrMax*properties_[i].Tc(), T);
        scalar Pvs = properties_[i].pv(p, Ti);
        scalar xs = x[i]*Pvs/p;
        XsSum += xs;
        Xs[i] = xs;
    }

    forAll(properties_, i)
    {
        if (Xs[i] > SMALL)
        {
            scalar Ti = min(TrMax*properties_[i].Tc(), T);
            sigma += (Xs[i]/XsSum)*properties_[i].sigma(p, Ti);
        }
    }

    return sigma;
}

The surface mole fractions are calculated using Raoult's Law, and then the sigma is calculated by the mole weighted average. Contributions are only considered if Xs[i] is greater than SMALL. If all Xs[i] are < SMALL, then sigma will return 0. My question now is what could be causing this. Off the bat would be that the mole fractions themselves are already < SMALL (possibly due to super tiny particle size) and dividing by vapour pressure pushes them over the edge. Removing that if condition for sigma would keep 0 from being returned, but then the Weber number would be huge and cause problems elsewhere. Does anyone know more about sprays and has some experience with this type of error?

Thanks!


All times are GMT -4. The time now is 05:44.