|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Maximus Arelius
Join Date: Jan 2017
Location: Morocco
Posts: 36
Rep Power: 9 ![]() |
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; } 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; } 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🃏 |
|
![]() |
![]() |
![]() |
Tags |
cfd analysis, openfoam 3.0.1, programming |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFoam-1.6-ext Allwmake compilation error - one last barrier | Pat84 | OpenFOAM Installation | 15 | July 25, 2012 21:49 |
emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 09:14 |
error in COMSOL:'ERROR:6164 Duplicate Variable' | bhushas | COMSOL | 1 | May 30, 2008 04:35 |
Env variable not set | gruber2 | OpenFOAM Installation | 5 | December 30, 2005 04:27 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 20:09 |