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

how to use current t, rho and species for calculations

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By marcbest

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2010, 12:05
Default how to use current t, rho and species for calculations
  #1
New Member
 
Join Date: May 2010
Location: Cologne
Posts: 27
Rep Power: 16
marcbest is on a distinguished road
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
marcbest is offline   Reply With Quote

Old   June 29, 2010, 07:03
Default
  #2
New Member
 
Join Date: May 2010
Location: Cologne
Posts: 27
Rep Power: 16
marcbest is on a distinguished road
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.
marcbest is offline   Reply With Quote

Old   July 2, 2010, 04:11
Default
  #3
New Member
 
Join Date: May 2010
Location: Cologne
Posts: 27
Rep Power: 16
marcbest is on a distinguished road
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
arvindpj likes this.
marcbest is offline   Reply With Quote

Old   September 16, 2010, 14:59
Default
  #4
New Member
 
Sina
Join Date: May 2010
Posts: 7
Rep Power: 16
shajitah is on a distinguished road
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
shajitah is offline   Reply With Quote

Reply


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
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


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