
[Sponsors] 
March 13, 2014, 04:53 
dpdtterm in energy equation of buoyantPimpleFoam

#1 
New Member
Jens Peterson
Join Date: Feb 2014
Posts: 4
Rep Power: 5 
Hello all,
I am simulating a buoyancydriven 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.46788703056841e05 6.61015720039410e07 1.70342449898889e09 1.94284389663358e12 8.64283583580195e16); } 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.26503697953756e07 2.77731495587309e10 1.00765751262485e13); } transport { //dynamic viscosity kg/ms muCoeffs<8> (0.907124928631493 0.0143820511516075 9.76703409945348e05 3.67596758496769e07 8.27176723626825e10 1.11210240552212e12 8.26794094903911e16 2.62140652993808e19); //Thermal conductivity W/mK kappaCoeffs<8> (44.3118446931015 0.773151693822239 0.00570642822582130 2.29415112216040e05 5.45444040085740e08 7.69316563660768e11 5.97198703640727e14 1.97170654681780e17); } } 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(); } Any input on this matter, or the general apporoach of this problem, is appreciated. // Jens 

March 13, 2014, 10:39 

#2 
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 413
Rep Power: 12 
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) ); Code:
if (thermo.dpdt()) { dpdt = fvc::ddt(p); } 

March 13, 2014, 11:55 

#3 
New Member
Jens Peterson
Join Date: Feb 2014
Posts: 4
Rep Power: 5 
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. 

March 13, 2014, 12:24 

#4 
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 413
Rep Power: 12 
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.cfdonline.com/Forums/ope...enthalpy.html 

March 14, 2014, 08:15 

#5 
New Member
Jens Peterson
Join Date: Feb 2014
Posts: 4
Rep Power: 5 
Ah, thank you. Now i feel stupid, I was looking at the completely wrong equation. That is exactly what I needed to know, thanks!


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Energy equation for compressible flow  majkl  OpenFOAM Running, Solving & CFD  3  February 1, 2013 06:31 
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 15:16 
Need help:about energy equation in CFX  Stein  CFX  4  July 2, 2009 22:31 
ke turbulence model and energy equation  Blob  Main CFD Forum  0  May 29, 2009 08:35 