CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Temperature is not calculated in modified CHTMultiregion

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   June 27, 2014, 04:28
Default Temperature is not calculated in modified CHTMultiregion
New Member
Join Date: May 2014
Posts: 23
Rep Power: 5
Gennaro is on a distinguished road
Dear all,

I'm working on a modified CHTMultiregion solver in which the energy equation of the fluid part (EEqn.H file) is replaced with:
    Info<< " ** Calculating CpEff           **\n";        
    CpEff = Cp*pow(T/Tlambda, 5.7);

    Info<< " ** Calculating gT              **\n";        
    gT = pow(rho, 2)*pow(Slambda, 4)*pow(Tlambda, 3)/Alambda; // Instead of Foam::pow

    Info<< " ** Calculating hK              **\n";        
    hK = 4*Sigma*pow(T, 3)*dimensionedScalar("Lref", dimensionSet(0,1,0,0,0), 1);        // Lref is just to have the dimensions of a thermal conductivity
    Info<< " ** Calculating fInv            **\n";
    fInv = gT*pow(pow(T/Tlambda, 5.7)*(1 - pow(T/Tlambda, 5.7)), 3);

    Info<< " ** Calculating magSqrGradT     **\n";        
    magSqrGradT = magSqr(fvc::grad(T)) + SMALL;

    Info<< " ** Calculating KEff            **\n";    
    KEff = pow(fInv/magSqrGradT, scalar(1)/scalar(3))/(rho*CpEff);

    Info<< " ** Solving EEqn                **\n";    
    fvScalarMatrix EEqn
        fvm::laplacian(KEff, T)

    Info<< " ** EEqn.relax()                **\n";    

    Info<< " ** fvOptions.constrain(EEqn)   **\n";    

    Info<< " ** EEqn.solve()                **\n";    

    Info<< " ** fvOptions.correct(T)        **\n";        

    Info<< " ** thermo.correct()            **\n";


    Info<< "Min/max T:" << min(thermo.T()).value() << ' '
        << max(thermo.T()).value() << endl;
The solver doesn't crash and the fluid interacts with the solid part.

Unfortunately, the temperature distribution is not calculated! T completely uniform all across the fluid part!

Can anyone help?

I'm happy to send the whole code plus a test case


Gennaro is offline   Reply With Quote

Old   September 25, 2014, 11:55
Peng Liang
Join Date: Mar 2014
Posts: 46
Rep Power: 5
tjliang is on a distinguished road
hello Gennaro,

have you solved your problem? I am also encountering the same problem as to implement temperature in chtmultiregionfoam. If you please, could you please show me how to add one or more temperature equations into chtmultiregionfoam? Thanks.

tjliang is offline   Reply With Quote

Old   December 18, 2014, 12:16
New Member
Join Date: May 2014
Posts: 23
Rep Power: 5
Gennaro is on a distinguished road
Hi Peng,

Yes, problem solved! I had to get rid of the code related to the thermophysical properties (they don't apply to helium) in order to have the T field properly written. If you need tips don't hesitate to ask.

Gennaro is offline   Reply With Quote


chtmultiregionsimplefoam, energy equation, temperature field

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 11 April 22, 2014 12:32
Is wall ajacent temperature equal to conservative temperature of the wall? shenying0710 CFX 8 January 4, 2013 05:03
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45
Inlet Temperature Fluctuation in CFX-5.7 LES Mode Halim Choi CFX 0 December 23, 2004 23:05

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