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

Transient energy conservation

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 18, 2014, 12:36
Default Transient energy conservation
  #1
New Member
 
David Van Cauwenberge
Join Date: Feb 2012
Location: Ghent, Belgium
Posts: 19
Rep Power: 14
dvcauwe is on a distinguished road
Hello Foamers, I have been breaking my head over this for the past 2 days, so I would really appreciate it if I could get some feedback on this.

I'm simulating flow through a pipe using a modified version of rhoPimpleFoam with cyclic boundaries at the in- and outlet of my domain while the flow is heated with a constant temperature gradient imposed on the tube wall. The problem however is that when I impose a gradient that is twice as big, the rate at which my gas is heating is only slightly higher and takes a considerable amount of time (~1s) to reach the double value of my initial deltaT/time with half the gradient imposed.

I understand that it takes a while to develop a temperature profile but still energy should be conserved, right? Performing additional subiterations offers a slight improvement but still doesn't balance out the energy equation. I thought a good way to monitor the heat going into the volume would be this function:
Code:
const fvPatchField<scalar>& heatFluxPatchField = T.boundaryField()[patchI];

// Print patch total heat transfer rate
const tmp<volScalarField> tkappa = thermo.kappa();
const scalarField& kappa = tkappa().boundaryField()[patchI];

scalar patchHeatRate = gSum
(
	kappa * heatFluxPatchField.snGrad() *
	heatFluxPatchField.patch().magSf()
);
, which shows me the desired total heat input but unfortunately this energy is not actually absorbed by the gas.

The energy equation is standard I'd say:
Code:
    volScalarField& he = thermo.he();

    fvScalarMatrix EEqn
    (
        fvm::ddt(rho, he) + fvm::div(phi, he)
      + fvc::ddt(rho, K) + fvc::div(phi, K)
      - fvm::laplacian(turbulence->alphaEff(), he)
     ==
        fvOptions(rho, he)
    );
    EEqn.relax();
    fvOptions.constrain(EEqn);
    EEqn.solve();
    fvOptions.correct(he);
    thermo.correct();
My only remaining guess at this moment is that setting a constant gradient for temperature simply does not guarantee that amount of energy going into the fluid during this time interval but that would imply setting an energy flux for...h? Then I'm not entirely sure how to use this field again in my thermo calculations...

Anyway, thanks to anyone that might be able to shed some light on this!

Best regards,
David
dvcauwe is offline   Reply With Quote

 


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
Turbulent kinetic energy in transient flow chmurillor FLUENT 0 June 2, 2013 11:41
Energy conservation issue izumi11 FLUENT 0 May 10, 2010 01:05
how to prove energy conservation in Fluent Tony FLUENT 0 May 15, 2006 12:42
The energy conservation in a case of phase change robin Phoenics 2 April 6, 2002 00:09


All times are GMT -4. The time now is 09:21.