# how to use current t, rho and species for calculations

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 June 28, 2010, 11:05 how to use current t, rho and species for calculations #1 New Member   Join Date: May 2010 Location: Cologne Posts: 27 Rep Power: 8 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, 06:03 #2 New Member   Join Date: May 2010 Location: Cologne Posts: 27 Rep Power: 8 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 06:57.

 July 2, 2010, 03:11 #3 New Member   Join Date: May 2010 Location: Cologne Posts: 27 Rep Power: 8 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("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(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, 13:59 #4 New Member   Sina Join Date: May 2010 Posts: 7 Rep Power: 8 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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post San24 CD-adapco 1 May 7, 2008 06:29 Davis FLUENT 0 June 28, 2007 11:44

All times are GMT -4. The time now is 00:18.

 Contact Us - CFD Online - Top