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

Temperature is not calculated in modified CHTMultiregion

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 27, 2014, 05:28
Default Temperature is not calculated in modified CHTMultiregion
  #1
New Member
 
Gennaro
Join Date: May 2014
Posts: 23
Rep Power: 12
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:
Code:
{    
    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";    
    EEqn.relax();

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

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

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

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

    rad.correct();

    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

Thanks

Gennaro
Gennaro is offline   Reply With Quote

Old   September 25, 2014, 12:55
Default
  #2
Member
 
Peng Liang
Join Date: Mar 2014
Posts: 60
Rep Power: 12
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.

Peng
tjliang is offline   Reply With Quote

Old   December 18, 2014, 12:16
Default
  #3
New Member
 
Gennaro
Join Date: May 2014
Posts: 23
Rep Power: 12
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
Gennaro is offline   Reply With Quote

Reply

Tags
chtmultiregionsimplefoam, energy equation, temperature field


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
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 08:15
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
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 16: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 13:52.