From fef5d5c6281b0083fab80f704dbb525eb19701b9 Mon Sep 17 00:00:00 2001 From: henry Date: Fri, 6 Feb 2009 21:01:12 +0000 Subject: [PATCH] From Niklas Nordin: Limit the temperature to the boiling-point in parcel.C New urea properties. --- src/lagrangian/dieselSpray/parcel/parcel.C | 54 +++++++++++++++++++++++- src/thermophysicalModels/liquids/CH4N2O/CH4N2O.H | 12 ++---- 2 files changed, 55 insertions(+), 11 deletions(-) diff --git a/src/lagrangian/dieselSpray/parcel/parcel.C b/src/lagrangian/dieselSpray/parcel/parcel.C index 2805a83..1af2699 100644 --- a/src/lagrangian/dieselSpray/parcel/parcel.C +++ b/src/lagrangian/dieselSpray/parcel/parcel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -297,7 +297,7 @@ bool Foam::parcel::move(spray& sDB) ms() -= ms()*(oTotMass-m())/oTotMass; // remove parcel if it is 'small' - if (m() < 1.0e-20) + if (m() < 1.0e-12) { keepParcel = false; @@ -574,6 +574,56 @@ void Foam::parcel::updateParcelProperties // Prevent droplet temperature to go too low // Mainly a numerical stability issue Tnew = max(200.0, Tnew); + scalar Td = Tnew; + + scalar pAtSurface = fuels.pv(pg, Td, X()); + scalar pCompare = 0.999*pg; + scalar boiling = pAtSurface >= pCompare; + if (boiling) + { + // can not go above boiling temperature + scalar Terr = 1.0e-3; + label n=0; + scalar dT = 1.0; + scalar pOld = pAtSurface; + while (dT > Terr) + { + n++; + pAtSurface = fuels.pv(pg, Td, X()); + if ((pAtSurface < pCompare) && (pOld < pCompare)) + { + Td += dT; + } + else + { + if ((pAtSurface > pCompare) && (pOld > pCompare)) + { + Td -= dT; + } + else + { + dT *= 0.5; + if ((pAtSurface > pCompare) && (pOld < pCompare)) + { + Td -= dT; + } + else + { + Td += dT; + } + } + } + pOld = pAtSurface; + if (debug) + { + if (n>100) + { + Info << "n = " << n << ", T = " << Td << ", pv = " << pAtSurface << endl; + } + } + } + Tnew = Td; + } } // Evaporate droplet! diff --git a/src/thermophysicalModels/liquids/CH4N2O/CH4N2O.H b/src/thermophysicalModels/liquids/CH4N2O/CH4N2O.H index 25c336f..2b5b4f4 100644 --- a/src/thermophysicalModels/liquids/CH4N2O/CH4N2O.H +++ b/src/thermophysicalModels/liquids/CH4N2O/CH4N2O.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -90,16 +90,10 @@ public: : liquid(60.056, 705.0, 9.050e+6, 0.218, 0.337, 405.85, 9.3131e+1, 465.0, 1.52e-29, 0.3449, 4.7813e+4), rho_(1230.006936, 0, 0, 0, 0, 0), - pv_(12.06, -3992.0, 0, 0, 0), -// hl_(1463034.50113228, 0, 0, 0, 0, 0), -// NN. we cant use constant heat of vapourisation, the below value is linear (sqrt) interpolation to critical temp + pv_(3015.15611544, -185497.059684, -430.223621983, 0.00017405122622, 2.0), hl_(705.0, 2534249.0, 0.5, 0.0, 0.0, 0.0), cp_(2006.46063673904, 0, 0, 0, 0, 0), - // NN: enthalpy, h_, is not used in the sprayModel. - // For consistency, the enthalpy is derived from hlat and hl. - // It is, however, convenient to have it available. h_(-6154107.41641135, 2006.46063673904, 0, 0, 0, 0), - cpg_(811.875582789397, 2099.04089516451, 1627.3, 1603.63660583455, 724.41), B_(-0.000383641934194752, 0.447249234048222, -469062.208605302, 5.5628080458239e+18, -2.3040162514986e+21), mu_(-51.964, 3670.6, 5.7331, -5.3495e-29, 10), @@ -107,7 +101,7 @@ public: K_(-0.4267, 0.0056903, -8.0065e-06, 1.815e-09, 0, 0), Kg_(6.977e-05, 1.1243, 844.9, -148850), sigma_(705.0, 1.0, 0.0, 0.0, 0.0, 0), // set to constant - D_(147.18, 20.1, 60.056, 28) // NN: Same as nHeptane + D_(147.18, 20.1, 60.056, 28) // Same as nHeptane {} CH4N2O ( -- 2.11.4.GIT