|
[Sponsors] |
how to use current t, rho and species for calculations |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 28, 2010, 12:05 |
how to use current t, rho and species for calculations
|
#1 |
New Member
Join Date: May 2010
Location: Cologne
Posts: 27
Rep Power: 16 |
Hello Foamers,
i want to implement a new absorptionEmission Modell for P1-Modell in OpenFoam 1.5 similar to "greyMeanAbsorptionEmission" in openfoam 1.6. for this i want to calculate the partial pressure of a species with the equations (in words): moleweigth: mw = density *8314.5 * temperature / pressure partial pressure: p_CH4 = massfraction_CH4 (mw / mw_CH4 ) * pressure / 10^5 how can i get the values of T, p, rho and Yi to do this calculation? Thanks in advance Marc |
|
June 29, 2010, 07:03 |
|
#2 |
New Member
Join Date: May 2010
Location: Cologne
Posts: 27
Rep Power: 16 |
ok the partial pressure can simplified be calculated as
pi = Yi * p but which objects must be included and how is the correct definition of T, p and Yi ? do i need hMixtureThermo.H or basicThermo.H? Last edited by marcbest; June 29, 2010 at 07:57. |
|
July 2, 2010, 04:11 |
|
#3 |
New Member
Join Date: May 2010
Location: Cologne
Posts: 27
Rep Power: 16 |
i think i could help myself. in the .H-file i added for T and p
#include "basicThermo.H" and under private: const basicThermo& thermo_; for the .C-file i added to construstors thermo_(mesh.lookupObject<basicThermo>("thermophys icalProperties")) in the member functions, i allocated T and p const volScalarField& T = thermo_.T(); const volScalarField& p = thermo_.p(); as well as the following for species const volScalarField& CH4 = mesh.lookupObject<volScalarField>(CH4); ... for calculations of the partial pressure, forAll (..., celli) { ... p_ch4 = CH4[celli] * p[celli]/(1E+5); ... } (T was used for another calculation) if experienced programmers know a better way to do this calculation, please tell me |
|
September 16, 2010, 14:59 |
|
#4 |
New Member
Sina
Join Date: May 2010
Posts: 7
Rep Power: 16 |
Hi Marc,
I've encountered a problem which is similar to yours. Actually, the solver (alternateSteadyReactingFoam) I'm working on is only executable under OpenFOAM 1.5, and as you know this version of OpenFOAM is not equipped with the radiation sub-model "greyMeanAbsorptionEmission". I've tried several days to add this module to the available radiation sub-models, but it fails! I was wondering if you have any idea of attaching these sub-models to OpenFOAM 1.5. The other question is about the way you attached your model to the code. Thanks for your care. Cheers, Sina |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problems with Inlet species | San24 | Siemens | 1 | May 7, 2008 07:29 |
UDS Species calculation is DIFFERENT! | Davis | FLUENT | 0 | June 28, 2007 12:44 |