|
[Sponsors] |
August 30, 2010, 05:19 |
|
#41 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
August 30, 2010, 14:33 |
|
#42 | |
New Member
Silvano
Join Date: Aug 2010
Location: Chicago /Torino Us/Italy
Posts: 11
Rep Power: 16 |
Quote:
thanks a lot! actually I need to access to the H[i] (enthalpy of each species )... is there another way to call them? Silvano |
||
August 30, 2010, 15:05 |
Sensible Enthalpy
|
#43 |
Senior Member
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 107
Rep Power: 17 |
Hi Everybody
I have the same problem, I want to have access to sensible enthalpy of mixture, and the chemical energy source term in Cantera. How can I do that?
__________________
SAHM |
|
September 1, 2010, 11:54 |
Questions about Cantera
|
#44 |
New Member
Olli
Join Date: Mar 2010
Location: Berlin
Posts: 13
Rep Power: 16 |
Hi everyone,
I'm researching in the field of swirl burners and have some experiences simulating combustion with CFX. Unfortunately I fell in love with OF. Due to the instructions I've installed the cantera-interface and now I ready to go. So here are my questions, which are probably easy to answer for you experts: 1. How is the coupling between OF and Cantera done. I mean is OF calculating the transport of each species and cantera calculates the reaction rates. Is this done via a source term? I just want to understand how the programs work. 2. Is the cantera thing able to simulate a premixed case (Methane/Air) 3. Is there an introduction on how to set an OF case with comubustion and cantera up? Something like a step-by-step. The provided tutorials are not commented. If someone can give me hint on the setup I would write it down for everyone. Regards, Olli |
|
September 4, 2010, 17:34 |
|
#45 | |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
Hello Sahm and Silvano,
sorry for letting you wait for so long. Here a possible solution to your problem: Quote:
Code:
gas.gas().getMassFractions(y1.begin()) Code:
rhomean = gas.gas().density() Code:
getEnthalpy_RT() See the Cantera Header files for more information (in CANTERA_INSTALLATION/include/cantera/kernel/). As long as you need the data only within that function and calculate the source terms there it won't be difficult. But if you want it in the hEqn of the solver the problems Bernhard mentioned will occur. I hope that helps. Regards, Markus. |
||
September 4, 2010, 17:46 |
|
#46 | |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
Hello Olli,
thanks for your interest in the code. I hope to be able to help a bit further. Quote:
2) It depends on the combustion model. Cantera is only used as database and to integrate the chemistry. For the combustion model you have to see if the available models fit. 3.) The solver is based on reactingFoam. So try to understand this one and then see what are the differences to the new one. Reactingfoam is for example explained here: http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2007/AndreasLundstrom/reactingFoam.pdf Additionally I recommend you to have a look at the Cantera tutorials and test cases. If there are more things you do not understand feel free to ask. Bye, Markus. |
||
September 8, 2010, 16:28 |
|
#47 | |
New Member
Silvano
Join Date: Aug 2010
Location: Chicago /Torino Us/Italy
Posts: 11
Rep Power: 16 |
Quote:
actually I would like modify the hEqn adding the the term: sum{div[h(i)*(muEff-alphaEff)]gradY(i)} that you get considering all Sc=1 in stead have unity Lewis Number. So for ReactingFoam I use the following hEqn: Code:
{ reactingMixture& multiMix = (reactingMixture&) thermo->composition(); PtrList<reactingMixture::reactionThermo> speciesData = multiMix.speciesData(); canteraLocalTimeChemistryModel::solve { energySource *= 0.0; surfaceScalarField alphaF = fvc::interpolate(turbulence->alphaEff() ); surfaceScalarField muF = fvc::interpolate( turbulence->muEff() ); volScalarField hY("hY",h); surfaceScalarField alphaH("alphaH", alphaF * fvc::interpolate( h) ); for (label i = 0; i < Y.size(); i++) { Info << "\tCalculating differential flux for species " << Y[i].name() << endl; reactingMixture::reactionThermo& spData = speciesData[i]; forAll(T, iCell) { hY[iCell] = spData.H(T[iCell] ); } forAll(T.boundaryField(), iPatch) { const fvPatchScalarField& T_patch = T.boundaryField()[iPatch]; fvPatchScalarField& hY_patch = hY.boundaryField()[iPatch]; forAll(T_patch, iFace) { hY_patch[iFace] = spData.H(T_patch[iFace] ); } } alphaH = fvc::interpolate(hY) * (muF - alphaF); energySource += fvc::laplacian( alphaH, Y[i] ); } } solve ( fvm::ddt(rho, h) + mvConvection->fvmDiv(phi, h) - fvm::laplacian(turbulence->alphaEff(), h) == DpDt + energySource ); thermo->correct(); } Code:
volScalarField energySource ( IOobject ( "energySource", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("zero", DpDt.dimensions(), 0.0) ); I would be very grateful if you could help me with this issue... Thanks, Silvano |
||
September 9, 2010, 05:12 |
|
#48 |
New Member
Olli
Join Date: Mar 2010
Location: Berlin
Posts: 13
Rep Power: 16 |
Hi Markus,
thank you for your answers. I will start with understanding reactingFoam and than continue to cantera. So be prepared for more questions;-) Thanks, Olli |
|
October 7, 2010, 14:53 |
|
#49 |
Senior Member
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 107
Rep Power: 17 |
Hi Markus and Bernhard
This was the last error I got when trying to install canterathermochemistry /usr/bin/ld: /usr/local/lib/libsundials_cvodes.a(cvodes.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libsundials_cvodes.a: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [/home/sahm/OpenFOAM/sahm-1.5-dev/lib/linux64GccDPOpt/libcanteraThermosChemistry.so] Error 1 As far as I know, installation of sundials was done with -fPIC, so I don't what to do with this final error. Should I run wmake with this key? Still there's a chance that I have defined the addresses wrong. I would really appreciate if any one could help me with this.
__________________
SAHM |
|
October 8, 2010, 05:35 |
|
#50 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
October 8, 2010, 12:19 |
|
#51 |
Senior Member
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 107
Rep Power: 17 |
Please double-check your sundials-compilation. I'm pretty sure that things are like ld reports them (that not everything was compiled with -fPIC). Especially check that ALL compilers that are used to compile it use that switch (one .o-file that is non-PICt taints the whole library)
Bernhard[/QUOTE] Thanks bernhard, but I have a question, I was trying to wmake the canterachemistrythermo, one by one, and I just removed the -l libraries inside the Make/options file, then tried to wmake it, and it compiled, I have no Idea what they were for, or what will happen next as I have not used it with any solver yet. Could you tell me what those libraries are for ? or where they're being used. SAHM.
__________________
SAHM |
|
October 11, 2010, 06:13 |
|
#52 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I was trying to wmake the canterachemistrythermo, one by one, and I just removed the -l libraries inside the Make/options file, then tried to wmake it, and it compiled, I have no Idea what they were for, or what will happen next as I have not used it with any solver yet. Could you tell me what those libraries are for ? or where they're being used. SAHM.[/QUOTE] Would have to look at the sources myself. Try running the solver. If the dynamic linker doesn't throw an error about missing references everything is fine Bernhard |
||
October 11, 2010, 19:40 |
|
#53 | |
Senior Member
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 107
Rep Power: 17 |
Quote:
Selecting thermodynamics package hMixtureThermo<canteraMixture> Unknown hCombustionThermo type hMixtureThermo<canteraMixture> Valid hCombustionThermo types are : 9 ( hMixtureThermo<multiComponentMixture<sutherlandTra nsport<specieThermo<janafThermo<perfectGas>>>>> hMixtureThermo<dieselMixture<sutherlandTransport<s pecieThermo<janafThermo<perfectGas>>>>> hMixtureThermo<veryInhomogeneousMixture<sutherland Transport<specieThermo<janafThermo<perfectGas>>>>> hMixtureThermo<inhomogeneousMixture<sutherlandTran sport<specieThermo<janafThermo<perfectGas>>>>> hMixtureThermo<homogeneousMixture<sutherlandTransp ort<specieThermo<janafThermo<perfectGas>>>>> hMixtureThermo<veryInhomogeneousMixture<constTrans port<specieThermo<hConstThermo<perfectGas>>>>> hMixtureThermo<inhomogeneousMixture<constTransport <specieThermo<hConstThermo<perfectGas>>>>> hMixtureThermo<homogeneousMixture<constTransport<s pecieThermo<hConstThermo<perfectGas>>>>> hMixtureThermo<reactingMixture> ) From function hCombustionThermo::New(const fvMesh&) in file hCombustionThermo/newhCombustionThermo.C at line 68. FOAM exiting. So, what should I do with those libraries. How can I make sure that I have installed them correctly and I have linked the canteraThermochemistry correctly. Thanks for your help.
__________________
SAHM |
||
October 12, 2010, 08:47 |
|
#54 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Make sure that a) you load the Cantera-library via libs in controlDict b) if you do: check whether there is a warning/error about not being able to load it further up in the log-file (it is usually a good idea to look for the first sign of trouble) If you do a) and b) gives no problem then hMixtureThermo<canteraMixture> should be part of that list (or you get no error at all) Bernhard |
||
October 12, 2010, 17:39 |
log files.
|
#55 | |
Senior Member
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 107
Rep Power: 17 |
Quote:
Apparently I have included the Cantera library in my control dict file, and I don't get any other error message. I have attached my log files. insta7 is the log file for installing cantera library, and log.txt is the error I get when I try to run alternateReactingFoam. Thanks for your time.
__________________
SAHM |
||
October 12, 2010, 22:08 |
new error
|
#56 |
Senior Member
Seyyed Ali H.M.
Join Date: Nov 2009
Location: Utah
Posts: 107
Rep Power: 17 |
Bernhard
Is this the error you were talking about?
__________________
SAHM |
|
October 13, 2010, 05:54 |
|
#57 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
You mean:
Code:
alternateReactingFoam: symbol lookup error: /home/sahm/OpenFOAM/sahm-1.5-dev/lib/linux64GccDPOpt/libcanteraThermosChemistry.so: undefined symbol: dgemv_ Bernhard |
|
October 14, 2010, 11:37 |
Cantera Installation (support pacakges)
|
#58 |
Member
N. A.
Join Date: May 2010
Posts: 64
Rep Power: 16 |
Hi foamers,
I am interested in using Cantera along with OpenFoam. I found information at wiki http://openfoamwiki.net/index.php/Co...teReactingFoam . The question I have is probably very basic. Can I install and download BLAS, LAPACK, numpy and gfortran in the third party directory, just as I download cantera and sundials in the third party. I am not very familiar with UNIX oeprations and hence asking this question. Will this package work with OpenFOAM1.6 version? Thanks, Nir |
|
October 14, 2010, 12:50 |
|
#59 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
||
October 14, 2010, 12:59 |
warning cantera /opt opt /opt/
|
#60 |
Senior Member
Join Date: Dec 2009
Posts: 112
Rep Power: 16 |
just an general advise:
do NOT install cantera in /opt/ !!!!!!!!!!!!!!!!! guess what...I did...just finished reinstalling the system.. it screws up your kernel !! |
|
|
|