CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

dpdt-term in energy equation of buoyantPimpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By JensP
  • 1 Post By jherb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2014, 03:53
Default dpdt-term in energy equation of buoyantPimpleFoam
  #1
New Member
 
Jens Peterson
Join Date: Feb 2014
Posts: 4
Rep Power: 12
JensP is on a distinguished road
Hello all,

I am simulating a buoyancy-driven flowcase with large temperature gradients using the buoyantPimpleFoam solver in OF2.3. The fluid (water) is between 15C and 285C and its thermophysical properties are set using polynoms to have them vary with temperature:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       polynomial;
    thermo          hPolynomial;
    equationOfState icoPolynomial;
    specie          specie;
    energy          sensibleEnthalpy;
}
 
dpdt off;
 
// coefficients for water @ 70 bar
mixture
{
        specie
    {
        nMoles          1;
        molWeight       18; 
    equationOfState
    {
           rhoCoeffs<8>    (-652.130039068252 17.3072281049247 -0.0530706424954250 -4.46788703056841e-05 6.61015720039410e-07 -1.70342449898889e-09 1.94284389663358e-12 -8.64283583580195e-16);
    }
    thermodynamics
    {
        Hf              0; //heat of formation, input in J/kg
        Sf              0; //standard entropy J/kg/K
        //cp (J/kg) by definition not a function of pressure.
  CpCoeffs<8>     (-123868.395198191 2386.30977759511 -18.8516975602727 0.0819407624259010 -0.000211924050467349 3.26503697953756e-07 -2.77731495587309e-10 1.00765751262485e-13);
    }
    transport
    {
//dynamic viscosity kg/ms
       muCoeffs<8>     (0.907124928631493 -0.0143820511516075 9.76703409945348e-05 -3.67596758496769e-07 8.27176723626825e-10 -1.11210240552212e-12 8.26794094903911e-16 -2.62140652993808e-19);
//Thermal conductivity W/mK
  kappaCoeffs<8>  (44.3118446931015 -0.773151693822239 0.00570642822582130 -2.29415112216040e-05 5.45444040085740e-08 -7.69316563660768e-11 5.97198703640727e-14 -1.97170654681780e-17);
    }
}
I know 8 coefficients is a bit much, but let's ignore that for a moment.
Since the equationOfState is set as icoPolynomial, this means we will have no compressibility in the fluid, which is fine since it is water we're dealing with here. However, simulating this WITHOUT the flag "dpdt off;" as seen above, leads to divergence almost for all cases I've tried.
Simulating WITH the flag "dpdt off;" gives good results, and I'm happy with using that.

My question is: where does this dpdt term come from? If we take a look at the source code for solving the energy equation in the buoyantPimpleFoam solver:

Code:
{
    volScalarField& he = thermo.he();
    fvScalarMatrix EEqn
    (
        fvm::ddt(rho, he) + fvm::div(phi, he)
      + fvc::ddt(rho, K) + fvc::div(phi, K)
      + (
            he.name() == "e"
          ? fvc::div
            (
                fvc::absolute(phi/fvc::interpolate(rho), U),
                p,
                "div(phiv,p)"
            )
          : -dpdt
        )
      - fvm::laplacian(turbulence->alphaEff(), he)
     ==
        radiation->Sh(thermo)
      + fvOptions(rho, he)
    );
    EEqn.relax();
    fvOptions.constrain(EEqn);
    EEqn.solve();
    fvOptions.correct(he);
    thermo.correct();
    radiation->correct();
}
we find the dpdt term implemented in the energy equation. The problem is, I can't find the term in any theory books. Am I looking in the wrong places, or is this dpdt term a rewritten form of something else? What is actually happening when I set "dpdt off"? I just want to make sure I can do it in good confidence.

Any input on this matter, or the general apporoach of this problem, is appreciated.

// Jens
JensP is offline   Reply With Quote

Old   March 13, 2014, 09:39
Default
  #2
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
dpdt is a field defined in createFields.H of the solver.
Code:
    Info<< "Creating field dpdt\n" << endl;
    volScalarField dpdt
    (
        IOobject
        (
            "dpdt",
            runTime.timeName(),
            mesh
        ),
        mesh,
        dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
    );
In pEqn.H it is updated after the pressure equation is solved:
Code:
    if (thermo.dpdt())
    {
        dpdt = fvc::ddt(p);
    }
If dpdt is set to off (or false) then nothing is done here. Otherwise the (explicit) time derivative of p is saved in this field.
jherb is offline   Reply With Quote

Old   March 13, 2014, 10:55
Default
  #3
New Member
 
Jens Peterson
Join Date: Feb 2014
Posts: 4
Rep Power: 12
JensP is on a distinguished road
Thank you for your reply Joachim.

Yes, I understand how the dpdt term is implemented in the code, but I guess this question is more about how theory is implemented in OpenFOAM.

So to clarify, why does buoyantPimpleFoam have the dpdt term in the energy equation AT ALL? Again, I could be looking in the wrong places, but I simply can't find it in any books on fluid dynamics.
cdunn6754 likes this.
JensP is offline   Reply With Quote

Old   March 13, 2014, 11:24
Default
  #4
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
E.g. the derivation of the (total) enthalpy equation (equation 2.27) in Versteeg et Malalasekera, An Introduction to Computational Fluid Dynamics - The Finite Volume Method (2nd edition) or equation 1.86 in the Theory Manual of CFX.

Or here: http://www.cfd-online.com/Forums/ope...-enthalpy.html
musabai likes this.
jherb is offline   Reply With Quote

Old   March 14, 2014, 07:15
Default
  #5
New Member
 
Jens Peterson
Join Date: Feb 2014
Posts: 4
Rep Power: 12
JensP is on a distinguished road
Ah, thank you. Now i feel stupid, I was looking at the completely wrong equation. That is exactly what I needed to know, thanks!
JensP is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Energy equation for compressible flow majkl OpenFOAM Running, Solving & CFD 5 February 10, 2021 15:17
how to troduce a source term in ICOFOAM solver's equation sawyer86 OpenFOAM Running, Solving & CFD 0 July 20, 2012 11:15
Large source term in species equation MACFD FLUENT 4 January 4, 2011 14:16
Need help:about energy equation in CFX Stein CFX 4 July 2, 2009 22:31
k-e turbulence model and energy equation Blob Main CFD Forum 0 May 29, 2009 08:35


All times are GMT -4. The time now is 03:57.