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

temperature equation for one phase in multiphase solver

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 13, 2010, 05:06
Default temperature equation for one phase in multiphase solver
  #1
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Stockholm, Sweden
Posts: 359
Rep Power: 11
romant is on a distinguished road
Hej,

I have been working with the interPhaseChangeFoam solver for a while now, and have started writing a phase change model based on temperature. Right now the temperature is still given via the dictionary input.

I wanted to add the energy equation for the fluid phase to this solver. The governing equation is


which I tried implementing like this

Code:
{

//    const volScalarField rhoAlpha = cp * rho1 * alpha1; // for time derivative
    volScalarField rhoAlpha
    (
        "rhoAlpha",
        cp * rho1 * alpha1
    );


    surfaceScalarField phiAlpha
    (
        "phiAlpha",
        phi * rho1 * cp  * fvc::interpolate(alpha1) //check with rhoPhi from the alphaEqn.H file
//        rhoPhi * cp //* fvc::interpolate(alpha1)
    );

    volScalarField lambdaFAlpha
    (
        "lambdaFAlpha",
        lambdaF * alpha1
    );


    Pair<tmp<volScalarField> > mDotAlphal = twoPhaseProperties->mDotAlphal();
    const volScalarField mDotAlphac = mDotAlphal[0]();

    fvScalarMatrix TEqn
    (
          fvm::ddt(rhoAlpha,T)
        + fvm::div(phiAlpha, T)
        - fvm::laplacian(lambdaFAlpha, T)
       == mDotAlphac * ifg

    );


    TEqn.relax();
    TEqn.solve();

    Info << "Max(T): " << max(T).value() << " K "
    << "Min(T): " << min(T).value() << " K" << endl;

}
Unfortunately, I have had no success in actually using this within the solver, the results are completely bogus. One thing that is obvious is that there might be a problem with the alpha1 attachment to the equation.

My first thought was to maybe be able to extract the mesh that contains water alpha1>0, and impose boundary conditions onto the interface cells. Is there a way to do it, or does somebody else see what could be wrong with the implementation of this equation?
__________________
~roman
romant is offline   Reply With Quote

Reply

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
Transport Equation for temperature variance ameya OpenFOAM Running, Solving & CFD 0 December 5, 2008 02:16
how to active Temperature equation in FLUENT james FLUENT 5 July 18, 2006 02:01
how to active temperature equation james FLUENT 0 June 19, 2006 03:54
multiphase UDF, variables for phase velocities Kerem FLUENT 4 March 27, 2006 08:20
2 phase flow equation in 1D Nicolas Main CFD Forum 0 December 13, 2003 15:19


All times are GMT -4. The time now is 07:38.