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

Variable Cp in twoPhaseMixtureThermo!

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2018, 00:36
Question Variable Cp in twoPhaseMixtureThermo!
  #1
Member
 
godfatherBond's Avatar
 
Maximus Arelius
Join Date: Jan 2017
Location: Morocco
Posts: 34
Rep Power: 9
godfatherBond is on a distinguished road
Hi FOAMers,
I was going through the source code for compressibleInterFoam , saw the twoPhaseMixtureThermo class used with it.
I looked at the source code of the energy equation
Code:
{
    fvScalarMatrix TEqn
    (
        fvm::ddt(rho, T)
      + fvm::div(rhoPhi, T)
      - fvm::laplacian(mixture.alphaEff(turbulence->mut()), T)
      + (
            fvc::div(fvc::absolute(phi, U), p)
          + fvc::ddt(rho, K) + fvc::div(rhoPhi, K)
        )
       *(
           alpha1/mixture.thermo1().Cv()
         + alpha2/mixture.thermo2().Cv()
        )
    );

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

    mixture.correct();

    Info<< "min(T) " << min(T).value() << endl;
}
Now, it seems that this particular solver has a constant Cp type energy equation(correct me if I'm wrong). But the tutorial of it has an option of variable Cp such as polynomial, janaf tables etc selectable at runtime.
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}
My question is:
If I choose the variable Cp option, the will the solver use Newton-Raphson to solve the non-linear form of equation formed using the polynomial expression for Cp as done in all other solvers such as rhoPimpleFoam(these use energy equation in form of enthalpy). As in the other compressible solvers, we solve an equation for enthalpy(or I.E.) and then we find temperature from the non-linear polynomial formed from
h = integral(cp * dT) solved for Temperature T.

Looking at the form of Energy equation it seems that a constant Cp form is used. Please enlighten me on this!
Thanks
__________________
--
🃏Maximus🃏
godfatherBond is offline   Reply With Quote

Reply

Tags
cfd analysis, openfoam 3.0.1, programming

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFoam-1.6-ext Allwmake compilation error - one last barrier Pat84 OpenFOAM Installation 15 July 25, 2012 22:49
emag beta feature: charge density charlotte CFX 4 March 22, 2011 10:14
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 05:35
Env variable not set gruber2 OpenFOAM Installation 5 December 30, 2005 05:27
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


All times are GMT -4. The time now is 01:04.